--- /dev/null
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+name: "CodeQL"
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [master]
+ schedule:
+ - cron: '0 6 * * 5'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ # Override automatic language detection by changing the below list
+ # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
+ language: ['cpp']
+ # Learn more...
+ # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ with:
+ # We must fetch at least the immediate parents so that if this is
+ # a pull request then we can checkout the head.
+ fetch-depth: 2
+
+ # If this run was triggered by a pull request event, then checkout
+ # the head of the pull request instead of the merge commit.
+ - run: git checkout HEAD^2
+ if: ${{ github.event_name == 'pull_request' }}
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
+
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
+
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
--- /dev/null
+.autotools
+.cproject
+.project
+.settings
+*.o
+*.Plo
+*.a
+*.so.*
+*.la
+*.lai
+*.lo
+*.Po
+*.pc
+*.so
+*.lib
+Thumbs.db
+*.obj
+*.pdb
+*.user
+*.aps
+*.pch
+*.vspscc
+*_i.c
+*_p.c
+*.ncb
+*.suo
+*.tlb
+*.tlh
+*.bak
+*.cache
+*.ilk
+*.log
+*.exe
+[Bb]in
+[Dd]ebug*/
+*.sbr
+obj/
+[Rr]elease*/
+_ReSharper*/
+[Tt]est[Rr]esult*
+.vs/
+#Nuget packages folder
+packages/
+/config.status
+/utils/common/.dirstamp
+/testbed/.libs/lt-testcms
+/testbed/.libs/testcms
+/testbed/testcms
+#Xcode
+libtool
+Build
+DerivedData
+.libs
+/utils/transicc/transicc
+/utils/tificc/tificc
+/utils/psicc/psicc
+/utils/linkicc/linkicc
+/utils/jpgicc/jpgicc
+*.tlog
+*.ipdb
+*.iobj
--- /dev/null
+language: c\r
+\r
+matrix:\r
+ include:\r
+# OSX standard test build\r
+# this is really a GCC frontend with an LLVM back-end\r
+ - os: osx\r
+ env:\r
+ - MATRIX_EVAL="CC=gcc && CXX=g++"\r
+\r
+# OSX and pure GCCs\r
+# https://docs.travis-ci.com/user/languages/c/#GCC-on-OS-X\r
+ - os: osx\r
+ osx_image: xcode8\r
+ env:\r
+ - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"\r
+\r
+# OSX and pure LLVMs - the version is controlled by the osx_image variable\r
+# images as per https://blog.travis-ci.com/2017-10-16-a-new-default-os-x-image-is-coming\r
+ - os: osx\r
+ osx_image: xcode6.4\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+\r
+ - os: osx\r
+ osx_image: xcode7.3\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+\r
+ - os: osx\r
+ osx_image: xcode8.3\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+\r
+ - os: osx\r
+ osx_image: xcode9\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+\r
+ - os: osx\r
+ osx_image: xcode9.1\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+ \r
+ - os: osx\r
+ osx_image: xcode9.4\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+ \r
+ - os: osx\r
+ osx_image: xcode10.1\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+ \r
+ - os: osx\r
+ osx_image: xcode11.3.1\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+ \r
+# Linux and GCCs\r
+ # gcc 4.8 at the time of writing\r
+ - os: linux\r
+ dist: trusty\r
+ env:\r
+ - MATRIX_EVAL="CC=gcc && CXX=g++"\r
+\r
+# for newer GCCs, add ubuntu-toolchain-r-test\r
+# https://docs.travis-ci.com/user/languages/c/\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - ubuntu-toolchain-r-test\r
+ packages:\r
+ - g++-4.9\r
+ env:\r
+ - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - ubuntu-toolchain-r-test\r
+ packages:\r
+ - g++-5\r
+ env:\r
+ - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - ubuntu-toolchain-r-test\r
+ packages:\r
+ - g++-6\r
+ env:\r
+ - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"\r
+\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - ubuntu-toolchain-r-test\r
+ packages:\r
+ - g++-7\r
+ env:\r
+ - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"\r
+\r
+# Linux and LLVMs\r
+# https://docs.travis-ci.com/user/languages/c/#Clang\r
+ - os: linux\r
+ dist: trusty\r
+ env:\r
+ - MATRIX_EVAL="CC=clang && CXX=clang"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - ubuntu-toolchain-r-test\r
+ - llvm-toolchain-precise-3.6\r
+ packages:\r
+ - clang-3.6\r
+ env:\r
+ - MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - ubuntu-toolchain-r-test\r
+ - llvm-toolchain-precise-3.7\r
+ packages:\r
+ - clang-3.7\r
+ env:\r
+ - MATRIX_EVAL="CC=clang-3.7 && CXX=clang++-3.7"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - ubuntu-toolchain-r-test\r
+ - llvm-toolchain-precise-3.8\r
+ packages:\r
+ - clang-3.8\r
+ env:\r
+ - MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - llvm-toolchain-trusty-3.9\r
+ packages:\r
+ - clang-3.9\r
+ env:\r
+ - MATRIX_EVAL="CC=clang-3.9 && CXX=clang++-3.9"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - llvm-toolchain-trusty-4.0\r
+ packages:\r
+ - clang-4.0\r
+ env:\r
+ - MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0"\r
+\r
+ - os: linux\r
+ dist: trusty\r
+ addons:\r
+ apt:\r
+ sources:\r
+ - llvm-toolchain-trusty-5.0\r
+ packages:\r
+ - clang-5.0\r
+ env:\r
+ - MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"\r
+\r
+\r
+before_install:\r
+ - eval "${MATRIX_EVAL}"\r
+\r
+script: ./configure && cat config.log && make && make check\r
Daniel Kaneider
Mateusz Jurczyk (Google)
Paul Miller
+Sébastien Léon
+Christian Schmitz
+XhmikosR
+Stanislav Brabec (SuSe)
+Leonhard Gruenschloss (Google)
+Patrick Noffke
+Christopher James Halse Rogers
+John Hein
+Thomas Weber (Debian)
+Mark Allen
+Noel Carboni
+Sergei Trofimovic
+Philipp Knechtges
Special Thanks
--------------
+Artifex software
+AlienSkin software
Jan Morovic
Jos Vernon (WebSupergoo)
Harald Schneider (Maxon)
Christian Albrecht
Dimitrios Anastassakis
Lemke Software
-Tim Zaman
\ No newline at end of file
+Tim Zaman
Little CMS
-Copyright (c) 1998-2011 Marti Maria Saguer
+Copyright (c) 1998-2020 Marti Maria Saguer
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-2.0 Major version bump
+
+-----------------------
+2.12 Maintenance release
-----------------------
+Added new build-in sigmoidal tone curve
+Added XCode 12 project
+Added support for multichannel input up to 15 channels
+Fix LUT8 write matrix
+Fix version mess on 10/11
+Fix tools & samples xgetopt
+Fix warnings on different function pointers
+Fix matlab MEX compilation
+plugin: cleanup and better SSE detection
+plugin: add lab to any on float
+plugin: it can now be compiled as C++
+recover PDF documentation, but try to keep it under a resonable size.
+Prevent a rare but possible out-of-bounds read in postscript generator
+Remove unused variables
-Fixed a bug on V2 CHAD construction, affects absolute colorimetric intent
-Fixed a bug that prevented linkicc to work
-Fixed a bug on transicc that made profiles with output colorants info to malfunction
-Fixed a bug on Lab + Alpha float formatters, added such predefined formatters as well
-Added cmsChangeBufferFormat for backwards compatibility
-Added UTILS_UNUSED_PARAMETER for samples
-Added a check on jpgicc for NULL transforms
-Fixed VC2010, VC2008 projects
-Added cmsTagLinkedTo
-Fixed some typos in error messages
-Peliminary Delphi wrapper
-Fixed a bug in tificc in floating point formats
-Fixed a bug in device link creation on v4 profiles
-Fixed a bug in psid and profile sequence tags
-Fixed memory leaks on when recovering from errors
-Fixed an issue on curve inversion
-Fixed several integer overflow and other integrity checks, thanks to Chris Evans
-linkicc now stores the rendering intent in the profile header
-Fixed delphi interface
-Added Duotone support (Bilinear interpolation)
-Fixed a bug on curve reversing when source curves have few points
-Added bound check in floating point interpolation
+-----------------------
+2.11 Maintenance release
+-----------------------
+Fixed __cpuid() on fast float plugin to allow gnu gcc
+Fixed copy alpha bounds check
+Fixed data race condition on contexts pool
+Fixed LUT16 write matrix on multichannel V2 profiles
-2.1 Maintenance release
-----------------------
+2.10 Featured release
+-----------------------
+Added a compilation toggle to remove "register" keyword in API.
+Previously commercial, fast_float plug-in is now released as open source under GPL3 license.
+MD5 functions are now accesible through plug-in API.
+Added support for Visual Studio 2019
+Bug fixing.
-Fixed severa bugs in absolute colorimetric intent
-Removed pthreads need
-Updated linkicc to 2.1, cleanup
-Fixed some potential issues as NULL dereferencing
-Fixed GBD bug (out of bounds memory overwrite)
-changed memmove to memcpy in cache for xput improvement
-Profiles with weird curves are not prone to p`relinearization optimization.
-Added functions to retrieve formatters from transforms
-Fixed a bug that made crash black preservation on CMYK2CMYK devicelinks
-Added named color functionality
-Fixed a bug in black preservation and sligtly non-monotonic curves
-Added dictionary metatag support
-Fixed a bug on ReadRAWtag
-Pascal unit now is supported by Free Pascal Compiler
+-----------------------
+2.9 Maintenance release
+-----------------------
+Several fixes related with security, and therefore not detailed here.
+C++ compiles now without warnings
+Added OSX and clang in travis
+Added a travis-ci test matrix for many compilers and OS. Thanks to Thomas Weber (debian) for this great improvement.
+testbed can now work with dynamic versions of library
+Fixed wrong planar formatters regarding linestride interpretation
-2.2 Maintenance release
+-----------------------
+2.8 Featured release
-----------------------
-Fixed a 0 byte allocation issue in _cmsCreateSubAllocChunk
-Fixed encoding for floating point tags in Lab/XYZ
-Fixed Absolute colorimetric intent issues
-Fixed a bug on the range of data in transicc, when colorant tag is specified
-Adding a memory alignment macro for CGATS parser
-Updated to ICC spec 4.3
-Added compatibilty with Argyll's CGATS parser
+Changed ChangeLog direction
+Fixed many typos in comments, thanks to Stefan Weil for doing that.
+Fixed localization bug, added a new test case crayons.icc thanks to Richard Hughes for providing the profile.
+Fixed a bug in optimizer that made some formats (i.e, bits planar) unavailable
+Fixed misalignment problems on Alpha. The compiler does not align strings, and accessing begin of string as a uint16 makes code to fail.
+Added some extra checks to the tools and examples.
+Fixed a bug that prevented to read luminance tag
+BIG amount of functionality contributed/Sponsored by Alien Skin Software: TransformStride, copyAlpha, performance plug-ins. Fixes some warnings as well.
+Added an extra _ to _stdcall to make it more portable
+Fixed a bug in transicc for named color profiles
+Fixed several compiler warnings
+Added support for Visual Studio 2015
+Fixed for XCODE project
-2.3 Maintenance release
+-----------------------
+2.7 Maintenance release
-----------------------
-Fixed a bug in the named color devicelink generation
-Fixed uint64 to work in systems without long long native type
-Added performance improvements from several contributors, mostly Artifex
-Fixed a bug in black preservation checking
-Added black point detection algorithm from Adobe paper
-Added support for transforms on planar data with different stride
-Added a new plug in entry for full transform
-Exposed internal overview table for tone curves
-gamma 1.0 can now operate in unbounded mode
-Fixed a bug in pipeline duplication
-Added getPipelineContextID
-Added a new plug-in type
-Internal stage structs are now accessible through plug-in API
-Fixed a bug on ending zero when saving a IT8 to memory
-Fixed a bug on IT8 reading of negative numbers.
-Increased security checks, thanks to Mateusz Jurczyk, from Google.
-Added half float support
-Fixed a typo on tificc and jpgicc names, thanks to Elle Stone for reporting.
-Fixed a bug on named color profiles.
-Added a conditional compilatio flag for "half" support
-Fixed a bug in transicc when clot tables are present
-Added formatter resolution after xform optimization plugin
-added half float variants (ABGR and so)
-Fixed a bug in XYZ floating point PCS
-Fixed an unitialized read on PatchLUT
-Added a check for maximum input channels
+Added a version retrieval function
+Added an option in transicc for working in bounded mode
+Fixed wrong handling of extra channels in some formatters.
+Added a project for VS2013
+Added license for iccjpeg.c
+New project for mac
+Added a global optimization that merges consecutive matrices in pipelines. Fixes loss of precision in some transforms
+Added a flag to clip negative values in unbounded transforms (only gray, rgb, cmyk)
+Move unused var suppresor before the `return` statements.
+Remove dead code.
+Add missing comma in CGATS parser
+utils/jpgicc/iccjpeg.c: Fix check if unsigned variable 'total_length'… …
+Some maintenance fixes
+Remove unused vcproj files
+Added a function to retrieve the iohandler of a given profile object
+Added a safety check on named color lists
+Fixed a macro clash on SNONE.
+Fixed a possible segmentation fault in a non-happy path
+
+-----------------------
+2.6 Featured release
+-----------------------
+
+Added pthread dependency. From now lcms supports multithreading
+Fix for delete tag memory corruption
+Added directories for tiff, jpeg in configure script
+New locking plug-in, from Artifex
+Big revamp on Contexts, from Artifex
+Fixed memory leaks on error handling
+Changed endianness detection for PowerPC
+Added a way to retrieve matrix shaper always, no matter LUT is present
+Fixed a bug in PCS/Colorspace order when reading V2 Lab devicelinks
+Fixed some indexing out of bounds in floating point interpolation
+Fixed a double free in recovering from a previous error in default intent handler.
+-----------------------
+2.5 Maintenance release
+-----------------------
+
+Added some checks for non-happy path, mostly failing mallocs
+Transform2Devicelink now keeps white point when guessing deviceclass is enabled
+Rendering intent used when creating the transform is now propagated to profile header in cmsTransform2Devicelink. This is because 7.2.15 in spec 4.3
+Added a simple project for cppcheck
+Added support for VS2012
+Remove spurious tabs added by git merge of pull request
+Fixed a bug in parametric curves
+Added some fixes from XhmikosR
+Added TIFF Lab16 handling on tifficc
+More changes from Artifex
+Added identity curves support for write V2 LUT
+Added a way to read the profile creator from header
+Added a reference for Mac MLU tag
+Fixed devicelink generation for 8 bits
+Several minor issues found by cppcheck
+Several improvements in cgats parser.
+Fixed some bugs on floating point curves.
+Fixed a bug on big endian platforms not supporting uint64 or long long.
+Added error descriptions on cmsSmoothToneCurve
+Added new cmsPlugInTHR() and fixed some race conditions (thanks to Artifex)
+update black point detection algorithm to reflect ICC changes
+Fixed some 64 bit warnings on size_t to uint32 conversions
+Fixed a multithead bug on optimization (StageDEF)
+RGB profiles using same tone curves for several channels are storing now only one copy of the curve (saves space)
+User defined parametric curves can now be saved in ICC profiles.
+
+--------------------
2.4 Featured release
--------------------
+
+Added a check for maximum input channels
+Fixed an uninitialized read on PatchLUT
+Fixed a bug in XYZ floating point PCS
+added half float variants (ABGR and so)
+Added formatter resolution after xform optimization plugin
+Fixed a bug in transicc when clot tables are present
+Added a conditional compilatio flag for "half" support
+Fixed a bug on named color profiles.
+Fixed a typo on tificc and jpgicc names, thanks to Elle Stone for reporting.
+Added half float support
+Increased security checks, thanks to Mateusz Jurczyk, from Google.
+Fixed a bug on IT8 reading of negative numbers.
+Fixed a bug on ending zero when saving a IT8 to memory
+Internal stage structs are now accessible through plug-in API
+Added a new plug-in type
+Added getPipelineContextID
+Fixed a bug in pipeline duplication
+gamma 1.0 can now operate in unbounded mode
+Exposed internal overview table for tone curves
+Added a new plug in entry for full transform
+Added support for transforms on planar data with different stride
+Added black point detection algorithm from Adobe paper
+Fixed a bug in black preservation checking
+Added performance improvements from several contributors, mostly Artifex
+Fixed uint64 to work in systems without long long native type
+Fixed a bug in the named color devicelink generation
+
+-----------------------
+2.3 Maintenance release
+-----------------------
+
+Added compatibility with Argyll's CGATS parser
+Updated to ICC spec 4.3
+Adding a memory alignment macro for CGATS parser
+Fixed a bug on the range of data in transicc, when colorant tag is specified
+Fixed Absolute colorimetric intent issues
+Fixed encoding for floating point tags in Lab/XYZ
+Fixed a 0 byte allocation issue in _cmsCreateSubAllocChunk
+
+-----------------------
+2.2 Maintenance release
+-----------------------
+
+Pascal unit now is supported by Free Pascal Compiler
+Fixed a bug on ReadRAWtag
+Added dictionary metatag support
+Fixed a bug in black preservation and slightly non-monotonic curves
+Added named color functionality
+Fixed a bug that made crash black preservation on CMYK2CMYK devicelinks
+Added functions to retrieve formatters from transforms
+Profiles with weird curves are not prone to p`relinearization optimization.
+changed memmove to memcpy in cache for xput improvement
+Fixed GBD bug (out of bounds memory overwrite)
+Fixed some potential issues as NULL dereferencing
+Updated linkicc to 2.1, cleanup
+Removed pthreads need
+Fixed severa bugs in absolute colorimetric intent
+
+-----------------------
+2.1 Maintenance release
+-----------------------
+
+Added bound check in floating point interpolation
+Fixed a bug on curve reversing when source curves have few points
+Added Duotone support (Bilinear interpolation)
+Fixed delphi interface
+linkicc now stores the rendering intent in the profile header
+Fixed several integer overflow and other integrity checks, thanks to Chris Evans
+Fixed an issue on curve inversion
+Fixed memory leaks on when recovering from errors
+Fixed a bug in psid and profile sequence tags
+Fixed a bug in device link creation on v4 profiles
+Fixed a bug in tificc in floating point formats
+Peliminary Delphi wrapper
+Fixed some typos in error messages
+Added cmsTagLinkedTo
+Fixed VC2010, VC2008 projects
+Added a check on jpgicc for NULL transforms
+Added UTILS_UNUSED_PARAMETER for samples
+Added cmsChangeBufferFormat for backwards compatibility
+Fixed a bug on Lab + Alpha float formatters, added such predefined formatters as well
+Fixed a bug on transicc that made profiles with output colorants info to malfunction
+Fixed a bug that prevented linkicc to work
+Fixed a bug on V2 CHAD construction, affects absolute colorimetric intent
+
+-----------------------
+2.0 Major version bump
+-----------------------
+
+
+
# Don't require all the GNU mandated files
AUTOMAKE_OPTIONS = 1.7.2 dist-zip foreign
+ACLOCAL_AMFLAGS = -I m4
+
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
+if COND_FASTFLOAT
+ USER_PLUGINS = plugins
+endif
+
# Directories containing Makefiles to 'make'
-SUBDIRS = src include utils/tificc utils/transicc utils/linkicc utils/jpgicc utils/psicc testbed
+SUBDIRS = src include utils/tificc utils/transicc utils/linkicc utils/jpgicc utils/psicc testbed $(USER_PLUGINS)
# Additional files to distribute
-EXTRA_DIST = AUTHORS COPYING ChangeLog doc Projects include bin Lib INSTALL NEWS README.1ST lcms2.pc.in
+EXTRA_DIST = AUTHORS COPYING ChangeLog doc Projects include bin Lib INSTALL README.1ST autogen.sh lcms2.pc.in plugins
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lcms2.pc
+
# Make sure get rid of VC stuff...
clean-local:
+ rm -rf autom4te.cache
find Projects -name "*.user" | xargs rm -rf
find Projects -name "Release" | xargs rm -rf
find Projects -name "Debug" | xargs rm -rf
find Projects -name "*.log" | xargs rm -rf
find Projects -name "*.sdf" | xargs rm -rf
find Projects -name "*.opensdf" | xargs rm -rf
- find Projects -name "*.log" | xargs rm -rf
find Projects -name "ipch" | xargs rm -rf
+
+
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
#
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/lcms2.pc.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- config.guess config.sub depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = lcms2.pc
CONFIG_CLEAN_VPATH_FILES =
+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 =
SOURCES =
DIST_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
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-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 \
+ tags-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
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
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 \
- distdir dist dist-all distcheck
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir distdir-am dist dist-all distcheck
+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
-DIST_SUBDIRS = $(SUBDIRS)
+CSCOPE = cscope
+DIST_SUBDIRS = src include utils/tificc utils/transicc utils/linkicc \
+ utils/jpgicc utils/psicc testbed plugins
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lcms2.pc.in AUTHORS \
+ COPYING ChangeLog INSTALL compile config.guess config.sub \
+ depcomp install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip
GZIP_ENV = --best
+DIST_TARGETS = dist-gzip dist-zip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
# Don't require all the GNU mandated files
AUTOMAKE_OPTIONS = 1.7.2 dist-zip foreign
+ACLOCAL_AMFLAGS = -I m4
+@COND_FASTFLOAT_TRUE@USER_PLUGINS = plugins
# Directories containing Makefiles to 'make'
-SUBDIRS = src include utils/tificc utils/transicc utils/linkicc utils/jpgicc utils/psicc testbed
+SUBDIRS = src include utils/tificc utils/transicc utils/linkicc utils/jpgicc utils/psicc testbed $(USER_PLUGINS)
# Additional files to distribute
-EXTRA_DIST = AUTHORS COPYING ChangeLog doc Projects include bin Lib INSTALL NEWS README.1ST lcms2.pc.in
+EXTRA_DIST = AUTHORS COPYING ChangeLog doc Projects include bin Lib INSTALL README.1ST autogen.sh lcms2.pc.in plugins
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lcms2.pc
all: all-recursive
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-rm -f libtool config.lt
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
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):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# 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.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ 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; \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(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; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && 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
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-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)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
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; \
$$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-recursive
+
+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
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-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || 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; \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
- $(am__remove_distdir)
-
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
- $(am__remove_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__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ @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
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
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.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
*.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 a+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 \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
uninstall-am: uninstall-pkgconfigDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) 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-generic \
- clean-libtool clean-local ctags ctags-recursive dist dist-all \
- dist-bzip2 dist-gzip dist-lzip dist-lzma 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-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-pkgconfigDATA
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool clean-local 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-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-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-am uninstall uninstall-am uninstall-pkgconfigDATA
+
+.PRECIOUS: Makefile
# Make sure get rid of VC stuff...
clean-local:
+ rm -rf autom4te.cache
find Projects -name "*.user" | xargs rm -rf
find Projects -name "Release" | xargs rm -rf
find Projects -name "Debug" | xargs rm -rf
find Projects -name "*.log" | xargs rm -rf
find Projects -name "*.sdf" | xargs rm -rf
find Projects -name "*.opensdf" | xargs rm -rf
- find Projects -name "*.log" | xargs rm -rf
find Projects -name "ipch" | xargs rm -rf
# Tell versions [3.59,3.63) of GNU make to not export all variables.
-**.suo
+# Visual Studio
+**.opensdf
**.sdf
-**.user
\ No newline at end of file
+**.suo
+**.user
+Debug/
+Release/
+# Xcode & macOS
+xcuserdata/
+.DS_Store
+._*
1 VERSIONINFO
-FILEVERSION 2, 4, 0, 0
-PRODUCTVERSION 2, 4, 0, 0
+FILEVERSION 2, 12, 0, 0
+PRODUCTVERSION 2, 12, 0, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
{
{
VALUE "CompanyName", "Marti Maria\000\000"
VALUE "FileDescription", "lcms color engine\000"
- VALUE "FileVersion", "2.04\000\000"
+ VALUE "FileVersion", "2.12\000\000"
VALUE "InternalName", "lcms2\000"
- VALUE "LegalCopyright", "Copyright © Marti Maria 2012\000\000"
+ VALUE "LegalCopyright", "Copyright � Marti Maria 2021\000\000"
VALUE "OriginalFilename", "lcms2.dll\000"
}
/x/aa/c/Tpd C0D32.OBJ+
+cmsalpha.obj+
cmscam02.obj+
cmscgats.obj+
cmscnvrt.obj+
..\..\src\cmswtpnt.c
..\..\src\cmsxform.c
..\..\src\cmshalf.c
+..\..\src\cmsalpha.c
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="jpgicc"
- ProjectGUID="{62812507-F926-4968-96A9-17678460AD90}"
- RootNamespace="jpgicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libjpeg.lib"
- OutputFile="../../../bin/jpgicciccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libjpeg.lib"
- OutputFile="../../../bin/jpgicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\jpgicc\iccjpeg.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\jpgicc\jpgicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="lcms2_DLL"\r
- ProjectGUID="{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}"\r
- RootNamespace="lcms2_DLL"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="196613"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="2"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="../../../include"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="3"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="3"\r
- DebugInformationFormat="4"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- OutputFile="../../../bin/lcms2d.dll"\r
- LinkIncremental="2"\r
- ModuleDefinitionFile="..\..\..\src\lcms2.def"\r
- GenerateDebugInformation="true"\r
- SubSystem="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="2"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- EnableIntrinsicFunctions="true"\r
- FavorSizeOrSpeed="1"\r
- OmitFramePointers="true"\r
- EnableFiberSafeOptimizations="true"\r
- WholeProgramOptimization="true"\r
- AdditionalIncludeDirectories="../../../include"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS"\r
- RuntimeLibrary="2"\r
- EnableFunctionLevelLinking="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="4"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- OutputFile="../../../bin/lcms2.dll"\r
- LinkIncremental="1"\r
- ModuleDefinitionFile="..\..\..\src\lcms2.def"\r
- GenerateDebugInformation="true"\r
- SubSystem="2"\r
- OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath="..\..\..\src\cmscam02.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmscgats.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmscnvrt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmserr.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsgamma.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsgmt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmshalf.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsintrp.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsio0.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsio1.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmslut.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsmd5.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsmtrx.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsnamed.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsopt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmspack.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmspcs.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsplugin.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsps2.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmssamp.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmssm.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmstypes.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsvirt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmswtpnt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsxform.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\lcms2.def"\r
- >\r
- <FileConfiguration\r
- Name="Release|Win32"\r
- >\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- </FileConfiguration>\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\lcms2_internal.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath="..\..\..\include\lcms2.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\include\lcms2_plugin.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- <File\r
- RelativePath="..\lcms2.rc"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\resource.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="lcms2_static"\r
- ProjectGUID="{71DEDE59-3F1E-486B-A899-4283000F76B5}"\r
- RootNamespace="lcms2_static"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="196613"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- AdditionalIncludeDirectories="../../../include"\r
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"\r
- MinimalRebuild="true"\r
- BasicRuntimeChecks="3"\r
- RuntimeLibrary="1"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="4"\r
- DebugInformationFormat="4"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- EnableIntrinsicFunctions="true"\r
- AdditionalIncludeDirectories="../../../include"\r
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"\r
- RuntimeLibrary="0"\r
- EnableFunctionLevelLinking="true"\r
- UsePrecompiledHeader="0"\r
- WarningLevel="4"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="Source Files"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath="..\..\..\src\cmscam02.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmscgats.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmscnvrt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmserr.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsgamma.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsgmt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmshalf.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsintrp.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsio0.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsio1.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmslut.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsmd5.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsmtrx.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsnamed.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsopt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmspack.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmspcs.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsplugin.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsps2.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmssamp.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmssm.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmstypes.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsvirt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmswtpnt.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\cmsxform.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\src\lcms2_internal.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Header Files"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath="..\..\..\include\lcms2.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\..\include\lcms2_plugin.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="linkicc"
- ProjectGUID="{FBFBE1DC-DB84-4BA1-9552-B4780F457849}"
- RootNamespace="linkicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/linkiccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/linkicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\linkicc\linkicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="psicc"
- ProjectGUID="{EF6A8851-65FE-46F5-B9EF-14F0B671F693}"
- RootNamespace="psicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/psiccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/psicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\psicc\psicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="testbed"
- ProjectGUID="{928A3A2B-46EF-4279-959C-513B3652FF0E}"
- RootNamespace="testbed"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../src"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- Profile="false"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- OmitFramePointers="true"
- EnableFiberSafeOptimizations="true"
- AdditionalIncludeDirectories="../../../include;../../../src"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CallingConvention="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- Profile="false"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\testbed\testcms2.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="tifdiff"
- ProjectGUID="{75B91835-CCD7-48BE-A606-A9C997D5DBEE}"
- RootNamespace="tifdiff"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tifdiffd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tifdiff.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\tificc\tifdiff.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="tificc"
- ProjectGUID="{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}"
- RootNamespace="tificc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tificcd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tificc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\tificc\tificc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\utils\common\utils.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="transicc"
- ProjectGUID="{9EE22D66-C849-474C-9ED5-C3E141DAB160}"
- RootNamespace="transicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/transiccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/transicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\transicc\transicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\utils\common\utils.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="jpegicc"
- ProjectGUID="{62812507-F926-4968-96A9-17678460AD90}"
- RootNamespace="jpegicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libjpeg.lib"
- OutputFile="../../../bin/jpegicciccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libjpeg.lib"
- OutputFile="../../../bin/jpegicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\jpegicc\iccjpeg.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\jpegicc\jpegicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="lcms2_DLL"
- ProjectGUID="{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}"
- RootNamespace="lcms2_DLL"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/lcms2d.dll"
- LinkIncremental="2"
- ModuleDefinitionFile="..\..\..\src\lcms2.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- OmitFramePointers="true"
- EnableFiberSafeOptimizations="true"
- WholeProgramOptimization="true"
- AdditionalIncludeDirectories="../../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/lcms2.dll"
- LinkIncremental="1"
- ModuleDefinitionFile="..\..\..\src\lcms2.def"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\src\cmscam02.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmscgats.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmscnvrt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmserr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsgamma.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsgmt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsintrp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsio0.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsio1.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmslut.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsmd5.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsmtrx.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsnamed.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsopt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmspack.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmspcs.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsplugin.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsps2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmssamp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmssm.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmstypes.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsvirt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmswtpnt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsxform.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\lcms2.def"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\..\src\lcms2_internal.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\include\lcms2.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\lcms2_plugin.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath="..\lcms2.rc"
- >
- </File>
- <File
- RelativePath="..\resource.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="lcms2_static"
- ProjectGUID="{71DEDE59-3F1E-486B-A899-4283000F76B5}"
- RootNamespace="lcms2_static"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="4"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="4"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\src\cmscam02.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmscgats.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmscnvrt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmserr.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsgamma.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsgmt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsintrp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsio0.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsio1.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmslut.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsmd5.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsmtrx.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsnamed.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsopt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmspack.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmspcs.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsplugin.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsps2.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmssamp.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmssm.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmstypes.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsvirt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmswtpnt.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\cmsxform.c"
- >
- </File>
- <File
- RelativePath="..\..\..\src\lcms2_internal.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\include\lcms2.h"
- >
- </File>
- <File
- RelativePath="..\..\..\include\lcms2_plugin.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="linkicc"
- ProjectGUID="{FBFBE1DC-DB84-4BA1-9552-B4780F457849}"
- RootNamespace="linkicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/linkiccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/linkicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\linkicc\linkicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="psicc"
- ProjectGUID="{EF6A8851-65FE-46F5-B9EF-14F0B671F693}"
- RootNamespace="psicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/psiccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/psicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\psicc\psicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="testbed"
- ProjectGUID="{928A3A2B-46EF-4279-959C-513B3652FF0E}"
- RootNamespace="testbed"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../src"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- Profile="false"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- FavorSizeOrSpeed="1"
- OmitFramePointers="true"
- EnableFiberSafeOptimizations="true"
- AdditionalIncludeDirectories="../../../include;../../../src"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- BufferSecurityCheck="false"
- EnableFunctionLevelLinking="true"
- EnableEnhancedInstructionSet="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CallingConvention="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- Profile="false"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\testbed\testcms2.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="tiffdiff"
- ProjectGUID="{75B91835-CCD7-48BE-A606-A9C997D5DBEE}"
- RootNamespace="tiffdiff"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tiffdiffd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tiffdiff.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\tifficc\tiffdiff.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="tifficc"
- ProjectGUID="{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}"
- RootNamespace="tifficc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tifficcd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libtiff.lib"
- OutputFile="../../../bin/tifficc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\tifficc\tifficc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\utils\common\utils.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="transicc"
- ProjectGUID="{9EE22D66-C849-474C-9ED5-C3E141DAB160}"
- RootNamespace="transicc"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/transiccd.exe"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../../../include;../../../utils/common"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="../../../bin/transicc.exe"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\..\utils\transicc\transicc.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\vprf.c"
- >
- </File>
- <File
- RelativePath="..\..\..\utils\common\xgetopt.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\..\utils\common\utils.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{62812507-F926-4968-96A9-17678460AD90}</ProjectGuid>\r
- <RootNamespace>jpegicc</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);;C:\jpeg-8b</IncludePath>\r
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);;C:\jpeg-8b</LibraryPath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);;C:\jpeg-8b</IncludePath>\r
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);;C:\jpeg-8b</LibraryPath>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\utils\common\vprf.c" />\r
- <ClCompile Include="..\..\..\utils\common\xgetopt.c" />\r
- <ClCompile Include="..\..\..\utils\jpgicc\iccjpeg.c" />\r
- <ClCompile Include="..\..\..\utils\jpgicc\jpgicc.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">\r
- <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{62812507-F926-4968-96A9-17678460AD90}</ProjectGuid>
+ <RootNamespace>jpegicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\jpgicc\iccjpeg.c" />
+ <ClCompile Include="..\..\..\utils\jpgicc\jpgicc.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Spanish (Modern) resources
+// Spanish (Spain, International Sort) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN)
-#ifdef _WIN32
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN
#pragma code_page(1252)
-#endif //_WIN32
-#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
1 VERSIONINFO
- FILEVERSION 2,3,0,0
- PRODUCTVERSION 2,3,0,0
+ FILEVERSION 2,12,0,0
+ PRODUCTVERSION 2,12,0,0
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
BLOCK "040904e4"
BEGIN
- VALUE "Comments", "\0"
- VALUE "CompanyName", "Marti Maria\0"
- VALUE "FileDescription", "lcms color engine\0"
- VALUE "FileVersion", "2.3\0"
- VALUE "InternalName", "lcms\0"
- VALUE "LegalCopyright", "Copyright © Marti Maria 2011\0"
- VALUE "LegalTrademarks", "\0"
- VALUE "OriginalFilename", "lcms2.dll\0"
- VALUE "PrivateBuild", "\0"
- VALUE "ProductName", "LittleCMS color engine\0"
- VALUE "ProductVersion", "2, 0, 3, 0\0"
- VALUE "SpecialBuild", "\0"
+ VALUE "CompanyName", "Marti Maria"
+ VALUE "FileDescription", "lcms color engine"
+ VALUE "FileVersion", "2.12.0.0"
+ VALUE "InternalName", "lcms"
+ VALUE "LegalCopyright", "Copyright � Marti Maria 2021"
+ VALUE "OriginalFilename", "lcms2.dll"
+ VALUE "ProductName", "LittleCMS color engine"
+ VALUE "ProductVersion", "2.12.0.0"
END
END
BLOCK "VarFileInfo"
END
END
-#endif // !_MAC
-
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// TEXTINCLUDE
//
-1 TEXTINCLUDE DISCARDABLE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE DISCARDABLE
+2 TEXTINCLUDE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"\0"
END
-3 TEXTINCLUDE DISCARDABLE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
#endif // APSTUDIO_INVOKED
-#endif // Spanish (Modern) resources
+#endif // Spanish (Spain, International Sort) resources
/////////////////////////////////////////////////////////////////////////////
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid>\r
- <RootNamespace>lcms2_DLL</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <OutputFile>../../../bin/lcms2d.dll</OutputFile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OutputFile>../../../bin/lcms2d.dll</OutputFile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <StringPooling>true</StringPooling>\r
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <StringPooling>true</StringPooling>\r
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\src\cmscam02.c" />\r
- <ClCompile Include="..\..\..\src\cmscgats.c" />\r
- <ClCompile Include="..\..\..\src\cmscnvrt.c" />\r
- <ClCompile Include="..\..\..\src\cmserr.c" />\r
- <ClCompile Include="..\..\..\src\cmsgamma.c" />\r
- <ClCompile Include="..\..\..\src\cmsgmt.c" />\r
- <ClCompile Include="..\..\..\src\cmshalf.c" />\r
- <ClCompile Include="..\..\..\src\cmsintrp.c" />\r
- <ClCompile Include="..\..\..\src\cmsio0.c" />\r
- <ClCompile Include="..\..\..\src\cmsio1.c" />\r
- <ClCompile Include="..\..\..\src\cmslut.c" />\r
- <ClCompile Include="..\..\..\src\cmsmd5.c" />\r
- <ClCompile Include="..\..\..\src\cmsmtrx.c" />\r
- <ClCompile Include="..\..\..\src\cmsnamed.c" />\r
- <ClCompile Include="..\..\..\src\cmsopt.c" />\r
- <ClCompile Include="..\..\..\src\cmspack.c" />\r
- <ClCompile Include="..\..\..\src\cmspcs.c" />\r
- <ClCompile Include="..\..\..\src\cmsplugin.c" />\r
- <ClCompile Include="..\..\..\src\cmsps2.c" />\r
- <ClCompile Include="..\..\..\src\cmssamp.c" />\r
- <ClCompile Include="..\..\..\src\cmssm.c" />\r
- <ClCompile Include="..\..\..\src\cmstypes.c" />\r
- <ClCompile Include="..\..\..\src\cmsvirt.c" />\r
- <ClCompile Include="..\..\..\src\cmswtpnt.c" />\r
- <ClCompile Include="..\..\..\src\cmsxform.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <CustomBuild Include="..\..\..\src\lcms2.def" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\src\lcms2_internal.h" />\r
- <ClInclude Include="..\..\..\include\lcms2.h" />\r
- <ClInclude Include="..\..\..\include\lcms2_plugin.h" />\r
- <ClInclude Include="..\resource.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ResourceCompile Include="..\lcms2.rc" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid>
+ <RootNamespace>lcms2_DLL</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <StringPooling>true</StringPooling>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <StringPooling>true</StringPooling>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmsalpha.c" />
+ <ClCompile Include="..\..\..\src\cmscam02.c" />
+ <ClCompile Include="..\..\..\src\cmscgats.c" />
+ <ClCompile Include="..\..\..\src\cmscnvrt.c" />
+ <ClCompile Include="..\..\..\src\cmserr.c" />
+ <ClCompile Include="..\..\..\src\cmsgamma.c" />
+ <ClCompile Include="..\..\..\src\cmsgmt.c" />
+ <ClCompile Include="..\..\..\src\cmshalf.c" />
+ <ClCompile Include="..\..\..\src\cmsintrp.c" />
+ <ClCompile Include="..\..\..\src\cmsio0.c" />
+ <ClCompile Include="..\..\..\src\cmsio1.c" />
+ <ClCompile Include="..\..\..\src\cmslut.c" />
+ <ClCompile Include="..\..\..\src\cmsmd5.c" />
+ <ClCompile Include="..\..\..\src\cmsmtrx.c" />
+ <ClCompile Include="..\..\..\src\cmsnamed.c" />
+ <ClCompile Include="..\..\..\src\cmsopt.c" />
+ <ClCompile Include="..\..\..\src\cmspack.c" />
+ <ClCompile Include="..\..\..\src\cmspcs.c" />
+ <ClCompile Include="..\..\..\src\cmsplugin.c" />
+ <ClCompile Include="..\..\..\src\cmsps2.c" />
+ <ClCompile Include="..\..\..\src\cmssamp.c" />
+ <ClCompile Include="..\..\..\src\cmssm.c" />
+ <ClCompile Include="..\..\..\src\cmstypes.c" />
+ <ClCompile Include="..\..\..\src\cmsvirt.c" />
+ <ClCompile Include="..\..\..\src\cmswtpnt.c" />
+ <ClCompile Include="..\..\..\src\cmsxform.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\src\lcms2.def">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h" />
+ <ClInclude Include="..\..\..\include\lcms2.h" />
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h" />
+ <ClInclude Include="..\resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\lcms2.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="Header Files">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="Resource Files">\r
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>\r
- </Filter>\r
- <Filter Include="Source Files">\r
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\src\cmscam02.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmscgats.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmscnvrt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmserr.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsgamma.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsgmt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsintrp.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsio0.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsio1.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmslut.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsmd5.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsmtrx.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsnamed.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsopt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmspack.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmspcs.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsplugin.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsps2.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmssamp.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmssm.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmstypes.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsvirt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmswtpnt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsxform.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmshalf.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\include\lcms2.h">\r
- <Filter>Header Files</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\include\lcms2_plugin.h">\r
- <Filter>Header Files</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\src\lcms2_internal.h">\r
- <Filter>Source Files</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\resource.h">\r
- <Filter>Resource Files</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ResourceCompile Include="..\lcms2.rc">\r
- <Filter>Resource Files</Filter>\r
- </ResourceCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <CustomBuild Include="..\..\..\src\lcms2.def">\r
- <Filter>Source Files</Filter>\r
- </CustomBuild>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmscam02.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscgats.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscnvrt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmserr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgamma.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgmt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsintrp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio0.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio1.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmslut.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmd5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmtrx.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsnamed.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspack.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspcs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsps2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssamp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssm.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmstypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsvirt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmswtpnt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsxform.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmshalf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsalpha.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\lcms2.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h">
+ <Filter>Source Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\resource.h">
+ <Filter>Resource Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\lcms2.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\src\lcms2.def">
+ <Filter>Source Files</Filter>
+ </CustomBuild>
+ </ItemGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid>
+ <RootNamespace>lcms2_static</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\Lib\MS\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\Lib\MS\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Lib\MS\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\Lib\MS\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <ExceptionHandling>false</ExceptionHandling>
+ <StringPooling>true</StringPooling>
+ <FloatingPointModel>Precise</FloatingPointModel>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <ExceptionHandling>false</ExceptionHandling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
+ <StringPooling>true</StringPooling>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmsalpha.c" />
+ <ClCompile Include="..\..\..\src\cmscam02.c" />
+ <ClCompile Include="..\..\..\src\cmscgats.c" />
+ <ClCompile Include="..\..\..\src\cmscnvrt.c" />
+ <ClCompile Include="..\..\..\src\cmserr.c" />
+ <ClCompile Include="..\..\..\src\cmsgamma.c" />
+ <ClCompile Include="..\..\..\src\cmsgmt.c" />
+ <ClCompile Include="..\..\..\src\cmshalf.c" />
+ <ClCompile Include="..\..\..\src\cmsintrp.c" />
+ <ClCompile Include="..\..\..\src\cmsio0.c" />
+ <ClCompile Include="..\..\..\src\cmsio1.c" />
+ <ClCompile Include="..\..\..\src\cmslut.c" />
+ <ClCompile Include="..\..\..\src\cmsmd5.c" />
+ <ClCompile Include="..\..\..\src\cmsmtrx.c" />
+ <ClCompile Include="..\..\..\src\cmsnamed.c" />
+ <ClCompile Include="..\..\..\src\cmsopt.c" />
+ <ClCompile Include="..\..\..\src\cmspack.c" />
+ <ClCompile Include="..\..\..\src\cmspcs.c" />
+ <ClCompile Include="..\..\..\src\cmsplugin.c" />
+ <ClCompile Include="..\..\..\src\cmsps2.c" />
+ <ClCompile Include="..\..\..\src\cmssamp.c" />
+ <ClCompile Include="..\..\..\src\cmssm.c" />
+ <ClCompile Include="..\..\..\src\cmstypes.c" />
+ <ClCompile Include="..\..\..\src\cmsvirt.c" />
+ <ClCompile Include="..\..\..\src\cmswtpnt.c" />
+ <ClCompile Include="..\..\..\src\cmsxform.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h" />
+ <ClInclude Include="..\..\..\include\lcms2.h" />
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="Header Files">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="Resource Files">\r
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>\r
- </Filter>\r
- <Filter Include="Source Files">\r
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\src\cmscam02.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmscgats.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmscnvrt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmserr.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsgamma.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsgmt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsintrp.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsio0.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsio1.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmslut.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsmd5.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsmtrx.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsnamed.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsopt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmspack.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmspcs.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsplugin.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsps2.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmssamp.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmssm.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmstypes.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsvirt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmswtpnt.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmsxform.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\src\cmshalf.c">\r
- <Filter>Source Files</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\include\lcms2.h">\r
- <Filter>Header Files</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\include\lcms2_plugin.h">\r
- <Filter>Header Files</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\src\lcms2_internal.h">\r
- <Filter>Source Files</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmscam02.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscgats.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscnvrt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmserr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgamma.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgmt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsintrp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio0.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio1.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmslut.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmd5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmtrx.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsnamed.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspack.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspcs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsps2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssamp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssm.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmstypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsvirt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmswtpnt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsxform.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmshalf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsalpha.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\lcms2.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h">
+ <Filter>Source Files</Filter>
+ </ClInclude>
+ </ItemGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid>\r
- <RootNamespace>tiffdiff</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);;C:\tiff-3.9.4\libtiff</IncludePath>\r
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);;C:\tiff-3.9.4\libtiff</LibraryPath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);;C:\tiff-3.9.4\libtiff</IncludePath>\r
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);;C:\tiff-3.9.4\libtiff</LibraryPath>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\utils\common\vprf.c" />\r
- <ClCompile Include="..\..\..\utils\common\xgetopt.c" />\r
- <ClCompile Include="..\..\..\utils\tificc\tifdiff.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">\r
- <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid>
+ <RootNamespace>linkicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\linkicc\linkicc.c" />
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{9EE22D66-C849-474C-9ED5-C3E141DAB160}</ProjectGuid>\r
- <RootNamespace>transicc</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\utils\transicc\transicc.c" />\r
- <ClCompile Include="..\..\..\utils\common\vprf.c" />\r
- <ClCompile Include="..\..\..\utils\common\xgetopt.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\utils\common\utils.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">\r
- <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid>
+ <RootNamespace>psicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\psicc\psicc.c" />
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid>\r
- <RootNamespace>testbed</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\testbed\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\testbed\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\testbed\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\testbed\</OutDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <Profile>false</Profile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <Profile>false</Profile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <BufferSecurityCheck>false</BufferSecurityCheck>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <CallingConvention>Cdecl</CallingConvention>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <Profile>false</Profile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <BufferSecurityCheck>false</BufferSecurityCheck>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <CallingConvention>Cdecl</CallingConvention>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <Profile>false</Profile>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">\r
- <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\testbed\testcms2.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid>
+ <RootNamespace>testbed</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\testbed\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\testbed\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\testbed\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\testbed\</OutDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <Profile>false</Profile>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\testbed\testcms2.c" />
+ <ClCompile Include="..\..\..\testbed\testplugin.c" />
+ <ClCompile Include="..\..\..\testbed\zoo_icc.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\testbed\testcms2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\testbed\testplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\testbed\zoo_icc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid>
+ <RootNamespace>tiffdiff</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\tificc\tifdiff.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid>
+ <RootNamespace>tifficc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath);C:\code\tiff-4.0.3\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);C:\code\tiff-4.0.3\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath);C:\code\tiff-4.0.3\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);C:\code\tiff-4.0.3\libtiff</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);C:\code\tiff-4.0.3\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);C:\code\tiff-4.0.3\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath);C:\code\tiff-4.0.3\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);C:\code\tiff-4.0.3\libtiff</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\tificc\tificc.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid>\r
- <RootNamespace>tifficc</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);C:\tiff-3.9.4\libtiff</IncludePath>\r
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);C:\tiff-3.9.4\libtiff</LibraryPath>\r
- <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);C:\tiff-3.9.4\libtiff</IncludePath>\r
- <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);C:\tiff-3.9.4\libtiff</LibraryPath>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\utils\common\vprf.c" />\r
- <ClCompile Include="..\..\..\utils\common\xgetopt.c" />\r
- <ClCompile Include="..\..\..\utils\tificc\tificc.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\utils\common\utils.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">\r
- <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9EE22D66-C849-474C-9ED5-C3E141DAB160}</ProjectGuid>
+ <RootNamespace>transicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\transicc\transicc.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{62812507-F926-4968-96A9-17678460AD90}</ProjectGuid>
+ <RootNamespace>jpegicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\jpgicc\iccjpeg.c" />
+ <ClCompile Include="..\..\..\utils\jpgicc\jpgicc.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\jpgicc\iccjpeg.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\jpgicc\jpgicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// Spanish (Modern) resources
+// Spanish (Spain, International Sort) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN)
-#ifdef _WIN32
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN
#pragma code_page(1252)
-#endif //_WIN32
-#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
1 VERSIONINFO
- FILEVERSION 2,3,0,0
- PRODUCTVERSION 2,3,0,0
+ FILEVERSION 2,12,0,0
+ PRODUCTVERSION 2,12,0,0
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
BLOCK "040904e4"
BEGIN
- VALUE "Comments", "\0"
- VALUE "CompanyName", "Marti Maria\0"
- VALUE "FileDescription", "lcms color engine\0"
- VALUE "FileVersion", "2.3\0"
- VALUE "InternalName", "lcms\0"
- VALUE "LegalCopyright", "Copyright (©) Marti Maria 2011\0"
- VALUE "LegalTrademarks", "\0"
- VALUE "OriginalFilename", "lcms2.dll\0"
- VALUE "PrivateBuild", "\0"
- VALUE "ProductName", "LittleCMS color engine\0"
- VALUE "ProductVersion", "2, 0, 3, 0\0"
- VALUE "SpecialBuild", "\0"
+ VALUE "CompanyName", "Marti Maria"
+ VALUE "FileDescription", "lcms color engine"
+ VALUE "FileVersion", "2.12.0.0"
+ VALUE "InternalName", "lcms"
+ VALUE "LegalCopyright", "Copyright � Marti Maria 2021"
+ VALUE "OriginalFilename", "lcms2.dll"
+ VALUE "ProductName", "LittleCMS color engine"
+ VALUE "ProductVersion", "2.12.0.0"
END
END
BLOCK "VarFileInfo"
END
END
-#endif // !_MAC
-
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// TEXTINCLUDE
//
-1 TEXTINCLUDE DISCARDABLE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE DISCARDABLE
+2 TEXTINCLUDE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"\0"
END
-3 TEXTINCLUDE DISCARDABLE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
#endif // APSTUDIO_INVOKED
-#endif // Spanish (Modern) resources
+#endif // Spanish (Spain, International Sort) resources
/////////////////////////////////////////////////////////////////////////////
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid>
+ <RootNamespace>lcms2_DLL</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <StringPooling>true</StringPooling>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <StringPooling>true</StringPooling>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmsalpha.c" />
+ <ClCompile Include="..\..\..\src\cmscam02.c" />
+ <ClCompile Include="..\..\..\src\cmscgats.c" />
+ <ClCompile Include="..\..\..\src\cmscnvrt.c" />
+ <ClCompile Include="..\..\..\src\cmserr.c" />
+ <ClCompile Include="..\..\..\src\cmsgamma.c" />
+ <ClCompile Include="..\..\..\src\cmsgmt.c" />
+ <ClCompile Include="..\..\..\src\cmshalf.c" />
+ <ClCompile Include="..\..\..\src\cmsintrp.c" />
+ <ClCompile Include="..\..\..\src\cmsio0.c" />
+ <ClCompile Include="..\..\..\src\cmsio1.c" />
+ <ClCompile Include="..\..\..\src\cmslut.c" />
+ <ClCompile Include="..\..\..\src\cmsmd5.c" />
+ <ClCompile Include="..\..\..\src\cmsmtrx.c" />
+ <ClCompile Include="..\..\..\src\cmsnamed.c" />
+ <ClCompile Include="..\..\..\src\cmsopt.c" />
+ <ClCompile Include="..\..\..\src\cmspack.c" />
+ <ClCompile Include="..\..\..\src\cmspcs.c" />
+ <ClCompile Include="..\..\..\src\cmsplugin.c" />
+ <ClCompile Include="..\..\..\src\cmsps2.c" />
+ <ClCompile Include="..\..\..\src\cmssamp.c" />
+ <ClCompile Include="..\..\..\src\cmssm.c" />
+ <ClCompile Include="..\..\..\src\cmstypes.c" />
+ <ClCompile Include="..\..\..\src\cmsvirt.c" />
+ <ClCompile Include="..\..\..\src\cmswtpnt.c" />
+ <ClCompile Include="..\..\..\src\cmsxform.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\src\lcms2.def">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h" />
+ <ClInclude Include="..\..\..\include\lcms2.h" />
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h" />
+ <ClInclude Include="..\resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\lcms2.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmscam02.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscgats.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscnvrt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmserr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgamma.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgmt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsintrp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio0.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio1.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmslut.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmd5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmtrx.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsnamed.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspack.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspcs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsps2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssamp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssm.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmstypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsvirt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmswtpnt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsxform.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmshalf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsalpha.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\lcms2.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h">
+ <Filter>Source Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\resource.h">
+ <Filter>Resource Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\lcms2.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\src\lcms2.def">
+ <Filter>Source Files</Filter>
+ </CustomBuild>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid>
+ <RootNamespace>lcms2_static</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\Lib\MS\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\Lib\MS\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Lib\MS\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\Lib\MS\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <ExceptionHandling>false</ExceptionHandling>
+ <StringPooling>true</StringPooling>
+ <FloatingPointModel>Precise</FloatingPointModel>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <ExceptionHandling>false</ExceptionHandling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
+ <StringPooling>true</StringPooling>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmsalpha.c" />
+ <ClCompile Include="..\..\..\src\cmscam02.c" />
+ <ClCompile Include="..\..\..\src\cmscgats.c" />
+ <ClCompile Include="..\..\..\src\cmscnvrt.c" />
+ <ClCompile Include="..\..\..\src\cmserr.c" />
+ <ClCompile Include="..\..\..\src\cmsgamma.c" />
+ <ClCompile Include="..\..\..\src\cmsgmt.c" />
+ <ClCompile Include="..\..\..\src\cmshalf.c" />
+ <ClCompile Include="..\..\..\src\cmsintrp.c" />
+ <ClCompile Include="..\..\..\src\cmsio0.c" />
+ <ClCompile Include="..\..\..\src\cmsio1.c" />
+ <ClCompile Include="..\..\..\src\cmslut.c" />
+ <ClCompile Include="..\..\..\src\cmsmd5.c" />
+ <ClCompile Include="..\..\..\src\cmsmtrx.c" />
+ <ClCompile Include="..\..\..\src\cmsnamed.c" />
+ <ClCompile Include="..\..\..\src\cmsopt.c" />
+ <ClCompile Include="..\..\..\src\cmspack.c" />
+ <ClCompile Include="..\..\..\src\cmspcs.c" />
+ <ClCompile Include="..\..\..\src\cmsplugin.c" />
+ <ClCompile Include="..\..\..\src\cmsps2.c" />
+ <ClCompile Include="..\..\..\src\cmssamp.c" />
+ <ClCompile Include="..\..\..\src\cmssm.c" />
+ <ClCompile Include="..\..\..\src\cmstypes.c" />
+ <ClCompile Include="..\..\..\src\cmsvirt.c" />
+ <ClCompile Include="..\..\..\src\cmswtpnt.c" />
+ <ClCompile Include="..\..\..\src\cmsxform.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h" />
+ <ClInclude Include="..\..\..\include\lcms2.h" />
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmscam02.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscgats.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscnvrt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmserr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgamma.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgmt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsintrp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio0.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio1.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmslut.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmd5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmtrx.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsnamed.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspack.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspcs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsps2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssamp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssm.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmstypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsvirt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmswtpnt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsxform.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmshalf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsalpha.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\lcms2.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h">
+ <Filter>Source Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid>
+ <RootNamespace>linkicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\linkicc\linkicc.c" />
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\linkicc\linkicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid>
+ <RootNamespace>psicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\psicc\psicc.c" />
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\psicc\psicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by lcms.rc
+// Microsoft Visual C++ generated include file.
+// Used by lcms2.rc
//
// Next default values for new objects
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid>
+ <RootNamespace>testbed</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\testbed\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\testbed\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\testbed\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\testbed\</OutDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <Profile>false</Profile>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\testbed\testcms2.c" />
+ <ClCompile Include="..\..\..\testbed\testplugin.c" />
+ <ClCompile Include="..\..\..\testbed\zoo_icc.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\testbed\testcms2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\testbed\testplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\testbed\zoo_icc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid>
+ <RootNamespace>tiffdiff</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\jpeg-8d;c:\tiff-4.0.2\libtiff;$(IncludePath)</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\jpeg-8d;C:\tiff-4.0.2\libtiff;$(LibraryPath)</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\tificc\tifdiff.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\tificc\tifdiff.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid>
+ <RootNamespace>tifficc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath);C:\tiff-4.0.2\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);C:\tiff-4.0.2\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath);C:\tiff-4.0.2\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);C:\tiff-4.0.2\libtiff</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);C:\tiff-4.0.2\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);C:\tiff-4.0.2\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath);C:\tiff-4.0.2\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);C:\tiff-4.0.2\libtiff</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\tificc\tificc.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\tificc\tificc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9EE22D66-C849-474C-9ED5-C3E141DAB160}</ProjectGuid>
+ <RootNamespace>transicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\transicc\transicc.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\transicc\transicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{62812507-F926-4968-96A9-17678460AD90}</ProjectGuid>
+ <RootNamespace>jpegicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);;C:\code\jpeg-9a</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);;C:\code\jpeg-9a</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>false</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libjpeg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\jpgicc\iccjpeg.c" />
+ <ClCompile Include="..\..\..\utils\jpgicc\jpgicc.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\jpgicc\iccjpeg.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\jpgicc\jpgicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Spanish (Spain, International Sort) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN)
+LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+1 VERSIONINFO
+ FILEVERSION 2,12,0,0
+ PRODUCTVERSION 2,12,0,0
+ FILEFLAGSMASK 0x0L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "Marti Maria"
+ VALUE "FileDescription", "lcms color engine"
+ VALUE "FileVersion", "2.12.0.0"
+ VALUE "InternalName", "lcms"
+ VALUE "LegalCopyright", "Copyright � Marti Maria 2021"
+ VALUE "OriginalFilename", "lcms2.dll"
+ VALUE "ProductName", "LittleCMS color engine"
+ VALUE "ProductVersion", "2.12.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Spanish (Spain, International Sort) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{8C51BE48-ADB8-4089-A9EC-F6BF993A0548}</ProjectGuid>
+ <RootNamespace>lcms2_DLL</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>lcms2</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <StringPooling>true</StringPooling>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>..\..\..\src\lcms2.def</ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CMS_DLL_BUILD;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <StringPooling>true</StringPooling>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmsalpha.c" />
+ <ClCompile Include="..\..\..\src\cmscam02.c" />
+ <ClCompile Include="..\..\..\src\cmscgats.c" />
+ <ClCompile Include="..\..\..\src\cmscnvrt.c" />
+ <ClCompile Include="..\..\..\src\cmserr.c" />
+ <ClCompile Include="..\..\..\src\cmsgamma.c" />
+ <ClCompile Include="..\..\..\src\cmsgmt.c" />
+ <ClCompile Include="..\..\..\src\cmshalf.c" />
+ <ClCompile Include="..\..\..\src\cmsintrp.c" />
+ <ClCompile Include="..\..\..\src\cmsio0.c" />
+ <ClCompile Include="..\..\..\src\cmsio1.c" />
+ <ClCompile Include="..\..\..\src\cmslut.c" />
+ <ClCompile Include="..\..\..\src\cmsmd5.c" />
+ <ClCompile Include="..\..\..\src\cmsmtrx.c" />
+ <ClCompile Include="..\..\..\src\cmsnamed.c" />
+ <ClCompile Include="..\..\..\src\cmsopt.c" />
+ <ClCompile Include="..\..\..\src\cmspack.c" />
+ <ClCompile Include="..\..\..\src\cmspcs.c" />
+ <ClCompile Include="..\..\..\src\cmsplugin.c" />
+ <ClCompile Include="..\..\..\src\cmsps2.c" />
+ <ClCompile Include="..\..\..\src\cmssamp.c" />
+ <ClCompile Include="..\..\..\src\cmssm.c" />
+ <ClCompile Include="..\..\..\src\cmstypes.c" />
+ <ClCompile Include="..\..\..\src\cmsvirt.c" />
+ <ClCompile Include="..\..\..\src\cmswtpnt.c" />
+ <ClCompile Include="..\..\..\src\cmsxform.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\src\lcms2.def">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h" />
+ <ClInclude Include="..\..\..\include\lcms2.h" />
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h" />
+ <ClInclude Include="..\resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\lcms2.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmscam02.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscgats.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscnvrt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmserr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgamma.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgmt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsintrp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio0.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio1.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmslut.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmd5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmtrx.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsnamed.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspack.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspcs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsps2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssamp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssm.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmstypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsvirt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmswtpnt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsxform.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmshalf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsalpha.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\lcms2.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h">
+ <Filter>Source Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\resource.h">
+ <Filter>Resource Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\lcms2.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\..\..\src\lcms2.def">
+ <Filter>Source Files</Filter>
+ </CustomBuild>
+ </ItemGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid>\r
- <RootNamespace>lcms2_static</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\Lib\MS\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\Lib\MS\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Lib\MS\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\Lib\MS\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <FunctionLevelLinking>\r
- </FunctionLevelLinking>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <FunctionLevelLinking>\r
- </FunctionLevelLinking>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
- <ExceptionHandling>false</ExceptionHandling>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>Full</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>true</OmitFramePointers>\r
- <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>\r
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>\r
- <ExceptionHandling>false</ExceptionHandling>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\src\cmscam02.c" />\r
- <ClCompile Include="..\..\..\src\cmscgats.c" />\r
- <ClCompile Include="..\..\..\src\cmscnvrt.c" />\r
- <ClCompile Include="..\..\..\src\cmserr.c" />\r
- <ClCompile Include="..\..\..\src\cmsgamma.c" />\r
- <ClCompile Include="..\..\..\src\cmsgmt.c" />\r
- <ClCompile Include="..\..\..\src\cmshalf.c" />\r
- <ClCompile Include="..\..\..\src\cmsintrp.c" />\r
- <ClCompile Include="..\..\..\src\cmsio0.c" />\r
- <ClCompile Include="..\..\..\src\cmsio1.c" />\r
- <ClCompile Include="..\..\..\src\cmslut.c" />\r
- <ClCompile Include="..\..\..\src\cmsmd5.c" />\r
- <ClCompile Include="..\..\..\src\cmsmtrx.c" />\r
- <ClCompile Include="..\..\..\src\cmsnamed.c" />\r
- <ClCompile Include="..\..\..\src\cmsopt.c" />\r
- <ClCompile Include="..\..\..\src\cmspack.c" />\r
- <ClCompile Include="..\..\..\src\cmspcs.c" />\r
- <ClCompile Include="..\..\..\src\cmsplugin.c" />\r
- <ClCompile Include="..\..\..\src\cmsps2.c" />\r
- <ClCompile Include="..\..\..\src\cmssamp.c" />\r
- <ClCompile Include="..\..\..\src\cmssm.c" />\r
- <ClCompile Include="..\..\..\src\cmstypes.c" />\r
- <ClCompile Include="..\..\..\src\cmsvirt.c" />\r
- <ClCompile Include="..\..\..\src\cmswtpnt.c" />\r
- <ClCompile Include="..\..\..\src\cmsxform.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\src\lcms2_internal.h" />\r
- <ClInclude Include="..\..\..\include\lcms2.h" />\r
- <ClInclude Include="..\..\..\include\lcms2_plugin.h" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{71DEDE59-3F1E-486B-A899-4283000F76B5}</ProjectGuid>
+ <RootNamespace>lcms2_static</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\Lib\MS\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\Lib\MS\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\Lib\MS\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\Lib\MS\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FunctionLevelLinking>
+ </FunctionLevelLinking>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <ExceptionHandling>false</ExceptionHandling>
+ <StringPooling>true</StringPooling>
+ <FloatingPointModel>Precise</FloatingPointModel>
+ <FloatingPointExceptions>false</FloatingPointExceptions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BrowseInformation>false</BrowseInformation>
+ </ClCompile>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <ExceptionHandling>false</ExceptionHandling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
+ <StringPooling>true</StringPooling>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmsalpha.c" />
+ <ClCompile Include="..\..\..\src\cmscam02.c" />
+ <ClCompile Include="..\..\..\src\cmscgats.c" />
+ <ClCompile Include="..\..\..\src\cmscnvrt.c" />
+ <ClCompile Include="..\..\..\src\cmserr.c" />
+ <ClCompile Include="..\..\..\src\cmsgamma.c" />
+ <ClCompile Include="..\..\..\src\cmsgmt.c" />
+ <ClCompile Include="..\..\..\src\cmshalf.c" />
+ <ClCompile Include="..\..\..\src\cmsintrp.c" />
+ <ClCompile Include="..\..\..\src\cmsio0.c" />
+ <ClCompile Include="..\..\..\src\cmsio1.c" />
+ <ClCompile Include="..\..\..\src\cmslut.c" />
+ <ClCompile Include="..\..\..\src\cmsmd5.c" />
+ <ClCompile Include="..\..\..\src\cmsmtrx.c" />
+ <ClCompile Include="..\..\..\src\cmsnamed.c" />
+ <ClCompile Include="..\..\..\src\cmsopt.c" />
+ <ClCompile Include="..\..\..\src\cmspack.c" />
+ <ClCompile Include="..\..\..\src\cmspcs.c" />
+ <ClCompile Include="..\..\..\src\cmsplugin.c" />
+ <ClCompile Include="..\..\..\src\cmsps2.c" />
+ <ClCompile Include="..\..\..\src\cmssamp.c" />
+ <ClCompile Include="..\..\..\src\cmssm.c" />
+ <ClCompile Include="..\..\..\src\cmstypes.c" />
+ <ClCompile Include="..\..\..\src\cmsvirt.c" />
+ <ClCompile Include="..\..\..\src\cmswtpnt.c" />
+ <ClCompile Include="..\..\..\src\cmsxform.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h" />
+ <ClInclude Include="..\..\..\include\lcms2.h" />
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\src\cmscam02.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscgats.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmscnvrt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmserr.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgamma.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsgmt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsintrp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio0.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsio1.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmslut.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmd5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsmtrx.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsnamed.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspack.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmspcs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsps2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssamp.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmssm.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmstypes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsvirt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmswtpnt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsxform.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmshalf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\src\cmsalpha.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\include\lcms2.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\include\lcms2_plugin.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\..\src\lcms2_internal.h">
+ <Filter>Source Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid>\r
- <RootNamespace>linkicc</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\utils\linkicc\linkicc.c" />\r
- <ClCompile Include="..\..\..\utils\common\vprf.c" />\r
- <ClCompile Include="..\..\..\utils\common\xgetopt.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">\r
- <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{FBFBE1DC-DB84-4BA1-9552-B4780F457849}</ProjectGuid>
+ <RootNamespace>linkicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>false</BrowseInformation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\linkicc\linkicc.c" />
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\linkicc\linkicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid>\r
- <RootNamespace>psicc</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <ClCompile>\r
- <Optimization>MaxSpeed</Optimization>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level4</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
- </ClCompile>\r
- <Link>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\utils\psicc\psicc.c" />\r
- <ClCompile Include="..\..\..\utils\common\vprf.c" />\r
- <ClCompile Include="..\..\..\utils\common\xgetopt.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">\r
- <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EF6A8851-65FE-46F5-B9EF-14F0B671F693}</ProjectGuid>
+ <RootNamespace>psicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>false</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\psicc\psicc.c" />
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\psicc\psicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by lcms2.rc
+//
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{928A3A2B-46EF-4279-959C-513B3652FF0E}</ProjectGuid>
+ <RootNamespace>testbed</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\testbed\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\testbed\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\testbed\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\testbed\</OutDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>false</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <Profile>false</Profile>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <AdditionalIncludeDirectories>../../../include;../../../src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CallingConvention>Cdecl</CallingConvention>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <Profile>false</Profile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\testbed\testcms2.c" />
+ <ClCompile Include="..\..\..\testbed\testplugin.c" />
+ <ClCompile Include="..\..\..\testbed\zoo_icc.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\testbed\testcms2.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\testbed\testplugin.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\testbed\zoo_icc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{75B91835-CCD7-48BE-A606-A9C997D5DBEE}</ProjectGuid>
+ <RootNamespace>tiffdiff</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\jpeg-8d;$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\jpeg-8d;$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\jpeg-8d;$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\jpeg-8d;$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\jpeg-8d;$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\jpeg-8d;$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\jpeg-8d;$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\jpeg-8d;$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>false</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\tificc\tifdiff.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\tificc\tifdiff.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{2256DE16-ED92-4A6F-9C54-F65BB61E64A2}</ProjectGuid>
+ <RootNamespace>tifficc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</IncludePath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(LibraryPath);E:\liteCommons\3rdparty\tiff-4.1.0\libtiff</LibraryPath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>false</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libtiff.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ <ClCompile Include="..\..\..\utils\tificc\tificc.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\tificc\tificc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9EE22D66-C849-474C-9ED5-C3E141DAB160}</ProjectGuid>
+ <RootNamespace>transicc</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\bin\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\bin\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(Platform)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <BrowseInformation>false</BrowseInformation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <AdditionalIncludeDirectories>../../../include;../../../utils/common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\transicc\transicc.c">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\vprf.c" />
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\utils\common\vprf.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\common\xgetopt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\utils\transicc\transicc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\utils\common\utils.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 4123B46925518DB1005F0287 /* linkicc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4123B46825518DB1005F0287 /* linkicc.c */; };
+ 4123B4A425518FFB005F0287 /* xgetopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 4123B4A325518FFB005F0287 /* xgetopt.c */; };
+ 4123B4B82551903B005F0287 /* tificc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4123B4B72551903B005F0287 /* tificc.c */; };
+ 4123B5042551A1C8005F0287 /* libfast_float_plugin.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A8F24C5E35200DF2C21 /* libfast_float_plugin.a */; };
+ 418B0A5224C5E1C900DF2C21 /* cmsgamma.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3824C5E1C700DF2C21 /* cmsgamma.c */; };
+ 418B0A5324C5E1C900DF2C21 /* cmsintrp.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3924C5E1C700DF2C21 /* cmsintrp.c */; };
+ 418B0A5424C5E1C900DF2C21 /* cmsgmt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3A24C5E1C700DF2C21 /* cmsgmt.c */; };
+ 418B0A5524C5E1C900DF2C21 /* cmscnvrt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3B24C5E1C700DF2C21 /* cmscnvrt.c */; };
+ 418B0A5624C5E1C900DF2C21 /* cmsmd5.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3C24C5E1C700DF2C21 /* cmsmd5.c */; };
+ 418B0A5724C5E1C900DF2C21 /* cmssm.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3D24C5E1C700DF2C21 /* cmssm.c */; };
+ 418B0A5824C5E1C900DF2C21 /* cmsopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3E24C5E1C700DF2C21 /* cmsopt.c */; };
+ 418B0A5924C5E1C900DF2C21 /* cmscgats.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A3F24C5E1C700DF2C21 /* cmscgats.c */; };
+ 418B0A5A24C5E1C900DF2C21 /* cmsalpha.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4024C5E1C800DF2C21 /* cmsalpha.c */; };
+ 418B0A5B24C5E1C900DF2C21 /* cmstypes.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4124C5E1C800DF2C21 /* cmstypes.c */; };
+ 418B0A5C24C5E1C900DF2C21 /* cmsio1.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4224C5E1C800DF2C21 /* cmsio1.c */; };
+ 418B0A5D24C5E1C900DF2C21 /* cmspack.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4324C5E1C800DF2C21 /* cmspack.c */; };
+ 418B0A5E24C5E1C900DF2C21 /* cmsxform.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4424C5E1C800DF2C21 /* cmsxform.c */; };
+ 418B0A5F24C5E1C900DF2C21 /* cmswtpnt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4524C5E1C800DF2C21 /* cmswtpnt.c */; };
+ 418B0A6024C5E1C900DF2C21 /* cmsmtrx.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4624C5E1C800DF2C21 /* cmsmtrx.c */; };
+ 418B0A6124C5E1C900DF2C21 /* cmspcs.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4724C5E1C800DF2C21 /* cmspcs.c */; };
+ 418B0A6224C5E1C900DF2C21 /* cmsps2.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4824C5E1C800DF2C21 /* cmsps2.c */; };
+ 418B0A6324C5E1C900DF2C21 /* cmsnamed.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4924C5E1C800DF2C21 /* cmsnamed.c */; };
+ 418B0A6424C5E1C900DF2C21 /* cmserr.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4A24C5E1C800DF2C21 /* cmserr.c */; };
+ 418B0A6524C5E1C900DF2C21 /* cmslut.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4B24C5E1C800DF2C21 /* cmslut.c */; };
+ 418B0A6624C5E1C900DF2C21 /* cmsvirt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4C24C5E1C800DF2C21 /* cmsvirt.c */; };
+ 418B0A6724C5E1C900DF2C21 /* cmsplugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4D24C5E1C800DF2C21 /* cmsplugin.c */; };
+ 418B0A6824C5E1C900DF2C21 /* cmshalf.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4E24C5E1C800DF2C21 /* cmshalf.c */; };
+ 418B0A6924C5E1C900DF2C21 /* cmsio0.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A4F24C5E1C900DF2C21 /* cmsio0.c */; };
+ 418B0A6A24C5E1C900DF2C21 /* cmscam02.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A5024C5E1C900DF2C21 /* cmscam02.c */; };
+ 418B0A6B24C5E1C900DF2C21 /* cmssamp.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A5124C5E1C900DF2C21 /* cmssamp.c */; };
+ 418B0A6F24C5E1E800DF2C21 /* lcms2.h in Headers */ = {isa = PBXBuildFile; fileRef = 418B0A6D24C5E1E800DF2C21 /* lcms2.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 418B0A7024C5E1E800DF2C21 /* lcms2_plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 418B0A6E24C5E1E800DF2C21 /* lcms2_plugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 418B0A7224C5E1F400DF2C21 /* lcms2_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 418B0A7124C5E1F400DF2C21 /* lcms2_internal.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 418B0A8A24C5E30000DF2C21 /* liblcms2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A3124C5E19500DF2C21 /* liblcms2.a */; };
+ 418B0AA124C5E37800DF2C21 /* fast_float_curves.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9324C5E37600DF2C21 /* fast_float_curves.c */; };
+ 418B0AA224C5E37800DF2C21 /* fast_float_15mats.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9424C5E37600DF2C21 /* fast_float_15mats.c */; };
+ 418B0AA324C5E37800DF2C21 /* fast_float_tethra.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9524C5E37600DF2C21 /* fast_float_tethra.c */; };
+ 418B0AA424C5E37800DF2C21 /* fast_float_cmyk.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9624C5E37700DF2C21 /* fast_float_cmyk.c */; };
+ 418B0AA524C5E37800DF2C21 /* fast_16_tethra.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9724C5E37700DF2C21 /* fast_16_tethra.c */; };
+ 418B0AA624C5E37800DF2C21 /* fast_float_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 418B0A9824C5E37700DF2C21 /* fast_float_internal.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 418B0AA724C5E37800DF2C21 /* fast_8_matsh.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9924C5E37700DF2C21 /* fast_8_matsh.c */; };
+ 418B0AA824C5E37800DF2C21 /* fast_float_separate.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9A24C5E37700DF2C21 /* fast_float_separate.c */; };
+ 418B0AA924C5E37800DF2C21 /* fast_8_matsh_sse.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9B24C5E37700DF2C21 /* fast_8_matsh_sse.c */; };
+ 418B0AAA24C5E37800DF2C21 /* fast_8_tethra.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9C24C5E37700DF2C21 /* fast_8_tethra.c */; };
+ 418B0AAB24C5E37800DF2C21 /* fast_float_sup.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9D24C5E37700DF2C21 /* fast_float_sup.c */; };
+ 418B0AAC24C5E37800DF2C21 /* fast_float_15bits.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9E24C5E37700DF2C21 /* fast_float_15bits.c */; };
+ 418B0AAD24C5E37800DF2C21 /* fast_8_curves.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0A9F24C5E37700DF2C21 /* fast_8_curves.c */; };
+ 418B0AAE24C5E37800DF2C21 /* fast_float_matsh.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0AA024C5E37800DF2C21 /* fast_float_matsh.c */; };
+ 418B0AB024C5E38C00DF2C21 /* lcms2_fast_float.h in Headers */ = {isa = PBXBuildFile; fileRef = 418B0AAF24C5E38C00DF2C21 /* lcms2_fast_float.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 418B0AC224C5E47C00DF2C21 /* liblcms2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A3124C5E19500DF2C21 /* liblcms2.a */; };
+ 418B0ADA24C5E58A00DF2C21 /* liblcms2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A3124C5E19500DF2C21 /* liblcms2.a */; };
+ 418B0AEA24C5E5CF00DF2C21 /* liblcms2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A3124C5E19500DF2C21 /* liblcms2.a */; };
+ 418B0AF224C5E6B000DF2C21 /* fast_float_testbed.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0AF124C5E6B000DF2C21 /* fast_float_testbed.c */; };
+ 418B0AF624C5E6C800DF2C21 /* xgetopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0AF324C5E6C700DF2C21 /* xgetopt.c */; };
+ 418B0AF724C5E6C800DF2C21 /* vprf.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0AF424C5E6C700DF2C21 /* vprf.c */; };
+ 418B0AF924C5E6D200DF2C21 /* transicc.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0AF824C5E6D200DF2C21 /* transicc.c */; };
+ 418B0AFF24C5E73100DF2C21 /* xgetopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0AFD24C5E73100DF2C21 /* xgetopt.c */; };
+ 418B0B0024C5E73100DF2C21 /* vprf.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0AFE24C5E73100DF2C21 /* vprf.c */; };
+ 418B0B0F24C5E79200DF2C21 /* utils.h in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B0E24C5E79200DF2C21 /* utils.h */; };
+ 418B0B1424C5E7BB00DF2C21 /* vprf.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B1224C5E7BB00DF2C21 /* vprf.c */; };
+ 418B0B1524C5E7CF00DF2C21 /* liblcms2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A3124C5E19500DF2C21 /* liblcms2.a */; };
+ 418B0B2124C5E8FA00DF2C21 /* liblcms2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A3124C5E19500DF2C21 /* liblcms2.a */; };
+ 418B0B2524C5E92100DF2C21 /* tifdiff.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B2424C5E92100DF2C21 /* tifdiff.c */; };
+ 418B0B2924C5E92B00DF2C21 /* vprf.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B2724C5E92B00DF2C21 /* vprf.c */; };
+ 418B0B2A24C5E92B00DF2C21 /* xgetopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B2824C5E92B00DF2C21 /* xgetopt.c */; };
+ 418B0B3824C5E98E00DF2C21 /* iccjpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B3624C5E98E00DF2C21 /* iccjpeg.c */; };
+ 418B0B3A24C5E99600DF2C21 /* jpgicc.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B3924C5E99600DF2C21 /* jpgicc.c */; };
+ 418B0B3D24C5E9A200DF2C21 /* liblcms2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 418B0A3124C5E19500DF2C21 /* liblcms2.a */; };
+ 418B0B4124C5E9F700DF2C21 /* vprf.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B3E24C5E9F700DF2C21 /* vprf.c */; };
+ 418B0B4224C5E9F700DF2C21 /* xgetopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B3F24C5E9F700DF2C21 /* xgetopt.c */; };
+ 418B0B4624C5EC1D00DF2C21 /* testcms2.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B4324C5EC1D00DF2C21 /* testcms2.c */; };
+ 418B0B4724C5EC1D00DF2C21 /* testplugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B4524C5EC1D00DF2C21 /* testplugin.c */; };
+ 418B0B4924C5EC2A00DF2C21 /* zoo_icc.c in Sources */ = {isa = PBXBuildFile; fileRef = 418B0B4824C5EC2A00DF2C21 /* zoo_icc.c */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 418B0A8524C5E29800DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+ 418B0AB224C5E3D400DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+ 418B0AC324C5E48100DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A8E24C5E35200DF2C21;
+ remoteInfo = fast_float_plugin;
+ };
+ 418B0AC524C5E48600DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+ 418B0ADB24C5E58F00DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+ 418B0AE824C5E5CA00DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+ 418B0B0C24C5E77500DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+ 418B0B2224C5E8FA00DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+ 418B0B3B24C5E99E00DF2C21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 418B0A2924C5E19500DF2C21 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 418B0A3024C5E19500DF2C21;
+ remoteInfo = lcms2;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 418B0A7624C5E25200DF2C21 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 418B0AB624C5E42900DF2C21 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 418B0AC924C5E4EA00DF2C21 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 418B0ADF24C5E5C300DF2C21 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 418B0B0324C5E76100DF2C21 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 418B0B1824C5E85600DF2C21 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+ 418B0B2D24C5E95D00DF2C21 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 4123B46825518DB1005F0287 /* linkicc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = linkicc.c; sourceTree = "<group>"; };
+ 4123B4A325518FFB005F0287 /* xgetopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xgetopt.c; path = ../common/xgetopt.c; sourceTree = "<group>"; };
+ 4123B4B72551903B005F0287 /* tificc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tificc.c; sourceTree = "<group>"; };
+ 4123B4C2255190FE005F0287 /* tifdiff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tifdiff.c; sourceTree = "<group>"; };
+ 418B0A3124C5E19500DF2C21 /* liblcms2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblcms2.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0A3824C5E1C700DF2C21 /* cmsgamma.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsgamma.c; path = ../../../src/cmsgamma.c; sourceTree = "<group>"; };
+ 418B0A3924C5E1C700DF2C21 /* cmsintrp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsintrp.c; path = ../../../src/cmsintrp.c; sourceTree = "<group>"; };
+ 418B0A3A24C5E1C700DF2C21 /* cmsgmt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsgmt.c; path = ../../../src/cmsgmt.c; sourceTree = "<group>"; };
+ 418B0A3B24C5E1C700DF2C21 /* cmscnvrt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmscnvrt.c; path = ../../../src/cmscnvrt.c; sourceTree = "<group>"; };
+ 418B0A3C24C5E1C700DF2C21 /* cmsmd5.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsmd5.c; path = ../../../src/cmsmd5.c; sourceTree = "<group>"; };
+ 418B0A3D24C5E1C700DF2C21 /* cmssm.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmssm.c; path = ../../../src/cmssm.c; sourceTree = "<group>"; };
+ 418B0A3E24C5E1C700DF2C21 /* cmsopt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsopt.c; path = ../../../src/cmsopt.c; sourceTree = "<group>"; };
+ 418B0A3F24C5E1C700DF2C21 /* cmscgats.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmscgats.c; path = ../../../src/cmscgats.c; sourceTree = "<group>"; };
+ 418B0A4024C5E1C800DF2C21 /* cmsalpha.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsalpha.c; path = ../../../src/cmsalpha.c; sourceTree = "<group>"; };
+ 418B0A4124C5E1C800DF2C21 /* cmstypes.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmstypes.c; path = ../../../src/cmstypes.c; sourceTree = "<group>"; };
+ 418B0A4224C5E1C800DF2C21 /* cmsio1.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsio1.c; path = ../../../src/cmsio1.c; sourceTree = "<group>"; };
+ 418B0A4324C5E1C800DF2C21 /* cmspack.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmspack.c; path = ../../../src/cmspack.c; sourceTree = "<group>"; };
+ 418B0A4424C5E1C800DF2C21 /* cmsxform.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsxform.c; path = ../../../src/cmsxform.c; sourceTree = "<group>"; };
+ 418B0A4524C5E1C800DF2C21 /* cmswtpnt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmswtpnt.c; path = ../../../src/cmswtpnt.c; sourceTree = "<group>"; };
+ 418B0A4624C5E1C800DF2C21 /* cmsmtrx.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsmtrx.c; path = ../../../src/cmsmtrx.c; sourceTree = "<group>"; };
+ 418B0A4724C5E1C800DF2C21 /* cmspcs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmspcs.c; path = ../../../src/cmspcs.c; sourceTree = "<group>"; };
+ 418B0A4824C5E1C800DF2C21 /* cmsps2.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsps2.c; path = ../../../src/cmsps2.c; sourceTree = "<group>"; };
+ 418B0A4924C5E1C800DF2C21 /* cmsnamed.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsnamed.c; path = ../../../src/cmsnamed.c; sourceTree = "<group>"; };
+ 418B0A4A24C5E1C800DF2C21 /* cmserr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmserr.c; path = ../../../src/cmserr.c; sourceTree = "<group>"; };
+ 418B0A4B24C5E1C800DF2C21 /* cmslut.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmslut.c; path = ../../../src/cmslut.c; sourceTree = "<group>"; };
+ 418B0A4C24C5E1C800DF2C21 /* cmsvirt.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsvirt.c; path = ../../../src/cmsvirt.c; sourceTree = "<group>"; };
+ 418B0A4D24C5E1C800DF2C21 /* cmsplugin.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsplugin.c; path = ../../../src/cmsplugin.c; sourceTree = "<group>"; };
+ 418B0A4E24C5E1C800DF2C21 /* cmshalf.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmshalf.c; path = ../../../src/cmshalf.c; sourceTree = "<group>"; };
+ 418B0A4F24C5E1C900DF2C21 /* cmsio0.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmsio0.c; path = ../../../src/cmsio0.c; sourceTree = "<group>"; };
+ 418B0A5024C5E1C900DF2C21 /* cmscam02.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmscam02.c; path = ../../../src/cmscam02.c; sourceTree = "<group>"; };
+ 418B0A5124C5E1C900DF2C21 /* cmssamp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cmssamp.c; path = ../../../src/cmssamp.c; sourceTree = "<group>"; };
+ 418B0A6D24C5E1E800DF2C21 /* lcms2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = lcms2.h; path = ../../../include/lcms2.h; sourceTree = "<group>"; };
+ 418B0A6E24C5E1E800DF2C21 /* lcms2_plugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = lcms2_plugin.h; path = ../../../include/lcms2_plugin.h; sourceTree = "<group>"; };
+ 418B0A7124C5E1F400DF2C21 /* lcms2_internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = lcms2_internal.h; path = ../../../src/lcms2_internal.h; sourceTree = "<group>"; };
+ 418B0A7824C5E25200DF2C21 /* testbed */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testbed; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0A8F24C5E35200DF2C21 /* libfast_float_plugin.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libfast_float_plugin.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0A9324C5E37600DF2C21 /* fast_float_curves.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_curves.c; path = ../../../plugins/fast_float/src/fast_float_curves.c; sourceTree = "<group>"; };
+ 418B0A9424C5E37600DF2C21 /* fast_float_15mats.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_15mats.c; path = ../../../plugins/fast_float/src/fast_float_15mats.c; sourceTree = "<group>"; };
+ 418B0A9524C5E37600DF2C21 /* fast_float_tethra.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_tethra.c; path = ../../../plugins/fast_float/src/fast_float_tethra.c; sourceTree = "<group>"; };
+ 418B0A9624C5E37700DF2C21 /* fast_float_cmyk.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_cmyk.c; path = ../../../plugins/fast_float/src/fast_float_cmyk.c; sourceTree = "<group>"; };
+ 418B0A9724C5E37700DF2C21 /* fast_16_tethra.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_16_tethra.c; path = ../../../plugins/fast_float/src/fast_16_tethra.c; sourceTree = "<group>"; };
+ 418B0A9824C5E37700DF2C21 /* fast_float_internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = fast_float_internal.h; path = ../../../plugins/fast_float/src/fast_float_internal.h; sourceTree = "<group>"; };
+ 418B0A9924C5E37700DF2C21 /* fast_8_matsh.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_8_matsh.c; path = ../../../plugins/fast_float/src/fast_8_matsh.c; sourceTree = "<group>"; };
+ 418B0A9A24C5E37700DF2C21 /* fast_float_separate.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_separate.c; path = ../../../plugins/fast_float/src/fast_float_separate.c; sourceTree = "<group>"; };
+ 418B0A9B24C5E37700DF2C21 /* fast_8_matsh_sse.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_8_matsh_sse.c; path = ../../../plugins/fast_float/src/fast_8_matsh_sse.c; sourceTree = "<group>"; };
+ 418B0A9C24C5E37700DF2C21 /* fast_8_tethra.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_8_tethra.c; path = ../../../plugins/fast_float/src/fast_8_tethra.c; sourceTree = "<group>"; };
+ 418B0A9D24C5E37700DF2C21 /* fast_float_sup.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_sup.c; path = ../../../plugins/fast_float/src/fast_float_sup.c; sourceTree = "<group>"; };
+ 418B0A9E24C5E37700DF2C21 /* fast_float_15bits.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_15bits.c; path = ../../../plugins/fast_float/src/fast_float_15bits.c; sourceTree = "<group>"; };
+ 418B0A9F24C5E37700DF2C21 /* fast_8_curves.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_8_curves.c; path = ../../../plugins/fast_float/src/fast_8_curves.c; sourceTree = "<group>"; };
+ 418B0AA024C5E37800DF2C21 /* fast_float_matsh.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = fast_float_matsh.c; path = ../../../plugins/fast_float/src/fast_float_matsh.c; sourceTree = "<group>"; };
+ 418B0AAF24C5E38C00DF2C21 /* lcms2_fast_float.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = lcms2_fast_float.h; path = ../../../plugins/fast_float/include/lcms2_fast_float.h; sourceTree = "<group>"; };
+ 418B0AB824C5E42900DF2C21 /* testbed */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = testbed; path = fast_float_testbed; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0ACB24C5E4EA00DF2C21 /* transicc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = transicc; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0AE124C5E5C300DF2C21 /* linkicc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = linkicc; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0AF124C5E6B000DF2C21 /* fast_float_testbed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fast_float_testbed.c; path = ../../../plugins/fast_float/testbed/fast_float_testbed.c; sourceTree = SOURCE_ROOT; };
+ 418B0AF324C5E6C700DF2C21 /* xgetopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xgetopt.c; path = ../../../utils/common/xgetopt.c; sourceTree = SOURCE_ROOT; };
+ 418B0AF424C5E6C700DF2C21 /* vprf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vprf.c; path = ../../../utils/common/vprf.c; sourceTree = SOURCE_ROOT; };
+ 418B0AF524C5E6C800DF2C21 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../../../utils/common/utils.h; sourceTree = SOURCE_ROOT; };
+ 418B0AF824C5E6D200DF2C21 /* transicc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = transicc.c; path = ../../../utils/transicc/transicc.c; sourceTree = SOURCE_ROOT; };
+ 418B0AFC24C5E73100DF2C21 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../../../utils/common/utils.h; sourceTree = SOURCE_ROOT; };
+ 418B0AFD24C5E73100DF2C21 /* xgetopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xgetopt.c; path = ../../../utils/common/xgetopt.c; sourceTree = SOURCE_ROOT; };
+ 418B0AFE24C5E73100DF2C21 /* vprf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vprf.c; path = ../../../utils/common/vprf.c; sourceTree = SOURCE_ROOT; };
+ 418B0B0524C5E76100DF2C21 /* tificc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tificc; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0B0E24C5E79200DF2C21 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../../../utils/common/utils.h; sourceTree = SOURCE_ROOT; };
+ 418B0B1224C5E7BB00DF2C21 /* vprf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vprf.c; path = ../../../utils/common/vprf.c; sourceTree = SOURCE_ROOT; };
+ 418B0B1A24C5E85600DF2C21 /* tifdiff */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tifdiff; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0B2424C5E92100DF2C21 /* tifdiff.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tifdiff.c; path = ../../../utils/tificc/tifdiff.c; sourceTree = SOURCE_ROOT; };
+ 418B0B2724C5E92B00DF2C21 /* vprf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vprf.c; path = ../common/vprf.c; sourceTree = "<group>"; };
+ 418B0B2824C5E92B00DF2C21 /* xgetopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xgetopt.c; path = ../common/xgetopt.c; sourceTree = "<group>"; };
+ 418B0B2F24C5E95D00DF2C21 /* jpegicc */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jpegicc; sourceTree = BUILT_PRODUCTS_DIR; };
+ 418B0B3624C5E98E00DF2C21 /* iccjpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = iccjpeg.c; path = ../../../utils/jpgicc/iccjpeg.c; sourceTree = SOURCE_ROOT; };
+ 418B0B3724C5E98E00DF2C21 /* iccjpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = iccjpeg.h; path = ../../../utils/jpgicc/iccjpeg.h; sourceTree = SOURCE_ROOT; };
+ 418B0B3924C5E99600DF2C21 /* jpgicc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jpgicc.c; sourceTree = "<group>"; };
+ 418B0B3E24C5E9F700DF2C21 /* vprf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vprf.c; path = ../../../utils/common/vprf.c; sourceTree = SOURCE_ROOT; };
+ 418B0B3F24C5E9F700DF2C21 /* xgetopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xgetopt.c; path = ../../../utils/common/xgetopt.c; sourceTree = SOURCE_ROOT; };
+ 418B0B4024C5E9F700DF2C21 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../../../utils/common/utils.h; sourceTree = SOURCE_ROOT; };
+ 418B0B4324C5EC1D00DF2C21 /* testcms2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testcms2.c; path = ../../../testbed/testcms2.c; sourceTree = SOURCE_ROOT; };
+ 418B0B4424C5EC1D00DF2C21 /* testcms2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = testcms2.h; path = ../../../testbed/testcms2.h; sourceTree = SOURCE_ROOT; };
+ 418B0B4524C5EC1D00DF2C21 /* testplugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testplugin.c; path = ../../../testbed/testplugin.c; sourceTree = "<group>"; };
+ 418B0B4824C5EC2A00DF2C21 /* zoo_icc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zoo_icc.c; path = ../../../testbed/zoo_icc.c; sourceTree = SOURCE_ROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 418B0A2F24C5E19500DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0A7524C5E25200DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0A8A24C5E30000DF2C21 /* liblcms2.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0A8D24C5E35200DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0AB524C5E42900DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0AC224C5E47C00DF2C21 /* liblcms2.a in Frameworks */,
+ 4123B5042551A1C8005F0287 /* libfast_float_plugin.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0AC824C5E4EA00DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0ADA24C5E58A00DF2C21 /* liblcms2.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0ADE24C5E5C300DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0AEA24C5E5CF00DF2C21 /* liblcms2.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0B0224C5E76100DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0B1524C5E7CF00DF2C21 /* liblcms2.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0B1724C5E85600DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0B2124C5E8FA00DF2C21 /* liblcms2.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0B2C24C5E95D00DF2C21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0B3D24C5E9A200DF2C21 /* liblcms2.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 418B0A2824C5E19500DF2C21 = {
+ isa = PBXGroup;
+ children = (
+ 418B0AB124C5E39A00DF2C21 /* fast_float_plugin */,
+ 418B0A7324C5E1FE00DF2C21 /* include */,
+ 418B0A6C24C5E1CE00DF2C21 /* src */,
+ 418B0A7924C5E25200DF2C21 /* testbed */,
+ 418B0AB924C5E42900DF2C21 /* fast_float_testbed */,
+ 418B0ACC24C5E4EA00DF2C21 /* transicc */,
+ 418B0AE224C5E5C300DF2C21 /* linkicc */,
+ 418B0B0624C5E76100DF2C21 /* tificc */,
+ 418B0B1B24C5E85600DF2C21 /* tifdiff */,
+ 418B0B3024C5E95D00DF2C21 /* jpegicc */,
+ 418B0A3224C5E19500DF2C21 /* Products */,
+ 418B0A8924C5E30000DF2C21 /* Frameworks */,
+ );
+ sourceTree = "<group>";
+ };
+ 418B0A3224C5E19500DF2C21 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0A3124C5E19500DF2C21 /* liblcms2.a */,
+ 418B0A7824C5E25200DF2C21 /* testbed */,
+ 418B0A8F24C5E35200DF2C21 /* libfast_float_plugin.a */,
+ 418B0AB824C5E42900DF2C21 /* testbed */,
+ 418B0ACB24C5E4EA00DF2C21 /* transicc */,
+ 418B0AE124C5E5C300DF2C21 /* linkicc */,
+ 418B0B0524C5E76100DF2C21 /* tificc */,
+ 418B0B1A24C5E85600DF2C21 /* tifdiff */,
+ 418B0B2F24C5E95D00DF2C21 /* jpegicc */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 418B0A6C24C5E1CE00DF2C21 /* src */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0A7124C5E1F400DF2C21 /* lcms2_internal.h */,
+ 418B0A4024C5E1C800DF2C21 /* cmsalpha.c */,
+ 418B0A5024C5E1C900DF2C21 /* cmscam02.c */,
+ 418B0A3F24C5E1C700DF2C21 /* cmscgats.c */,
+ 418B0A3B24C5E1C700DF2C21 /* cmscnvrt.c */,
+ 418B0A4A24C5E1C800DF2C21 /* cmserr.c */,
+ 418B0A3824C5E1C700DF2C21 /* cmsgamma.c */,
+ 418B0A3A24C5E1C700DF2C21 /* cmsgmt.c */,
+ 418B0A4E24C5E1C800DF2C21 /* cmshalf.c */,
+ 418B0A3924C5E1C700DF2C21 /* cmsintrp.c */,
+ 418B0A4F24C5E1C900DF2C21 /* cmsio0.c */,
+ 418B0A4224C5E1C800DF2C21 /* cmsio1.c */,
+ 418B0A4B24C5E1C800DF2C21 /* cmslut.c */,
+ 418B0A3C24C5E1C700DF2C21 /* cmsmd5.c */,
+ 418B0A4624C5E1C800DF2C21 /* cmsmtrx.c */,
+ 418B0A4924C5E1C800DF2C21 /* cmsnamed.c */,
+ 418B0A3E24C5E1C700DF2C21 /* cmsopt.c */,
+ 418B0A4324C5E1C800DF2C21 /* cmspack.c */,
+ 418B0A4724C5E1C800DF2C21 /* cmspcs.c */,
+ 418B0A4D24C5E1C800DF2C21 /* cmsplugin.c */,
+ 418B0A4824C5E1C800DF2C21 /* cmsps2.c */,
+ 418B0A5124C5E1C900DF2C21 /* cmssamp.c */,
+ 418B0A3D24C5E1C700DF2C21 /* cmssm.c */,
+ 418B0A4124C5E1C800DF2C21 /* cmstypes.c */,
+ 418B0A4C24C5E1C800DF2C21 /* cmsvirt.c */,
+ 418B0A4524C5E1C800DF2C21 /* cmswtpnt.c */,
+ 418B0A4424C5E1C800DF2C21 /* cmsxform.c */,
+ );
+ name = src;
+ sourceTree = "<group>";
+ };
+ 418B0A7324C5E1FE00DF2C21 /* include */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0A6E24C5E1E800DF2C21 /* lcms2_plugin.h */,
+ 418B0A6D24C5E1E800DF2C21 /* lcms2.h */,
+ );
+ name = include;
+ sourceTree = "<group>";
+ };
+ 418B0A7924C5E25200DF2C21 /* testbed */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0B4824C5EC2A00DF2C21 /* zoo_icc.c */,
+ 418B0B4324C5EC1D00DF2C21 /* testcms2.c */,
+ 418B0B4424C5EC1D00DF2C21 /* testcms2.h */,
+ 418B0B4524C5EC1D00DF2C21 /* testplugin.c */,
+ );
+ name = testbed;
+ sourceTree = SOURCE_ROOT;
+ };
+ 418B0A8924C5E30000DF2C21 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 418B0AB124C5E39A00DF2C21 /* fast_float_plugin */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0AAF24C5E38C00DF2C21 /* lcms2_fast_float.h */,
+ 418B0A9F24C5E37700DF2C21 /* fast_8_curves.c */,
+ 418B0A9B24C5E37700DF2C21 /* fast_8_matsh_sse.c */,
+ 418B0A9924C5E37700DF2C21 /* fast_8_matsh.c */,
+ 418B0A9C24C5E37700DF2C21 /* fast_8_tethra.c */,
+ 418B0A9724C5E37700DF2C21 /* fast_16_tethra.c */,
+ 418B0A9E24C5E37700DF2C21 /* fast_float_15bits.c */,
+ 418B0A9424C5E37600DF2C21 /* fast_float_15mats.c */,
+ 418B0A9624C5E37700DF2C21 /* fast_float_cmyk.c */,
+ 418B0A9324C5E37600DF2C21 /* fast_float_curves.c */,
+ 418B0A9824C5E37700DF2C21 /* fast_float_internal.h */,
+ 418B0AA024C5E37800DF2C21 /* fast_float_matsh.c */,
+ 418B0A9A24C5E37700DF2C21 /* fast_float_separate.c */,
+ 418B0A9D24C5E37700DF2C21 /* fast_float_sup.c */,
+ 418B0A9524C5E37600DF2C21 /* fast_float_tethra.c */,
+ );
+ name = fast_float_plugin;
+ sourceTree = "<group>";
+ };
+ 418B0AB924C5E42900DF2C21 /* fast_float_testbed */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0AF124C5E6B000DF2C21 /* fast_float_testbed.c */,
+ );
+ name = fast_float_testbed;
+ path = ../../../plugins/fast_float/testbed;
+ sourceTree = "<group>";
+ };
+ 418B0ACC24C5E4EA00DF2C21 /* transicc */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0AF824C5E6D200DF2C21 /* transicc.c */,
+ 418B0AF524C5E6C800DF2C21 /* utils.h */,
+ 418B0AF424C5E6C700DF2C21 /* vprf.c */,
+ 418B0AF324C5E6C700DF2C21 /* xgetopt.c */,
+ );
+ name = transicc;
+ sourceTree = SOURCE_ROOT;
+ };
+ 418B0AE224C5E5C300DF2C21 /* linkicc */ = {
+ isa = PBXGroup;
+ children = (
+ 4123B46825518DB1005F0287 /* linkicc.c */,
+ 418B0AFC24C5E73100DF2C21 /* utils.h */,
+ 418B0AFE24C5E73100DF2C21 /* vprf.c */,
+ 418B0AFD24C5E73100DF2C21 /* xgetopt.c */,
+ );
+ name = linkicc;
+ path = ../../../utils/linkicc;
+ sourceTree = SOURCE_ROOT;
+ };
+ 418B0B0624C5E76100DF2C21 /* tificc */ = {
+ isa = PBXGroup;
+ children = (
+ 4123B4B72551903B005F0287 /* tificc.c */,
+ 4123B4A325518FFB005F0287 /* xgetopt.c */,
+ 418B0B1224C5E7BB00DF2C21 /* vprf.c */,
+ 418B0B0E24C5E79200DF2C21 /* utils.h */,
+ );
+ name = tificc;
+ path = ../../../utils/tificc;
+ sourceTree = SOURCE_ROOT;
+ };
+ 418B0B1B24C5E85600DF2C21 /* tifdiff */ = {
+ isa = PBXGroup;
+ children = (
+ 4123B4C2255190FE005F0287 /* tifdiff.c */,
+ 418B0B2724C5E92B00DF2C21 /* vprf.c */,
+ 418B0B2824C5E92B00DF2C21 /* xgetopt.c */,
+ 418B0B2424C5E92100DF2C21 /* tifdiff.c */,
+ );
+ name = tifdiff;
+ path = ../../../utils/tificc;
+ sourceTree = SOURCE_ROOT;
+ };
+ 418B0B3024C5E95D00DF2C21 /* jpegicc */ = {
+ isa = PBXGroup;
+ children = (
+ 418B0B4024C5E9F700DF2C21 /* utils.h */,
+ 418B0B3E24C5E9F700DF2C21 /* vprf.c */,
+ 418B0B3F24C5E9F700DF2C21 /* xgetopt.c */,
+ 418B0B3924C5E99600DF2C21 /* jpgicc.c */,
+ 418B0B3624C5E98E00DF2C21 /* iccjpeg.c */,
+ 418B0B3724C5E98E00DF2C21 /* iccjpeg.h */,
+ );
+ name = jpegicc;
+ path = ../../../utils/jpgicc;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 418B0A2D24C5E19500DF2C21 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0A6F24C5E1E800DF2C21 /* lcms2.h in Headers */,
+ 418B0A7024C5E1E800DF2C21 /* lcms2_plugin.h in Headers */,
+ 418B0A7224C5E1F400DF2C21 /* lcms2_internal.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0A8B24C5E35200DF2C21 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0AB024C5E38C00DF2C21 /* lcms2_fast_float.h in Headers */,
+ 418B0AA624C5E37800DF2C21 /* fast_float_internal.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 418B0A3024C5E19500DF2C21 /* lcms2 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0A3524C5E19500DF2C21 /* Build configuration list for PBXNativeTarget "lcms2" */;
+ buildPhases = (
+ 418B0A2D24C5E19500DF2C21 /* Headers */,
+ 418B0A2E24C5E19500DF2C21 /* Sources */,
+ 418B0A2F24C5E19500DF2C21 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = lcms2;
+ productName = lcms2;
+ productReference = 418B0A3124C5E19500DF2C21 /* liblcms2.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 418B0A7724C5E25200DF2C21 /* testbed */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0A7C24C5E25200DF2C21 /* Build configuration list for PBXNativeTarget "testbed" */;
+ buildPhases = (
+ 418B0A7424C5E25200DF2C21 /* Sources */,
+ 418B0A7524C5E25200DF2C21 /* Frameworks */,
+ 418B0A7624C5E25200DF2C21 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0A8624C5E29800DF2C21 /* PBXTargetDependency */,
+ );
+ name = testbed;
+ productName = testbed;
+ productReference = 418B0A7824C5E25200DF2C21 /* testbed */;
+ productType = "com.apple.product-type.tool";
+ };
+ 418B0A8E24C5E35200DF2C21 /* fast_float_plugin */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0A9024C5E35200DF2C21 /* Build configuration list for PBXNativeTarget "fast_float_plugin" */;
+ buildPhases = (
+ 418B0A8B24C5E35200DF2C21 /* Headers */,
+ 418B0A8C24C5E35200DF2C21 /* Sources */,
+ 418B0A8D24C5E35200DF2C21 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0AB324C5E3D400DF2C21 /* PBXTargetDependency */,
+ );
+ name = fast_float_plugin;
+ productName = fast_float_plugin;
+ productReference = 418B0A8F24C5E35200DF2C21 /* libfast_float_plugin.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 418B0AB724C5E42900DF2C21 /* fast_float_testbed */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0ABC24C5E42900DF2C21 /* Build configuration list for PBXNativeTarget "fast_float_testbed" */;
+ buildPhases = (
+ 418B0AB424C5E42900DF2C21 /* Sources */,
+ 418B0AB524C5E42900DF2C21 /* Frameworks */,
+ 418B0AB624C5E42900DF2C21 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0AC624C5E48600DF2C21 /* PBXTargetDependency */,
+ 418B0AC424C5E48100DF2C21 /* PBXTargetDependency */,
+ );
+ name = fast_float_testbed;
+ productName = fast_float_testbed;
+ productReference = 418B0AB824C5E42900DF2C21 /* testbed */;
+ productType = "com.apple.product-type.tool";
+ };
+ 418B0ACA24C5E4EA00DF2C21 /* transicc */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0ACF24C5E4EA00DF2C21 /* Build configuration list for PBXNativeTarget "transicc" */;
+ buildPhases = (
+ 418B0AC724C5E4EA00DF2C21 /* Sources */,
+ 418B0AC824C5E4EA00DF2C21 /* Frameworks */,
+ 418B0AC924C5E4EA00DF2C21 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0ADC24C5E58F00DF2C21 /* PBXTargetDependency */,
+ );
+ name = transicc;
+ productName = transicc;
+ productReference = 418B0ACB24C5E4EA00DF2C21 /* transicc */;
+ productType = "com.apple.product-type.tool";
+ };
+ 418B0AE024C5E5C300DF2C21 /* linkicc */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0AE524C5E5C300DF2C21 /* Build configuration list for PBXNativeTarget "linkicc" */;
+ buildPhases = (
+ 418B0ADD24C5E5C300DF2C21 /* Sources */,
+ 418B0ADE24C5E5C300DF2C21 /* Frameworks */,
+ 418B0ADF24C5E5C300DF2C21 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0AE924C5E5CA00DF2C21 /* PBXTargetDependency */,
+ );
+ name = linkicc;
+ productName = linkicc;
+ productReference = 418B0AE124C5E5C300DF2C21 /* linkicc */;
+ productType = "com.apple.product-type.tool";
+ };
+ 418B0B0424C5E76100DF2C21 /* tificc */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0B0924C5E76100DF2C21 /* Build configuration list for PBXNativeTarget "tificc" */;
+ buildPhases = (
+ 418B0B0124C5E76100DF2C21 /* Sources */,
+ 418B0B0224C5E76100DF2C21 /* Frameworks */,
+ 418B0B0324C5E76100DF2C21 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0B0D24C5E77500DF2C21 /* PBXTargetDependency */,
+ );
+ name = tificc;
+ productName = tificc;
+ productReference = 418B0B0524C5E76100DF2C21 /* tificc */;
+ productType = "com.apple.product-type.tool";
+ };
+ 418B0B1924C5E85600DF2C21 /* tifdiff */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0B1E24C5E85600DF2C21 /* Build configuration list for PBXNativeTarget "tifdiff" */;
+ buildPhases = (
+ 418B0B1624C5E85600DF2C21 /* Sources */,
+ 418B0B1724C5E85600DF2C21 /* Frameworks */,
+ 418B0B1824C5E85600DF2C21 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0B2324C5E8FA00DF2C21 /* PBXTargetDependency */,
+ );
+ name = tifdiff;
+ productName = tifdiff;
+ productReference = 418B0B1A24C5E85600DF2C21 /* tifdiff */;
+ productType = "com.apple.product-type.tool";
+ };
+ 418B0B2E24C5E95D00DF2C21 /* jpegicc */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 418B0B3324C5E95D00DF2C21 /* Build configuration list for PBXNativeTarget "jpegicc" */;
+ buildPhases = (
+ 418B0B2B24C5E95D00DF2C21 /* Sources */,
+ 418B0B2C24C5E95D00DF2C21 /* Frameworks */,
+ 418B0B2D24C5E95D00DF2C21 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 418B0B3C24C5E99E00DF2C21 /* PBXTargetDependency */,
+ );
+ name = jpegicc;
+ productName = jpegicc;
+ productReference = 418B0B2F24C5E95D00DF2C21 /* jpegicc */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 418B0A2924C5E19500DF2C21 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1210;
+ ORGANIZATIONNAME = littlecms;
+ TargetAttributes = {
+ 418B0A3024C5E19500DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0A7724C5E25200DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0A8E24C5E35200DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0AB724C5E42900DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0ACA24C5E4EA00DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0AE024C5E5C300DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0B0424C5E76100DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0B1924C5E85600DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ 418B0B2E24C5E95D00DF2C21 = {
+ CreatedOnToolsVersion = 11.6;
+ };
+ };
+ };
+ buildConfigurationList = 418B0A2C24C5E19500DF2C21 /* Build configuration list for PBXProject "lcms2" */;
+ compatibilityVersion = "Xcode 12.0";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 418B0A2824C5E19500DF2C21;
+ productRefGroup = 418B0A3224C5E19500DF2C21 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 418B0A3024C5E19500DF2C21 /* lcms2 */,
+ 418B0A7724C5E25200DF2C21 /* testbed */,
+ 418B0A8E24C5E35200DF2C21 /* fast_float_plugin */,
+ 418B0AB724C5E42900DF2C21 /* fast_float_testbed */,
+ 418B0ACA24C5E4EA00DF2C21 /* transicc */,
+ 418B0AE024C5E5C300DF2C21 /* linkicc */,
+ 418B0B0424C5E76100DF2C21 /* tificc */,
+ 418B0B1924C5E85600DF2C21 /* tifdiff */,
+ 418B0B2E24C5E95D00DF2C21 /* jpegicc */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 418B0A2E24C5E19500DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0A5224C5E1C900DF2C21 /* cmsgamma.c in Sources */,
+ 418B0A5324C5E1C900DF2C21 /* cmsintrp.c in Sources */,
+ 418B0A5424C5E1C900DF2C21 /* cmsgmt.c in Sources */,
+ 418B0A5524C5E1C900DF2C21 /* cmscnvrt.c in Sources */,
+ 418B0A5624C5E1C900DF2C21 /* cmsmd5.c in Sources */,
+ 418B0A5724C5E1C900DF2C21 /* cmssm.c in Sources */,
+ 418B0A5824C5E1C900DF2C21 /* cmsopt.c in Sources */,
+ 418B0A5924C5E1C900DF2C21 /* cmscgats.c in Sources */,
+ 418B0A5A24C5E1C900DF2C21 /* cmsalpha.c in Sources */,
+ 418B0A5B24C5E1C900DF2C21 /* cmstypes.c in Sources */,
+ 418B0A5C24C5E1C900DF2C21 /* cmsio1.c in Sources */,
+ 418B0A5D24C5E1C900DF2C21 /* cmspack.c in Sources */,
+ 418B0A5E24C5E1C900DF2C21 /* cmsxform.c in Sources */,
+ 418B0A5F24C5E1C900DF2C21 /* cmswtpnt.c in Sources */,
+ 418B0A6024C5E1C900DF2C21 /* cmsmtrx.c in Sources */,
+ 418B0A6124C5E1C900DF2C21 /* cmspcs.c in Sources */,
+ 418B0A6224C5E1C900DF2C21 /* cmsps2.c in Sources */,
+ 418B0A6324C5E1C900DF2C21 /* cmsnamed.c in Sources */,
+ 418B0A6424C5E1C900DF2C21 /* cmserr.c in Sources */,
+ 418B0A6524C5E1C900DF2C21 /* cmslut.c in Sources */,
+ 418B0A6624C5E1C900DF2C21 /* cmsvirt.c in Sources */,
+ 418B0A6724C5E1C900DF2C21 /* cmsplugin.c in Sources */,
+ 418B0A6824C5E1C900DF2C21 /* cmshalf.c in Sources */,
+ 418B0A6924C5E1C900DF2C21 /* cmsio0.c in Sources */,
+ 418B0A6A24C5E1C900DF2C21 /* cmscam02.c in Sources */,
+ 418B0A6B24C5E1C900DF2C21 /* cmssamp.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0A7424C5E25200DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0B4724C5EC1D00DF2C21 /* testplugin.c in Sources */,
+ 418B0B4924C5EC2A00DF2C21 /* zoo_icc.c in Sources */,
+ 418B0B4624C5EC1D00DF2C21 /* testcms2.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0A8C24C5E35200DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0AA124C5E37800DF2C21 /* fast_float_curves.c in Sources */,
+ 418B0AA224C5E37800DF2C21 /* fast_float_15mats.c in Sources */,
+ 418B0AA324C5E37800DF2C21 /* fast_float_tethra.c in Sources */,
+ 418B0AA424C5E37800DF2C21 /* fast_float_cmyk.c in Sources */,
+ 418B0AA524C5E37800DF2C21 /* fast_16_tethra.c in Sources */,
+ 418B0AA724C5E37800DF2C21 /* fast_8_matsh.c in Sources */,
+ 418B0AA824C5E37800DF2C21 /* fast_float_separate.c in Sources */,
+ 418B0AA924C5E37800DF2C21 /* fast_8_matsh_sse.c in Sources */,
+ 418B0AAA24C5E37800DF2C21 /* fast_8_tethra.c in Sources */,
+ 418B0AAB24C5E37800DF2C21 /* fast_float_sup.c in Sources */,
+ 418B0AAC24C5E37800DF2C21 /* fast_float_15bits.c in Sources */,
+ 418B0AAD24C5E37800DF2C21 /* fast_8_curves.c in Sources */,
+ 418B0AAE24C5E37800DF2C21 /* fast_float_matsh.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0AB424C5E42900DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0AF224C5E6B000DF2C21 /* fast_float_testbed.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0AC724C5E4EA00DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0AF724C5E6C800DF2C21 /* vprf.c in Sources */,
+ 418B0AF924C5E6D200DF2C21 /* transicc.c in Sources */,
+ 418B0AF624C5E6C800DF2C21 /* xgetopt.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0ADD24C5E5C300DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0B0024C5E73100DF2C21 /* vprf.c in Sources */,
+ 418B0AFF24C5E73100DF2C21 /* xgetopt.c in Sources */,
+ 4123B46925518DB1005F0287 /* linkicc.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0B0124C5E76100DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4123B4A425518FFB005F0287 /* xgetopt.c in Sources */,
+ 418B0B0F24C5E79200DF2C21 /* utils.h in Sources */,
+ 418B0B1424C5E7BB00DF2C21 /* vprf.c in Sources */,
+ 4123B4B82551903B005F0287 /* tificc.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0B1624C5E85600DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0B2524C5E92100DF2C21 /* tifdiff.c in Sources */,
+ 418B0B2924C5E92B00DF2C21 /* vprf.c in Sources */,
+ 418B0B2A24C5E92B00DF2C21 /* xgetopt.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 418B0B2B24C5E95D00DF2C21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 418B0B3824C5E98E00DF2C21 /* iccjpeg.c in Sources */,
+ 418B0B4224C5E9F700DF2C21 /* xgetopt.c in Sources */,
+ 418B0B4124C5E9F700DF2C21 /* vprf.c in Sources */,
+ 418B0B3A24C5E99600DF2C21 /* jpgicc.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 418B0A8624C5E29800DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0A8524C5E29800DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0AB324C5E3D400DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0AB224C5E3D400DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0AC424C5E48100DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A8E24C5E35200DF2C21 /* fast_float_plugin */;
+ targetProxy = 418B0AC324C5E48100DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0AC624C5E48600DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0AC524C5E48600DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0ADC24C5E58F00DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0ADB24C5E58F00DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0AE924C5E5CA00DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0AE824C5E5CA00DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0B0D24C5E77500DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0B0C24C5E77500DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0B2324C5E8FA00DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0B2224C5E8FA00DF2C21 /* PBXContainerItemProxy */;
+ };
+ 418B0B3C24C5E99E00DF2C21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 418B0A3024C5E19500DF2C21 /* lcms2 */;
+ targetProxy = 418B0B3B24C5E99E00DF2C21 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 418B0A3324C5E19500DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 418B0A3424C5E19500DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ 418B0A3624C5E19500DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ EXECUTABLE_PREFIX = lib;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 418B0A3724C5E19500DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ EXECUTABLE_PREFIX = lib;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ 418B0A7D24C5E25200DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 418B0A7E24C5E25200DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 418B0A9124C5E35200DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ EXECUTABLE_PREFIX = lib;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 418B0A9224C5E35200DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ EXECUTABLE_PREFIX = lib;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ };
+ name = Release;
+ };
+ 418B0ABD24C5E42900DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 418B0ABE24C5E42900DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 418B0AD024C5E4EA00DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 418B0AD124C5E4EA00DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 418B0AE624C5E5C300DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 418B0AE724C5E5C300DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 418B0B0A24C5E76100DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = /usr/local/include;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ OTHER_LDFLAGS = (
+ "-L",
+ /usr/local/lib,
+ "-ltiff",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 418B0B0B24C5E76100DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = /usr/local/include;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ OTHER_LDFLAGS = (
+ "-L",
+ /usr/local/lib,
+ "-ltiff",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 418B0B1F24C5E85600DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = /usr/local/include;
+ OTHER_LDFLAGS = (
+ "-L",
+ /usr/local/lib,
+ "-ltiff",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 418B0B2024C5E85600DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = /usr/local/include;
+ OTHER_LDFLAGS = (
+ "-L",
+ /usr/local/lib,
+ "-ltiff",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ 418B0B3424C5E95D00DF2C21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = /usr/local/include;
+ OTHER_LDFLAGS = (
+ "-L",
+ /usr/local/lib,
+ "-ljpeg",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 418B0B3524C5E95D00DF2C21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ HEADER_SEARCH_PATHS = /usr/local/include;
+ OTHER_LDFLAGS = (
+ "-L",
+ /usr/local/lib,
+ "-ljpeg",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 418B0A2C24C5E19500DF2C21 /* Build configuration list for PBXProject "lcms2" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0A3324C5E19500DF2C21 /* Debug */,
+ 418B0A3424C5E19500DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0A3524C5E19500DF2C21 /* Build configuration list for PBXNativeTarget "lcms2" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0A3624C5E19500DF2C21 /* Debug */,
+ 418B0A3724C5E19500DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0A7C24C5E25200DF2C21 /* Build configuration list for PBXNativeTarget "testbed" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0A7D24C5E25200DF2C21 /* Debug */,
+ 418B0A7E24C5E25200DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0A9024C5E35200DF2C21 /* Build configuration list for PBXNativeTarget "fast_float_plugin" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0A9124C5E35200DF2C21 /* Debug */,
+ 418B0A9224C5E35200DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0ABC24C5E42900DF2C21 /* Build configuration list for PBXNativeTarget "fast_float_testbed" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0ABD24C5E42900DF2C21 /* Debug */,
+ 418B0ABE24C5E42900DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0ACF24C5E4EA00DF2C21 /* Build configuration list for PBXNativeTarget "transicc" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0AD024C5E4EA00DF2C21 /* Debug */,
+ 418B0AD124C5E4EA00DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0AE524C5E5C300DF2C21 /* Build configuration list for PBXNativeTarget "linkicc" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0AE624C5E5C300DF2C21 /* Debug */,
+ 418B0AE724C5E5C300DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0B0924C5E76100DF2C21 /* Build configuration list for PBXNativeTarget "tificc" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0B0A24C5E76100DF2C21 /* Debug */,
+ 418B0B0B24C5E76100DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0B1E24C5E85600DF2C21 /* Build configuration list for PBXNativeTarget "tifdiff" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0B1F24C5E85600DF2C21 /* Debug */,
+ 418B0B2024C5E85600DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 418B0B3324C5E95D00DF2C21 /* Build configuration list for PBXNativeTarget "jpegicc" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 418B0B3424C5E95D00DF2C21 /* Debug */,
+ 418B0B3524C5E95D00DF2C21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 418B0A2924C5E19500DF2C21 /* Project object */;
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:lcms2.xcodeproj">
+ </FileRef>
+</Workspace>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IDEDidComputeMac32BitWarning</key>
+ <true/>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>PreviewsEnabled</key>
+ <false/>
+</dict>
+</plist>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project version="1">\r
+ <includedir>\r
+ <dir name="../../include/"/>\r
+ </includedir>\r
+ <paths>\r
+ <dir name="../../src"/>\r
+ </paths>\r
+</project>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>LittleCMS</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.apple.carbonframeworktemplate</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>1.01</string>
- <key>CFBundleSignature</key>
- <string>lcms</string>
- <key>CFBundleVersion</key>
- <string>2.4</string>
- <key>CSResourcesFileMapped</key>
- <true/>
-</dict>
-</plist>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>ActivePerspectiveName</key>
- <string>Project</string>
- <key>AllowedModules</key>
- <array>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>PBXSmartGroupTreeModule</string>
- <key>Name</key>
- <string>Groups and Files Outline View</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>PBXNavigatorGroup</string>
- <key>Name</key>
- <string>Editor</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>XCTaskListModule</string>
- <key>Name</key>
- <string>Task List</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>XCDetailModule</string>
- <key>Name</key>
- <string>File and Smart Group Detail Viewer</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>1</string>
- <key>Module</key>
- <string>PBXBuildResultsModule</string>
- <key>Name</key>
- <string>Detailed Build Results Viewer</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>1</string>
- <key>Module</key>
- <string>PBXProjectFindModule</string>
- <key>Name</key>
- <string>Project Batch Find Tool</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>XCProjectFormatConflictsModule</string>
- <key>Name</key>
- <string>Project Format Conflicts List</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>PBXBookmarksModule</string>
- <key>Name</key>
- <string>Bookmarks Tool</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>PBXClassBrowserModule</string>
- <key>Name</key>
- <string>Class Browser</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>PBXCVSModule</string>
- <key>Name</key>
- <string>Source Code Control Tool</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>PBXDebugBreakpointsModule</string>
- <key>Name</key>
- <string>Debug Breakpoints Tool</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>XCDockableInspector</string>
- <key>Name</key>
- <string>Inspector</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>PBXOpenQuicklyModule</string>
- <key>Name</key>
- <string>Open Quickly Tool</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>1</string>
- <key>Module</key>
- <string>PBXDebugSessionModule</string>
- <key>Name</key>
- <string>Debugger</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>1</string>
- <key>Module</key>
- <string>PBXDebugCLIModule</string>
- <key>Name</key>
- <string>Debug Console</string>
- </dict>
- <dict>
- <key>BundleLoadPath</key>
- <string></string>
- <key>MaxInstances</key>
- <string>n</string>
- <key>Module</key>
- <string>XCSnapshotModule</string>
- <key>Name</key>
- <string>Snapshots Tool</string>
- </dict>
- </array>
- <key>BundlePath</key>
- <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
- <key>Description</key>
- <string>DefaultDescriptionKey</string>
- <key>DockingSystemVisible</key>
- <false/>
- <key>Extension</key>
- <string>mode1v3</string>
- <key>FavBarConfig</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>546B299810AC669D0054D33A</string>
- <key>XCBarModuleItemNames</key>
- <dict/>
- <key>XCBarModuleItems</key>
- <array/>
- </dict>
- <key>FirstTimeWindowDisplayed</key>
- <false/>
- <key>Identifier</key>
- <string>com.apple.perspectives.project.mode1v3</string>
- <key>MajorVersion</key>
- <integer>33</integer>
- <key>MinorVersion</key>
- <integer>0</integer>
- <key>Name</key>
- <string>Default</string>
- <key>Notifications</key>
- <array>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusErrorsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusErrorsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusWarningsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusWarningsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- </array>
- <key>OpenEditors</key>
- <array/>
- <key>PerspectiveWidths</key>
- <array>
- <integer>-1</integer>
- <integer>-1</integer>
- </array>
- <key>Perspectives</key>
- <array>
- <dict>
- <key>ChosenToolbarItems</key>
- <array>
- <string>active-target-popup</string>
- <string>active-buildstyle-popup</string>
- <string>action</string>
- <string>NSToolbarFlexibleSpaceItem</string>
- <string>buildOrClean</string>
- <string>build-and-goOrGo</string>
- <string>com.apple.ide.PBXToolbarStopButton</string>
- <string>get-info</string>
- <string>toggle-editor</string>
- <string>NSToolbarFlexibleSpaceItem</string>
- <string>com.apple.pbx.toolbar.searchfield</string>
- </array>
- <key>ControllerClassBaseName</key>
- <string></string>
- <key>IconName</key>
- <string>WindowOfProjectWithEditor</string>
- <key>Identifier</key>
- <string>perspective.project</string>
- <key>IsVertical</key>
- <false/>
- <key>Layout</key>
- <array>
- <dict>
- <key>BecomeActive</key>
- <true/>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXBottomSmartGroupGIDs</key>
- <array>
- <string>1C37FBAC04509CD000000102</string>
- <string>1C37FAAC04509CD000000102</string>
- <string>1C08E77C0454961000C914BD</string>
- <string>1C37FABC05509CD000000102</string>
- <string>1C37FABC05539CD112110102</string>
- <string>E2644B35053B69B200211256</string>
- <string>1C37FABC04509CD000100104</string>
- <string>1CC0EA4004350EF90044410B</string>
- <string>1CC0EA4004350EF90041110B</string>
- </array>
- <key>PBXProjectModuleGUID</key>
- <string>1CE0B1FE06471DED0097A5F4</string>
- <key>PBXProjectModuleLabel</key>
- <string>Files</string>
- <key>PBXProjectStructureProvided</key>
- <string>yes</string>
- <key>PBXSmartGroupTreeModuleColumnData</key>
- <dict>
- <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
- <array>
- <real>389</real>
- </array>
- <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
- <array>
- <string>MainColumn</string>
- </array>
- </dict>
- <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
- <dict>
- <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
- <array>
- <string>0867D691FE84028FC02AAC07</string>
- <string>1C37FBAC04509CD000000102</string>
- <string>1C37FABC05509CD000000102</string>
- <string>E2644B35053B69B200211256</string>
- </array>
- <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
- <array>
- <array>
- <integer>7</integer>
- <integer>6</integer>
- </array>
- </array>
- <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {389, 946}}</string>
- </dict>
- <key>PBXTopSmartGroupGIDs</key>
- <array/>
- <key>XCIncludePerspectivesSwitch</key>
- <true/>
- <key>XCSharingToken</key>
- <string>com.apple.Xcode.GFSharingToken</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {406, 964}}</string>
- <key>GroupTreeTableConfiguration</key>
- <array>
- <string>MainColumn</string>
- <real>389</real>
- </array>
- <key>RubberWindowFrame</key>
- <string>145 -306 1537 1005 0 0 1600 1178 </string>
- </dict>
- <key>Module</key>
- <string>PBXSmartGroupTreeModule</string>
- <key>Proportion</key>
- <string>406pt</string>
- </dict>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CE0B20306471E060097A5F4</string>
- <key>PBXProjectModuleLabel</key>
- <string>testcms2.c</string>
- <key>PBXSplitModuleInNavigatorKey</key>
- <dict>
- <key>Split0</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CE0B20406471E060097A5F4</string>
- <key>PBXProjectModuleLabel</key>
- <string>testcms2.c</string>
- <key>_historyCapacity</key>
- <integer>0</integer>
- <key>bookmark</key>
- <string>54C0D5B915A2072100A94CDC</string>
- <key>history</key>
- <array>
- <string>546B29DA10AC6B6E0054D33A</string>
- <string>546B29F510AC6C480054D33A</string>
- <string>54DBD07515A206A100180017</string>
- </array>
- <key>prevStack</key>
- <array>
- <string>546B29E010AC6B6E0054D33A</string>
- <string>546B29E110AC6B6E0054D33A</string>
- </array>
- </dict>
- <key>SplitCount</key>
- <string>1</string>
- </dict>
- <key>StatusBarVisibility</key>
- <true/>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {1126, 0}}</string>
- <key>RubberWindowFrame</key>
- <string>145 -306 1537 1005 0 0 1600 1178 </string>
- </dict>
- <key>Module</key>
- <string>PBXNavigatorGroup</string>
- <key>Proportion</key>
- <string>0pt</string>
- </dict>
- <dict>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CE0B20506471E060097A5F4</string>
- <key>PBXProjectModuleLabel</key>
- <string>Detail</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 5}, {1126, 959}}</string>
- <key>RubberWindowFrame</key>
- <string>145 -306 1537 1005 0 0 1600 1178 </string>
- </dict>
- <key>Module</key>
- <string>XCDetailModule</string>
- <key>Proportion</key>
- <string>959pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>1126pt</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Project</string>
- <key>ServiceClasses</key>
- <array>
- <string>XCModuleDock</string>
- <string>PBXSmartGroupTreeModule</string>
- <string>XCModuleDock</string>
- <string>PBXNavigatorGroup</string>
- <string>XCDetailModule</string>
- </array>
- <key>TableOfContents</key>
- <array>
- <string>54C0D5B315A206F900A94CDC</string>
- <string>1CE0B1FE06471DED0097A5F4</string>
- <string>54C0D5B415A206F900A94CDC</string>
- <string>1CE0B20306471E060097A5F4</string>
- <string>1CE0B20506471E060097A5F4</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.defaultV3</string>
- </dict>
- <dict>
- <key>ControllerClassBaseName</key>
- <string></string>
- <key>IconName</key>
- <string>WindowOfProject</string>
- <key>Identifier</key>
- <string>perspective.morph</string>
- <key>IsVertical</key>
- <integer>0</integer>
- <key>Layout</key>
- <array>
- <dict>
- <key>BecomeActive</key>
- <integer>1</integer>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXBottomSmartGroupGIDs</key>
- <array>
- <string>1C37FBAC04509CD000000102</string>
- <string>1C37FAAC04509CD000000102</string>
- <string>1C08E77C0454961000C914BD</string>
- <string>1C37FABC05509CD000000102</string>
- <string>1C37FABC05539CD112110102</string>
- <string>E2644B35053B69B200211256</string>
- <string>1C37FABC04509CD000100104</string>
- <string>1CC0EA4004350EF90044410B</string>
- <string>1CC0EA4004350EF90041110B</string>
- </array>
- <key>PBXProjectModuleGUID</key>
- <string>11E0B1FE06471DED0097A5F4</string>
- <key>PBXProjectModuleLabel</key>
- <string>Files</string>
- <key>PBXProjectStructureProvided</key>
- <string>yes</string>
- <key>PBXSmartGroupTreeModuleColumnData</key>
- <dict>
- <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
- <array>
- <real>186</real>
- </array>
- <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
- <array>
- <string>MainColumn</string>
- </array>
- </dict>
- <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
- <dict>
- <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
- <array>
- <string>29B97314FDCFA39411CA2CEA</string>
- <string>1C37FABC05509CD000000102</string>
- </array>
- <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
- <array>
- <array>
- <integer>0</integer>
- </array>
- </array>
- <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {186, 337}}</string>
- </dict>
- <key>PBXTopSmartGroupGIDs</key>
- <array/>
- <key>XCIncludePerspectivesSwitch</key>
- <integer>1</integer>
- <key>XCSharingToken</key>
- <string>com.apple.Xcode.GFSharingToken</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {203, 355}}</string>
- <key>GroupTreeTableConfiguration</key>
- <array>
- <string>MainColumn</string>
- <real>186</real>
- </array>
- <key>RubberWindowFrame</key>
- <string>373 269 690 397 0 0 1440 878 </string>
- </dict>
- <key>Module</key>
- <string>PBXSmartGroupTreeModule</string>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Morph</string>
- <key>PreferredWidth</key>
- <integer>300</integer>
- <key>ServiceClasses</key>
- <array>
- <string>XCModuleDock</string>
- <string>PBXSmartGroupTreeModule</string>
- </array>
- <key>TableOfContents</key>
- <array>
- <string>11E0B1FE06471DED0097A5F4</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.default.shortV3</string>
- </dict>
- </array>
- <key>PerspectivesBarVisible</key>
- <false/>
- <key>ShelfIsVisible</key>
- <false/>
- <key>SourceDescription</key>
- <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>
- <key>StatusbarIsVisible</key>
- <true/>
- <key>TimeStamp</key>
- <real>362940193.69248402</real>
- <key>ToolbarDisplayMode</key>
- <integer>1</integer>
- <key>ToolbarIsVisible</key>
- <true/>
- <key>ToolbarSizeMode</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Perspectives</string>
- <key>UpdateMessage</key>
- <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string>
- <key>WindowJustification</key>
- <integer>5</integer>
- <key>WindowOrderList</key>
- <array>
- <string>546B297610AC61DD0054D33A</string>
- <string>/Users/mariama/lcms2-2.4/Projects/mac/LittleCMS/LittleCMS.xcodeproj</string>
- </array>
- <key>WindowString</key>
- <string>145 -306 1537 1005 0 0 1600 1178 </string>
- <key>WindowToolsV3</key>
- <array>
- <dict>
- <key>FirstTimeWindowDisplayed</key>
- <false/>
- <key>Identifier</key>
- <string>windowTool.build</string>
- <key>IsVertical</key>
- <true/>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CD0528F0623707200166675</string>
- <key>PBXProjectModuleLabel</key>
- <string></string>
- <key>StatusBarVisibility</key>
- <true/>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {897, 417}}</string>
- <key>RubberWindowFrame</key>
- <string>645 215 897 912 0 0 1600 1178 </string>
- </dict>
- <key>Module</key>
- <string>PBXNavigatorGroup</string>
- <key>Proportion</key>
- <string>417pt</string>
- </dict>
- <dict>
- <key>BecomeActive</key>
- <true/>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>PBXProjectModuleLabel</key>
- <string>Build</string>
- <key>XCBuildResultsTrigger_Collapse</key>
- <integer>1021</integer>
- <key>XCBuildResultsTrigger_Open</key>
- <integer>1013</integer>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 422}, {897, 449}}</string>
- <key>RubberWindowFrame</key>
- <string>645 215 897 912 0 0 1600 1178 </string>
- </dict>
- <key>Module</key>
- <string>PBXBuildResultsModule</string>
- <key>Proportion</key>
- <string>449pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>871pt</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Build Results</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXBuildResultsModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <true/>
- <key>TableOfContents</key>
- <array>
- <string>546B297610AC61DD0054D33A</string>
- <string>54C0D5B815A2071B00A94CDC</string>
- <string>1CD0528F0623707200166675</string>
- <string>XCMainBuildResultsModuleGUID</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.buildV3</string>
- <key>WindowString</key>
- <string>645 215 897 912 0 0 1600 1178 </string>
- <key>WindowToolGUID</key>
- <string>546B297610AC61DD0054D33A</string>
- <key>WindowToolIsVisible</key>
- <false/>
- </dict>
- <dict>
- <key>FirstTimeWindowDisplayed</key>
- <false/>
- <key>Identifier</key>
- <string>windowTool.debugger</string>
- <key>IsVertical</key>
- <true/>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>ContentConfiguration</key>
- <dict>
- <key>Debugger</key>
- <dict>
- <key>HorizontalSplitView</key>
- <dict>
- <key>_collapsingFrameDimension</key>
- <real>0.0</real>
- <key>_indexOfCollapsedView</key>
- <integer>0</integer>
- <key>_percentageOfCollapsedView</key>
- <real>0.0</real>
- <key>isCollapsed</key>
- <string>yes</string>
- <key>sizes</key>
- <array>
- <string>{{0, 0}, {316, 185}}</string>
- <string>{{316, 0}, {378, 185}}</string>
- </array>
- </dict>
- <key>VerticalSplitView</key>
- <dict>
- <key>_collapsingFrameDimension</key>
- <real>0.0</real>
- <key>_indexOfCollapsedView</key>
- <integer>0</integer>
- <key>_percentageOfCollapsedView</key>
- <real>0.0</real>
- <key>isCollapsed</key>
- <string>yes</string>
- <key>sizes</key>
- <array>
- <string>{{0, 0}, {694, 185}}</string>
- <string>{{0, 185}, {694, 196}}</string>
- </array>
- </dict>
- </dict>
- <key>LauncherConfigVersion</key>
- <string>8</string>
- <key>PBXProjectModuleGUID</key>
- <string>1C162984064C10D400B95A72</string>
- <key>PBXProjectModuleLabel</key>
- <string>Debug - GLUTExamples (Underwater)</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>DebugConsoleVisible</key>
- <string>None</string>
- <key>DebugConsoleWindowFrame</key>
- <string>{{200, 200}, {500, 300}}</string>
- <key>DebugSTDIOWindowFrame</key>
- <string>{{200, 200}, {500, 300}}</string>
- <key>Frame</key>
- <string>{{0, 0}, {694, 381}}</string>
- <key>PBXDebugSessionStackFrameViewKey</key>
- <dict>
- <key>DebugVariablesTableConfiguration</key>
- <array>
- <string>Name</string>
- <real>120</real>
- <string>Value</string>
- <real>85</real>
- <string>Summary</string>
- <real>148</real>
- </array>
- <key>Frame</key>
- <string>{{316, 0}, {378, 185}}</string>
- <key>RubberWindowFrame</key>
- <string>406 715 694 422 0 0 1600 1178 </string>
- </dict>
- <key>RubberWindowFrame</key>
- <string>406 715 694 422 0 0 1600 1178 </string>
- </dict>
- <key>Module</key>
- <string>PBXDebugSessionModule</string>
- <key>Proportion</key>
- <string>381pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>381pt</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Debugger</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXDebugSessionModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <true/>
- <key>TableOfContents</key>
- <array>
- <string>1CD10A99069EF8BA00B06720</string>
- <string>546B29C910AC6A970054D33A</string>
- <string>1C162984064C10D400B95A72</string>
- <string>546B29CA10AC6A970054D33A</string>
- <string>546B29CB10AC6A970054D33A</string>
- <string>546B29CC10AC6A970054D33A</string>
- <string>546B29CD10AC6A970054D33A</string>
- <string>546B29CE10AC6A970054D33A</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.debugV3</string>
- <key>WindowString</key>
- <string>406 715 694 422 0 0 1600 1178 </string>
- <key>WindowToolGUID</key>
- <string>1CD10A99069EF8BA00B06720</string>
- <key>WindowToolIsVisible</key>
- <false/>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.find</string>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CDD528C0622207200134675</string>
- <key>PBXProjectModuleLabel</key>
- <string><No Editor></string>
- <key>PBXSplitModuleInNavigatorKey</key>
- <dict>
- <key>Split0</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CD0528D0623707200166675</string>
- </dict>
- <key>SplitCount</key>
- <string>1</string>
- </dict>
- <key>StatusBarVisibility</key>
- <integer>1</integer>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {781, 167}}</string>
- <key>RubberWindowFrame</key>
- <string>62 385 781 470 0 0 1440 878 </string>
- </dict>
- <key>Module</key>
- <string>PBXNavigatorGroup</string>
- <key>Proportion</key>
- <string>781pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>50%</string>
- </dict>
- <dict>
- <key>BecomeActive</key>
- <integer>1</integer>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CD0528E0623707200166675</string>
- <key>PBXProjectModuleLabel</key>
- <string>Project Find</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{8, 0}, {773, 254}}</string>
- <key>RubberWindowFrame</key>
- <string>62 385 781 470 0 0 1440 878 </string>
- </dict>
- <key>Module</key>
- <string>PBXProjectFindModule</string>
- <key>Proportion</key>
- <string>50%</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>428pt</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Project Find</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXProjectFindModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <integer>1</integer>
- <key>TableOfContents</key>
- <array>
- <string>1C530D57069F1CE1000CFCEE</string>
- <string>1C530D58069F1CE1000CFCEE</string>
- <string>1C530D59069F1CE1000CFCEE</string>
- <string>1CDD528C0622207200134675</string>
- <string>1C530D5A069F1CE1000CFCEE</string>
- <string>1CE0B1FE06471DED0097A5F4</string>
- <string>1CD0528E0623707200166675</string>
- </array>
- <key>WindowString</key>
- <string>62 385 781 470 0 0 1440 878 </string>
- <key>WindowToolGUID</key>
- <string>1C530D57069F1CE1000CFCEE</string>
- <key>WindowToolIsVisible</key>
- <integer>0</integer>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>MENUSEPARATOR</string>
- </dict>
- <dict>
- <key>FirstTimeWindowDisplayed</key>
- <false/>
- <key>Identifier</key>
- <string>windowTool.debuggerConsole</string>
- <key>IsVertical</key>
- <true/>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>BecomeActive</key>
- <true/>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1C78EAAC065D492600B07095</string>
- <key>PBXProjectModuleLabel</key>
- <string>Debugger Console</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {814, 470}}</string>
- <key>RubberWindowFrame</key>
- <string>406 626 814 511 0 0 1600 1178 </string>
- </dict>
- <key>Module</key>
- <string>PBXDebugCLIModule</string>
- <key>Proportion</key>
- <string>470pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>470pt</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Debugger Console</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXDebugCLIModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <true/>
- <key>TableOfContents</key>
- <array>
- <string>1C78EAAD065D492600B07095</string>
- <string>546B29CF10AC6A970054D33A</string>
- <string>1C78EAAC065D492600B07095</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.consoleV3</string>
- <key>WindowString</key>
- <string>406 626 814 511 0 0 1600 1178 </string>
- <key>WindowToolGUID</key>
- <string>1C78EAAD065D492600B07095</string>
- <key>WindowToolIsVisible</key>
- <false/>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.snapshots</string>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>Module</key>
- <string>XCSnapshotModule</string>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Snapshots</string>
- <key>ServiceClasses</key>
- <array>
- <string>XCSnapshotModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <string>Yes</string>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.snapshots</string>
- <key>WindowString</key>
- <string>315 824 300 550 0 0 1440 878 </string>
- <key>WindowToolIsVisible</key>
- <string>Yes</string>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.scm</string>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1C78EAB2065D492600B07095</string>
- <key>PBXProjectModuleLabel</key>
- <string><No Editor></string>
- <key>PBXSplitModuleInNavigatorKey</key>
- <dict>
- <key>Split0</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1C78EAB3065D492600B07095</string>
- </dict>
- <key>SplitCount</key>
- <string>1</string>
- </dict>
- <key>StatusBarVisibility</key>
- <integer>1</integer>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {452, 0}}</string>
- <key>RubberWindowFrame</key>
- <string>743 379 452 308 0 0 1280 1002 </string>
- </dict>
- <key>Module</key>
- <string>PBXNavigatorGroup</string>
- <key>Proportion</key>
- <string>0pt</string>
- </dict>
- <dict>
- <key>BecomeActive</key>
- <integer>1</integer>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CD052920623707200166675</string>
- <key>PBXProjectModuleLabel</key>
- <string>SCM</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>ConsoleFrame</key>
- <string>{{0, 259}, {452, 0}}</string>
- <key>Frame</key>
- <string>{{0, 7}, {452, 259}}</string>
- <key>RubberWindowFrame</key>
- <string>743 379 452 308 0 0 1280 1002 </string>
- <key>TableConfiguration</key>
- <array>
- <string>Status</string>
- <real>30</real>
- <string>FileName</string>
- <real>199</real>
- <string>Path</string>
- <real>197.09500122070312</real>
- </array>
- <key>TableFrame</key>
- <string>{{0, 0}, {452, 250}}</string>
- </dict>
- <key>Module</key>
- <string>PBXCVSModule</string>
- <key>Proportion</key>
- <string>262pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>266pt</string>
- </dict>
- </array>
- <key>Name</key>
- <string>SCM</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXCVSModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <integer>1</integer>
- <key>TableOfContents</key>
- <array>
- <string>1C78EAB4065D492600B07095</string>
- <string>1C78EAB5065D492600B07095</string>
- <string>1C78EAB2065D492600B07095</string>
- <string>1CD052920623707200166675</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.scm</string>
- <key>WindowString</key>
- <string>743 379 452 308 0 0 1280 1002 </string>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.breakpoints</string>
- <key>IsVertical</key>
- <integer>0</integer>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>BecomeActive</key>
- <integer>1</integer>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXBottomSmartGroupGIDs</key>
- <array>
- <string>1C77FABC04509CD000000102</string>
- </array>
- <key>PBXProjectModuleGUID</key>
- <string>1CE0B1FE06471DED0097A5F4</string>
- <key>PBXProjectModuleLabel</key>
- <string>Files</string>
- <key>PBXProjectStructureProvided</key>
- <string>no</string>
- <key>PBXSmartGroupTreeModuleColumnData</key>
- <dict>
- <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
- <array>
- <real>168</real>
- </array>
- <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
- <array>
- <string>MainColumn</string>
- </array>
- </dict>
- <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
- <dict>
- <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
- <array>
- <string>1C77FABC04509CD000000102</string>
- </array>
- <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
- <array>
- <array>
- <integer>0</integer>
- </array>
- </array>
- <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {168, 350}}</string>
- </dict>
- <key>PBXTopSmartGroupGIDs</key>
- <array/>
- <key>XCIncludePerspectivesSwitch</key>
- <integer>0</integer>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{0, 0}, {185, 368}}</string>
- <key>GroupTreeTableConfiguration</key>
- <array>
- <string>MainColumn</string>
- <real>168</real>
- </array>
- <key>RubberWindowFrame</key>
- <string>315 424 744 409 0 0 1440 878 </string>
- </dict>
- <key>Module</key>
- <string>PBXSmartGroupTreeModule</string>
- <key>Proportion</key>
- <string>185pt</string>
- </dict>
- <dict>
- <key>ContentConfiguration</key>
- <dict>
- <key>PBXProjectModuleGUID</key>
- <string>1CA1AED706398EBD00589147</string>
- <key>PBXProjectModuleLabel</key>
- <string>Detail</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{{190, 0}, {554, 368}}</string>
- <key>RubberWindowFrame</key>
- <string>315 424 744 409 0 0 1440 878 </string>
- </dict>
- <key>Module</key>
- <string>XCDetailModule</string>
- <key>Proportion</key>
- <string>554pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>368pt</string>
- </dict>
- </array>
- <key>MajorVersion</key>
- <integer>3</integer>
- <key>MinorVersion</key>
- <integer>0</integer>
- <key>Name</key>
- <string>Breakpoints</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXSmartGroupTreeModule</string>
- <string>XCDetailModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <integer>1</integer>
- <key>TableOfContents</key>
- <array>
- <string>1CDDB66807F98D9800BB5817</string>
- <string>1CDDB66907F98D9800BB5817</string>
- <string>1CE0B1FE06471DED0097A5F4</string>
- <string>1CA1AED706398EBD00589147</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.breakpointsV3</string>
- <key>WindowString</key>
- <string>315 424 744 409 0 0 1440 878 </string>
- <key>WindowToolGUID</key>
- <string>1CDDB66807F98D9800BB5817</string>
- <key>WindowToolIsVisible</key>
- <integer>1</integer>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.debugAnimator</string>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>Module</key>
- <string>PBXNavigatorGroup</string>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Debug Visualizer</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXNavigatorGroup</string>
- </array>
- <key>StatusbarIsVisible</key>
- <integer>1</integer>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.debugAnimatorV3</string>
- <key>WindowString</key>
- <string>100 100 700 500 0 0 1280 1002 </string>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.bookmarks</string>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>Module</key>
- <string>PBXBookmarksModule</string>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Bookmarks</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXBookmarksModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <integer>0</integer>
- <key>WindowString</key>
- <string>538 42 401 187 0 0 1280 1002 </string>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.projectFormatConflicts</string>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>Module</key>
- <string>XCProjectFormatConflictsModule</string>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Project Format Conflicts</string>
- <key>ServiceClasses</key>
- <array>
- <string>XCProjectFormatConflictsModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <integer>0</integer>
- <key>WindowContentMinSize</key>
- <string>450 300</string>
- <key>WindowString</key>
- <string>50 850 472 307 0 0 1440 877</string>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.classBrowser</string>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>BecomeActive</key>
- <integer>1</integer>
- <key>ContentConfiguration</key>
- <dict>
- <key>OptionsSetName</key>
- <string>Hierarchy, all classes</string>
- <key>PBXProjectModuleGUID</key>
- <string>1CA6456E063B45B4001379D8</string>
- <key>PBXProjectModuleLabel</key>
- <string>Class Browser - NSObject</string>
- </dict>
- <key>GeometryConfiguration</key>
- <dict>
- <key>ClassesFrame</key>
- <string>{{0, 0}, {374, 96}}</string>
- <key>ClassesTreeTableConfiguration</key>
- <array>
- <string>PBXClassNameColumnIdentifier</string>
- <real>208</real>
- <string>PBXClassBookColumnIdentifier</string>
- <real>22</real>
- </array>
- <key>Frame</key>
- <string>{{0, 0}, {630, 331}}</string>
- <key>MembersFrame</key>
- <string>{{0, 105}, {374, 395}}</string>
- <key>MembersTreeTableConfiguration</key>
- <array>
- <string>PBXMemberTypeIconColumnIdentifier</string>
- <real>22</real>
- <string>PBXMemberNameColumnIdentifier</string>
- <real>216</real>
- <string>PBXMemberTypeColumnIdentifier</string>
- <real>97</real>
- <string>PBXMemberBookColumnIdentifier</string>
- <real>22</real>
- </array>
- <key>PBXModuleWindowStatusBarHidden2</key>
- <integer>1</integer>
- <key>RubberWindowFrame</key>
- <string>385 179 630 352 0 0 1440 878 </string>
- </dict>
- <key>Module</key>
- <string>PBXClassBrowserModule</string>
- <key>Proportion</key>
- <string>332pt</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>332pt</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Class Browser</string>
- <key>ServiceClasses</key>
- <array>
- <string>PBXClassBrowserModule</string>
- </array>
- <key>StatusbarIsVisible</key>
- <integer>0</integer>
- <key>TableOfContents</key>
- <array>
- <string>1C0AD2AF069F1E9B00FABCE6</string>
- <string>1C0AD2B0069F1E9B00FABCE6</string>
- <string>1CA6456E063B45B4001379D8</string>
- </array>
- <key>ToolbarConfiguration</key>
- <string>xcode.toolbar.config.classbrowser</string>
- <key>WindowString</key>
- <string>385 179 630 352 0 0 1440 878 </string>
- <key>WindowToolGUID</key>
- <string>1C0AD2AF069F1E9B00FABCE6</string>
- <key>WindowToolIsVisible</key>
- <integer>0</integer>
- </dict>
- <dict>
- <key>Identifier</key>
- <string>windowTool.refactoring</string>
- <key>IncludeInToolsMenu</key>
- <integer>0</integer>
- <key>Layout</key>
- <array>
- <dict>
- <key>Dock</key>
- <array>
- <dict>
- <key>BecomeActive</key>
- <integer>1</integer>
- <key>GeometryConfiguration</key>
- <dict>
- <key>Frame</key>
- <string>{0, 0}, {500, 335}</string>
- <key>RubberWindowFrame</key>
- <string>{0, 0}, {500, 335}</string>
- </dict>
- <key>Module</key>
- <string>XCRefactoringModule</string>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Proportion</key>
- <string>100%</string>
- </dict>
- </array>
- <key>Name</key>
- <string>Refactoring</string>
- <key>ServiceClasses</key>
- <array>
- <string>XCRefactoringModule</string>
- </array>
- <key>WindowString</key>
- <string>200 200 500 356 0 0 1920 1200 </string>
- </dict>
- </array>
-</dict>
-</plist>
+++ /dev/null
-// !$*UTF8*$!
-{
- 0867D690FE84028FC02AAC07 /* Project object */ = {
- activeArchitecture = ppc;
- activeBuildConfigurationName = Release;
- activeExecutable = 546B29A410AC677E0054D33A /* testbed */;
- activeTarget = 8D07F2BC0486CC7A007CD1D0 /* LittleCMS */;
- addToTargets = (
- 546B29A210AC677E0054D33A /* testbed */,
- );
- codeSenseManager = 546B293010AC5E210054D33A /* Code sense */;
- executables = (
- 546B29A410AC677E0054D33A /* testbed */,
- );
- perUserDictionary = {
- PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 200,
- 200,
- 760,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXBookmarksDataSource_LocationID,
- PBXBookmarksDataSource_NameID,
- PBXBookmarksDataSource_CommentsID,
- );
- };
- PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 20,
- 300,
- 840,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXErrorsWarningsDataSource_TypeID,
- PBXErrorsWarningsDataSource_MessageID,
- PBXErrorsWarningsDataSource_LocationID,
- );
- };
- PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 22,
- 300,
- 838,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXExecutablesDataSource_ActiveFlagID,
- PBXExecutablesDataSource_NameID,
- PBXExecutablesDataSource_CommentsID,
- );
- };
- PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 20,
- 887,
- 20,
- 48,
- 43,
- 43,
- 20,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXFileDataSource_FiletypeID,
- PBXFileDataSource_Filename_ColumnID,
- PBXFileDataSource_Built_ColumnID,
- PBXFileDataSource_ObjectSize_ColumnID,
- PBXFileDataSource_Errors_ColumnID,
- PBXFileDataSource_Warnings_ColumnID,
- PBXFileDataSource_Target_ColumnID,
- );
- };
- PBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 200,
- 964,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXFindDataSource_MessageID,
- PBXFindDataSource_LocationID,
- );
- };
- PBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 16,
- 200,
- 50,
- 890,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXSymbolsDataSource_SymbolTypeIconID,
- PBXSymbolsDataSource_SymbolNameID,
- PBXSymbolsDataSource_SymbolTypeID,
- PBXSymbolsDataSource_ReferenceNameID,
- );
- };
- PBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 20,
- 20,
- 926,
- 20,
- 48.16259765625,
- 43,
- 43,
- 20,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXFileDataSource_SCM_ColumnID,
- PBXFileDataSource_FiletypeID,
- PBXFileDataSource_Filename_ColumnID,
- PBXFileDataSource_Built_ColumnID,
- PBXFileDataSource_ObjectSize_ColumnID,
- PBXFileDataSource_Errors_ColumnID,
- PBXFileDataSource_Warnings_ColumnID,
- PBXFileDataSource_Target_ColumnID,
- );
- };
- PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 20,
- 847,
- 60,
- 20,
- 48,
- 43,
- 43,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXFileDataSource_FiletypeID,
- PBXFileDataSource_Filename_ColumnID,
- PBXTargetDataSource_PrimaryAttribute,
- PBXFileDataSource_Built_ColumnID,
- PBXFileDataSource_ObjectSize_ColumnID,
- PBXFileDataSource_Errors_ColumnID,
- PBXFileDataSource_Warnings_ColumnID,
- );
- };
- PBXPerProjectTemplateStateSaveDate = 362940143;
- PBXWorkspaceStateSaveDate = 362940143;
- };
- perUserProjectItems = {
- 546B29DA10AC6B6E0054D33A = 546B29DA10AC6B6E0054D33A /* PBXTextBookmark */;
- 546B29E010AC6B6E0054D33A = 546B29E010AC6B6E0054D33A /* PBXTextBookmark */;
- 546B29E110AC6B6E0054D33A = 546B29E110AC6B6E0054D33A /* PBXTextBookmark */;
- 546B29E210AC6B6E0054D33A = 546B29E210AC6B6E0054D33A /* PBXTextBookmark */;
- 546B29F510AC6C480054D33A = 546B29F510AC6C480054D33A /* PBXTextBookmark */;
- 54C0D5B215A206F900A94CDC /* PBXTextBookmark */ = 54C0D5B215A206F900A94CDC /* PBXTextBookmark */;
- 54C0D5B915A2072100A94CDC /* PBXTextBookmark */ = 54C0D5B915A2072100A94CDC /* PBXTextBookmark */;
- 54DBD07515A206A100180017 = 54DBD07515A206A100180017 /* PBXTextBookmark */;
- };
- sourceControlManager = 546B292F10AC5E210054D33A /* Source Control */;
- userBuildSettings = {
- };
- };
- 546B292F10AC5E210054D33A /* Source Control */ = {
- isa = PBXSourceControlManager;
- fallbackIsa = XCSourceControlManager;
- isSCMEnabled = 0;
- scmConfiguration = {
- };
- };
- 546B293010AC5E210054D33A /* Code sense */ = {
- isa = PBXCodeSenseManager;
- indexTemplatePath = "";
- };
- 546B293810AC5E4A0054D33A /* cmsio0.c */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1065, 24374}}";
- sepNavSelRange = "{25921, 0}";
- sepNavVisRange = "{0, 0}";
- };
- };
- 546B296B10AC5EAA0054D33A /* TestBed-Info.plist */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1128, 522}}";
- sepNavSelRange = "{172, 5}";
- sepNavVisRange = "{0, 671}";
- };
- };
- 546B299D10AC672A0054D33A /* RunUnitTests */ = {
- isa = PBXFileReference;
- lastKnownFileType = text.script.sh;
- name = RunUnitTests;
- path = /Developer/Tools/RunUnitTests;
- sourceTree = "<absolute>";
- };
- 546B29A210AC677E0054D33A /* testbed */ = {
- activeExec = 0;
- executables = (
- 546B29A410AC677E0054D33A /* testbed */,
- );
- };
- 546B29A410AC677E0054D33A /* testbed */ = {
- isa = PBXExecutable;
- activeArgIndices = (
- );
- argumentStrings = (
- );
- autoAttachOnCrash = 1;
- breakpointsEnabled = 0;
- configStateDict = {
- };
- customDataFormattersEnabled = 1;
- debuggerPlugin = GDBDebugging;
- disassemblyDisplayState = 0;
- dylibVariantSuffix = "";
- enableDebugStr = 1;
- environmentEntries = (
- );
- executableSystemSymbolLevel = 0;
- executableUserSymbolLevel = 0;
- libgmallocEnabled = 0;
- name = testbed;
- savedGlobals = {
- };
- sourceDirectories = (
- );
- variableFormatDictionary = {
- };
- };
- 546B29AD10AC68410054D33A /* testcms2.c */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1065, 110054}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 0}";
- sepNavWindowFrame = "{{61, 247}, {1099, 884}}";
- };
- };
- 546B29DA10AC6B6E0054D33A /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B299D10AC672A0054D33A /* RunUnitTests */;
- name = "RunUnitTests: 298";
- rLen = 5;
- rLoc = 9244;
- rType = 0;
- vrLen = 172;
- vrLoc = 9140;
- };
- 546B29E010AC6B6E0054D33A /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B299D10AC672A0054D33A /* RunUnitTests */;
- name = "RunUnitTests: 298";
- rLen = 5;
- rLoc = 9244;
- rType = 0;
- vrLen = 172;
- vrLoc = 9140;
- };
- 546B29E110AC6B6E0054D33A /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B296B10AC5EAA0054D33A /* TestBed-Info.plist */;
- name = "TestBed-Info.plist: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 662;
- vrLoc = 0;
- };
- 546B29E210AC6B6E0054D33A /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B29AD10AC68410054D33A /* testcms2.c */;
- name = "testcms2.c: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1115;
- vrLoc = 0;
- };
- 546B29F510AC6C480054D33A /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B296B10AC5EAA0054D33A /* TestBed-Info.plist */;
- name = "TestBed-Info.plist: 5";
- rLen = 5;
- rLoc = 172;
- rType = 0;
- vrLen = 671;
- vrLoc = 0;
- };
- 54C0D5B215A206F900A94CDC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B29AD10AC68410054D33A /* testcms2.c */;
- name = "testcms2.c: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 0;
- vrLoc = 0;
- };
- 54C0D5B915A2072100A94CDC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B29AD10AC68410054D33A /* testcms2.c */;
- name = "testcms2.c: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 0;
- vrLoc = 0;
- };
- 54DBD07515A206A100180017 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 546B29AD10AC68410054D33A /* testcms2.c */;
- name = "testcms2.c: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 0;
- vrLoc = 0;
- };
- 8D07F2BC0486CC7A007CD1D0 /* LittleCMS */ = {
- activeExec = 0;
- };
-}
+++ /dev/null
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 44;
- objects = {
-
-/* Begin PBXBuildFile section */
- 546B294910AC5E4A0054D33A /* cmscam02.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293110AC5E4A0054D33A /* cmscam02.c */; };
- 546B294A10AC5E4A0054D33A /* cmscgats.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293210AC5E4A0054D33A /* cmscgats.c */; };
- 546B294B10AC5E4A0054D33A /* cmscnvrt.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293310AC5E4A0054D33A /* cmscnvrt.c */; };
- 546B294C10AC5E4A0054D33A /* cmserr.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293410AC5E4A0054D33A /* cmserr.c */; };
- 546B294D10AC5E4A0054D33A /* cmsgamma.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293510AC5E4A0054D33A /* cmsgamma.c */; };
- 546B294E10AC5E4A0054D33A /* cmsgmt.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293610AC5E4A0054D33A /* cmsgmt.c */; };
- 546B294F10AC5E4A0054D33A /* cmsintrp.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293710AC5E4A0054D33A /* cmsintrp.c */; };
- 546B295010AC5E4A0054D33A /* cmsio0.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293810AC5E4A0054D33A /* cmsio0.c */; };
- 546B295110AC5E4A0054D33A /* cmsio1.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293910AC5E4A0054D33A /* cmsio1.c */; };
- 546B295210AC5E4A0054D33A /* cmslut.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293A10AC5E4A0054D33A /* cmslut.c */; };
- 546B295310AC5E4A0054D33A /* cmsmd5.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293B10AC5E4A0054D33A /* cmsmd5.c */; };
- 546B295410AC5E4A0054D33A /* cmsmtrx.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293C10AC5E4A0054D33A /* cmsmtrx.c */; };
- 546B295510AC5E4A0054D33A /* cmsnamed.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293D10AC5E4A0054D33A /* cmsnamed.c */; };
- 546B295610AC5E4A0054D33A /* cmsopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293E10AC5E4A0054D33A /* cmsopt.c */; };
- 546B295710AC5E4A0054D33A /* cmspack.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B293F10AC5E4A0054D33A /* cmspack.c */; };
- 546B295810AC5E4A0054D33A /* cmspcs.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294010AC5E4A0054D33A /* cmspcs.c */; };
- 546B295910AC5E4A0054D33A /* cmsplugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294110AC5E4A0054D33A /* cmsplugin.c */; };
- 546B295A10AC5E4A0054D33A /* cmsps2.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294210AC5E4A0054D33A /* cmsps2.c */; };
- 546B295B10AC5E4A0054D33A /* cmssamp.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294310AC5E4A0054D33A /* cmssamp.c */; };
- 546B295C10AC5E4A0054D33A /* cmssm.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294410AC5E4A0054D33A /* cmssm.c */; };
- 546B295D10AC5E4A0054D33A /* cmstypes.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294510AC5E4A0054D33A /* cmstypes.c */; };
- 546B295E10AC5E4A0054D33A /* cmsvirt.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294610AC5E4A0054D33A /* cmsvirt.c */; };
- 546B295F10AC5E4A0054D33A /* cmswtpnt.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294710AC5E4A0054D33A /* cmswtpnt.c */; };
- 546B296010AC5E4A0054D33A /* cmsxform.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B294810AC5E4A0054D33A /* cmsxform.c */; };
- 546B296310AC5E600054D33A /* lcms2.h in Headers */ = {isa = PBXBuildFile; fileRef = 546B296110AC5E600054D33A /* lcms2.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 546B296410AC5E600054D33A /* lcms2_plugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 546B296210AC5E600054D33A /* lcms2_plugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 546B29AE10AC68410054D33A /* testcms2.c in Sources */ = {isa = PBXBuildFile; fileRef = 546B29AD10AC68410054D33A /* testcms2.c */; };
- 54DBD06115A202B200180017 /* cmshalf.c in Sources */ = {isa = PBXBuildFile; fileRef = 54DBD06015A202B200180017 /* cmshalf.c */; };
- 54DBD06215A202BB00180017 /* cmshalf.c in Sources */ = {isa = PBXBuildFile; fileRef = 54DBD06015A202B200180017 /* cmshalf.c */; };
- 8D07F2BE0486CC7A007CD1D0 /* LittleCMS_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32BAE0B70371A74B00C91783 /* LittleCMS_Prefix.pch */; settings = {ATTRIBUTES = (Private, ); }; };
- 8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
- 8D07F2C40486CC7A007CD1D0 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB77AAFE841565C02AAC07 /* Carbon.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 546B29A710AC67870054D33A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 8D07F2BC0486CC7A007CD1D0;
- remoteInfo = LittleCMS;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 08FB77AAFE841565C02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
- 32BAE0B70371A74B00C91783 /* LittleCMS_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LittleCMS_Prefix.pch; sourceTree = "<group>"; };
- 546B293110AC5E4A0054D33A /* cmscam02.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmscam02.c; path = ../../../src/cmscam02.c; sourceTree = SOURCE_ROOT; };
- 546B293210AC5E4A0054D33A /* cmscgats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmscgats.c; path = ../../../src/cmscgats.c; sourceTree = SOURCE_ROOT; };
- 546B293310AC5E4A0054D33A /* cmscnvrt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmscnvrt.c; path = ../../../src/cmscnvrt.c; sourceTree = SOURCE_ROOT; };
- 546B293410AC5E4A0054D33A /* cmserr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmserr.c; path = ../../../src/cmserr.c; sourceTree = SOURCE_ROOT; };
- 546B293510AC5E4A0054D33A /* cmsgamma.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsgamma.c; path = ../../../src/cmsgamma.c; sourceTree = SOURCE_ROOT; };
- 546B293610AC5E4A0054D33A /* cmsgmt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsgmt.c; path = ../../../src/cmsgmt.c; sourceTree = SOURCE_ROOT; };
- 546B293710AC5E4A0054D33A /* cmsintrp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsintrp.c; path = ../../../src/cmsintrp.c; sourceTree = SOURCE_ROOT; };
- 546B293810AC5E4A0054D33A /* cmsio0.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsio0.c; path = ../../../src/cmsio0.c; sourceTree = SOURCE_ROOT; };
- 546B293910AC5E4A0054D33A /* cmsio1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsio1.c; path = ../../../src/cmsio1.c; sourceTree = SOURCE_ROOT; };
- 546B293A10AC5E4A0054D33A /* cmslut.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmslut.c; path = ../../../src/cmslut.c; sourceTree = SOURCE_ROOT; };
- 546B293B10AC5E4A0054D33A /* cmsmd5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsmd5.c; path = ../../../src/cmsmd5.c; sourceTree = SOURCE_ROOT; };
- 546B293C10AC5E4A0054D33A /* cmsmtrx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsmtrx.c; path = ../../../src/cmsmtrx.c; sourceTree = SOURCE_ROOT; };
- 546B293D10AC5E4A0054D33A /* cmsnamed.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsnamed.c; path = ../../../src/cmsnamed.c; sourceTree = SOURCE_ROOT; };
- 546B293E10AC5E4A0054D33A /* cmsopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsopt.c; path = ../../../src/cmsopt.c; sourceTree = SOURCE_ROOT; };
- 546B293F10AC5E4A0054D33A /* cmspack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmspack.c; path = ../../../src/cmspack.c; sourceTree = SOURCE_ROOT; };
- 546B294010AC5E4A0054D33A /* cmspcs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmspcs.c; path = ../../../src/cmspcs.c; sourceTree = SOURCE_ROOT; };
- 546B294110AC5E4A0054D33A /* cmsplugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsplugin.c; path = ../../../src/cmsplugin.c; sourceTree = SOURCE_ROOT; };
- 546B294210AC5E4A0054D33A /* cmsps2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsps2.c; path = ../../../src/cmsps2.c; sourceTree = SOURCE_ROOT; };
- 546B294310AC5E4A0054D33A /* cmssamp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmssamp.c; path = ../../../src/cmssamp.c; sourceTree = SOURCE_ROOT; };
- 546B294410AC5E4A0054D33A /* cmssm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmssm.c; path = ../../../src/cmssm.c; sourceTree = SOURCE_ROOT; };
- 546B294510AC5E4A0054D33A /* cmstypes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmstypes.c; path = ../../../src/cmstypes.c; sourceTree = SOURCE_ROOT; };
- 546B294610AC5E4A0054D33A /* cmsvirt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsvirt.c; path = ../../../src/cmsvirt.c; sourceTree = SOURCE_ROOT; };
- 546B294710AC5E4A0054D33A /* cmswtpnt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmswtpnt.c; path = ../../../src/cmswtpnt.c; sourceTree = SOURCE_ROOT; };
- 546B294810AC5E4A0054D33A /* cmsxform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmsxform.c; path = ../../../src/cmsxform.c; sourceTree = SOURCE_ROOT; };
- 546B296110AC5E600054D33A /* lcms2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lcms2.h; path = ../../../include/lcms2.h; sourceTree = SOURCE_ROOT; };
- 546B296210AC5E600054D33A /* lcms2_plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lcms2_plugin.h; path = ../../../include/lcms2_plugin.h; sourceTree = SOURCE_ROOT; };
- 546B296B10AC5EAA0054D33A /* TestBed-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestBed-Info.plist"; sourceTree = "<group>"; };
- 546B29A310AC677E0054D33A /* testbed */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testbed; sourceTree = BUILT_PRODUCTS_DIR; };
- 546B29AC10AC682F0054D33A /* lcms2_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lcms2_internal.h; path = ../../../src/lcms2_internal.h; sourceTree = SOURCE_ROOT; };
- 546B29AD10AC68410054D33A /* testcms2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testcms2.c; path = ../../../testbed/testcms2.c; sourceTree = SOURCE_ROOT; };
- 54DBD06015A202B200180017 /* cmshalf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cmshalf.c; path = ../../../src/cmshalf.c; sourceTree = "<group>"; };
- 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
- 8D07F2C80486CC7A007CD1D0 /* LittleCMS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LittleCMS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 546B29A110AC677E0054D33A /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D07F2C40486CC7A007CD1D0 /* Carbon.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 034768DDFF38A45A11DB9C8B /* Products */ = {
- isa = PBXGroup;
- children = (
- 8D07F2C80486CC7A007CD1D0 /* LittleCMS.framework */,
- 546B29A310AC677E0054D33A /* testbed */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 0867D691FE84028FC02AAC07 /* LittleCMS */ = {
- isa = PBXGroup;
- children = (
- 08FB77ACFE841707C02AAC07 /* Source */,
- 089C1665FE841158C02AAC07 /* Resources */,
- 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
- 034768DDFF38A45A11DB9C8B /* Products */,
- 546B296B10AC5EAA0054D33A /* TestBed-Info.plist */,
- );
- name = LittleCMS;
- sourceTree = "<group>";
- };
- 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
- isa = PBXGroup;
- children = (
- 08FB77AAFE841565C02AAC07 /* Carbon.framework */,
- );
- name = "External Frameworks and Libraries";
- sourceTree = "<group>";
- };
- 089C1665FE841158C02AAC07 /* Resources */ = {
- isa = PBXGroup;
- children = (
- 8D07F2C70486CC7A007CD1D0 /* Info.plist */,
- 089C1666FE841158C02AAC07 /* InfoPlist.strings */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
- 08FB77ACFE841707C02AAC07 /* Source */ = {
- isa = PBXGroup;
- children = (
- 54DBD06015A202B200180017 /* cmshalf.c */,
- 546B29AD10AC68410054D33A /* testcms2.c */,
- 546B29AC10AC682F0054D33A /* lcms2_internal.h */,
- 546B296110AC5E600054D33A /* lcms2.h */,
- 546B296210AC5E600054D33A /* lcms2_plugin.h */,
- 546B293110AC5E4A0054D33A /* cmscam02.c */,
- 546B293210AC5E4A0054D33A /* cmscgats.c */,
- 546B293310AC5E4A0054D33A /* cmscnvrt.c */,
- 546B293410AC5E4A0054D33A /* cmserr.c */,
- 546B293510AC5E4A0054D33A /* cmsgamma.c */,
- 546B293610AC5E4A0054D33A /* cmsgmt.c */,
- 546B293710AC5E4A0054D33A /* cmsintrp.c */,
- 546B293810AC5E4A0054D33A /* cmsio0.c */,
- 546B293910AC5E4A0054D33A /* cmsio1.c */,
- 546B293A10AC5E4A0054D33A /* cmslut.c */,
- 546B293B10AC5E4A0054D33A /* cmsmd5.c */,
- 546B293C10AC5E4A0054D33A /* cmsmtrx.c */,
- 546B293D10AC5E4A0054D33A /* cmsnamed.c */,
- 546B293E10AC5E4A0054D33A /* cmsopt.c */,
- 546B293F10AC5E4A0054D33A /* cmspack.c */,
- 546B294010AC5E4A0054D33A /* cmspcs.c */,
- 546B294110AC5E4A0054D33A /* cmsplugin.c */,
- 546B294210AC5E4A0054D33A /* cmsps2.c */,
- 546B294310AC5E4A0054D33A /* cmssamp.c */,
- 546B294410AC5E4A0054D33A /* cmssm.c */,
- 546B294510AC5E4A0054D33A /* cmstypes.c */,
- 546B294610AC5E4A0054D33A /* cmsvirt.c */,
- 546B294710AC5E4A0054D33A /* cmswtpnt.c */,
- 546B294810AC5E4A0054D33A /* cmsxform.c */,
- 32BAE0B70371A74B00C91783 /* LittleCMS_Prefix.pch */,
- );
- name = Source;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
- 8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D07F2BE0486CC7A007CD1D0 /* LittleCMS_Prefix.pch in Headers */,
- 546B296310AC5E600054D33A /* lcms2.h in Headers */,
- 546B296410AC5E600054D33A /* lcms2_plugin.h in Headers */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
- 546B29A210AC677E0054D33A /* testbed */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 546B29AB10AC67C30054D33A /* Build configuration list for PBXNativeTarget "testbed" */;
- buildPhases = (
- 546B29A010AC677E0054D33A /* Sources */,
- 546B29A110AC677E0054D33A /* Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- 546B29A810AC67870054D33A /* PBXTargetDependency */,
- );
- name = testbed;
- productName = testbed;
- productReference = 546B29A310AC677E0054D33A /* testbed */;
- productType = "com.apple.product-type.tool";
- };
- 8D07F2BC0486CC7A007CD1D0 /* LittleCMS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "LittleCMS" */;
- buildPhases = (
- 8D07F2BD0486CC7A007CD1D0 /* Headers */,
- 8D07F2BF0486CC7A007CD1D0 /* Resources */,
- 8D07F2C10486CC7A007CD1D0 /* Sources */,
- 8D07F2C30486CC7A007CD1D0 /* Frameworks */,
- 8D07F2C50486CC7A007CD1D0 /* Rez */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = LittleCMS;
- productInstallPath = "$(HOME)/Library/Frameworks";
- productName = LittleCMS;
- productReference = 8D07F2C80486CC7A007CD1D0 /* LittleCMS.framework */;
- productType = "com.apple.product-type.framework";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 0867D690FE84028FC02AAC07 /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "LittleCMS" */;
- compatibilityVersion = "Xcode 3.0";
- hasScannedForEncodings = 1;
- mainGroup = 0867D691FE84028FC02AAC07 /* LittleCMS */;
- productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 8D07F2BC0486CC7A007CD1D0 /* LittleCMS */,
- 546B29A210AC677E0054D33A /* testbed */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXRezBuildPhase section */
- 8D07F2C50486CC7A007CD1D0 /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXRezBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 546B29A010AC677E0054D33A /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 546B29AE10AC68410054D33A /* testcms2.c in Sources */,
- 54DBD06115A202B200180017 /* cmshalf.c in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 8D07F2C10486CC7A007CD1D0 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 546B294910AC5E4A0054D33A /* cmscam02.c in Sources */,
- 546B294A10AC5E4A0054D33A /* cmscgats.c in Sources */,
- 546B294B10AC5E4A0054D33A /* cmscnvrt.c in Sources */,
- 546B294C10AC5E4A0054D33A /* cmserr.c in Sources */,
- 546B294D10AC5E4A0054D33A /* cmsgamma.c in Sources */,
- 546B294E10AC5E4A0054D33A /* cmsgmt.c in Sources */,
- 546B294F10AC5E4A0054D33A /* cmsintrp.c in Sources */,
- 546B295010AC5E4A0054D33A /* cmsio0.c in Sources */,
- 546B295110AC5E4A0054D33A /* cmsio1.c in Sources */,
- 546B295210AC5E4A0054D33A /* cmslut.c in Sources */,
- 546B295310AC5E4A0054D33A /* cmsmd5.c in Sources */,
- 546B295410AC5E4A0054D33A /* cmsmtrx.c in Sources */,
- 546B295510AC5E4A0054D33A /* cmsnamed.c in Sources */,
- 546B295610AC5E4A0054D33A /* cmsopt.c in Sources */,
- 546B295710AC5E4A0054D33A /* cmspack.c in Sources */,
- 546B295810AC5E4A0054D33A /* cmspcs.c in Sources */,
- 546B295910AC5E4A0054D33A /* cmsplugin.c in Sources */,
- 546B295A10AC5E4A0054D33A /* cmsps2.c in Sources */,
- 546B295B10AC5E4A0054D33A /* cmssamp.c in Sources */,
- 546B295C10AC5E4A0054D33A /* cmssm.c in Sources */,
- 546B295D10AC5E4A0054D33A /* cmstypes.c in Sources */,
- 546B295E10AC5E4A0054D33A /* cmsvirt.c in Sources */,
- 546B295F10AC5E4A0054D33A /* cmswtpnt.c in Sources */,
- 546B296010AC5E4A0054D33A /* cmsxform.c in Sources */,
- 54DBD06215A202BB00180017 /* cmshalf.c in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- 546B29A810AC67870054D33A /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 8D07F2BC0486CC7A007CD1D0 /* LittleCMS */;
- targetProxy = 546B29A710AC67870054D33A /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
- 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- 089C1667FE841158C02AAC07 /* English */,
- );
- name = InfoPlist.strings;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 4FADC24308B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_VERSION = A;
- GCC_CHAR_IS_UNSIGNED_CHAR = YES;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = LittleCMS_Prefix.pch;
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "$(HOME)/Library/Frameworks";
- LIBRARY_STYLE = DYNAMIC;
- MACH_O_TYPE = mh_dylib;
- PRODUCT_NAME = LittleCMS;
- WRAPPER_EXTENSION = framework;
- ZERO_LINK = YES;
- };
- name = Debug;
- };
- 4FADC24408B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_VERSION = A;
- GCC_CHAR_IS_UNSIGNED_CHAR = YES;
- GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = LittleCMS_Prefix.pch;
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "$(HOME)/Library/Frameworks";
- LIBRARY_STYLE = DYNAMIC;
- MACH_O_TYPE = mh_dylib;
- PRODUCT_NAME = LittleCMS;
- WRAPPER_EXTENSION = framework;
- };
- name = Release;
- };
- 4FADC24708B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- LINK_WITH_STANDARD_LIBRARIES = YES;
- MACH_O_TYPE = mh_execute;
- OTHER_LDFLAGS = "";
- PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
- STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
- };
- name = Debug;
- };
- 4FADC24808B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- LINK_WITH_STANDARD_LIBRARIES = YES;
- MACH_O_TYPE = mh_execute;
- OTHER_LDFLAGS = "";
- PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
- STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
- };
- name = Release;
- };
- 546B29A510AC677F0054D33A /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
- INSTALL_PATH = /usr/local/bin;
- OTHER_LDFLAGS = (
- "-framework",
- Carbon,
- "-framework",
- LittleCMS,
- );
- PREBINDING = NO;
- PRODUCT_NAME = testbed;
- ZERO_LINK = YES;
- };
- name = Debug;
- };
- 546B29A610AC677F0054D33A /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
- INSTALL_PATH = /usr/local/bin;
- OTHER_LDFLAGS = (
- "-framework",
- Carbon,
- "-framework",
- LittleCMS,
- );
- PREBINDING = NO;
- PRODUCT_NAME = testbed;
- ZERO_LINK = NO;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "LittleCMS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24308B4156D00ABE55E /* Debug */,
- 4FADC24408B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "LittleCMS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24708B4156D00ABE55E /* Debug */,
- 4FADC24808B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 546B29AB10AC67C30054D33A /* Build configuration list for PBXNativeTarget "testbed" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 546B29A510AC677F0054D33A /* Debug */,
- 546B29A610AC677F0054D33A /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}
+++ /dev/null
-//
-// Prefix header for all source files of the 'LittleCMS' target in the 'LittleCMS' project.
-//
-
-#include <Carbon/Carbon.h>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.TestBed</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>CSResourcesFileMapped</key>
- <string>yes</string>
-</dict>
-</plist>
- Please see the documentation in doc folder
+About Little CMS
+Little CMS intends to be an OPEN SOURCE small-footprint color management engine, with special focus on accuracy and performance. It uses the International Color Consortium standard (ICC), which is the modern standard when regarding to color management. The ICC specification is widely used and is referred to in many International and other de-facto standards. It was approved as an International Standard, ISO 15076-1, in 2005.
+
+Conformance
+Little CMS 2.12 is a FULL IMPLEMENTATION of ICC specification 4.3, it fully supports all kind of V2 and V4 profiles, including abstract, devicelink and named color profiles. Check the tutorial for a exhaustive list of features.
+
+
+A bit of story
+Since the initial release, back in 1998, Little CMS has grown to become one of the most popular open-source color management libraries, and has been used in a large number of production projects, in areas as printer firmware, monitors, digital cameras, RIPs, publishing, scientific, and many others. You can find Little CMS in most Linux distributions, and it's released under an open source license.
+
+Please see the complete documentation in doc folder
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 57 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
- *\ * | *\ *)
- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-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
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PREPARE_SED_QUOTE_VARS
-# --------------------------
-# Define a few sed substitution that help us do robust quoting.
-m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
-[# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-])
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
- eval 'cat <<_LTECHO_EOF
-\$[]1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-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=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-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=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
-# ------------------------------------
-# 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
-# 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).
-m4_ifdef([AS_INIT_GENERATED],
-[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
-[m4_defun([_LT_GENERATED_FILE_INIT],
-[m4_require([AS_PREPARE])]dnl
-[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
-[lt_write_fail=0
-cat >$1 <<_ASEOF || lt_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-$2
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$1 <<\_ASEOF || lt_write_fail=1
-AS_SHELL_SANITIZE
-_AS_PREPARE
-exec AS_MESSAGE_FD>&1
-_ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
-m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
-[# Run this file to recreate a libtool stub with the current configuration.])
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2010 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
-exec AS_MESSAGE_LOG_FD>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec AS_MESSAGE_LOG_FD>>config.log
-$lt_cl_success || AS_EXIT(1)
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '$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"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-dnl AC_DEFUN([AC_LIBTOOL_RC], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
- case $host_os in
- rhapsody* | darwin*)
- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
- AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
- AC_CHECK_TOOL([LIPO], [lipo], [:])
- AC_CHECK_TOOL([OTOOL], [otool], [:])
- AC_CHECK_TOOL([OTOOL64], [otool64], [:])
- _LT_DECL([], [DSYMUTIL], [1],
- [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
- _LT_DECL([], [NMEDIT], [1],
- [Tool to change global to local symbols on Mac OS X])
- _LT_DECL([], [LIPO], [1],
- [Tool to manipulate fat objects and archives on Mac OS X])
- _LT_DECL([], [OTOOL], [1],
- [ldd/readelf like tool for Mach-O binaries on Mac OS X])
- _LT_DECL([], [OTOOL64], [1],
- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi])
- AC_CACHE_CHECK([for -exported_symbols_list linker flag],
- [lt_cv_ld_exported_symbols_list],
- [lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [lt_cv_ld_exported_symbols_list=yes],
- [lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
- ])
- AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
- [lt_cv_ld_force_load=no
- cat > conftest.c << _LT_EOF
-int forced_loaded() { return 2;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
- echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
- $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
- cat > conftest.c << _LT_EOF
-int main() { return 0;}
-_LT_EOF
- echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
- _lt_result=$?
- if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
- lt_cv_ld_force_load=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -f conftest.err libconftest.a conftest conftest.c
- rm -rf conftest.dSYM
- ])
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
- m4_require([_LT_REQUIRED_DARWIN_CHECKS])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- 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\"`'
- 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"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=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}"
- m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-],[])
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
-# ----------------------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-# Store the results from the different compilers for each TAGNAME.
-# 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
- aix_libpath=$lt_cv_aix_libpath
-else
- AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
- lt_aix_libpath_sed='[
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\([^ ]*\) *$/\1/
- p
- }
- }]'
- _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
- # Check for a 64-bit object if we didn't find anything.
- if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
- _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"
- fi
- ])
- aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
-fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[m4_divert_text([M4SH-INIT], [$1
-])])# _LT_SHELL_INIT
-
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# 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).
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-AC_MSG_CHECKING([how to print strings])
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
- test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
- ECHO='printf %s\n'
-else
- # Use this function as a fallback that always works.
- func_fallback_echo ()
- {
- eval 'cat <<_LTECHO_EOF
-$[]1
-_LTECHO_EOF'
- }
- ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
- $ECHO "$*"
-}
-
-case "$ECHO" in
- printf*) AC_MSG_RESULT([printf]) ;;
- print*) AC_MSG_RESULT([print -r]) ;;
- *) AC_MSG_RESULT([cat]) ;;
-esac
-
-m4_ifdef([_AS_DETECT_SUGGESTED],
-[_AS_DETECT_SUGGESTED([
- test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
- ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
- ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
- ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
- PATH=/empty FPATH=/empty; export PATH FPATH
- test "X`printf %s $ECHO`" = "X$ECHO" \
- || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
-
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_WITH_SYSROOT
-# ----------------
-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).],
-[], [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 #(
- yes)
- if test "$GCC" = yes; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
- fi
- ;; #(
- /*)
- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
- ;; #(
- no|'')
- ;; #(
- *)
- 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.])])
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_PROG_AR
-# -----------
-m4_defun([_LT_PROG_AR],
-[AC_CHECK_TOOLS(AR, [ar], false)
-: ${AR=ar}
-: ${AR_FLAGS=cru}
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
-
-AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
- [lt_cv_ar_at_file=no
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
- [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
- # 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
- lt_cv_ar_at_file=@
- fi
- fi
- rm -f conftest.* libconftest.a
- ])
- ])
-
-if test "x$lt_cv_ar_at_file" = xno; then
- archiver_list_spec=
-else
- archiver_list_spec=$lt_cv_ar_at_file
-fi
-_LT_DECL([], [archiver_list_spec], [1],
- [How to feed a file listing to the archiver])
-])# _LT_PROG_AR
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[_LT_PROG_AR
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-case $host_os in
- darwin*)
- lock_old_archive_extraction=yes ;;
- *)
- lock_old_archive_extraction=no ;;
-esac
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-_LT_DECL([], [lock_old_archive_extraction], [0],
- [Whether to use a lock for old archive extraction])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- mint*)
- # On MiNT this can take a long time and run out of memory.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
- = "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-/* When -fvisbility=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; }
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else
- {
- if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- else puts (dlerror ());
- }
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
- [], [
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- case $host_os in
- 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
- *\;*)
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
- ;;
- *)
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
- ;;
- esac
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
- # AWK program above erroneously prepends '/' to C:/dos/paths
- # 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'` ;;
- esac
- sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[[4-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`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'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$cc_basename in
- yes,*)
- # 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'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-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}'
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- ;;
-
- *,cl*)
- # Native MSVC
- libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
-
- case $build_os in
- mingw*)
- sys_lib_search_path_spec=
- lt_save_ifs=$IFS
- IFS=';'
- for lt_path in $LIB
- do
- IFS=$lt_save_ifs
- # Let DOS variable expansion print the short 8.3 style file name.
- lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
- sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
- done
- IFS=$lt_save_ifs
- # Convert to MSYS style.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
- ;;
- cygwin*)
- # Convert to unix form, then to dos form, then back to unix form
- # but this time dos style (no spaces!) so that the unix form looks
- # like /cygdrive/c/PROGRA~1:/cygdr...
- sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
- sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
- 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"
- 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'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # FIXME: find the short name or the path components, as spaces are
- # common. (e.g. "Program Files" -> "PROGRA~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'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
- dynamic_linker='Win32 link.exe'
- ;;
-
- *)
- # Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- dynamic_linker='Win32 ld.exe'
- ;;
- esac
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-haiku*)
- version_type=linux
- 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'
- shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
- postinstall_cmds='chmod 555 $lib'
- # or fails outright, so override atomically:
- install_override_mode=555
- ;;
-
-interix[[3-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
-
- # Some binutils ld are patched to set DT_RUNPATH
- AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
- [lt_cv_shlibpath_overrides_runpath=no
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
- [lt_cv_shlibpath_overrides_runpath=yes])])
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
- ])
- shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
- [Variables whose values should be saved in libtool wrapper scripts and
- restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
- [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
- [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
- [[List of archive names. First name is the real one, the rest are links.
- The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
- [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [install_override_mode], [1],
- [Permission mode override for installation of shared libraries])
-_LT_DECL([], [postinstall_cmds], [2],
- [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
- [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
- [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
- [[As "finish_cmds", except a single script fragment to be evaled but
- not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
- [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
- [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
- [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="m4_if([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
- [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-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],
- [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
- while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- if test "$GCC" != yes; then
- reload_cmds=false
- fi
- ;;
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_TAGDECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- # 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
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- # Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc*)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-haiku*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[[3-9]]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-
-file_magic_glob=
-want_nocaseglob=no
-if test "$build" = "$host"; then
- case $host_os in
- mingw* | pw32*)
- if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
- want_nocaseglob=yes
- else
- file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
- fi
- ;;
- esac
-fi
-
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
- [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
- [Command to use when deplibs_check_method = "file_magic"])
-_LT_DECL([], [file_magic_glob], [1],
- [How to find potential files when deplibs_check_method = "file_magic"])
-_LT_DECL([], [want_nocaseglob], [1],
- [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- 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
- *COFF*)
- DUMPBIN="$DUMPBIN -symbols"
- ;;
- *)
- DUMPBIN=:
- ;;
- esac
- fi
- AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
- [lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
- cat conftest.out >&AS_MESSAGE_LOG_FD
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-# --------------------------------
-# how to determine the name of the shared library
-# associated with a specific link library.
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-m4_require([_LT_DECL_DLLTOOL])
-AC_CACHE_CHECK([how to associate runtime and link libraries],
-lt_cv_sharedlib_from_linklib_cmd,
-[lt_cv_sharedlib_from_linklib_cmd='unknown'
-
-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
- case `$DLLTOOL --help 2>&1` in
- *--identify-strict*)
- lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
- ;;
- *)
- lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
- ;;
- esac
- ;;
-*)
- # fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd="$ECHO"
- ;;
-esac
-])
-sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
-test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
-_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
- [Command to associate shared and link libraries])
-])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-
-
-# _LT_PATH_MANIFEST_TOOL
-# ----------------------
-# locate the manifest tool
-m4_defun([_LT_PATH_MANIFEST_TOOL],
-[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
-test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
- [lt_cv_path_mainfest_tool=no
- echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
- $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
- cat conftest.err >&AS_MESSAGE_LOG_FD
- if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
- fi
- rm -f conftest*])
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
- MANIFEST_TOOL=:
-fi
-_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
-])# _LT_PATH_MANIFEST_TOOL
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- case $cc_basename in
- nvcc*)
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
- esac
-
- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
- [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK ['"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx]"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
- lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-/* 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
- relocations are performed -- see ld's documentation on pseudo-relocs. */
-# define LT@&t@_DLSYM_CONST
-#elif defined(__osf__)
-/* This system does not cope well with relocations in const data. */
-# define LT@&t@_DLSYM_CONST
-#else
-# define LT@&t@_DLSYM_CONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-LT@&t@_DLSYM_CONST struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_globsym_save_LIBS=$LIBS
- lt_globsym_save_CFLAGS=$CFLAGS
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS=$lt_globsym_save_LIBS
- CFLAGS=$lt_globsym_save_CFLAGS
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-
-# Response file support.
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- nm_file_list_spec='@'
-elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
- nm_file_list_spec='@'
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
- [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
- [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
- [lt_cv_sys_global_symbol_to_c_name_address], [1],
- [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
- [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
- [Transform the output of nm in a C name address pair when lib prefix is needed])
-_LT_DECL([], [nm_file_list_spec], [1],
- [Specify filename containing input files for $NM])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-m4_if([$1], [CXX], [
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- haiku*)
- # PIC is the default for Haiku.
- # The "-static" flag exists, but is broken.
- _LT_TAGVAR(lt_prog_compiler_static, $1)=
- ;;
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[[4-9]]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
- # IBM XL 8.0, 9.0 on PPC and BlueGene
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC* | sunCC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- haiku*)
- # PIC is the default for Haiku.
- # The "-static" flag exists, but is broken.
- _LT_TAGVAR(lt_prog_compiler_static, $1)=
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
-
- case $cc_basename in
- nvcc*) # Cuda Compiler Driver 2.2
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
- ;;
- 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'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xl* | bgxl* | bgf* | mpixl*)
- # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
- ;;
- *Sun\ C*)
- # Sun C 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- rdos*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-
-AC_CACHE_CHECK([for $compiler option to produce PIC],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
- [Additional compiler flags for building library objects])
-
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
- [How to pass a linker flag through the compiler])
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
- [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- 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".
- 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'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- case $cc_basename in
- cl*) ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
- ;;
- esac
- ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
-], [
- runpath_var=
- _LT_TAGVAR(allow_undefined_flag, $1)=
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(archive_cmds, $1)=
- _LT_TAGVAR(archive_expsym_cmds, $1)=
- _LT_TAGVAR(compiler_needs_object, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(hardcode_automatic, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_TAGVAR(hardcode_minus_L, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(inherit_rpath, $1)=no
- _LT_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_TAGVAR(module_cmds, $1)=
- _LT_TAGVAR(module_expsym_cmds, $1)=
- _LT_TAGVAR(old_archive_from_new_cmds, $1)=
- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- _LT_TAGVAR(ld_shlibs, $1)=yes
-
- # 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
- case $host_os in
- aix*)
- # The AIX port of GNU ld has always aspired to compatibility
- # with the native linker. However, as the warning in the GNU ld
- # block says, versions before 2.19.5* couldn't really create working
- # shared libraries, regardless of the interface used.
- case `$LD -v 2>&1` in
- *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
- *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
- *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
- *)
- lt_use_gnu_ld_interface=yes
- ;;
- esac
- ;;
- *)
- lt_use_gnu_ld_interface=yes
- ;;
- esac
- fi
-
- if test "$lt_use_gnu_ld_interface" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *GNU\ gold*) supports_anon_versioning=yes ;;
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[[3-9]]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.19, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to install binutils
-*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
-*** You will then need to restart the configuration process.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(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
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- _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'
- 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(link_all_deplibs, $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'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=' $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'
- 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'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- tmp_sharedflag='--shared' ;;
- xl[[cC]]* | 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(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(compiler_needs_object, $1)=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf* | 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)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
- runpath_var=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global
- # defined symbols, whereas GNU nm marks them as "W".
- 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'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX([$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"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX([$1])
- _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
- # 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'
- 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'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- bsdi[[45]]*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- case $cc_basename in
- cl*)
- # Native MSVC
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='@'
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $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='
- # 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
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
- # 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'
- ;;
- *)
- # Assume MSVC wrapper
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
- esac
- ;;
-
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $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'
- else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes && 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'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- m4_if($1, [], [
- # Older versions of the 11.00 compiler do not understand -b yet
- # (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)='$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'])
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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"
- AC_LINK_IFELSE(
- [AC_LANG_SOURCE(
- [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
- [C++], [[int foo (void) { return 0; }]],
- [Fortran 77], [[
- subroutine foo
- end]],
- [Fortran], [[
- subroutine foo
- 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'
- 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'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $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_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'
-
- # Both c and cxx compiler support -rpath directly
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
- [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_CACHE_CHECK([whether -lc should be explicitly linked in],
- [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
- [$RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
- then
- lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- ])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
- ;;
- esac
- fi
- ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
- [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
- [enable_shared_with_static_runtimes], [0],
- [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
- [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
- [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
- [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
- [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
- [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
- [Commands used to build a loadable module if different from building
- a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
- [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
- [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
- [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
- [Flag to hardcode $libdir into a binary during linking.
- This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
- [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting ${shlibpath_var} if the
- library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
- [Set to "yes" if building a shared library automatically hardcodes DIR
- into the library and all subsequent libraries and executables linked
- against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
- [Set to yes if linker adds runtime paths of dependent libraries
- to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
- [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [always_export_symbols], [0],
- [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
- [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
- [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
- [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
- [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [postlink_cmds], [2],
- [Commands necessary for finishing linking programs])
-_LT_TAGDECL([], [file_list_spec], [1],
- [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
- LT_SYS_DLOPEN_SELF
- _LT_CMD_STRIPLIB
-
- # Report which library types will actually be built
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[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
- AC_PROG_CXXCPP
-else
- _lt_caught_CXX_error=yes
-fi
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_CFLAGS=$CFLAGS
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- CFLAGS=$CXXFLAGS
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
- else
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- LT_PATH_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC $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'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
- _LT_TAGVAR(ld_shlibs, $1)=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- aix_use_runtimelinking=no
-
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- _LT_SYS_MODULE_PATH_AIX([$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"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX([$1])
- _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
- # 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'
- 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'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- case $GXX,$cc_basename in
- ,cl* | no,cl*)
- # Native MSVC
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='@'
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $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='
- # 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'
- ;;
- *)
- # 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(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- freebsd-elf*)
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- gnu*)
- ;;
-
- haiku*)
- _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_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; 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'
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $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'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && 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
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
- fi
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- ;;
-
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | 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'
- _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'
- _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'
- ;;
- *) # 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'
- ;;
- 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'
- ;;
- cxx*)
- # Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='func_echo_all'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=func_echo_all
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- case $host in
- osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && 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_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'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`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}\*'
- 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 $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_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC* | sunCC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='func_echo_all'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
- fi
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
- '"$_LT_TAGVAR(old_archive_cmds, $1)"
- _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
- '"$_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'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- CFLAGS=$lt_save_CFLAGS
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_FUNC_STRIPNAME_CNF
-# ----------------------
-# func_stripname_cnf prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-#
-# This function is identical to the (non-XSI) version of func_stripname,
-# except this one can be used by m4 code that may be executed by configure,
-# rather than the libtool script.
-m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
-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}\$%%"`;;
- esac
-} # func_stripname_cnf
-])# _LT_FUNC_STRIPNAME_CNF
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer a
- a=0
- return
- end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-_LT_EOF
-])
-
-_lt_libdeps_save_CFLAGS=$CFLAGS
-case "$CC $CFLAGS " in #(
-*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
-*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
-esac
-
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case ${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
- prev=$p
- continue
- fi
-
- # Expand the sysroot to ease extracting the directories later.
- if test -z "$prev"; then
- case $p in
- -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
- -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
- -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
- esac
- fi
- 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
- -L | -R)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- prev=
- ;;
-
- *.lto.$objext) ;; # Ignore GCC LTO objects
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-CFLAGS=$_lt_libdeps_save_CFLAGS
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_TAGVAR(predep_objects,$1)=
- _LT_TAGVAR(postdep_objects,$1)=
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC* | 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
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
- [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
- [Dependencies to place before and after the objects being linked to
- create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
- [The library search path used internally by the compiler when linking
- a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test "X$F77" = "Xno"; then
- _lt_disable_F77=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- lt_save_CFLAGS=$CFLAGS
- CC=${F77-"f77"}
- CFLAGS=$FFLAGS
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
- GCC=$G77
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
- CFLAGS="$lt_save_CFLAGS"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_LANG_PUSH(Fortran)
-
-if test -z "$FC" || test "X$FC" = "Xno"; then
- _lt_disable_FC=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- lt_save_CFLAGS=$CFLAGS
- CC=${FC-"f95"}
- CFLAGS=$FCFLAGS
- compiler=$CC
- GCC=$ac_cv_fc_compiler_gnu
-
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC=$lt_save_CC
- CFLAGS=$lt_save_CFLAGS
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-CFLAGS=$GCJFLAGS
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-CFLAGS=
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
- :
- _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
- [AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-# _LT_DECL_DLLTOOL
-# ----------------
-# Ensure DLLTOOL variable is set.
-m4_defun([_LT_DECL_DLLTOOL],
-[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
-AC_SUBST([DLLTOOL])
-])
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
- [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_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
- lt_unset=unset
-else
- lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_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
-# 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],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_MSG_CHECKING([how to convert $build file names to $host format])
-AC_CACHE_VAL(lt_cv_to_host_file_cmd,
-[case $host in
- *-*-mingw* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
- ;;
- *-*-cygwin* )
- lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
- ;;
- * ) # otherwise, assume *nix
- lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
- ;;
- esac
- ;;
- *-*-cygwin* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
- ;;
- *-*-cygwin* )
- lt_cv_to_host_file_cmd=func_convert_file_noop
- ;;
- * ) # otherwise, assume *nix
- lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
- ;;
- esac
- ;;
- * ) # unhandled hosts (and "normal" native builds)
- lt_cv_to_host_file_cmd=func_convert_file_noop
- ;;
-esac
-])
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
-_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
- [0], [convert $build file names to $host format])dnl
-
-AC_MSG_CHECKING([how to convert $build file names to toolchain format])
-AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
-[#assume ordinary cross tools, or native build.
-lt_cv_to_tool_file_cmd=func_convert_file_noop
-case $host in
- *-*-mingw* )
- case $build in
- *-*-mingw* ) # actually msys
- lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
- ;;
- esac
- ;;
-esac
-])
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
-_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
- [0], [convert $build files to toolchain format])dnl
-])# _LT_PATH_CONVERSION_FUNCTIONS
-
-# Helper functions for option handling. -*- Autoconf -*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008, 2009 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
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it. Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
- _LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
- [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME. If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
- dnl
- dnl Simply set some default values (i.e off) if boolean options were not
- dnl specified:
- _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
- ])
- _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
- ])
- dnl
- dnl If no reference was made to various pairs of opposing options, then
- dnl we run the default mode handler for the pair. For example, if neither
- dnl `shared' nor `disable-shared' was passed, we enable building of shared
- dnl archives by default:
- _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
- _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
- ])
-])# _LT_SET_OPTIONS
-
-
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+# Copyright (C) 1996-2018 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.
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS], [1], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
- [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
- [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
- [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
- [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
- [m4_define([_LTDL_TYPE], [convenience])])
-
-# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
- [$#], [2], [[$2]],
- [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
- [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
- [$#], 1, [],
- [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
- m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
- [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
- [m4_foreach([_Lt_suffix],
- ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
- [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
- [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
- [lt_append([$1], [$2], [$3])$4],
- [$5])],
- [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
- [$5],
- [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
- [lt_join(m4_quote(m4_default([$4], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
-
-# ltversion.m4 -- version numbers -*- Autoconf -*-
-#
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# @configure_input@
-
-# serial 3294 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.4])
-m4_define([LT_PACKAGE_REVISION], [1.3294])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4'
-macro_revision='1.3294'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
-
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004.
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-
-# serial 5 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else. This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
-m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
-m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
-m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
-m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
-m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
+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],,
+[m4_warning([this file was generated for autoconf 2.69.
+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'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2002-2018 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 1
-
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.3], [],
+m4_if([$1], [1.16.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.3])dnl
+[AM_AUTOMAKE_VERSION([1.16.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 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 1
-
# 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/../..'.
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# 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, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
-
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 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 12
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 5
-
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # 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
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. Try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 16
-
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+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])
# -----------------------------------------------
# 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
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+ [$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])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# 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
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ 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: <http://austingroupbugs.net/view.php?id=542>
+
+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: <https://www.gnu.org/software/coreutils/>.
+
+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
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2018 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 1
-
# 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'" ;;
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 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],
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2018 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_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well. Anyway, the user
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
]
)
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
-
# AM_MAKE_INCLUDE()
# -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
-
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
$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
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])
+ AC_MSG_WARN(['missing' script is too old or missing])
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 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 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2018 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_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(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-2018 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_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) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2001-2018 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_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-2018 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
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$[2]" = conftest.file
)
then
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 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 1
+# 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-2018 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2018 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.
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# 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],
+ [],
- # 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])
+ [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
+
+ # 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 <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/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
+m4_include([m4/acx_pthread.m4])
+m4_include([m4/ax_append_compile_flags.m4])
+m4_include([m4/ax_append_flag.m4])
+m4_include([m4/ax_check_compile_flag.m4])
+m4_include([m4/ax_gcc_func_attribute.m4])
+m4_include([m4/ax_require_defined.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
test -z "$srcdir" && srcdir=.
DIE=0
+ACLOCAL_FLAGS="-I m4"
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory $srcdir does not look like the"
echo "Running autoheader..."
autoheader
fi
- echo "Running automake --add-missing --gnu -Wno-portability $am_opt ..."
- automake --add-missing --gnu -Wno-portability $am_opt
+ echo "Running automake --add-missing -copy --gnu -Wno-portability $am_opt ..."
+ automake --add-missing --copy --gnu -Wno-portability $am_opt
echo "Running autoconf ..."
autoconf
--- /dev/null
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2014-11-04'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to <config-patches@gnu.org>.
+
me=`echo "$0" | sed -e 's,.*/,,'`
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright 1992-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."
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
fi
;;
*)
- os=netbsd
+ os=netbsd
;;
esac
# The OS release
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
+ echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
+ esac ;;
+ esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
+ esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
- # Unixware is an offshoot of SVR4, but it has its own version
- # number series starting with 2...
- # I am not positive that other SVR4 systems won't match this,
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
- # Use sysv4.2uw... so that sysv4* matches it.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
fi
exit ;;
i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
exit ;;
pc:*:*:*)
# Left here for compatibility:
- # uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configuration will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
- exit ;;
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
echo ns32k-sni-sysv
fi
exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+esac
cat >&2 <<EOF
$0: unable to guess system type
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright 1992-2014 Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2014-12-03'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright 1992-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."
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
- -bluegene*)
- os=-cnk
+ -bluegene*)
+ os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
os=-chorusos
basic_machine=$1
;;
- -chorusrdb)
- os=-chorusrdb
+ -chorusrdb)
+ os=-chorusrdb
basic_machine=$1
- ;;
+ ;;
-hiux*)
os=-hiuxwe2
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
+ | epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
- | nios | nios2 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
- | rx \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
- | v850 | v850e \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
basic_machine=mt-unknown
;;
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
+ | le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
- | nios-* | nios2-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
- | romp-* | rs6000-* | rx-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
| tron-* \
| ubicom32-* \
- | v850-* | v850e-* | vax-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
basic_machine=a29k-amd
os=-udi
;;
- abacus)
+ abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=powerpc-ibm
os=-cnk
;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
- cegcc)
+ cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16)
+ cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
np1)
basic_machine=np1-gould
;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
;;
power) basic_machine=power-ibm
;;
- ppc) basic_machine=powerpc-unknown
+ ppc | ppcbe) basic_machine=powerpc-unknown
;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
basic_machine=i860-stratus
os=-sysv4
;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
sun2)
basic_machine=m68000-sun
;;
basic_machine=t90-cray
os=-unicos
;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
tile*)
- basic_machine=tile-unknown
+ basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
xps | xps100)
basic_machine=xps100-honeywell
;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
ymp)
basic_machine=ymp-cray
os=-unicos
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases
+ # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ -auroraux)
+ os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
-opened*)
os=-openedition
;;
- -os400*)
+ -os400*)
os=-os400
;;
-wince*)
-sinix*)
os=-sysv4
;;
- -tpf*)
+ -tpf*)
os=-tpf
;;
-triton*)
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
+ -nacl*)
+ ;;
-none)
;;
*)
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
+ score-*)
os=-elf
;;
- spu-*)
+ spu-*)
os=-elf
;;
*-acorn)
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
;;
- mep-*)
+ mep-*)
os=-elf
;;
mips*-cisco)
*-ibm)
os=-aix
;;
- *-knuth)
+ *-knuth)
os=-mmixware
;;
*-wec)
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for lcms2 2.4.
+# Generated by GNU Autoconf 2.69 for lcms2 2.12.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Identity of this package.
PACKAGE_NAME='lcms2'
PACKAGE_TARNAME='lcms2'
-PACKAGE_VERSION='2.4'
-PACKAGE_STRING='lcms2 2.4'
+PACKAGE_VERSION='2.12'
+PACKAGE_STRING='lcms2 2.12'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+COND_FASTFLOAT_FALSE
+COND_FASTFLOAT_TRUE
TIFFICC_DEPLIBS
JPEGICC_DEPLIBS
+LIB_PLUGINS
LCMS_LIB_DEPLIBS
LIB_TIFF
HasTIFF_FALSE
LIB_JPEG
HasJPEG_FALSE
HasJPEG_TRUE
+LIB_THREAD
LIB_MATH
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CXX
+PTHREAD_CC
+acx_pthread_config
inline
MAINT
MAINTAINER_MODE_FALSE
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
-am__quote
am__include
DEPDIR
OBJEXT
LDFLAGS
CFLAGS
CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
am__untar
am__tar
AMTAR
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
-with_jpeg
-with_tiff
-with_zlib
+enable_silent_rules
enable_dependency_tracking
enable_shared
enable_static
with_sysroot
enable_libtool_lock
enable_maintainer_mode
+with_jpeg
+with_tiff
+with_zlib
+with_fastfloat
+with_threads
'
ac_precious_vars='build_alias
host_alias
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
# 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 lcms2 2.4 to adapt to many kinds of systems.
+\`configure' configures lcms2 2.12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of lcms2 2.4:";;
+ short | recursive ) echo "Configuration of lcms2 2.12:";;
esac
cat <<\_ACEOF
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
+ --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
+ speeds up one-time build
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --without-jpeg disable JPEG support
- --without-tiff disable TIFF support
- --without-zlib disable ZLIB support
- --with-pic try to use only PIC/non-PIC objects [default=use
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--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-jpeg=DIR use jpeg installed in DIR
+ --with-tiff=DIR use tiff installed in DIR
+ --without-zlib disable ZLIB support
+ --with-fastfloat build and install fast_float plugin, use only if GPL
+ 3.0 is acceptable
+ --without-threads disable POSIX threads API support
Some influential environment variables:
CC C compiler command
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-lcms2 configure 2.4
-generated by GNU Autoconf 2.68
+lcms2 configure 2.12
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by lcms2 $as_me 2.4, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by lcms2 $as_me 2.12, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
+# Specify directory where m4 macros may be found.
+
+
#
# Libtool library revision control info
-# See the libtool documentation under the heading "Libtool's versioning
-# system" in order to understand the meaning of these fields
-#
-# Here are a set of rules to help you update your library version
-# information:
-#
-# 1. Start with version information of `0:0:0' for each libtool library.
-# 2. Update the version information only immediately before a public
-# release of your software. More frequent updates are unnecessary, and
-# only guarantee that the current interface number gets larger faster.
-# 3. If the library source code has changed at all since the last update,
-# then increment revision (`c:r:a' becomes `c:r+1:a').
-# 4. If any interfaces have been added, removed, or changed since the last
-# update, increment current, and set revision to 0.
-# 5. If any interfaces have been added since the last public release, then
-# increment age.
-# 6. If any interfaces have been removed since the last public release,
-# then set age to 0.
#
LIBRARY_CURRENT=2
-LIBRARY_REVISION=4
+LIBRARY_REVISION=12
LIBRARY_AGE=0
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
-am__api_version='1.11'
+am__api_version='1.16'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$2" = conftest.file
)
then
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
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
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;}
+ { $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'" ;;
esac
fi
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
+# will honor the 'STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
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."
# Define the identity of the package.
PACKAGE='lcms2'
- VERSION='2.4'
+ VERSION='2.12'
# Some tools Automake needs.
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# 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}'
-am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar plaintar pax cpio none'
+
+# 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
+$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
+ if test $am_uid -le $am_max_uid; 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; }
+ _am_tools=none
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
+$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
+ if test $am_gid -le $am_max_gid; 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; }
+ _am_tools=none
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
+$as_echo_n "checking how to create a ustar tar archive... " >&6; }
+ # 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_ustar-$_am_tools}
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
+ ($_am_tar --version) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && break
+ done
+ am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=ustar -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 ustar -w "$$tardir"'
+ am__tar_='pax -L -x ustar -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
+ am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
+ am__untar='cpio -i -H ustar -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_ustar}" && break
-# Disable JPEG.
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ ($am__untar <conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
-# Check whether --with-jpeg was given.
-if test "${with_jpeg+set}" = set; then :
- withval=$with_jpeg; with_jpeg=$withval
+ if ${am_cv_prog_tar_ustar+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- with_jpeg='yes'
+ am_cv_prog_tar_ustar=$_am_tool
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
+$as_echo "$am_cv_prog_tar_ustar" >&6; }
-# Disable TIFF.
-# Check whether --with-tiff was given.
-if test "${with_tiff+set}" = set; then :
- withval=$with_tiff; with_tiff=$withval
-else
- with_tiff='yes'
-fi
-# Disable ZLIB
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then :
- withval=$with_zlib; with_zlib=$withval
-else
- with_zlib='yes'
+
+# 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: <http://austingroupbugs.net/view.php?id=542>
+
+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: <https://www.gnu.org/software/coreutils/>.
+
+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
+
# Check for programs
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
am__doit:
- @echo this is the am__doit target
+ @echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+$as_echo "${_am_result}" >&6; }
# Check whether --enable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then :
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
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
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
return 0;
}
_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
-macro_version='2.4'
-macro_revision='1.3294'
+macro_version='2.4.2'
+macro_revision='1.3337'
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ 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
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
lt_cv_sys_max_cmd_len=196608
;;
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
lt_cv_deplibs_check_method=pass_all
;;
-# This must be Linux ELF.
+# This must be glibc/ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
;;
esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
# 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};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
CFLAGS="$SAVE_CFLAGS"
fi
;;
-sparc*-*solaris*)
+*-*solaris*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ 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"
+ fi
+ ;;
*)
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
LD="${LD-ld} -64"
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-dynamiclib -Wl,-single_module conftest.c 2>conftest.err
_lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ 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
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
if ${lt_cv_ld_exported_symbols_list+:} false; then :
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
$as_echo_n "checking for -force_load linker flag... " >&6; }
if ${lt_cv_ld_force_load+:} false; then :
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
_lt_result=$?
- if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+ 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
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
# Check whether --with-pic was given.
if test "${with_pic+set}" = set; then :
- withval=$with_pic; pic_mode="$withval"
+ withval=$with_pic; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
pic_mode=default
fi
+
+
+
+
test -z "$LN_S" && LN_S="ln -s"
$RM -r conftest*
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
case $cc_basename in
nvcc*) # Cuda Compiler Driver 2.2
lt_prog_compiler_wl='-Xlinker '
- lt_prog_compiler_pic='-Xcompiler -fPIC'
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
;;
esac
else
;;
*)
case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
# Sun Fortran 8.3 passes all unrecognized flags to the linker
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
lt_prog_compiler_wl=''
;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
*Sun\ C*)
# Sun C 5.9
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
lt_prog_compiler_wl='-Wl,'
;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
esac
;;
esac
hardcode_direct=no
hardcode_direct_absolute=no
hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
hardcode_libdir_separator=
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
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=
- hardcode_libdir_flag_spec_ld='-rpath $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
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
# 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
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
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\"`'
+
else
whole_archive_flag_spec=''
fi
hardcode_shlibpath_var=no
;;
- freebsd1*)
- ld_shlibs=no
- ;;
-
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2.*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
fi
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_direct_absolute=yes
-
-
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
case $host_os in
aix3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
;;
aix[4-9]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
;;
bsdi[45]*)
- version_type=linux
+ 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'
;;
dgux*)
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
;;
gnu*)
- version_type=linux
+ 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
+ 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"
;;
interix[3-9]*)
- version_type=linux
+ 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}'
nonstopux*) version_type=nonstopux ;;
*)
if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
fi ;;
dynamic_linker=no
;;
-# This must be Linux ELF.
+# This must be glibc/ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
+ 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}'
;;
newsos6)
- version_type=linux
+ 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}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
solaris*)
- version_type=linux
+ 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}'
;;
sysv4 | sysv4.3*)
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
sysv4*MP*)
if test -d /usr/nec ;then
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
tpf*)
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
+ 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}'
;;
uts4*)
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
hardcode_direct_CXX=no
hardcode_direct_absolute_CXX=no
hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
hardcode_libdir_separator_CXX=
hardcode_minus_L_CXX=no
hardcode_shlibpath_var_CXX=unsupported
hardcode_shlibpath_var_CXX=unsupported
if test "$lt_cv_ld_force_load" = "yes"; then
whole_archive_flag_spec_CXX='`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_CXX=''
fi
esac
;;
- freebsd[12]*)
+ freebsd2.*)
# C++ shared libraries reported to be fairly broken before
# switch to ELF
ld_shlibs_CXX=no
case "$CC $CFLAGS " in #(
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
esac
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
- cl*) ;;
+ cl*)
+ exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
*)
export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
case $host_os in
aix3*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
;;
aix[4-9]*)
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
;;
bsdi[45]*)
- version_type=linux
+ 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'
;;
dgux*)
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
- dynamic_linker=no
- ;;
-
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
objformat=`/usr/bin/objformat`
else
case $host_os in
- freebsd[123]*) objformat=aout ;;
+ freebsd[23].*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2.*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
;;
gnu*)
- version_type=linux
+ 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
+ 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"
;;
interix[3-9]*)
- version_type=linux
+ 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}'
nonstopux*) version_type=nonstopux ;;
*)
if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
+ version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
fi ;;
dynamic_linker=no
;;
-# This must be Linux ELF.
+# This must be glibc/ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu)
- version_type=linux
+ 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}'
;;
newsos6)
- version_type=linux
+ 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}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
solaris*)
- version_type=linux
+ 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}'
;;
sysv4 | sysv4.3*)
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
sysv4*MP*)
if test -d /usr/nec ;then
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
tpf*)
# TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
+ 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}'
;;
uts4*)
- version_type=linux
+ 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'
shlibpath_var=LD_LIBRARY_PATH
+
+
ac_config_commands="$ac_config_commands libtool"
+LIB_PLUGINS = ''
+
# Add configure option --enable-maintainer-mode which enables dependency
# checking and generation useful to package maintainers. This is made an
# option to avoid confusing end users.
-# If words are stored with the most significant byte first (like
-# Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
+# Check if the C compiler supports the "visibility" function attribute
+# If supported, defines HAVE_FUNC_ATTRIBUTE_VISIBILITY
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((visibility))" >&5
+$as_echo_n "checking for __attribute__((visibility))... " >&6; }
+if ${ax_cv_have_func_attribute_visibility+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_c_bigendian=unknown
- # See if we're dealing with a universal compiler.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifndef __APPLE_CC__
- not a universal capable compiler
- #endif
- typedef int dummy;
+
+
+ int foo_def( void ) __attribute__((visibility("default")));
+ int foo_hid( void ) __attribute__((visibility("hidden")));
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest.err; then :
+ ax_cv_have_func_attribute_visibility=no
+else
+ ax_cv_have_func_attribute_visibility=yes
+fi
+else
+ ax_cv_have_func_attribute_visibility=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
- # Check for potential -arch flags. It is not universal unless
- # there are at least two -arch flags with different values.
- ac_arch=
- ac_prev=
- for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
- if test -n "$ac_prev"; then
- case $ac_word in
- i?86 | x86_64 | ppc | ppc64)
- if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
- ac_arch=$ac_word
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_visibility" >&5
+$as_echo "$ax_cv_have_func_attribute_visibility" >&6; }
+
+ if test yes = $ax_cv_have_func_attribute_visibility; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
+_ACEOF
+
+fi
+
+
+
+
+# Check if the compiler supports "-fvisibility=hidden" and if yes, add it to CFLAGS
+# This means that symbols that are not marked explicitly for export (CMSAPI)
+# will not be reachable in the shared library.
+
+
+
+
+for flag in "-fvisibility=hidden"; do
+ as_CACHEVAR=`$as_echo "ax_cv_check_cflags__$flag" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
+$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
+if eval \${$as_CACHEVAR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$CFLAGS
+ CFLAGS="$CFLAGS $flag"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_CACHEVAR=yes"
+else
+ eval "$as_CACHEVAR=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_check_save_flags
+fi
+eval ac_res=\$$as_CACHEVAR
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then :
+
+if ${CFLAGS+:} false; then :
+
+ case " $CFLAGS " in #(
+ *" $flag "*) :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5
+ (: CFLAGS already contains $flag) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } ;; #(
+ *) :
+
+ as_fn_append CFLAGS " $flag"
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
+ (: CFLAGS="$CFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ ;;
+esac
+
+else
+
+ CFLAGS=$flag
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS\""; } >&5
+ (: CFLAGS="$CFLAGS") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+
+fi
+
+else
+ :
+fi
+
+done
+
+
+# If words are stored with the most significant byte first (like
+# Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
else
ac_cv_c_bigendian=universal
break
;; #(
*)
as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
+# Point to JPEG installed in DIR or disable JPEG with --without-jpeg.
+
+# Check whether --with-jpeg was given.
+if test "${with_jpeg+set}" = set; then :
+ withval=$with_jpeg;
+ if test "x$withval" = "xno" ; then
+ with_jpeg='no'
+ else
+ if test "x$withval" != "xyes" ; then
+ with_jpeg=$withval
+ JPEG_DIR=$withval
+ CPPFLAGS="$CPPFLAGS -I$JPEG_DIR/include"
+ LDFLAGS="$LDFLAGS -L$JPEG_DIR/lib"
+ fi
+ with_jpeg='yes'
+ fi
+
+else
+ with_jpeg='yes'
+fi
+
+
+# Point to TIFF installed in DIR or disable TIFF with --without-tiff.
+
+# Check whether --with-tiff was given.
+if test "${with_tiff+set}" = set; then :
+ withval=$with_tiff;
+ if test "x$withval" = "xno" ; then
+ with_tiff='no'
+ else
+ if test "x$withval" != "xyes" ; then
+ with_tiff=$withval
+ TIFF_DIR=$withval
+ CPPFLAGS="$CPPFLAGS -I$TIFF_DIR/include"
+ LDFLAGS="$LDFLAGS -L$TIFF_DIR/lib"
+ fi
+ with_tiff='yes'
+ fi
+
+else
+ with_tiff='yes'
+fi
+
+
+# Disable ZLIB
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+ withval=$with_zlib; with_zlib=$withval
+else
+ with_zlib='yes'
+fi
+
+
+#fast_float plugin:
+
+# Check whether --with-fastfloat was given.
+if test "${with_fastfloat+set}" = set; then :
+ withval=$with_fastfloat;
+ with_fastfloat='yes'
+ LIB_PLUGINS="$LIB_PLUGINS -llcms2_fast_float"
+
+else
+
+ with_fastfloat='no'
+
+fi
+
+
+#
+# Determine POSIX threads settings
+#
+# Enable support for POSIX thread APIs
+
+# Check whether --with-threads was given.
+if test "${with_threads+set}" = set; then :
+ withval=$with_threads; with_threads=$withval
+else
+ with_threads='yes'
+fi
+
+
+have_threads=no
+if test "$with_threads" != 'no'
+then
+
+
+
+
+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
+
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ 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 pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ acx_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt lpthread pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
+
+ # The HP-UX compiler just warns about options it does not understand
+ # but it needs -mt.
+ *-hpux*)
+ acx_pthread_flags="-mt $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ case $flag in
+ none)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ -*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; 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_acx_pthread_config+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$acx_pthread_config"; then
+ ac_cv_prog_acx_pthread_config="$acx_pthread_config" # 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_acx_pthread_config="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+fi
+fi
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ acx_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int attr=$attr; return attr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ attr_name=$attr; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
+_ACEOF
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: must compile with xlc_r or cc_r
+ case "${host_os}" in
+ aix* )
+ if test x"$GCC" != xyes; then
+ case "$CC" in
+ *xlc )
+ # Extract the first word of "xlc_r", so it can be a program name with args.
+set dummy xlc_r; 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_PTHREAD_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CC="xlc_r"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ ;;
+ *cc )
+ # Extract the first word of "cc_r", so it can be a program name with args.
+set dummy cc_r; 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_PTHREAD_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CC="cc_r"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ ;;
+ esac
+ fi
+ case "$CXX" in
+ *xlC )
+ # Extract the first word of "xlC_r", so it can be a program name with args.
+set dummy xlC_r; 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_PTHREAD_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PTHREAD_CXX"; then
+ ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CXX="xlC_r"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_PTHREAD_CXX" && ac_cv_prog_PTHREAD_CXX="${CXX}"
+fi
+fi
+PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
+if test -n "$PTHREAD_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
+$as_echo "$PTHREAD_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ ;;
+ esac
+ ;;
+ esac
+fi
+
+if test "${PTHREAD_CC}x" = "x"
+then
+ PTHREAD_CC="$CC"
+fi
+if test "${PTHREAD_CXX}x" = "x"
+then
+ PTHREAD_CXX="$CXX"
+fi
+
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+
+$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
+
+ :
+else
+ acx_pthread_ok=no
+
+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
+
+
+
+ if test "$acx_pthread_ok" = yes
+ then
+ have_threads=yes
+
+ DEF_THREAD="$PTHREAD_CFLAGS"
+ CFLAGS="$CFLAGS $DEF_THREAD"
+ CXXFLAGS="$CXXFLAGS $DEF_THREAD"
+
+ if test "$CC" != "$PTHREAD_CC"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads." >&5
+$as_echo "$as_me: WARNING: Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads." >&2;}
+ CC="$PTHREAD_CC"
+ fi
+ if test "$CXX" != "$PTHREAD_CXX"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Replacing compiler $CXX with compiler $PTHREAD_CXX to support pthreads." >&5
+$as_echo "$as_me: WARNING: Replacing compiler $CXX with compiler $PTHREAD_CXX to support pthreads." >&2;}
+ CXX="$PTHREAD_CXX"
+ fi
+ fi
+fi
+
+
#
# Find math library
#
#
+# Find Posix threads library
+#
+LIB_THREAD=''
+if test "$with_threads" != 'no' && test "$have_threads" = 'yes'
+then
+ for lib in pthread pthreads
+ do
+ if test "x$PTHREAD_LIBS" = "x" ; then
+ as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_pthread_mutex_lock" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_lock in -l$lib" >&5
+$as_echo_n "checking for pthread_mutex_lock in -l$lib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$lib $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 pthread_mutex_lock ();
+int
+main ()
+{
+return pthread_mutex_lock ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ PTHREAD_LIBS=-l$lib
+fi
+
+ fi
+ done
+
+ LIB_THREAD="$PTHREAD_LIBS"
+ LIBS="$LIBS $LIB_THREAD"
+
+$as_echo "#define HasTHREADS 1" >>confdefs.h
+
+else
+
+$as_echo "#define HasTHREADS 0" >>confdefs.h
+
+fi
+
+
+#
# Check for JPEG
#
have_jpeg='no'
LIB_JPEG=''
if test ! "$with_jpeg" = 'no'
then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG support " >&5
-$as_echo_n "checking for JPEG support ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG support" >&5
+$as_echo_n "checking for JPEG support... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
failed=0;
fi
- ac_fn_c_check_header_mongrel "$LINENO" "jmorecfg.h" "ac_cv_header_jmorecfg_h" "$ac_includes_default"
+ ac_fn_c_check_header_compile "$LINENO" "jmorecfg.h" "ac_cv_header_jmorecfg_h" "#include <jconfig.h>
+"
if test "x$ac_cv_header_jmorecfg_h" = xyes; then :
passed=`expr $passed + 1`
else
# Check for ZLIB
#
have_zlib='no'
-if test ! "$with_zlib" = 'no' || test ! "$with_png" = 'no'
+if test ! "$with_zlib" = 'no' || test ! "$with_tiff" = 'no'
then
LIB_ZLIB=''
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB support " >&5
LIB_TIFF=''
if test ! "$with_tiff" = 'no'
then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFF support " >&5
-$as_echo_n "checking for TIFF support ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFF support" >&5
+$as_echo_n "checking for TIFF support... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
failed=0;
+
# Libraries that the LCMS library depends on
-LCMS_LIB_DEPLIBS="$LIB_MATH"
+LCMS_LIB_DEPLIBS="$LIB_MATH $LIB_THREAD"
LCMS_LIB_DEPLIBS=`echo $LCMS_LIB_DEPLIBS | sed -e 's/ */ /g'`
+echo "LIB_PLUGINS: $LIB_PLUGINS"
+
+
# Libraries that the jpegicc program depends on
-JPEGICC_DEPLIBS="$LIB_JPEG $LIB_MATH"
+JPEGICC_DEPLIBS="$LIB_JPEG $LIB_MATH $LIB_THREAD"
JPEGICC_DEPLIBS=`echo $JPEGICC_DEPLIBS | sed -e 's/ */ /g'`
# Libraries that the tifficc program depends on
-TIFFICC_DEPLIBS="$LIB_TIFF $LIB_JPEG $LIB_ZLIB $LIB_MATH"
+TIFFICC_DEPLIBS="$LIB_TIFF $LIB_JPEG $LIB_ZLIB $LIB_MATH $LIB_THREAD"
TIFFICC_DEPLIBS=`echo $TIFFICC_DEPLIBS | sed -e 's/ */ /g'`
ac_config_files="$ac_config_files testbed/Makefile"
+ if test "x$with_fastfloat" = "xyes" ; then
+ COND_FASTFLOAT_TRUE=
+ COND_FASTFLOAT_FALSE='#'
+else
+ COND_FASTFLOAT_TRUE='#'
+ COND_FASTFLOAT_FALSE=
+fi
+
+ac_config_files="$ac_config_files plugins/Makefile"
+
+ac_config_files="$ac_config_files plugins/fast_float/Makefile"
+
+ac_config_files="$ac_config_files plugins/fast_float/src/Makefile"
+
+ac_config_files="$ac_config_files plugins/fast_float/include/Makefile"
+
+ac_config_files="$ac_config_files plugins/fast_float/testbed/Makefile"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
LTLIBOBJS=$ac_ltlibobjs
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
as_fn_error $? "conditional \"HasTIFF\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${COND_FASTFLOAT_TRUE}" && test -z "${COND_FASTFLOAT_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FASTFLOAT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by lcms2 $as_me 2.4, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by lcms2 $as_me 2.12, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-lcms2 config.status 2.4
-configured by $0, generated by GNU Autoconf 2.68,
+lcms2 config.status 2.12
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
#
# INIT-COMMANDS
#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
# The HP-UX ksh and POSIX shell print the target directory to stdout
enable_fast_install='`$ECHO "$enable_fast_install" | $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"`'
host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
OBJDUMP \
SHELL \
ECHO \
+PATH_SEPARATOR \
SED \
GREP \
EGREP \
allow_undefined_flag \
no_undefined_flag \
hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
exclude_expsyms \
include_expsyms \
allow_undefined_flag_CXX \
no_undefined_flag_CXX \
hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
hardcode_libdir_separator_CXX \
exclude_expsyms_CXX \
include_expsyms_CXX \
"utils/jpgicc/Makefile") CONFIG_FILES="$CONFIG_FILES utils/jpgicc/Makefile" ;;
"utils/psicc/Makefile") CONFIG_FILES="$CONFIG_FILES utils/psicc/Makefile" ;;
"testbed/Makefile") CONFIG_FILES="$CONFIG_FILES testbed/Makefile" ;;
+ "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;;
+ "plugins/fast_float/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/fast_float/Makefile" ;;
+ "plugins/fast_float/src/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/fast_float/src/Makefile" ;;
+ "plugins/fast_float/include/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/fast_float/include/Makefile" ;;
+ "plugins/fast_float/testbed/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/fast_float/testbed/Makefile" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
case $ac_tag in
*:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # 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
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
shift
- for mf
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
do
# Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
+ am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$am_mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
q
}
s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
- /^X\(\/\/\)$/{
+ /^X\/\(\/\/\)$/{
s//\1/
q
}
- /^X\(\/\).*/{
+ /^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
done
+ if test $am_rc -ne 0; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. Try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
}
;;
"libtool":C)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-# Inc.
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
# This file is part of GNU Libtool.
# An echo program that protects backslashes.
ECHO=$lt_ECHO
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
# The host system.
host_alias=$host_alias
host=$host
# This must work even if \$libdir does not exist
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
# This must work even if \$libdir does not exist
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
#
# Set the package name and version
#
-AC_INIT(lcms2,2.4)
+AC_INIT(lcms2,2.12)
+
+# Specify directory where m4 macros may be found.
+AC_CONFIG_MACRO_DIR([m4])
#
# Libtool library revision control info
-# See the libtool documentation under the heading "Libtool's versioning
-# system" in order to understand the meaning of these fields
-#
-# Here are a set of rules to help you update your library version
-# information:
-#
-# 1. Start with version information of `0:0:0' for each libtool library.
-# 2. Update the version information only immediately before a public
-# release of your software. More frequent updates are unnecessary, and
-# only guarantee that the current interface number gets larger faster.
-# 3. If the library source code has changed at all since the last update,
-# then increment revision (`c:r:a' becomes `c:r+1:a').
-# 4. If any interfaces have been added, removed, or changed since the last
-# update, increment current, and set revision to 0.
-# 5. If any interfaces have been added since the last public release, then
-# increment age.
-# 6. If any interfaces have been removed since the last public release,
-# then set age to 0.
#
LIBRARY_CURRENT=2
-LIBRARY_REVISION=4
+LIBRARY_REVISION=12
LIBRARY_AGE=0
AC_SUBST(LIBRARY_CURRENT)dnl
# Obtain system type by running config.guess
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE([foreign 1.7.2 no-define dist-zip])
+AM_INIT_AUTOMAKE([foreign 1.9 tar-ustar no-define dist-zip subdir-objects])
-# Disable JPEG.
-AC_ARG_WITH(jpeg,
- [ --without-jpeg disable JPEG support],
- [with_jpeg=$withval],
- [with_jpeg='yes'])
-
-# Disable TIFF.
-AC_ARG_WITH(tiff,
- [ --without-tiff disable TIFF support],
- [with_tiff=$withval],
- [with_tiff='yes'])
-
-# Disable ZLIB
-AC_ARG_WITH(zlib,
- [ --without-zlib disable ZLIB support],
- [with_zlib=$withval],
- [with_zlib='yes'])
# Check for programs
AC_PROG_CC_STDC
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
+LIB_PLUGINS = ''
+
# Add configure option --enable-maintainer-mode which enables dependency
# checking and generation useful to package maintainers. This is made an
# option to avoid confusing end users.
AC_C_INLINE
AC_SUBST(inline)
+# Check if the C compiler supports the "visibility" function attribute
+# If supported, defines HAVE_FUNC_ATTRIBUTE_VISIBILITY
+AX_GCC_FUNC_ATTRIBUTE(visibility)
+
+# Check if the compiler supports "-fvisibility=hidden" and if yes, add it to CFLAGS
+# This means that symbols that are not marked explicitly for export (CMSAPI)
+# will not be reachable in the shared library.
+AX_APPEND_COMPILE_FLAGS(["-fvisibility=hidden"])
+
# If words are stored with the most significant byte first (like
# Motorola and SPARC CPUs), define `WORDS_BIGENDIAN'.
AC_C_BIGENDIAN
+# Point to JPEG installed in DIR or disable JPEG with --without-jpeg.
+AC_ARG_WITH(jpeg,
+ AS_HELP_STRING([--with-jpeg=DIR],[use jpeg installed in DIR]),
+ [
+ if [ test "x$withval" = "xno" ]; then
+ [with_jpeg='no']
+ else
+ if [ test "x$withval" != "xyes" ]; then
+ with_jpeg=$withval
+ JPEG_DIR=$withval
+ CPPFLAGS="$CPPFLAGS -I$JPEG_DIR/include"
+ LDFLAGS="$LDFLAGS -L$JPEG_DIR/lib"
+ fi
+ [with_jpeg='yes']
+ fi
+ ],
+ [with_jpeg='yes'])
+
+# Point to TIFF installed in DIR or disable TIFF with --without-tiff.
+AC_ARG_WITH(tiff,
+ AS_HELP_STRING([--with-tiff=DIR], [use tiff installed in DIR]),
+ [
+ if [ test "x$withval" = "xno" ]; then
+ [with_tiff='no']
+ else
+ if [ test "x$withval" != "xyes" ]; then
+ with_tiff=$withval
+ TIFF_DIR=$withval
+ CPPFLAGS="$CPPFLAGS -I$TIFF_DIR/include"
+ LDFLAGS="$LDFLAGS -L$TIFF_DIR/lib"
+ fi
+ [with_tiff='yes']
+ fi
+ ],
+ [with_tiff='yes'])
+
+# Disable ZLIB
+AC_ARG_WITH(zlib,
+ [ --without-zlib disable ZLIB support],
+ [with_zlib=$withval],
+ [with_zlib='yes'])
+
+#fast_float plugin:
+AC_ARG_WITH(fastfloat,
+ AS_HELP_STRING([--with-fastfloat],
+ [build and install fast_float plugin, use only if GPL 3.0 is acceptable]),
+ [
+ with_fastfloat='yes'
+ LIB_PLUGINS="$LIB_PLUGINS -llcms2_fast_float"
+ ],
+ [
+ with_fastfloat='no'
+ ])
+
+#
+# Determine POSIX threads settings
+#
+# Enable support for POSIX thread APIs
+AC_ARG_WITH(threads,
+ AS_HELP_STRING([--without-threads],
+ [disable POSIX threads API support]),
+ [with_threads=$withval],
+ [with_threads='yes'])
+
+have_threads=no
+if test "$with_threads" != 'no'
+then
+
+ ACX_PTHREAD()
+
+ if test "$acx_pthread_ok" = yes
+ then
+ have_threads=yes
+
+ DEF_THREAD="$PTHREAD_CFLAGS"
+ CFLAGS="$CFLAGS $DEF_THREAD"
+ CXXFLAGS="$CXXFLAGS $DEF_THREAD"
+
+ if test "$CC" != "$PTHREAD_CC"
+ then
+ AC_MSG_WARN([Replacing compiler $CC with compiler $PTHREAD_CC to support pthreads.])
+ CC="$PTHREAD_CC"
+ fi
+ if test "$CXX" != "$PTHREAD_CXX"
+ then
+ AC_MSG_WARN([Replacing compiler $CXX with compiler $PTHREAD_CXX to support pthreads.])
+ CXX="$PTHREAD_CXX"
+ fi
+ fi
+fi
+
+
#
# Find math library
#
AC_SUBST(LIB_MATH)
#
+# Find Posix threads library
+#
+LIB_THREAD=''
+if test "$with_threads" != 'no' && test "$have_threads" = 'yes'
+then
+ for lib in pthread pthreads
+ do
+ if test "x$PTHREAD_LIBS" = "x" ; then
+ AC_CHECK_LIB([$lib],pthread_mutex_lock,[PTHREAD_LIBS=-l$lib],,)
+ fi
+ done
+
+ LIB_THREAD="$PTHREAD_LIBS"
+ LIBS="$LIBS $LIB_THREAD"
+ AC_DEFINE(HasTHREADS,1,[Define if you have pthreads library])
+else
+ AC_DEFINE(HasTHREADS,0,[Define if you don't have pthreads library])
+fi
+AC_SUBST(LIB_THREAD)
+
+#
# Check for JPEG
#
have_jpeg='no'
LIB_JPEG=''
if test ! "$with_jpeg" = 'no'
then
- AC_MSG_CHECKING(for JPEG support )
+ AC_MSG_CHECKING([for JPEG support])
AC_MSG_RESULT()
failed=0;
passed=0;
AC_CHECK_HEADER(jconfig.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
AC_CHECK_HEADER(jerror.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
- AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
+ AC_CHECK_HEADER(jmorecfg.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`,[#include <jconfig.h>])
AC_CHECK_HEADER(jpeglib.h,passed=`expr $passed + 1`,failed=`expr $failed + 1`)
AC_CHECK_LIB(jpeg,jpeg_read_header,passed=`expr $passed + 1`,failed=`expr $failed + 1`,)
# Check for ZLIB
#
have_zlib='no'
-dnl PNG requires zlib so enable zlib check if PNG is requested
-if test ! "$with_zlib" = 'no' || test ! "$with_png" = 'no'
+dnl TIFF may require zlib so enable zlib check if TIFF is requested
+if test ! "$with_zlib" = 'no' || test ! "$with_tiff" = 'no'
then
LIB_ZLIB=''
AC_MSG_CHECKING(for ZLIB support )
LIB_TIFF=''
if test ! "$with_tiff" = 'no'
then
- AC_MSG_CHECKING(for TIFF support )
+ AC_MSG_CHECKING([for TIFF support])
AC_MSG_RESULT()
failed=0;
passed=0;
AM_CONDITIONAL(HasTIFF, test "$have_tiff" = 'yes')
AC_SUBST(LIB_TIFF)
+
# Libraries that the LCMS library depends on
-LCMS_LIB_DEPLIBS="$LIB_MATH"
+LCMS_LIB_DEPLIBS="$LIB_MATH $LIB_THREAD"
LCMS_LIB_DEPLIBS=`echo $LCMS_LIB_DEPLIBS | sed -e 's/ */ /g'`
AC_SUBST(LCMS_LIB_DEPLIBS)
+echo "LIB_PLUGINS: $LIB_PLUGINS"
+AC_SUBST(LIB_PLUGINS)
+
# Libraries that the jpegicc program depends on
-JPEGICC_DEPLIBS="$LIB_JPEG $LIB_MATH"
+JPEGICC_DEPLIBS="$LIB_JPEG $LIB_MATH $LIB_THREAD"
JPEGICC_DEPLIBS=`echo $JPEGICC_DEPLIBS | sed -e 's/ */ /g'`
AC_SUBST(JPEGICC_DEPLIBS)
# Libraries that the tifficc program depends on
-TIFFICC_DEPLIBS="$LIB_TIFF $LIB_JPEG $LIB_ZLIB $LIB_MATH"
+TIFFICC_DEPLIBS="$LIB_TIFF $LIB_JPEG $LIB_ZLIB $LIB_MATH $LIB_THREAD"
TIFFICC_DEPLIBS=`echo $TIFFICC_DEPLIBS | sed -e 's/ */ /g'`
AC_SUBST(TIFFICC_DEPLIBS)
AC_CONFIG_FILES([utils/jpgicc/Makefile])
AC_CONFIG_FILES([utils/psicc/Makefile])
AC_CONFIG_FILES([testbed/Makefile])
+AM_CONDITIONAL([COND_FASTFLOAT], [test "x$with_fastfloat" = "xyes" ])
+AC_CONFIG_FILES([plugins/Makefile])
+AC_CONFIG_FILES([plugins/fast_float/Makefile])
+AC_CONFIG_FILES([plugins/fast_float/src/Makefile])
+AC_CONFIG_FILES([plugins/fast_float/include/Makefile])
+AC_CONFIG_FILES([plugins/fast_float/testbed/Makefile])
AC_OUTPUT
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2004-05-31.23
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Environment variables:
depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
+ tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
- exit 0
+ exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
- exit 0
+ exit $?
;;
esac
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
rm -f "$tmpdepfile"
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
fi
if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
fi
case "$depmode" in
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
;;
gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
+## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
-## well.
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
-
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
+ # the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> $depfile
- echo >> $depfile
-
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
+ # current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
-
- if test -f "$tmpdepfile"; then :
- else
- stripped=`echo "$stripped" | sed 's,^.*/,,'`
- tmpdepfile="$stripped.u"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
fi
- if test $stat -eq 0; then :
- else
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
-
- if test -f "$tmpdepfile"; then
- outname="$stripped.o"
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
+ # and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # Dependencies are output in .lo.d with libtool 1.4.
- # With libtool 1.5 they are output both in $dir.libs/$base.o.d
- # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
- # latter, because the former will be cleaned when $dir.libs is
- # erased.
- tmpdepfile1="$dir.libs/$base.lo.d"
- tmpdepfile2="$dir$base.o.d"
- tmpdepfile3="$dir.libs/$base.d"
- "$@" -Wc,-MD
- else
- tmpdepfile1="$dir$base.o.d"
- tmpdepfile2="$dir$base.d"
- tmpdepfile3="$dir$base.d"
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
- exit $stat
- fi
-
- if test -f "$tmpdepfile1"; then
- tmpdepfile="$tmpdepfile1"
- elif test -f "$tmpdepfile2"; then
- tmpdepfile="$tmpdepfile2"
- else
- tmpdepfile="$tmpdepfile3"
- fi
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
done
test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
+ # Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
- cleared=no
- for arg in "$@"; do
+ cleared=no eat=no
+ for arg
+ do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
esac
done
- "$@" -E |
- sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
IFS=" "
for arg
do
case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
+ set fnord "$@"
+ shift
+ shift
+ ;;
*)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
none)
exec "$@"
;;
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
# Based on a work by Bob Friesenhahn
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
build_triplet = @build@
host_triplet = @host@
subdir = include
-DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+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 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
}
am__installdirs = "$(DESTDIR)$(includedir)"
HEADERS = $(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
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign include/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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-rm -rf .libs _libs
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@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"; \
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)
+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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool ctags distclean 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 \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool cscopelist-am ctags ctags-am distclean \
+ 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-includeHEADERS install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-includeHEADERS
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2021 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
//
//---------------------------------------------------------------------------------
//
-// Version 2.4
+// Version 2.12
//
#ifndef _lcms2_H
// #define CMS_USE_CPP_API
// Uncomment this line if you need strict CGATS syntax. Makes CGATS files to
-// require "KEYWORD" on undefined identifiers, keep it comented out unless needed
+// require "KEYWORD" on undefined identifiers, keep it commented out unless needed
// #define CMS_STRICT_CGATS 1
// Uncomment to get rid of the tables for "half" float support
// #define CMS_NO_HALF_SUPPORT 1
+// Uncomment to get rid of pthreads/windows dependency
+// #define CMS_NO_PTHREADS 1
+
+// Uncomment this for special windows mutex initialization (see lcms2_internal.h)
+// #define CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT
+
+// Uncomment this to remove the "register" storage class
+// #define CMS_NO_REGISTER_KEYWORD 1
+
// ********** End of configuration toggles ******************************
// Needed for streams
#endif
// Version/release
-#define LCMS_VERSION 2040
+#define LCMS_VERSION 2120
// I will give the chance of redefining basic types for compilers that are not fully C99 compliant
#ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
#endif
#endif
+// Handle "register" keyword
+#if defined(CMS_NO_REGISTER_KEYWORD) && !defined(CMS_DLL) && !defined(CMS_DLL_BUILD)
+# define CMSREGISTER
+#else
+# define CMSREGISTER register
+#endif
+
// In the case 64 bit numbers are not supported by the compiler
#ifdef CMS_DONT_USE_INT64
typedef cmsUInt32Number cmsUInt64Number[2];
# define CMS_IS_WINDOWS_ 1
#endif
-// Try to detect big endian platforms. This list can be endless, so only some checks are performed over here.
-// you can pass this toggle to the compiler by using -DCMS_USE_BIG_ENDIAN or something similar
-
-#if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || defined(WORDS_BIGENDIAN)
-# define CMS_USE_BIG_ENDIAN 1
-#endif
+// Try to detect big endian platforms. This list can be endless, so primarily rely on the configure script
+// on Unix-like systems, and allow it to be set on the compiler command line using
+// -DCMS_USE_BIG_ENDIAN or something similar
+#ifdef CMS_USE_BIG_ENDIAN // set at compiler command line takes overall precedence
-#if defined(__sgi__) || defined(__sgi) || defined(__powerpc__) || defined(sparc)
-# define CMS_USE_BIG_ENDIAN 1
-#endif
+# if CMS_USE_BIG_ENDIAN == 0
+# undef CMS_USE_BIG_ENDIAN
+# endif
-#if defined(__ppc__) || defined(__s390__) || defined(__s390x__)
-# define CMS_USE_BIG_ENDIAN 1
-#endif
+#else // CMS_USE_BIG_ENDIAN
+
+# ifdef WORDS_BIGENDIAN // set by configure (or explicitly on compiler command line)
+# define CMS_USE_BIG_ENDIAN 1
+# else // WORDS_BIGENDIAN
+// Fall back to platform/compiler specific tests
+# if defined(__sgi__) || defined(__sgi) || defined(sparc)
+# define CMS_USE_BIG_ENDIAN 1
+# endif
+
+# if defined(__s390__) || defined(__s390x__)
+# define CMS_USE_BIG_ENDIAN 1
+# endif
+
+# ifdef macintosh
+# ifdef __BIG_ENDIAN__
+# define CMS_USE_BIG_ENDIAN 1
+# endif
+# ifdef __LITTLE_ENDIAN__
+# undef CMS_USE_BIG_ENDIAN
+# endif
+# endif
+# endif // WORDS_BIGENDIAN
+
+# if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__)
+# define CMS_USE_BIG_ENDIAN 1
+# endif
-#ifdef TARGET_CPU_PPC
-# if TARGET_CPU_PPC
-# define CMS_USE_BIG_ENDIAN 1
-# endif
-#endif
+#endif // CMS_USE_BIG_ENDIAN
-#ifdef macintosh
-# ifdef __BIG_ENDIAN__
-# define CMS_USE_BIG_ENDIAN 1
-# endif
-#endif
// Calling convention -- this is hardly platform and compiler dependent
#ifdef CMS_IS_WINDOWS_
# define CMSEXPORT __stdcall _export
# define CMSAPI
# else
-# define CMSEXPORT _stdcall
+# define CMSEXPORT __stdcall
# ifdef CMS_DLL_BUILD
# define CMSAPI __declspec(dllexport)
# else
# define CMSAPI __declspec(dllimport)
-# endif
+# endif
# endif
# else
-# define CMSEXPORT
-# define CMSAPI
+# define CMSEXPORT
+# define CMSAPI
# endif
-#else
-# define CMSEXPORT
-# define CMSAPI
+#else // not Windows
+# ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
+# define CMSEXPORT
+# define CMSAPI __attribute__((visibility("default")))
+# else
+# define CMSEXPORT
+# define CMSAPI
+# endif
+#endif // CMS_IS_WINDOWS_
+
+#ifdef HasTHREADS
+# if HasTHREADS == 1
+# undef CMS_NO_PTHREADS
+# else
+# define CMS_NO_PTHREADS 1
+# endif
#endif
// Some common definitions
#endif
// D50 XYZ normalized to Y=1.0
-#define cmsD50X 0.9642
-#define cmsD50Y 1.0
-#define cmsD50Z 0.8249
+#define cmsD50X 0.9642
+#define cmsD50Y 1.0
+#define cmsD50Z 0.8249
// V4 perceptual black
#define cmsPERCEPTUAL_BLACK_X 0.00336
#define cmsPERCEPTUAL_BLACK_Z 0.00287
// Definitions in ICC spec
-#define cmsMagicNumber 0x61637370 // 'acsp'
-#define lcmsSignature 0x6c636d73 // 'lcms'
+#define cmsMagicNumber 0x61637370 // 'acsp'
+#define lcmsSignature 0x6c636d73 // 'lcms'
// Base ICC type definitions
cmsSigPreview1Tag = 0x70726531, // 'pre1'
cmsSigPreview2Tag = 0x70726532, // 'pre2'
cmsSigProfileDescriptionTag = 0x64657363, // 'desc'
+ cmsSigProfileDescriptionMLTag = 0x6473636d, // 'dscm'
cmsSigProfileSequenceDescTag = 0x70736571, // 'pseq'
cmsSigProfileSequenceIdTag = 0x70736964, // 'psid'
cmsSigPs2CRD0Tag = 0x70736430, // 'psd0'
cmsSigViewingCondDescTag = 0x76756564, // 'vued'
cmsSigViewingConditionsTag = 0x76696577, // 'view'
cmsSigVcgtTag = 0x76636774, // 'vcgt'
- cmsSigMetaTag = 0x6D657461 // 'meta'
+ cmsSigMetaTag = 0x6D657461, // 'meta'
+ cmsSigArgyllArtsTag = 0x61727473 // 'arts'
} cmsTagSignature;
cmsSigNamedColorElemType = 0x6E636C20, // 'ncl '
cmsSigLabV2toV4 = 0x32203420, // '2 4 '
cmsSigLabV4toV2 = 0x34203220, // '4 2 '
-
+
// Identities
cmsSigIdentityElemType = 0x69646E20, // 'idn '
cmsSigLab2FloatPCS = 0x64326C20, // 'd2l '
cmsSigFloatPCS2Lab = 0x6C326420, // 'l2d '
cmsSigXYZ2FloatPCS = 0x64327820, // 'd2x '
- cmsSigFloatPCS2XYZ = 0x78326420 // 'x2d '
+ cmsSigFloatPCS2XYZ = 0x78326420, // 'x2d '
+ cmsSigClipNegativesElemType = 0x636c7020 // 'clp '
} cmsStageSignature;
// Little CMS specific typedefs
-typedef void* cmsContext; // Context identifier for multithreaded environments
typedef void* cmsHANDLE ; // Generic handle
typedef void* cmsHPROFILE; // Opaque typedefs to hide internals
typedef void* cmsHTRANSFORM;
// T: Pixeltype
// F: Flavor 0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)
// P: Planar? 0=Chunky, 1=Planar
-// X: swap 16 bps endianess?
+// X: swap 16 bps endianness?
// S: Do swap? ie, BGR, KYMC
// E: Extra samples
// C: Channels (Samples per pixel)
#define TYPE_ARGB_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|SWAPFIRST_SH(1))
#define TYPE_BGR_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1))
#define TYPE_BGRA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
-#define TYPE_ABGR_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1))
+#define TYPE_ABGR_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1))
#define TYPE_CMYK_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(4))
} cmsICCViewingConditions;
+// Get LittleCMS version (for shared objects) -----------------------------------------------------------------------------
+
+CMSAPI int CMSEXPORT cmsGetEncodedCMMversion(void);
+
// Support of non-standard functions --------------------------------------------------------------------------------------
CMSAPI int CMSEXPORT cmsstrcasecmp(const char* s1, const char* s2);
CMSAPI long int CMSEXPORT cmsfilelength(FILE* f);
-// Plug-In registering ---------------------------------------------------------------------------------------------------
+
+// Context handling --------------------------------------------------------------------------------------------------------
+
+// Each context holds its owns globals and its own plug-ins. There is a global context with the id = 0 for lecacy compatibility
+// though using the global context is not recommended. Proper context handling makes lcms more thread-safe.
+
+typedef struct _cmsContext_struct* cmsContext;
+
+CMSAPI cmsContext CMSEXPORT cmsCreateContext(void* Plugin, void* UserData);
+CMSAPI void CMSEXPORT cmsDeleteContext(cmsContext ContextID);
+CMSAPI cmsContext CMSEXPORT cmsDupContext(cmsContext ContextID, void* NewUserData);
+CMSAPI void* CMSEXPORT cmsGetContextUserData(cmsContext ContextID);
+
+// Plug-In registering --------------------------------------------------------------------------------------------------
CMSAPI cmsBool CMSEXPORT cmsPlugin(void* Plugin);
+CMSAPI cmsBool CMSEXPORT cmsPluginTHR(cmsContext ContextID, void* Plugin);
CMSAPI void CMSEXPORT cmsUnregisterPlugins(void);
+CMSAPI void CMSEXPORT cmsUnregisterPluginsTHR(cmsContext ContextID);
// Error logging ----------------------------------------------------------------------------------------------------------
// Allows user to set any specific logger
CMSAPI void CMSEXPORT cmsSetLogErrorHandler(cmsLogErrorHandlerFunction Fn);
+CMSAPI void CMSEXPORT cmsSetLogErrorHandlerTHR(cmsContext ContextID, cmsLogErrorHandlerFunction Fn);
// Conversions --------------------------------------------------------------------------------------------------------------
cmsCIEXYZ whitePoint;
cmsFloat64Number Yb;
cmsFloat64Number La;
- int surround;
+ cmsUInt32Number surround;
cmsFloat64Number D_value;
} cmsViewingConditions;
// The internal representation is none of your business.
typedef struct _cms_curve_struct cmsToneCurve;
-CMSAPI cmsToneCurve* CMSEXPORT cmsBuildSegmentedToneCurve(cmsContext ContextID, cmsInt32Number nSegments, const cmsCurveSegment Segments[]);
+CMSAPI cmsToneCurve* CMSEXPORT cmsBuildSegmentedToneCurve(cmsContext ContextID, cmsUInt32Number nSegments, const cmsCurveSegment Segments[]);
CMSAPI cmsToneCurve* CMSEXPORT cmsBuildParametricToneCurve(cmsContext ContextID, cmsInt32Number Type, const cmsFloat64Number Params[]);
CMSAPI cmsToneCurve* CMSEXPORT cmsBuildGamma(cmsContext ContextID, cmsFloat64Number Gamma);
-CMSAPI cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsInt32Number nEntries, const cmsUInt16Number values[]);
+CMSAPI cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsUInt32Number nEntries, const cmsUInt16Number values[]);
CMSAPI cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[]);
CMSAPI void CMSEXPORT cmsFreeToneCurve(cmsToneCurve* Curve);
CMSAPI void CMSEXPORT cmsFreeToneCurveTriple(cmsToneCurve* Curve[3]);
CMSAPI cmsToneCurve* CMSEXPORT cmsDupToneCurve(const cmsToneCurve* Src);
CMSAPI cmsToneCurve* CMSEXPORT cmsReverseToneCurve(const cmsToneCurve* InGamma);
-CMSAPI cmsToneCurve* CMSEXPORT cmsReverseToneCurveEx(cmsInt32Number nResultSamples, const cmsToneCurve* InGamma);
+CMSAPI cmsToneCurve* CMSEXPORT cmsReverseToneCurveEx(cmsUInt32Number nResultSamples, const cmsToneCurve* InGamma);
CMSAPI cmsToneCurve* CMSEXPORT cmsJoinToneCurve(cmsContext ContextID, const cmsToneCurve* X, const cmsToneCurve* Y, cmsUInt32Number nPoints);
CMSAPI cmsBool CMSEXPORT cmsSmoothToneCurve(cmsToneCurve* Tab, cmsFloat64Number lambda);
CMSAPI cmsFloat32Number CMSEXPORT cmsEvalToneCurveFloat(const cmsToneCurve* Curve, cmsFloat32Number v);
CMSAPI cmsBool CMSEXPORT cmsIsToneCurveDescending(const cmsToneCurve* t);
CMSAPI cmsInt32Number CMSEXPORT cmsGetToneCurveParametricType(const cmsToneCurve* t);
CMSAPI cmsFloat64Number CMSEXPORT cmsEstimateGamma(const cmsToneCurve* t, cmsFloat64Number Precision);
+CMSAPI cmsFloat64Number* CMSEXPORT cmsGetToneCurveParams(const cmsToneCurve* t);
// Tone curve tabular estimation
CMSAPI cmsUInt32Number CMSEXPORT cmsGetToneCurveEstimatedTableEntries(const cmsToneCurve* t);
// Where to place/locate the stages in the pipeline chain
typedef enum { cmsAT_BEGIN, cmsAT_END } cmsStageLoc;
-CMSAPI void CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe);
+CMSAPI cmsBool CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe);
CMSAPI void CMSEXPORT cmsPipelineUnlinkStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage** mpe);
// This function is quite useful to analyze the structure of a Pipeline and retrieve the Stage elements
CMSAPI void* CMSEXPORT cmsStageData(const cmsStage* mpe);
// Sampling
-typedef cmsInt32Number (* cmsSAMPLER16) (register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register void * Cargo);
+typedef cmsInt32Number (* cmsSAMPLER16) (CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void * Cargo);
-typedef cmsInt32Number (* cmsSAMPLERFLOAT)(register const cmsFloat32Number In[],
- register cmsFloat32Number Out[],
- register void * Cargo);
+typedef cmsInt32Number (* cmsSAMPLERFLOAT)(CMSREGISTER const cmsFloat32Number In[],
+ CMSREGISTER cmsFloat32Number Out[],
+ CMSREGISTER void * Cargo);
// Use this flag to prevent changes being written to destination
#define SAMPLER_INSPECT 0x01000000
// For CLUT only
-CMSAPI cmsBool CMSEXPORT cmsStageSampleCLut16bit(cmsStage* mpe, cmsSAMPLER16 Sampler, void* Cargo, cmsUInt32Number dwFlags);
+CMSAPI cmsBool CMSEXPORT cmsStageSampleCLut16bit(cmsStage* mpe, cmsSAMPLER16 Sampler, void* Cargo, cmsUInt32Number dwFlags);
CMSAPI cmsBool CMSEXPORT cmsStageSampleCLutFloat(cmsStage* mpe, cmsSAMPLERFLOAT Sampler, void* Cargo, cmsUInt32Number dwFlags);
// Slicers
const char LanguageCode[3], const char CountryCode[3],
char ObtainedLanguage[3], char ObtainedCountry[3]);
+CMSAPI cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu);
+
+CMSAPI cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu,
+ cmsUInt32Number idx,
+ char LanguageCode[3],
+ char CountryCode[3]);
+
// Undercolorremoval & black generation -------------------------------------------------------------------------------------
typedef struct {
typedef struct {
cmsUInt32Number n;
- cmsContext ContextID;
+ cmsContext ContextID;
cmsPSEQDESC* seq;
} cmsSEQ;
CMSAPI cmsTagSignature CMSEXPORT cmsTagLinkedTo(cmsHPROFILE hProfile, cmsTagSignature sig);
// Read and write raw data
-CMSAPI cmsInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, void* Buffer, cmsUInt32Number BufferSize);
+CMSAPI cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, void* Buffer, cmsUInt32Number BufferSize);
CMSAPI cmsBool CMSEXPORT cmsWriteRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, const void* data, cmsUInt32Number Size);
// Access header data
CMSAPI void CMSEXPORT cmsSetHeaderFlags(cmsHPROFILE hProfile, cmsUInt32Number Flags);
CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile);
CMSAPI void CMSEXPORT cmsSetHeaderManufacturer(cmsHPROFILE hProfile, cmsUInt32Number manufacturer);
+CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderCreator(cmsHPROFILE hProfile);
CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile);
CMSAPI void CMSEXPORT cmsSetHeaderModel(cmsHPROFILE hProfile, cmsUInt32Number model);
CMSAPI void CMSEXPORT cmsSetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number Flags);
CMSAPI cmsUInt32Number CMSEXPORT cmsChannelsOf(cmsColorSpaceSignature ColorSpace);
-// Build a suitable formatter for the colorspace of this profile
+// Build a suitable formatter for the colorspace of this profile. nBytes=1 means 8 bits, nBytes=2 means 16 bits.
CMSAPI cmsUInt32Number CMSEXPORT cmsFormatterForColorspaceOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat);
CMSAPI cmsUInt32Number CMSEXPORT cmsFormatterForPCSOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat);
CMSAPI cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromStream(cmsContext ContextID, FILE* Stream);
CMSAPI cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromMem(cmsContext ContextID, void *Buffer, cmsUInt32Number size, const char* AccessMode);
CMSAPI cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromNULL(cmsContext ContextID);
+CMSAPI cmsIOHANDLER* CMSEXPORT cmsGetProfileIOhandler(cmsHPROFILE hProfile);
CMSAPI cmsBool CMSEXPORT cmsCloseIOhandler(cmsIOHANDLER* io);
// MD5 message digest --------------------------------------------------------------------------------------------------
CMSAPI cmsBool CMSEXPORT cmsMD5computeID(cmsHPROFILE hProfile);
-// Profile high level funtions ------------------------------------------------------------------------------------------
+// Profile high level functions ------------------------------------------------------------------------------------------
CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromFile(const char *ICCProfile, const char *sAccess);
CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromFileTHR(cmsContext ContextID, const char *ICCProfile, const char *sAccess);
CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromMem(const void * MemPtr, cmsUInt32Number dwSize);
CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromMemTHR(cmsContext ContextID, const void * MemPtr, cmsUInt32Number dwSize);
CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromIOhandlerTHR(cmsContext ContextID, cmsIOHANDLER* io);
+CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromIOhandler2THR(cmsContext ContextID, cmsIOHANDLER* io, cmsBool write);
CMSAPI cmsBool CMSEXPORT cmsCloseProfile(cmsHPROFILE hProfile);
CMSAPI cmsBool CMSEXPORT cmsSaveProfileToFile(cmsHPROFILE hProfile, const char* FileName);
CMSAPI cmsHPROFILE CMSEXPORT cmsCreate_sRGBProfile(void);
CMSAPI cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfileTHR(cmsContext ContextID,
- int nLUTPoints,
+ cmsUInt32Number nLUTPoints,
cmsFloat64Number Bright,
cmsFloat64Number Contrast,
cmsFloat64Number Hue,
cmsFloat64Number Saturation,
- int TempSrc,
- int TempDest);
+ cmsUInt32Number TempSrc,
+ cmsUInt32Number TempDest);
-CMSAPI cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfile(int nLUTPoints,
+CMSAPI cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfile(cmsUInt32Number nLUTPoints,
cmsFloat64Number Bright,
cmsFloat64Number Contrast,
cmsFloat64Number Hue,
cmsFloat64Number Saturation,
- int TempSrc,
- int TempDest);
+ cmsUInt32Number TempSrc,
+ cmsUInt32Number TempDest);
CMSAPI cmsHPROFILE CMSEXPORT cmsCreateNULLProfileTHR(cmsContext ContextID);
CMSAPI cmsHPROFILE CMSEXPORT cmsCreateNULLProfile(void);
// Call with NULL as parameters to get the intent count
CMSAPI cmsUInt32Number CMSEXPORT cmsGetSupportedIntents(cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions);
+CMSAPI cmsUInt32Number CMSEXPORT cmsGetSupportedIntentsTHR(cmsContext ContextID, cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions);
// Flags
// Misc
#define cmsFLAGS_BLACKPOINTCOMPENSATION 0x2000
#define cmsFLAGS_NOWHITEONWHITEFIXUP 0x0004 // Don't fix scum dot
-#define cmsFLAGS_HIGHRESPRECALC 0x0400 // Use more memory to give better accurancy
-#define cmsFLAGS_LOWRESPRECALC 0x0800 // Use less memory to minimize resouces
+#define cmsFLAGS_HIGHRESPRECALC 0x0400 // Use more memory to give better accuracy
+#define cmsFLAGS_LOWRESPRECALC 0x0800 // Use less memory to minimize resources
// For devicelink creation
#define cmsFLAGS_8BITS_DEVICELINK 0x0008 // Create 8 bits devicelinks
#define cmsFLAGS_CLUT_POST_LINEARIZATION 0x0001 // create postlinearization tables if possible
#define cmsFLAGS_CLUT_PRE_LINEARIZATION 0x0010 // create prelinearization tables if possible
+// Specific to unbounded mode
+#define cmsFLAGS_NONEGATIVES 0x8000 // Prevent negative numbers in floating point transforms
+
+// Copy alpha channels when transforming
+#define cmsFLAGS_COPY_ALPHA 0x04000000 // Alpha channels are copied on cmsDoTransform()
+
// Fine-tune control over number of gridpoints
#define cmsFLAGS_GRIDPOINTS(n) (((n) & 0xFF) << 16)
void * OutputBuffer,
cmsUInt32Number Size);
-CMSAPI void CMSEXPORT cmsDoTransformStride(cmsHTRANSFORM Transform,
+CMSAPI void CMSEXPORT cmsDoTransformStride(cmsHTRANSFORM Transform, // Deprecated
const void * InputBuffer,
void * OutputBuffer,
cmsUInt32Number Size,
cmsUInt32Number Stride);
+CMSAPI void CMSEXPORT cmsDoTransformLineStride(cmsHTRANSFORM Transform,
+ const void* InputBuffer,
+ void* OutputBuffer,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ cmsUInt32Number BytesPerLineIn,
+ cmsUInt32Number BytesPerLineOut,
+ cmsUInt32Number BytesPerPlaneIn,
+ cmsUInt32Number BytesPerPlaneOut);
+
-CMSAPI void CMSEXPORT cmsSetAlarmCodes(cmsUInt16Number NewAlarm[cmsMAXCHANNELS]);
+CMSAPI void CMSEXPORT cmsSetAlarmCodes(const cmsUInt16Number NewAlarm[cmsMAXCHANNELS]);
CMSAPI void CMSEXPORT cmsGetAlarmCodes(cmsUInt16Number NewAlarm[cmsMAXCHANNELS]);
+
+CMSAPI void CMSEXPORT cmsSetAlarmCodesTHR(cmsContext ContextID,
+ const cmsUInt16Number AlarmCodes[cmsMAXCHANNELS]);
+CMSAPI void CMSEXPORT cmsGetAlarmCodesTHR(cmsContext ContextID,
+ cmsUInt16Number AlarmCodes[cmsMAXCHANNELS]);
+
+
+
// Adaptation state for absolute colorimetric intent
CMSAPI cmsFloat64Number CMSEXPORT cmsSetAdaptationState(cmsFloat64Number d);
+CMSAPI cmsFloat64Number CMSEXPORT cmsSetAdaptationStateTHR(cmsContext ContextID, cmsFloat64Number d);
+
+
// Grab the ContextID from an open transform. Returns NULL if a NULL transform is passed
CMSAPI cmsContext CMSEXPORT cmsGetTransformContextID(cmsHTRANSFORM hTransform);
// Persistence
CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromFile(cmsContext ContextID, const char* cFileName);
-CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromMem(cmsContext ContextID, void *Ptr, cmsUInt32Number len);
+CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromMem(cmsContext ContextID, const void *Ptr, cmsUInt32Number len);
// CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromIOhandler(cmsContext ContextID, cmsIOHANDLER* io);
CMSAPI cmsBool CMSEXPORT cmsIT8SaveToFile(cmsHANDLE hIT8, const char* cFileName);
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
CMSAPI void CMSEXPORT _cmsMAT3eval(cmsVEC3* r, const cmsMAT3* a, const cmsVEC3* v);
+// MD5 low level -------------------------------------------------------------------------------------
+
+CMSAPI cmsHANDLE CMSEXPORT cmsMD5alloc(cmsContext ContextID);
+CMSAPI void CMSEXPORT cmsMD5add(cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32Number len);
+CMSAPI void CMSEXPORT cmsMD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle);
+
// Error logging -------------------------------------------------------------------------------------
CMSAPI void CMSEXPORT cmsSignalError(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *ErrorText, ...);
const void* Buffer);
};
-// Endianess adjust functions
+// Endianness adjust functions
CMSAPI cmsUInt16Number CMSEXPORT _cmsAdjustEndianess16(cmsUInt16Number Word);
CMSAPI cmsUInt32Number CMSEXPORT _cmsAdjustEndianess32(cmsUInt32Number Value);
CMSAPI void CMSEXPORT _cmsAdjustEndianess64(cmsUInt64Number* Result, cmsUInt64Number* QWord);
#define cmsPluginMultiProcessElementSig 0x6D706548 // 'mpeH'
#define cmsPluginOptimizationSig 0x6F707448 // 'optH'
#define cmsPluginTransformSig 0x7A666D48 // 'xfmH'
+#define cmsPluginMutexSig 0x6D747A48 // 'mtxH'
typedef struct _cmsPluginBaseStruct {
//----------------------------------------------------------------------------------------------------------
// Memory handler. Each new plug-in type replaces current behaviour
+
+typedef void* (* _cmsMallocFnPtrType)(cmsContext ContextID, cmsUInt32Number size);
+typedef void (* _cmsFreeFnPtrType)(cmsContext ContextID, void *Ptr);
+typedef void* (* _cmsReallocFnPtrType)(cmsContext ContextID, void* Ptr, cmsUInt32Number NewSize);
+
+typedef void* (* _cmsMalloZerocFnPtrType)(cmsContext ContextID, cmsUInt32Number size);
+typedef void* (* _cmsCallocFnPtrType)(cmsContext ContextID, cmsUInt32Number num, cmsUInt32Number size);
+typedef void* (* _cmsDupFnPtrType)(cmsContext ContextID, const void* Org, cmsUInt32Number size);
+
typedef struct {
cmsPluginBase base;
// Required
- void * (* MallocPtr)(cmsContext ContextID, cmsUInt32Number size);
- void (* FreePtr)(cmsContext ContextID, void *Ptr);
- void * (* ReallocPtr)(cmsContext ContextID, void* Ptr, cmsUInt32Number NewSize);
+ _cmsMallocFnPtrType MallocPtr;
+ _cmsFreeFnPtrType FreePtr;
+ _cmsReallocFnPtrType ReallocPtr;
// Optional
- void * (* MallocZeroPtr)(cmsContext ContextID, cmsUInt32Number size);
- void * (* CallocPtr)(cmsContext ContextID, cmsUInt32Number num, cmsUInt32Number size);
- void * (* DupPtr)(cmsContext ContextID, const void* Org, cmsUInt32Number size);
+ _cmsMalloZerocFnPtrType MallocZeroPtr;
+ _cmsCallocFnPtrType CallocPtr;
+ _cmsDupFnPtrType DupPtr;
} cmsPluginMemHandler;
// 16 bits forward interpolation. This function performs precision-limited linear interpolation
// and is supposed to be quite fast. Implementation may be tetrahedral or trilinear, and plug-ins may
// choose to implement any other interpolation algorithm.
-typedef void (* _cmsInterpFn16)(register const cmsUInt16Number Input[],
- register cmsUInt16Number Output[],
- register const struct _cms_interp_struc* p);
+typedef void (* _cmsInterpFn16)(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const struct _cms_interp_struc* p);
// Floating point forward interpolation. Full precision interpolation using floats. This is not a
// time critical function. Implementation may be tetrahedral or trilinear, and plug-ins may
#define CMS_LERP_FLAGS_TRILINEAR 0x0100 // Hint only
-#define MAX_INPUT_DIMENSIONS 8
+#define MAX_INPUT_DIMENSIONS 15
typedef struct _cms_interp_struc { // Used on all interpolations. Supplied by lcms2 when calling the interpolation function
// Parametric curves. A negative type means same function but analytically inverted. Max. number of params is 10
-// Evaluator callback for user-suplied parametric curves. May implement more than one type
+// Evaluator callback for user-supplied parametric curves. May implement more than one type
typedef cmsFloat64Number (* cmsParametricCurveEvaluator)(cmsInt32Number Type, const cmsFloat64Number Params[10], cmsFloat64Number R);
// Plug-in may implement an arbitrary number of parametric curves
struct _cmstransform_struct;
-typedef cmsUInt8Number* (* cmsFormatter16)(register struct _cmstransform_struct* CMMcargo,
- register cmsUInt16Number Values[],
- register cmsUInt8Number* Buffer,
- register cmsUInt32Number Stride);
+typedef cmsUInt8Number* (* cmsFormatter16)(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride);
typedef cmsUInt8Number* (* cmsFormatterFloat)(struct _cmstransform_struct* CMMcargo,
cmsFloat32Number Values[],
cmsUInt32Number nSupportedTypes; // In how many types this tag can come (MAX_TYPES_IN_LCMS_PLUGIN maximum)
cmsTagTypeSignature SupportedTypes[MAX_TYPES_IN_LCMS_PLUGIN];
- // For writting
+ // For writing
cmsTagTypeSignature (* DecideType)(cmsFloat64Number ICCVersion, const void *Data);
} cmsTagDescriptor;
// the optimization search. Or FALSE if it is unable to optimize and want to give a chance
// to the rest of optimizers.
-typedef void (* _cmsOPTeval16Fn)(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register const void* Data);
-
-
typedef cmsBool (* _cmsOPToptimizeFn)(cmsPipeline** Lut,
cmsUInt32Number Intent,
cmsUInt32Number* InputFormat,
cmsUInt32Number* OutputFormat,
cmsUInt32Number* dwFlags);
+// Pipeline Evaluator (in 16 bits)
+typedef void (* _cmsPipelineEval16Fn)(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ const void* Data);
+
+// Pipeline Evaluator (in floating point)
+typedef void (* _cmsPipelineEvalFloatFn)(const cmsFloat32Number In[],
+ cmsFloat32Number Out[],
+ const void* Data);
+
+
// This function may be used to set the optional evaluator and a block of private data. If private data is being used, an optional
// duplicator and free functions should also be specified in order to duplicate the LUT construct. Use NULL to inhibit such functionality.
CMSAPI void CMSEXPORT _cmsPipelineSetOptimizationParameters(cmsPipeline* Lut,
- _cmsOPTeval16Fn Eval16,
+ _cmsPipelineEval16Fn Eval16,
void* PrivateData,
_cmsFreeUserDataFn FreePrivateDataFn,
_cmsDupUserDataFn DupPrivateDataFn);
//----------------------------------------------------------------------------------------------------------
// Full xform
-typedef void (* _cmsTransformFn)(struct _cmstransform_struct *CMMcargo,
+
+typedef struct {
+ cmsUInt32Number BytesPerLineIn;
+ cmsUInt32Number BytesPerLineOut;
+ cmsUInt32Number BytesPerPlaneIn;
+ cmsUInt32Number BytesPerPlaneOut;
+
+} cmsStride;
+
+typedef void (* _cmsTransformFn)(struct _cmstransform_struct *CMMcargo, // Legacy function, handles just ONE scanline.
const void* InputBuffer,
void* OutputBuffer,
cmsUInt32Number Size,
- cmsUInt32Number Stride);
+ cmsUInt32Number Stride); // Stride in bytes to the next plana in planar formats
+
+
+typedef void (*_cmsTransform2Fn)(struct _cmstransform_struct *CMMcargo,
+ const void* InputBuffer,
+ void* OutputBuffer,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride);
typedef cmsBool (* _cmsTransformFactory)(_cmsTransformFn* xform,
void** UserData,
cmsUInt32Number* OutputFormat,
cmsUInt32Number* dwFlags);
+typedef cmsBool (* _cmsTransform2Factory)(_cmsTransform2Fn* xform,
+ void** UserData,
+ _cmsFreeUserDataFn* FreePrivateDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
// Retrieve user data as specified by the factory
CMSAPI void CMSEXPORT _cmsSetTransformUserData(struct _cmstransform_struct *CMMcargo, void* ptr, _cmsFreeUserDataFn FreePrivateDataFn);
CMSAPI void CMSEXPORT _cmsGetTransformFormatters16 (struct _cmstransform_struct *CMMcargo, cmsFormatter16* FromInput, cmsFormatter16* ToOutput);
CMSAPI void CMSEXPORT _cmsGetTransformFormattersFloat(struct _cmstransform_struct *CMMcargo, cmsFormatterFloat* FromInput, cmsFormatterFloat* ToOutput);
+// Retrieve original flags
+CMSAPI cmsUInt32Number CMSEXPORT _cmsGetTransformFlags(struct _cmstransform_struct* CMMcargo);
+
typedef struct {
cmsPluginBase base;
// Transform entry point
- _cmsTransformFactory Factory;
+ union {
+ _cmsTransformFactory legacy_xform;
+ _cmsTransform2Factory xform;
+ } factories;
} cmsPluginTransform;
+//----------------------------------------------------------------------------------------------------------
+// Mutex
+
+typedef void* (* _cmsCreateMutexFnPtrType)(cmsContext ContextID);
+typedef void (* _cmsDestroyMutexFnPtrType)(cmsContext ContextID, void* mtx);
+typedef cmsBool (* _cmsLockMutexFnPtrType)(cmsContext ContextID, void* mtx);
+typedef void (* _cmsUnlockMutexFnPtrType)(cmsContext ContextID, void* mtx);
+
+typedef struct {
+ cmsPluginBase base;
+
+ _cmsCreateMutexFnPtrType CreateMutexPtr;
+ _cmsDestroyMutexFnPtrType DestroyMutexPtr;
+ _cmsLockMutexFnPtrType LockMutexPtr;
+ _cmsUnlockMutexFnPtrType UnlockMutexPtr;
+
+} cmsPluginMutex;
+
+CMSAPI void* CMSEXPORT _cmsCreateMutex(cmsContext ContextID);
+CMSAPI void CMSEXPORT _cmsDestroyMutex(cmsContext ContextID, void* mtx);
+CMSAPI cmsBool CMSEXPORT _cmsLockMutex(cmsContext ContextID, void* mtx);
+CMSAPI void CMSEXPORT _cmsUnlockMutex(cmsContext ContextID, void* mtx);
+
#ifndef CMS_USE_CPP_API
# ifdef __cplusplus
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- shift;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) no_target_directory=true;;
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
fi
shift # arg
dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
done
fi
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call `install-sh -d' without argument.
+ # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
for src
do
- # Protect names starting with `-'.
+ # Protect names problematic for 'test' and other utilities.
case $src in
- -*) src=./$src;;
+ -* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
-
dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
Name: @PACKAGE@
Description: LCMS Color Management Library
Version: @VERSION@
-Libs: -L${libdir} -llcms2
-Libs.private: @LIB_MATH@
+Libs: -L${libdir} -llcms2 @LIB_PLUGINS@
+Libs.private: @LIB_MATH@ @LIB_THREAD@
Cflags: -I${includedir}
-# libtool (GNU libtool) 2.4
+# libtool (GNU libtool) 2.4.2
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# 2007, 2008, 2009, 2010, 2011 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.
# --quiet, --silent don't print informational messages
# --no-quiet, --no-silent
# print informational messages (default)
+# --no-warn don't display warning messages
# --tag=TAG use configuration variables from tag TAG
# -v, --verbose print more informational messages than default
# --no-verbose don't print the extra informational messages
# compiler: $LTCC
# compiler flags: $LTCFLAGS
# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.4
+# $progname: (GNU libtool) 2.4.2
# automake: $automake_version
# autoconf: $autoconf_version
#
PROGRAM=libtool
PACKAGE=libtool
-VERSION=2.4
+VERSION=2.4.2
TIMESTAMP=""
-package_revision=1.3294
+package_revision=1.3337
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
: ${CP="cp -f"}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${EGREP="/usr/bin/grep -E"}
-: ${FGREP="/usr/bin/grep -F"}
-: ${GREP="/usr/bin/grep"}
-: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
-: ${SED="/usr/bin/sed"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
: ${Xsed="$SED -e 1s/^X//"}
# to NONDIR_REPLACEMENT.
# value returned in "$func_dirname_result"
# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
+# value returned in "$func_basename_result"
# Implementation must be kept synchronized with func_dirname
# and func_basename. For efficiency, we do not delegate to
# those functions but instead duplicate the functionality here.
;;
*)
save_IFS="$IFS"
- IFS=:
+ IFS=${PATH_SEPARATOR-:}
for progdir in $PATH; do
IFS="$save_IFS"
test -x "$progdir/$progname" && break
s*\$LTCFLAGS*'"$LTCFLAGS"'*
s*\$LD*'"$LD"'*
s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
p
d
}
opt_help=false
opt_help_all=false
opt_silent=:
+opt_warning=:
opt_verbose=:
opt_silent=false
opt_verbose=false
opt_silent=false
func_append preserve_args " $opt"
;;
+ --no-warning|--no-warn)
+ opt_warning=false
+func_append preserve_args " $opt"
+ ;;
--no-verbose)
opt_verbose=false
func_append preserve_args " $opt"
*.[cCFSifmso] | \
*.ada | *.adb | *.ads | *.asm | \
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
- *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
func_xform "$libobj"
libobj=$func_xform_result
;;
# Set up the ranlib parameters.
oldlib="$destdir/$name"
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
fi
# Do each command in the postinstall commands.
# linked before any other PIC object. But we must not use
# pic_flag when linking with -static. The problem exists in
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
*-*-hpux*)
pic_flag_for_symtable=" $pic_flag" ;;
# launches target application with the remaining arguments.
func_exec_program ()
{
- for lt_wr_arg
- do
- case \$lt_wr_arg in
- --lt-*) ;;
- *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
- esac
- shift
- done
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
func_exec_program_core \${1+\"\$@\"}
}
{
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
namespace, but it is not one of the ones we know about and
- have already dealt with, above (inluding dump-script), then
+ have already dealt with, above (including dump-script), then
report an error. Otherwise, targets might begin to believe
they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
namespace. The first time any user complains about this, we'll
{
EOF
func_emit_wrapper yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
-
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
cat <<"EOF"
}
EOF
}
# end: func_emit_cwrapperexe_src
-# func_emit_exe_manifest
-# emit a Win32 UAC manifest for executable on stdout
-# Must ONLY be called from within func_mode_link because
-# it depends on a number of variable set therein.
-func_emit_exe_manifest ()
-{
- cat <<EOF
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity version="1.0.0.0"
-EOF
-
- case $host in
- i?86-*-* ) echo ' processorArchitecture="x86"' ;;
- ia64-*-* ) echo ' processorArchitecture="ia64"' ;;
- x86_64-*-* ) echo ' processorArchitecture="amd64"' ;;
- *) echo ' processorArchitecture="*"' ;;
- esac
-
- cat <<EOF
- name="$host_os.$PROGRAM.$outputname"
- type="win32"/>
-
- <!-- Identify the application security requirements. -->
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
- </requestedPrivileges>
- </security>
- </trustInfo>
-</assembly>
-EOF
-}
-
# func_win32_import_lib_p ARG
# True if ARG is an import lib, as indicated by $file_magic_cmd
func_win32_import_lib_p ()
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
# -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
- # -{shared,static}-libgcc, -static-{libgfortran|libstdc++}
- # link against specified runtime library
- # -fstack-protector* stack protector flags for GCC
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-flto*|-fwhopr*|-fuse-linker-plugin| \
- -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++| \
- -fstack-protector*)
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-fgnu-tm| \
+ -shared-libgcc|-static-libgcc|-static-libgfortran|-static-libstdc++)
func_quote_for_eval "$arg"
arg="$func_quote_for_eval_result"
func_append compile_command " $arg"
lib=
found=no
case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
test "$hardcode_direct_absolute" = no; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
+ add_dir="-L$absdir"
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
# which has an extra 1 added just for fun
#
case $version_type in
+ # correct linux to gnu/linux during the next big refactor
darwin|linux|osf|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
versuffix="$major.$revision"
;;
- linux)
+ linux) # correct to gnu/linux during the next big refactor
func_arith $current - $age
major=.$func_arith_result
versuffix="$major.$age.$revision"
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
+ # Remove ${wl} instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
elif test -n "$runpath_var"; then
case "$perm_rpath " in
*" $libdir "*) ;;
- *) func_apped perm_rpath " $libdir" ;;
+ *) func_append perm_rpath " $libdir" ;;
esac
fi
done
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
cwrappersource="$output_path/$objdir/lt-$output_name.c"
cwrapper="$output_path/$output_name.exe"
$RM $cwrappersource $cwrapper
- trap "$RM $cwrappersource $cwrapper $cwrapper.manifest; exit $EXIT_FAILURE" 1 2 15
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
func_emit_cwrapperexe_src > $cwrappersource
$opt_dry_run || {
# note: this script will not be executed, so do not chmod.
if test "x$build" = "x$host" ; then
- # Create the UAC manifests first if necessary (but the
- # manifest files must have executable permission regardless).
- case $output_name in
- *instal*|*patch*|*setup*|*update*)
- func_emit_exe_manifest > $cwrapper.manifest
- func_emit_exe_manifest > $output_path/$objdir/$output_name.exe.manifest
- chmod +x $cwrapper.manifest
- chmod +x $output_path/$objdir/$output_name.exe.manifest
- ;;
- esac
$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
else
func_emit_wrapper no > $func_ltwrapper_scriptname_result
esac
done
fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
eval cmds=\"$old_archive_cmds\"
func_len " $cmds"
*.la)
func_basename "$deplib"
name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ func_resolve_sysroot "$deplib"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
test -z "$libdir" && \
func_fatal_error "\`$deplib' is not a valid libtool archive"
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
# note $name still contains .exe if it was in $file originally
# as does the version of $file that was added into $rmfiles
func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
- func_append rmfiles " ${name}.manifest $objdir/${name}.manifest"
if test "$fast_install" = yes && test -n "$relink_command"; then
- func_append rmfiles " $odir/lt-$name $objdir/lt-${name}.manifest"
+ func_append rmfiles " $odir/lt-$name"
fi
if test "X$noexename" != "X$name" ; then
func_append rmfiles " $odir/lt-${noexename}.c"
--- /dev/null
+##### http://autoconf-archive.cryp.to/acx_pthread.html
+#
+# SYNOPSIS
+#
+# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads.
+# It sets the PTHREAD_LIBS output variable to the threads library and
+# linker flags, and the PTHREAD_CFLAGS output variable to any special
+# C compiler flags that are needed. (The user can also force certain
+# compiler flags/libs to be tested by setting these environment
+# variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise).
+# (This is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these
+# flags, but also link it with them as well. e.g. you should link
+# with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
+# $LIBS
+#
+# If you are only building threads programs, you may wish to use
+# these variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+# constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
+# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads
+# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
+# run it if it is not found. If ACTION-IF-FOUND is not specified, the
+# default action will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or
+# if you have any other suggestions or comments. This macro was based
+# on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/)
+# (with help from M. Frigo), as well as ac_pthread and hb_pthread
+# macros posted by Alejandro Forero Cuervo to the autoconf macro
+# repository. We are also grateful for the helpful feedback of
+# numerous users.
+#
+# LAST MODIFICATION
+#
+# 2006-05-29
+#
+# COPYLEFT
+#
+# Copyright (c) 2006 Steven G. Johnson <stevenj@alum.mit.edu>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+# As a special exception, the respective Autoconf Macro's copyright
+# owner gives unlimited permission to copy, distribute and modify the
+# configure scripts that are the output of Autoconf when processing
+# the Macro. You need not follow the terms of the GNU General Public
+# License when using or distributing such scripts, even though
+# portions of the text of the Macro appear in them. The GNU General
+# Public License (GPL) does govern all other use of the material that
+# constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the
+# Autoconf Macro released by the Autoconf Macro Archive. When you
+# make and distribute a modified version of the Autoconf Macro, you
+# may extend this special exception to the GPL to apply to your
+# modified version as well.
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt lpthread pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
+
+ # The HP-UX compiler just warns about options it does not understand
+ # but it needs -mt.
+ *-hpux*)
+ acx_pthread_flags="-mt $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ PTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$flag])
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+ [acx_pthread_ok=yes])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+ [attr_name=$attr; break])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ fi
+
+ AC_MSG_CHECKING([if more special flags are required for pthreads])
+ flag=no
+ case "${host_cpu}-${host_os}" in
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ esac
+ AC_MSG_RESULT(${flag})
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # More AIX lossage: must compile with xlc_r or cc_r
+ case "${host_os}" in
+ aix* )
+ if test x"$GCC" != xyes; then
+ case "$CC" in
+ *xlc )
+ AC_CHECK_PROG(PTHREAD_CC, xlc_r, xlc_r, ${CC}) ;;
+ *cc )
+ AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) ;;
+ esac
+ fi
+ case "$CXX" in
+ *xlC )
+ AC_CHECK_PROG(PTHREAD_CXX, xlC_r, xlC_r, ${CXX}) ;;
+ esac
+ ;;
+ esac
+fi
+
+if test "${PTHREAD_CC}x" = "x"
+then
+ PTHREAD_CC="$CC"
+fi
+if test "${PTHREAD_CXX}x" = "x"
+then
+ PTHREAD_CXX="$CXX"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+AC_SUBST(PTHREAD_CXX)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ acx_pthread_ok=no
+ $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# For every FLAG1, FLAG2 it is checked whether the compiler works with the
+# flag. If it does, the flag is added FLAGS-VARIABLE
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. During the check the flag is always added to the
+# current language's flags.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: This macro depends on the AX_APPEND_FLAG and
+# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
+# AX_APPEND_LINK_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 5
+
+AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
+[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
+AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
+for flag in $1; do
+ AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
+done
+])dnl AX_APPEND_COMPILE_FLAGS
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
+# added in between.
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
+# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+# FLAG.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 6
+
+AC_DEFUN([AX_APPEND_FLAG],
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+ [
+ AS_VAR_APPEND(FLAGS,[" $1"])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+ ],
+ [
+ AS_VAR_SET(FLAGS,[$1])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_APPEND_FLAG
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the current language's compiler
+# or gives an error. (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 4
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
+#
+# DESCRIPTION
+#
+# This macro checks if the compiler supports one of GCC's function
+# attributes; many other compilers also provide function attributes with
+# the same syntax. Compiler warnings are used to detect supported
+# attributes as unsupported ones are ignored by default so quieting
+# warnings when using this macro will yield false positives.
+#
+# The ATTRIBUTE parameter holds the name of the attribute to be checked.
+#
+# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
+#
+# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
+# variable.
+#
+# The macro currently supports the following function attributes:
+#
+# alias
+# aligned
+# alloc_size
+# always_inline
+# artificial
+# cold
+# const
+# constructor
+# constructor_priority for constructor attribute with priority
+# deprecated
+# destructor
+# dllexport
+# dllimport
+# error
+# externally_visible
+# flatten
+# format
+# format_arg
+# gnu_inline
+# hot
+# ifunc
+# leaf
+# malloc
+# noclone
+# noinline
+# nonnull
+# noreturn
+# nothrow
+# optimize
+# pure
+# unused
+# used
+# visibility
+# warning
+# warn_unused_result
+# weak
+# weakref
+#
+# Unsuppored function attributes will be tested with a prototype returning
+# an int and not accepting any arguments and the result of the check might
+# be wrong or meaningless so use with care.
+#
+# LICENSE
+#
+# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 3
+
+AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
+ AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
+
+ AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ m4_case([$1],
+ [alias], [
+ int foo( void ) { return 0; }
+ int bar( void ) __attribute__(($1("foo")));
+ ],
+ [aligned], [
+ int foo( void ) __attribute__(($1(32)));
+ ],
+ [alloc_size], [
+ void *foo(int a) __attribute__(($1(1)));
+ ],
+ [always_inline], [
+ inline __attribute__(($1)) int foo( void ) { return 0; }
+ ],
+ [artificial], [
+ inline __attribute__(($1)) int foo( void ) { return 0; }
+ ],
+ [cold], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [const], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [constructor_priority], [
+ int foo( void ) __attribute__((__constructor__(65535/2)));
+ ],
+ [constructor], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [deprecated], [
+ int foo( void ) __attribute__(($1("")));
+ ],
+ [destructor], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [dllexport], [
+ __attribute__(($1)) int foo( void ) { return 0; }
+ ],
+ [dllimport], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [error], [
+ int foo( void ) __attribute__(($1("")));
+ ],
+ [externally_visible], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [flatten], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [format], [
+ int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
+ ],
+ [format_arg], [
+ char *foo(const char *p) __attribute__(($1(1)));
+ ],
+ [gnu_inline], [
+ inline __attribute__(($1)) int foo( void ) { return 0; }
+ ],
+ [hot], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [ifunc], [
+ int my_foo( void ) { return 0; }
+ static int (*resolve_foo(void))(void) { return my_foo; }
+ int foo( void ) __attribute__(($1("resolve_foo")));
+ ],
+ [leaf], [
+ __attribute__(($1)) int foo( void ) { return 0; }
+ ],
+ [malloc], [
+ void *foo( void ) __attribute__(($1));
+ ],
+ [noclone], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [noinline], [
+ __attribute__(($1)) int foo( void ) { return 0; }
+ ],
+ [nonnull], [
+ int foo(char *p) __attribute__(($1(1)));
+ ],
+ [noreturn], [
+ void foo( void ) __attribute__(($1));
+ ],
+ [nothrow], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [optimize], [
+ __attribute__(($1(3))) int foo( void ) { return 0; }
+ ],
+ [pure], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [unused], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [used], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [visibility], [
+ int foo_def( void ) __attribute__(($1("default")));
+ int foo_hid( void ) __attribute__(($1("hidden")));
+ ],
+ [warning], [
+ int foo( void ) __attribute__(($1("")));
+ ],
+ [warn_unused_result], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [weak], [
+ int foo( void ) __attribute__(($1));
+ ],
+ [weakref], [
+ static int foo( void ) { return 0; }
+ static int bar( void ) __attribute__(($1("foo")));
+ ],
+ [
+ m4_warn([syntax], [Unsupported attribute $1, the test may fail])
+ int foo( void ) __attribute__(($1));
+ ]
+ )], [])
+ ],
+ dnl GCC doesn't exit with an error if an unknown attribute is
+ dnl provided but only outputs a warning, so accept the attribute
+ dnl only if no warning were issued.
+ [AS_IF([test -s conftest.err],
+ [AS_VAR_SET([ac_var], [no])],
+ [AS_VAR_SET([ac_var], [yes])])],
+ [AS_VAR_SET([ac_var], [no])])
+ ])
+
+ AS_IF([test yes = AS_VAR_GET([ac_var])],
+ [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
+ [Define to 1 if the system has the `$1' function attribute])], [])
+
+ AS_VAR_POPDEF([ac_var])
+])
--- /dev/null
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_REQUIRE_DEFINED(MACRO)
+#
+# DESCRIPTION
+#
+# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
+# been defined and thus are available for use. This avoids random issues
+# where a macro isn't expanded. Instead the configure script emits a
+# non-fatal:
+#
+# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
+#
+# It's like AC_REQUIRE except it doesn't expand the required macro.
+#
+# Here's an example:
+#
+# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+#
+# LICENSE
+#
+# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
+ m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
+])dnl AX_REQUIRE_DEFINED
--- /dev/null
+# 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.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 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.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+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
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+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=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+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=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# 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
+# 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).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$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"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ 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
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _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
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ 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\"`'
+ 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"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=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}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# 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
+ aix_libpath=$lt_cv_aix_libpath
+else
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _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"
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# 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).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+case "$ECHO" in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+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).],
+[], [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 #(
+ yes)
+ if test "$GCC" = yes; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ 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.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ 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"
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [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
+ # 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
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisbility=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; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ case $host_os in
+ 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
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # 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'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`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'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+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'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # 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'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+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}'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='${libname}.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ 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"
+ 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'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~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'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # 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
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[23]].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux # 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'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+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'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-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'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # 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}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # 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=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux # 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'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # 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}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+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'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+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],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ # 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
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ 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
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+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
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* 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
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ 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'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Intel*\ [[CF]]*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'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ 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".
+ 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'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # 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
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test "$lt_use_gnu_ld_interface" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(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
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _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'
+ 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(link_all_deplibs, $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'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=' $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'
+ 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'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]* | 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(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(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf* | 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(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ 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'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$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"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _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
+ # 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'
+ 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'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $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='
+ # 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
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # 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'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $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'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes && 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'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (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)='$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'])
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ 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'
+ 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'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $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_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'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[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
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $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'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$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"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _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
+ # 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'
+ 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'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $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='
+ # 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'
+ ;;
+ *)
+ # 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(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ haiku*)
+ _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_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; 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'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $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'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && 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
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | 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'
+ _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'
+ _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'
+ ;;
+ *) # 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'
+ ;;
+ 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'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && 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_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'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`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}\*'
+ 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 $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_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_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'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+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}\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case ${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
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ 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
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | 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
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+ CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# 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'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_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
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_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
+# 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],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
--- /dev/null
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008, 2009 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
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for lt_pkg in $withval; do
+ IFS="$lt_save_ifs"
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
--- /dev/null
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
--- /dev/null
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 3337 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.2'
+macro_revision='1.3337'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
--- /dev/null
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2004-09-07.08
+scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
-# Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
-run=:
+case $1 in
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case "$1" in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
- exit 0
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
- exit 0
+ exit $?
;;
-*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
- lex|yacc)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case "$f" in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if [ ! -f y.tab.h ]; then
- echo >y.tab.h
- fi
- if [ ! -f y.tab.c ]; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if [ $# -ne 1 ]; then
- eval LASTARG="\${$#}"
- case "$LASTARG" in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if [ ! -f lex.yy.c ]; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit 1
- fi
- ;;
-
- makeinfo)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
- fi
- touch $file
- ;;
-
- tar)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case "$firstarg" in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case "$firstarg" in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
--- /dev/null
+SUBDIRS = fast_float
--- /dev/null
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 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__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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
+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@
+subdir = plugins
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+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 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-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 \
+ tags-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_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+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
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+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@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JPEGICC_DEPLIBS = @JPEGICC_DEPLIBS@
+LCMS_LIB_DEPLIBS = @LCMS_LIB_DEPLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBRARY_AGE = @LIBRARY_AGE@
+LIBRARY_CURRENT = @LIBRARY_CURRENT@
+LIBRARY_REVISION = @LIBRARY_REVISION@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_JPEG = @LIB_JPEG@
+LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
+LIB_TIFF = @LIB_TIFF@
+LIB_ZLIB = @LIB_ZLIB@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TIFFICC_DEPLIBS = @TIFFICC_DEPLIBS@
+VERSION = @VERSION@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+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@
+inline = @inline@
+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@
+runstatedir = @runstatedir@
+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@
+SUBDIRS = fast_float
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --foreign plugins/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign plugins/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _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.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ 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"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+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; \
+ $(am__define_uniq_tagged_files); \
+ 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-recursive
+
+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
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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
+installdirs: installdirs-recursive
+installdirs-am:
+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:
+
+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-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic 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-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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean 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-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-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# 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:
--- /dev/null
+
+
+ IMPORTANT: Before adding those plug-ins to your commercial project, please check licenses for each plugin.
+
+ LittleCMS core is released under MIT, but plug-ins may be released under other license. fast_float, for example is GPL3
+
\ No newline at end of file
--- /dev/null
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
\ No newline at end of file
--- /dev/null
+SUBDIRS = src include testbed
--- /dev/null
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 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__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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
+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@
+subdir = plugins/fast_float
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+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 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-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 \
+ tags-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_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+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
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
+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@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JPEGICC_DEPLIBS = @JPEGICC_DEPLIBS@
+LCMS_LIB_DEPLIBS = @LCMS_LIB_DEPLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBRARY_AGE = @LIBRARY_AGE@
+LIBRARY_CURRENT = @LIBRARY_CURRENT@
+LIBRARY_REVISION = @LIBRARY_REVISION@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_JPEG = @LIB_JPEG@
+LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
+LIB_TIFF = @LIB_TIFF@
+LIB_ZLIB = @LIB_ZLIB@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TIFFICC_DEPLIBS = @TIFFICC_DEPLIBS@
+VERSION = @VERSION@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+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@
+inline = @inline@
+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@
+runstatedir = @runstatedir@
+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@
+SUBDIRS = src include testbed
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --foreign plugins/fast_float/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign plugins/fast_float/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _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.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ 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"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+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; \
+ $(am__define_uniq_tagged_files); \
+ 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-recursive
+
+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
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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
+installdirs: installdirs-recursive
+installdirs-am:
+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:
+
+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-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic 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-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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean 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-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-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# 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:
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\lcms2_fast_float.h" />
+ <ClInclude Include="..\..\src\fast_float_internal.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\fast_16_tethra.c" />
+ <ClCompile Include="..\..\src\fast_8_curves.c" />
+ <ClCompile Include="..\..\src\fast_8_matsh.c" />
+ <ClCompile Include="..\..\src\fast_8_matsh_sse.c" />
+ <ClCompile Include="..\..\src\fast_8_tethra.c" />
+ <ClCompile Include="..\..\src\fast_float_15bits.c" />
+ <ClCompile Include="..\..\src\fast_float_15mats.c" />
+ <ClCompile Include="..\..\src\fast_float_cmyk.c" />
+ <ClCompile Include="..\..\src\fast_float_curves.c" />
+ <ClCompile Include="..\..\src\fast_float_lab.c" />
+ <ClCompile Include="..\..\src\fast_float_matsh.c" />
+ <ClCompile Include="..\..\src\fast_float_separate.c" />
+ <ClCompile Include="..\..\src\fast_float_sup.c" />
+ <ClCompile Include="..\..\src\fast_float_tethra.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\Projects\VC2019\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\COPYING.GPL3" />
+ <None Include="..\..\doc\LittleCMS fast float extensions 1.0.pdf" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AD9FF79B-CF6E-4971-A7CF-DAA47D636676}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>fast</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <IntDir>$(Platform)\fast_float_plugin_$(Configuration)\</IntDir>
+ <OutDir>..\..\..\..\Lib\MS\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <IntDir>$(Platform)\fast_float_plugin_$(Configuration)\</IntDir>
+ <OutDir>..\..\..\..\Lib\MS\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>$(Platform)\fast_float_plugin_$(Configuration)\</IntDir>
+ <OutDir>..\..\..\..\Lib\MS\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <IntDir>$(Platform)\fast_float_plugin_$(Configuration)\</IntDir>
+ <OutDir>..\..\..\..\Lib\MS\</OutDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include;..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include;..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level4</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include;..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BrowseInformation>false</BrowseInformation>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level4</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include;..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <Link>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{7d5b1769-2be4-46f2-9e35-6260eea79d7f}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="doc">
+ <UniqueIdentifier>{012df308-35db-4909-b035-b1cd5fd1ee5b}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\include\lcms2_fast_float.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\fast_float_internal.h">
+ <Filter>Source Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\fast_float_15bits.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_curves.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_separate.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_sup.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_tethra.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_15mats.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_matsh.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_cmyk.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_8_curves.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_8_tethra.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_16_tethra.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_8_matsh_sse.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_8_matsh.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\fast_float_lab.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\COPYING.GPL3">
+ <Filter>doc</Filter>
+ </None>
+ <None Include="..\..\doc\LittleCMS fast float extensions 1.0.pdf">
+ <Filter>doc</Filter>
+ </None>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{7629D670-C419-402B-8A90-747952EE9FC0}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>fast_testbed</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <IntDir>$(Platform)\testbed_$(Configuration)\</IntDir>
+ <OutDir>$(ProjectDir)..\..\testbed\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <IntDir>$(Platform)\testbed_$(Configuration)\</IntDir>
+ <OutDir>$(ProjectDir)..\..\testbed\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <IntDir>$(Platform)\testbed_$(Configuration)\</IntDir>
+ <OutDir>$(ProjectDir)..\..\testbed\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <IntDir>$(Platform)\testbed_$(Configuration)\</IntDir>
+ <OutDir>$(ProjectDir)..\..\testbed\</OutDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\src</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level4</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\src</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level4</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\src</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level4</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\..\..\include;..\..\include;..\..\src</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\testbed\fast_float_testbed.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\Projects\VC2019\lcms2_static\lcms2_static.vcxproj">
+ <Project>{71dede59-3f1e-486b-a899-4283000f76b5}</Project>
+ </ProjectReference>
+ <ProjectReference Include="lcms2_fast_float_plugin.vcxproj">
+ <Project>{ad9ff79b-cf6e-4971-a7cf-daa47d636676}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
- </Filter>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\..\..\testbed\testcms2.c">
+ <ClCompile Include="..\..\testbed\fast_float_testbed.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
--- /dev/null
+#
+# Makefile for include directory
+
+include_HEADERS = lcms2_fast_float.h
+
+EXTRA_DIST = lcms2_fast_float.h
--- /dev/null
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 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@
+
+#
+# Makefile for include directory
+
+VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
+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@
+subdir = plugins/fast_float/include
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+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 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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)$(includedir)"
+HEADERS = $(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
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JPEGICC_DEPLIBS = @JPEGICC_DEPLIBS@
+LCMS_LIB_DEPLIBS = @LCMS_LIB_DEPLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBRARY_AGE = @LIBRARY_AGE@
+LIBRARY_CURRENT = @LIBRARY_CURRENT@
+LIBRARY_REVISION = @LIBRARY_REVISION@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_JPEG = @LIB_JPEG@
+LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
+LIB_TIFF = @LIB_TIFF@
+LIB_ZLIB = @LIB_ZLIB@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TIFFICC_DEPLIBS = @TIFFICC_DEPLIBS@
+VERSION = @VERSION@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+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@
+inline = @inline@
+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@
+runstatedir = @runstatedir@
+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@
+include_HEADERS = lcms2_fast_float.h
+EXTRA_DIST = lcms2_fast_float.h
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --foreign plugins/fast_float/include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign plugins/fast_float/include/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+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
+
+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)
+
+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`; \
+ $(am__define_uniq_tagged_files); \
+ 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-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
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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 $(HEADERS)
+installdirs:
+ for dir in "$(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:
+
+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 mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool cscopelist-am ctags ctags-am distclean \
+ 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-includeHEADERS install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-includeHEADERS
+
+.PRECIOUS: Makefile
+
+
+# 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:
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#ifndef _LCMS2_FAST_FLOAT_H
+#define _LCMS2_FAST_FLOAT_H
+
+#include "lcms2_plugin.h"
+
+#ifndef CMS_USE_CPP_API
+# ifdef __cplusplus
+extern "C" {
+# endif
+#endif
+
+#define LCMS2_FAST_FLOAT_VERSION 1400
+
+// Configuration toggles
+
+// Uncomment this if you want to avoid SSE2 entirely.
+// Default is commented out. There are two kernels, one is vectorized and the other is not.
+// On inizialization, there is a SSE2 detection. If the SSE2 detection succeeds, then the vectorized code is selected.
+// If the CPU is old and does not support SSE2, then the non-vectorized code is used.
+// If you define the toggle, there is no detection and the non-vectorized kernel is always used.
+
+// #define CMS_DONT_USE_SSE2 1
+
+
+// The one and only plug-in entry point. To install this plugin in your code
+// you need to place this in some initialization place:
+//
+// cmsPlugin(cmsFastFloatExtensions());
+//
+
+CMSAPI void* CMSEXPORT cmsFastFloatExtensions(void);
+
+
+// New encodings that the plug-in implements
+
+#define BIT15_SH(a) ((a) << 26)
+#define T_BIT15(a) (((a)>>26)&1)
+#define DITHER_SH(a) ((a) << 27)
+#define T_DITHER(a) (((a)>>27)&1)
+
+#define TYPE_GRAY_15 (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)|BIT15_SH(1))
+#define TYPE_GRAY_15_REV (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)|FLAVOR_SH(1)|BIT15_SH(1))
+#define TYPE_GRAY_15_SE (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)|ENDIAN16_SH(1)|BIT15_SH(1))
+#define TYPE_GRAYA_15 (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|BIT15_SH(1))
+#define TYPE_GRAYA_15_SE (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|ENDIAN16_SH(1)|BIT15_SH(1))
+#define TYPE_GRAYA_15_PLANAR (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|PLANAR_SH(1)|BIT15_SH(1))
+
+#define TYPE_RGB_15 (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|BIT15_SH(1))
+#define TYPE_RGB_15_PLANAR (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)|BIT15_SH(1))
+#define TYPE_RGB_15_SE (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)|BIT15_SH(1))
+
+#define TYPE_BGR_15 (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|BIT15_SH(1))
+#define TYPE_BGR_15_PLANAR (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PLANAR_SH(1)|BIT15_SH(1))
+#define TYPE_BGR_15_SE (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)|BIT15_SH(1))
+
+#define TYPE_RGBA_15 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|BIT15_SH(1))
+#define TYPE_RGBA_15_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)|BIT15_SH(1))
+#define TYPE_RGBA_15_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)|BIT15_SH(1))
+
+#define TYPE_ARGB_15 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1)|BIT15_SH(1))
+
+#define TYPE_ABGR_15 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|BIT15_SH(1))
+#define TYPE_ABGR_15_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PLANAR_SH(1)|BIT15_SH(1))
+#define TYPE_ABGR_15_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)|BIT15_SH(1))
+
+#define TYPE_BGRA_15 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|BIT15_SH(1))
+#define TYPE_BGRA_15_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|BIT15_SH(1))
+
+#define TYPE_CMY_15 (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|BIT15_SH(1))
+#define TYPE_YMC_15 (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|BIT15_SH(1))
+#define TYPE_CMY_15_PLANAR (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)|BIT15_SH(1))
+#define TYPE_CMY_15_SE (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)|BIT15_SH(1))
+
+#define TYPE_CMYK_15 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|BIT15_SH(1))
+#define TYPE_CMYK_15_REV (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|FLAVOR_SH(1)|BIT15_SH(1))
+#define TYPE_CMYK_15_PLANAR (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|PLANAR_SH(1)|BIT15_SH(1))
+#define TYPE_CMYK_15_SE (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|ENDIAN16_SH(1)|BIT15_SH(1))
+
+#define TYPE_KYMC_15 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|DOSWAP_SH(1)|BIT15_SH(1))
+#define TYPE_KYMC_15_SE (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)|BIT15_SH(1))
+
+#define TYPE_KCMY_15 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|SWAPFIRST_SH(1)|BIT15_SH(1))
+#define TYPE_KCMY_15_REV (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|FLAVOR_SH(1)|SWAPFIRST_SH(1)|BIT15_SH(1))
+#define TYPE_KCMY_15_SE (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|ENDIAN16_SH(1)|SWAPFIRST_SH(1)|BIT15_SH(1))
+
+#define TYPE_GRAY_8_DITHER (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(1)|DITHER_SH(1))
+#define TYPE_RGB_8_DITHER (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|DITHER_SH(1))
+#define TYPE_RGBA_8_DITHER (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1)|DITHER_SH(1))
+#define TYPE_BGR_8_DITHER (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|DITHER_SH(1))
+#define TYPE_ABGR_8_DITHER (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|EXTRA_SH(1)|DITHER_SH(1))
+#define TYPE_CMYK_8_DITHER (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|DITHER_SH(1))
+#define TYPE_KYMC_8_DITHER (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|DOSWAP_SH(1)|DITHER_SH(1))
+
+
+#define TYPE_AGRAY_8 (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|DOSWAP_SH(1)|BYTES_SH(1))
+#define TYPE_AGRAY_16 (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|DOSWAP_SH(1)|BYTES_SH(2))
+#define TYPE_AGRAY_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|DOSWAP_SH(1)|BYTES_SH(4))
+#define TYPE_GRAYA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(4))
+#define TYPE_AGRAY_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|DOSWAP_SH(1)|BYTES_SH(0))
+
+#define TYPE_ACMYK_8 (COLORSPACE_SH(PT_CMYK)|EXTRA_SH(1)|CHANNELS_SH(4)|BYTES_SH(1)|SWAPFIRST_SH(1))
+#define TYPE_KYMCA_8 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
+#define TYPE_AKYMC_8 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1))
+
+#define TYPE_CMYKA_16 (COLORSPACE_SH(PT_CMYK)|EXTRA_SH(1)|CHANNELS_SH(4)|BYTES_SH(2))
+#define TYPE_ACMYK_16 (COLORSPACE_SH(PT_CMYK)|EXTRA_SH(1)|CHANNELS_SH(4)|BYTES_SH(2)|SWAPFIRST_SH(1))
+#define TYPE_KYMCA_16 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|EXTRA_SH(1)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1))
+#define TYPE_AKYMC_16 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|EXTRA_SH(1)|BYTES_SH(2)|DOSWAP_SH(1))
+
+
+#define TYPE_AGRAY_8_PLANAR (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(1)|PLANAR_SH(1)|SWAPFIRST_SH(1))
+#define TYPE_AGRAY_16_PLANAR (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|PLANAR_SH(1)|SWAPFIRST_SH(1))
+
+#define TYPE_GRAYA_FLT_PLANAR (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(4)|PLANAR_SH(1))
+#define TYPE_AGRAY_FLT_PLANAR (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(4)|PLANAR_SH(1)|SWAPFIRST_SH(1))
+
+#define TYPE_GRAYA_DBL_PLANAR (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(0)|PLANAR_SH(1))
+#define TYPE_AGRAY_DBL_PLANAR (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(0)|PLANAR_SH(1)|SWAPFIRST_SH(1))
+
+#define TYPE_ARGB_16_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1)|PLANAR_SH(1))
+#define TYPE_BGRA_16_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1)|DOSWAP_SH(1)|PLANAR_SH(1))
+
+#ifndef CMS_USE_CPP_API
+# ifdef __cplusplus
+ }
+# endif
+#endif
+
+#endif
+
--- /dev/null
+#
+# Makefile for building lcms2_fast_float library
+#
+
+# Don't require all the GNU mandated files
+AUTOMAKE_OPTIONS = 1.7 foreign
+
+includedir = ${prefix}/include
+
+# Shared libraries built in this directory
+lib_LTLIBRARIES = liblcms2_fast_float.la
+
+LIBRARY_CURRENT = 1
+LIBRARY_REVISION = 1
+LIBRARY_AGE = 0
+
+AM_CPPFLAGS = -Ofast -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/../include -I$(builddir)/../include
+
+liblcms2_fast_float_la_LDFLAGS = -no-undefined \
+ -version-info $(LIBRARY_CURRENT):$(LIBRARY_REVISION):$(LIBRARY_AGE)
+
+liblcms2_fast_float_la_LIBADD = $(LCMS_LIB_DEPLIBS) $(top_builddir)/src/liblcms2.la
+
+liblcms2_fast_float_la_SOURCES = fast_8_curves.c fast_8_matsh_sse.c fast_8_matsh.c fast_8_tethra.c \
+ fast_16_tethra.c fast_float_15bits.c fast_float_15mats.c fast_float_cmyk.c fast_float_curves.c fast_float_matsh.c \
+ fast_float_separate.c fast_float_sup.c fast_float_tethra.c fast_float_lab.c fast_float_internal.h
+
--- /dev/null
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 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@
+
+#
+# Makefile for building lcms2_fast_float library
+#
+
+VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
+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@
+subdir = plugins/fast_float/src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+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)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+liblcms2_fast_float_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/liblcms2.la
+am_liblcms2_fast_float_la_OBJECTS = fast_8_curves.lo \
+ fast_8_matsh_sse.lo fast_8_matsh.lo fast_8_tethra.lo \
+ fast_16_tethra.lo fast_float_15bits.lo fast_float_15mats.lo \
+ fast_float_cmyk.lo fast_float_curves.lo fast_float_matsh.lo \
+ fast_float_separate.lo fast_float_sup.lo fast_float_tethra.lo \
+ fast_float_lab.lo
+liblcms2_fast_float_la_OBJECTS = $(am_liblcms2_fast_float_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 =
+liblcms2_fast_float_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(liblcms2_fast_float_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+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@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/fast_16_tethra.Plo \
+ ./$(DEPDIR)/fast_8_curves.Plo ./$(DEPDIR)/fast_8_matsh.Plo \
+ ./$(DEPDIR)/fast_8_matsh_sse.Plo ./$(DEPDIR)/fast_8_tethra.Plo \
+ ./$(DEPDIR)/fast_float_15bits.Plo \
+ ./$(DEPDIR)/fast_float_15mats.Plo \
+ ./$(DEPDIR)/fast_float_cmyk.Plo \
+ ./$(DEPDIR)/fast_float_curves.Plo \
+ ./$(DEPDIR)/fast_float_lab.Plo \
+ ./$(DEPDIR)/fast_float_matsh.Plo \
+ ./$(DEPDIR)/fast_float_separate.Plo \
+ ./$(DEPDIR)/fast_float_sup.Plo \
+ ./$(DEPDIR)/fast_float_tethra.Plo
+am__mv = mv -f
+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 = $(liblcms2_fast_float_la_SOURCES)
+DIST_SOURCES = $(liblcms2_fast_float_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JPEGICC_DEPLIBS = @JPEGICC_DEPLIBS@
+LCMS_LIB_DEPLIBS = @LCMS_LIB_DEPLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBRARY_AGE = 0
+LIBRARY_CURRENT = 1
+LIBRARY_REVISION = 1
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_JPEG = @LIB_JPEG@
+LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
+LIB_TIFF = @LIB_TIFF@
+LIB_ZLIB = @LIB_ZLIB@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TIFFICC_DEPLIBS = @TIFFICC_DEPLIBS@
+VERSION = @VERSION@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+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 = ${prefix}/include
+infodir = @infodir@
+inline = @inline@
+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@
+runstatedir = @runstatedir@
+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@
+
+# Don't require all the GNU mandated files
+AUTOMAKE_OPTIONS = 1.7 foreign
+
+# Shared libraries built in this directory
+lib_LTLIBRARIES = liblcms2_fast_float.la
+AM_CPPFLAGS = -Ofast -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir)/../include -I$(builddir)/../include
+liblcms2_fast_float_la_LDFLAGS = -no-undefined \
+ -version-info $(LIBRARY_CURRENT):$(LIBRARY_REVISION):$(LIBRARY_AGE)
+
+liblcms2_fast_float_la_LIBADD = $(LCMS_LIB_DEPLIBS) $(top_builddir)/src/liblcms2.la
+liblcms2_fast_float_la_SOURCES = fast_8_curves.c fast_8_matsh_sse.c fast_8_matsh.c fast_8_tethra.c \
+ fast_16_tethra.c fast_float_15bits.c fast_float_15mats.c fast_float_cmyk.c fast_float_curves.c fast_float_matsh.c \
+ fast_float_separate.c fast_float_sup.c fast_float_tethra.c fast_float_lab.c fast_float_internal.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --foreign plugins/fast_float/src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign plugins/fast_float/src/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+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}; \
+ }
+
+liblcms2_fast_float.la: $(liblcms2_fast_float_la_OBJECTS) $(liblcms2_fast_float_la_DEPENDENCIES) $(EXTRA_liblcms2_fast_float_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(liblcms2_fast_float_la_LINK) -rpath $(libdir) $(liblcms2_fast_float_la_OBJECTS) $(liblcms2_fast_float_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_16_tethra.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_8_curves.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_8_matsh.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_8_matsh_sse.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_8_tethra.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_15bits.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_15mats.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_cmyk.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_curves.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_lab.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_matsh.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_separate.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_sup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_tethra.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.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 $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+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`; \
+ $(am__define_uniq_tagged_files); \
+ 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-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
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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)$(libdir)"; 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:
+
+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 -f ./$(DEPDIR)/fast_16_tethra.Plo
+ -rm -f ./$(DEPDIR)/fast_8_curves.Plo
+ -rm -f ./$(DEPDIR)/fast_8_matsh.Plo
+ -rm -f ./$(DEPDIR)/fast_8_matsh_sse.Plo
+ -rm -f ./$(DEPDIR)/fast_8_tethra.Plo
+ -rm -f ./$(DEPDIR)/fast_float_15bits.Plo
+ -rm -f ./$(DEPDIR)/fast_float_15mats.Plo
+ -rm -f ./$(DEPDIR)/fast_float_cmyk.Plo
+ -rm -f ./$(DEPDIR)/fast_float_curves.Plo
+ -rm -f ./$(DEPDIR)/fast_float_lab.Plo
+ -rm -f ./$(DEPDIR)/fast_float_matsh.Plo
+ -rm -f ./$(DEPDIR)/fast_float_separate.Plo
+ -rm -f ./$(DEPDIR)/fast_float_sup.Plo
+ -rm -f ./$(DEPDIR)/fast_float_tethra.Plo
+ -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-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 -f ./$(DEPDIR)/fast_16_tethra.Plo
+ -rm -f ./$(DEPDIR)/fast_8_curves.Plo
+ -rm -f ./$(DEPDIR)/fast_8_matsh.Plo
+ -rm -f ./$(DEPDIR)/fast_8_matsh_sse.Plo
+ -rm -f ./$(DEPDIR)/fast_8_tethra.Plo
+ -rm -f ./$(DEPDIR)/fast_float_15bits.Plo
+ -rm -f ./$(DEPDIR)/fast_float_15mats.Plo
+ -rm -f ./$(DEPDIR)/fast_float_cmyk.Plo
+ -rm -f ./$(DEPDIR)/fast_float_curves.Plo
+ -rm -f ./$(DEPDIR)/fast_float_lab.Plo
+ -rm -f ./$(DEPDIR)/fast_float_matsh.Plo
+ -rm -f ./$(DEPDIR)/fast_float_separate.Plo
+ -rm -f ./$(DEPDIR)/fast_float_sup.Plo
+ -rm -f ./$(DEPDIR)/fast_float_tethra.Plo
+ -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
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \
+ ctags ctags-am 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+.PRECIOUS: Makefile
+
+
+# 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:
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+// lcms internal
+CMSAPI cmsBool CMSEXPORT _cmsOptimizePipeline(cmsContext ContextID,
+ cmsPipeline** Lut,
+ cmsUInt32Number Intent,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+
+// Optimization for 16 bits, 3 inputs only
+typedef struct {
+
+ cmsContext ContextID;
+
+ const cmsInterpParams* p; // Tetrahedrical interpolation parameters. This is a not-owned pointer.
+
+} Performance16Data;
+
+
+// Precomputes tables for 16-bit on input devicelink.
+static
+Performance16Data* Performance16alloc(cmsContext ContextID, const cmsInterpParams* p)
+{
+ Performance16Data* p16;
+
+ p16 = (Performance16Data*) _cmsMallocZero(ContextID, sizeof(Performance16Data));
+ if (p16 == NULL) return NULL;
+
+ p16 ->ContextID = ContextID;
+ p16 ->p = p;
+
+ return p16;
+}
+
+static
+void Performance16free(cmsContext ContextID, void* ptr)
+{
+ _cmsFree(ContextID, ptr);
+}
+
+/**
+* Because cmsChangeBuffersFormat, we have to allow this code to output data in either 8 or 16 bits.
+* The increments are already computed correctly, but the data may change. So, we use a macro to
+* increase xput
+*/
+#define TO_OUTPUT_16(d,v) do { *(cmsUInt16Number*) (d) = v; } while(0)
+#define TO_OUTPUT_8(d,v) do { *(cmsUInt8Number*) (d) = FROM_16_TO_8(v); } while(0)
+
+#define TO_OUTPUT(d,v) do { if (out16) TO_OUTPUT_16(d,v); else TO_OUTPUT_8(d,v); } while(0)
+
+#define FROM_INPUT(v) (in16 ? (*((const cmsUInt16Number*)(v))) : FROM_8_TO_16(*((const cmsUInt8Number*)(v))))
+
+static
+void PerformanceEval16(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+
+ cmsUInt16Number r, g, b;
+ int x0, y0, z0;
+ cmsS15Fixed16Number rx, ry, rz;
+ cmsS15Fixed16Number fx, fy, fz;
+ cmsS15Fixed16Number c0, c1, c2, c3, Rest;
+ cmsUInt32Number OutChan, TotalPlusAlpha;
+ cmsS15Fixed16Number X0, X1, Y0, Y1, Z0, Z1;
+ Performance16Data* p16 = (Performance16Data*)_cmsGetTransformUserData(CMMcargo);
+ const cmsInterpParams* p = p16->p;
+ cmsUInt32Number TotalOut = p->nOutputs;
+ const cmsUInt16Number* BaseTable = (const cmsUInt16Number*)p->Table;
+ const cmsUInt16Number* LutTable;
+
+ cmsUInt8Number* out[cmsMAXCHANNELS];
+ cmsUInt16Number res16;
+
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ int in16, out16; // Used by macros!
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ cmsUInt32Number dwInFormat = cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo);
+ cmsUInt32Number dwOutFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo);
+
+ _cmsComputeComponentIncrements(dwInFormat, Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(dwOutFormat, Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ in16 = (T_BYTES(dwInFormat) == 2);
+ out16 = (T_BYTES(dwOutFormat) == 2);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ TotalPlusAlpha = TotalOut;
+ if (ain) TotalPlusAlpha++;
+
+ for (OutChan = 0; OutChan < TotalPlusAlpha; OutChan++) {
+ out[OutChan] = (cmsUInt8Number*)Output + DestStartingOrder[OutChan] + strideOut;
+ }
+
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ r = FROM_INPUT(rin);
+ g = FROM_INPUT(gin);
+ b = FROM_INPUT(bin);
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+
+ fx = _cmsToFixedDomain((int)r * p->Domain[0]);
+ fy = _cmsToFixedDomain((int)g * p->Domain[1]);
+ fz = _cmsToFixedDomain((int)b * p->Domain[2]);
+
+ x0 = FIXED_TO_INT(fx);
+ y0 = FIXED_TO_INT(fy);
+ z0 = FIXED_TO_INT(fz);
+
+ rx = FIXED_REST_TO_INT(fx);
+ ry = FIXED_REST_TO_INT(fy);
+ rz = FIXED_REST_TO_INT(fz);
+
+ X0 = p->opta[2] * x0;
+ X1 = (r == 0xFFFFU ? 0 : p->opta[2]);
+
+ Y0 = p->opta[1] * y0;
+ Y1 = (g == 0xFFFFU ? 0 : p->opta[1]);
+
+ Z0 = p->opta[0] * z0;
+ Z1 = (b == 0xFFFFU ? 0 : p->opta[0]);
+
+
+ LutTable = &BaseTable[X0 + Y0 + Z0];
+
+ // Output should be computed as x = ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest))
+ // which expands as: x = (Rest + ((Rest+0x7fff)/0xFFFF) + 0x8000)>>16
+ // This can be replaced by: t = Rest+0x8001, x = (t + (t>>16))>>16
+ // at the cost of being off by one at 7fff and 17ffe.
+
+ if (rx >= ry) {
+ if (ry >= rz) {
+ Y1 += X1;
+ Z1 += Y1;
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c3 -= c2;
+ c2 -= c1;
+ c1 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ res16 = (cmsUInt16Number)c0 + ((Rest + (Rest >> 16)) >> 16);
+ TO_OUTPUT(out[OutChan], res16);
+ out[OutChan] += DestIncrements[OutChan];
+ }
+ }
+ else if (rz >= rx) {
+ X1 += Z1;
+ Y1 += X1;
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c2 -= c1;
+ c1 -= c3;
+ c3 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ res16 = (cmsUInt16Number)c0 + ((Rest + (Rest >> 16)) >> 16);
+ TO_OUTPUT(out[OutChan], res16);
+ out[OutChan] += DestIncrements[OutChan];
+ }
+ }
+ else {
+ Z1 += X1;
+ Y1 += Z1;
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c2 -= c3;
+ c3 -= c1;
+ c1 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ res16 = (cmsUInt16Number)c0 + ((Rest + (Rest >> 16)) >> 16);
+ TO_OUTPUT(out[OutChan], res16);
+ out[OutChan] += DestIncrements[OutChan];
+ }
+ }
+ }
+ else {
+ if (rx >= rz) {
+ X1 += Y1;
+ Z1 += X1;
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c3 -= c1;
+ c1 -= c2;
+ c2 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ res16 = (cmsUInt16Number)c0 + ((Rest + (Rest >> 16)) >> 16);
+ TO_OUTPUT(out[OutChan], res16);
+ out[OutChan] += DestIncrements[OutChan];
+ }
+ }
+ else if (ry >= rz) {
+ Z1 += Y1;
+ X1 += Z1;
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c1 -= c3;
+ c3 -= c2;
+ c2 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ res16 = (cmsUInt16Number)c0 + ((Rest + (Rest >> 16)) >> 16);
+ TO_OUTPUT(out[OutChan], res16);
+ out[OutChan] += DestIncrements[OutChan];
+ }
+ }
+ else {
+ Y1 += Z1;
+ X1 += Y1;
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c1 -= c2;
+ c2 -= c3;
+ c3 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ res16 = (cmsUInt16Number)c0 + ((Rest + (Rest >> 16)) >> 16);
+ TO_OUTPUT(out[OutChan], res16);
+ out[OutChan] += DestIncrements[OutChan];
+ }
+ }
+ }
+
+ if (ain)
+ {
+ res16 = *(const cmsUInt16Number*)ain;
+ TO_OUTPUT(out[OutChan], res16);
+ out[TotalOut] += DestIncrements[TotalOut];
+ }
+
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+#undef DENS
+
+
+
+// --------------------------------------------------------------------------------------------------------------
+
+cmsBool Optimize16BitRGBTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsStage* mpe;
+ Performance16Data* p16;
+ cmsContext ContextID;
+ _cmsStageCLutData* data;
+ cmsUInt32Number newFlags;
+ cmsStage* OptimizedCLUTmpe;
+
+
+ // For empty transforms, do nothing
+ if (*Lut == NULL) return FALSE;
+
+ // This is a loosy optimization! does not apply in floating-point cases
+ if (T_FLOAT(*InputFormat) || T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only on 16-bit
+ if (T_BYTES(*InputFormat) != 2 || T_BYTES(*OutputFormat) != 2) return FALSE;
+
+ // Only real 16 bits
+ if (T_BIT15(*InputFormat) != 0 || T_BIT15(*OutputFormat) != 0) return FALSE;
+
+ // Swap endian is not supported
+ if (T_ENDIAN16(*InputFormat) != 0 || T_ENDIAN16(*OutputFormat) != 0) return FALSE;
+
+ // Only on input RGB
+ if (T_COLORSPACE(*InputFormat) != PT_RGB) return FALSE;
+
+
+ // If this is a matrix-shaper, the default does already a good job
+ if (cmsPipelineCheckAndRetreiveStages(*Lut, 4,
+ cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
+ NULL, NULL, NULL, NULL)) return FALSE;
+
+ if (cmsPipelineCheckAndRetreiveStages(*Lut, 2,
+ cmsSigCurveSetElemType, cmsSigCurveSetElemType,
+ NULL, NULL)) return FALSE;
+
+
+ // Named color pipelines cannot be optimized either
+ for (mpe = cmsPipelineGetPtrToFirstStage(*Lut);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+ if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE;
+ }
+
+ ContextID = cmsGetPipelineContextID(*Lut);
+ newFlags = *dwFlags | cmsFLAGS_FORCE_CLUT;
+
+ if (!_cmsOptimizePipeline(ContextID,
+ Lut,
+ INTENT_PERCEPTUAL, // Dont care
+ InputFormat,
+ OutputFormat,
+ &newFlags)) return FALSE;
+
+ OptimizedCLUTmpe = cmsPipelineGetPtrToFirstStage(*Lut);
+
+ // Set the evaluator
+ data = (_cmsStageCLutData*)cmsStageData(OptimizedCLUTmpe);
+
+ p16 = Performance16alloc(ContextID, data->Params);
+ if (p16 == NULL) return FALSE;
+
+ *TransformFn = PerformanceEval16;
+ *UserData = p16;
+ *FreeDataFn = Performance16free;
+ *InputFormat |= 0x02000000;
+ *OutputFormat |= 0x02000000;
+ *dwFlags |= cmsFLAGS_CAN_CHANGE_FORMATTER;
+
+ return TRUE;
+}
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+// Curves, optimization is valid for 8 bits only
+typedef struct {
+
+ cmsContext ContextID;
+ int nCurves;
+ cmsUInt8Number Curves[cmsMAXCHANNELS][256];
+
+} Curves8Data;
+
+
+// Evaluator for RGB 8-bit curves. This are just 1D tables
+static void FastEvaluateRGBCurves8(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ Curves8Data* Data = (Curves8Data*)_cmsGetTransformUserData(CMMcargo);
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+
+ *rout = Data->Curves[0][*rin];
+ *gout = Data->Curves[1][*gin];
+ *bout = Data->Curves[2][*bin];
+
+ // Handle alpha
+ if (ain) {
+ *aout = *ain;
+ }
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+ if (ain) ain += SourceIncrements[3];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+ if (aout) aout += DestIncrements[3];
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+// Do nothing but arrange the format. RGB
+static void FastRGBIdentity8(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+
+ *rout = *rin;
+ *gout = *gin;
+ *bout = *bin;
+
+ // Handle alpha
+ if (ain) {
+ *aout = *ain;
+ }
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+ if (ain) ain += SourceIncrements[3];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+ if (aout) aout += DestIncrements[3];
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+
+// Evaluate 1 channel only
+static void FastEvaluateGrayCurves8(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* gout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ Curves8Data* Data = (Curves8Data*)_cmsGetTransformUserData(CMMcargo);
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ *gout = Data->Curves[0][*gin];
+
+ // Handle alpha
+ if (ain) {
+ *aout = *ain;
+ }
+
+ gin += SourceIncrements[0];
+
+ if (ain) ain += SourceIncrements[1];
+
+ gout += DestIncrements[0];
+
+ if (aout) aout += DestIncrements[1];
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+static void FastGrayIdentity8(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* gout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ *gout = *gin;
+
+ // Handle alpha
+ if (ain) {
+ *aout = *ain;
+ }
+
+ gin += SourceIncrements[0];
+
+ if (ain) ain += SourceIncrements[1];
+
+ gout += DestIncrements[0];
+
+ if (aout) aout += DestIncrements[1];
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+
+
+
+// Try to see if the curves are linear
+static
+cmsBool AllCurvesAreLinear(Curves8Data* data)
+{
+ int i, j;
+
+ for (i=0; i < 3; i++) {
+ for (j = 0; j < 256; j++) {
+ if (data ->Curves[i][j] != j) return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+
+static
+Curves8Data* ComputeCompositeCurves(cmsUInt32Number nChan, cmsPipeline* Src)
+{
+ cmsUInt32Number i, j;
+ cmsFloat32Number InFloat[3], OutFloat[3];
+
+ Curves8Data* Data = (Curves8Data*) _cmsMallocZero(cmsGetPipelineContextID(Src), sizeof(Curves8Data));
+ if (Data == NULL) return NULL;
+
+ // Create target curves
+ for (i=0; i < 256; i++) {
+
+ for (j=0; j <nChan; j++)
+ InFloat[j] = (cmsFloat32Number) ((cmsFloat64Number) i / 255.0);
+
+ cmsPipelineEvalFloat(InFloat, OutFloat, Src);
+
+ for (j=0; j < nChan; j++)
+ Data -> Curves[j][i] = FROM_16_TO_8(_cmsSaturateWord(OutFloat[j] * 65535.0));
+ }
+
+ return Data;
+}
+
+
+// If the target LUT holds only curves, the optimization procedure is to join all those
+// curves together. That only works on curves and does not work on matrices.
+// Any number of channels up to 16
+cmsBool Optimize8ByJoiningCurves(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+
+ cmsPipeline* Src = *Lut;
+ cmsStage* mpe;
+ Curves8Data* Data;
+ cmsUInt32Number nChans;
+
+ // This is a loosy optimization! does not apply in floating-point cases
+ if (T_FLOAT(*InputFormat) || T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only on 8-bit
+ if (T_BYTES(*InputFormat) != 1 || T_BYTES(*OutputFormat) != 1) return FALSE;
+
+ // Curves need same channels on input and output (despite extra channels may differ)
+ nChans = T_CHANNELS(*InputFormat);
+ if (nChans != T_CHANNELS(*OutputFormat)) return FALSE;
+
+ // gray and RGB
+ if (nChans != 1 && nChans != 3) return FALSE;
+
+ // Only curves in this LUT?
+ for (mpe = cmsPipelineGetPtrToFirstStage(Src);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+
+ if (cmsStageType(mpe) != cmsSigCurveSetElemType) return FALSE;
+ }
+
+ Data = ComputeCompositeCurves(nChans, Src);
+
+ *dwFlags |= cmsFLAGS_NOCACHE;
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ *UserData = Data;
+ *FreeUserData = _cmsFree;
+
+ // Maybe the curves are linear at the end
+ if (nChans == 1)
+ *TransformFn = (AllCurvesAreLinear(Data) ? FastGrayIdentity8 : FastEvaluateGrayCurves8);
+ else
+ *TransformFn = (AllCurvesAreLinear(Data) ? FastRGBIdentity8 : FastEvaluateRGBCurves8);
+
+ return TRUE;
+
+}
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+// Optimization for matrix-shaper in 8 bits. Numbers are operated in n.14 signed, tables are stored in 1.14 fixed
+
+#include "fast_float_internal.h"
+
+typedef cmsInt32Number cmsS1Fixed14Number; // Note that this may hold more than 16 bits!
+
+#define DOUBLE_TO_1FIXED14(x) ((cmsS1Fixed14Number) floor((x) * 16384.0 + 0.5))
+
+// This is the private data container used by this optimization
+typedef struct {
+
+ // Alignment makes it faster
+
+ cmsS1Fixed14Number Mat[4][4]; // n.14 to n.14 (needs a saturation after that)
+
+ void * real_ptr;
+
+ cmsContext ContextID;
+
+ cmsS1Fixed14Number Shaper1R[256]; // from 0..255 to 1.14 (0.0...1.0)
+ cmsS1Fixed14Number Shaper1G[256];
+ cmsS1Fixed14Number Shaper1B[256];
+
+ cmsUInt8Number Shaper2R[0x4001]; // 1.14 to 0..255
+ cmsUInt8Number Shaper2G[0x4001];
+ cmsUInt8Number Shaper2B[0x4001];
+
+} XMatShaper8Data;
+
+
+static
+XMatShaper8Data* malloc_aligned(cmsContext ContextID)
+{
+ cmsUInt8Number* real_ptr = (cmsUInt8Number*) _cmsMallocZero(ContextID, sizeof(XMatShaper8Data) + 32);
+ cmsUInt8Number* aligned = (cmsUInt8Number*) (((uintptr_t)real_ptr + 16) & ~0xf);
+ XMatShaper8Data* p = (XMatShaper8Data*) aligned;
+
+ p ->real_ptr = real_ptr;
+ return p;
+}
+
+static
+void free_aligned(XMatShaper8Data* a)
+{
+ _cmsFree(a->ContextID, a->real_ptr);
+}
+
+
+// Free the private data container
+static
+void FreeMatShaper(cmsContext ContextID, void* Data)
+{
+ UNUSED_PARAMETER(ContextID);
+
+ if (Data != NULL) free_aligned((XMatShaper8Data*) Data);
+}
+
+
+// This table converts from 8 bits to 1.14 after applying the curve
+static
+void FillFirstShaper(cmsS1Fixed14Number* Table, cmsToneCurve* Curve)
+{
+ int i;
+ cmsFloat32Number R, y;
+
+ for (i=0; i < 256; i++) {
+
+ R = (cmsFloat32Number) (i / 255.0);
+ y = cmsEvalToneCurveFloat(Curve, R);
+
+ Table[i] = DOUBLE_TO_1FIXED14(y);
+ }
+}
+
+
+// This table converts form 1.14 (being 0x4000 the last entry) to 8 bits after applying the curve
+static
+void FillSecondShaper(cmsUInt8Number* Table, cmsToneCurve* Curve)
+{
+ int i;
+ cmsFloat32Number R, Val;
+ cmsInt32Number w;
+
+ for (i=0; i < 0x4001; i++) {
+
+ R = (cmsFloat32Number) (i / 16384.0f);
+ Val = cmsEvalToneCurveFloat(Curve, R);
+ w = (cmsInt32Number) (Val * 255.0f + 0.5f);
+ if (w < 0) w = 0;
+ if (w > 255) w = 255;
+
+ Table[i] = (cmsInt8Number) w;
+
+ }
+}
+
+// Compute the matrix-shaper structure
+static
+XMatShaper8Data* SetMatShaper(cmsContext ContextID, cmsToneCurve* Curve1[3], cmsMAT3* Mat, cmsVEC3* Off, cmsToneCurve* Curve2[3])
+{
+ XMatShaper8Data* p;
+ int i, j;
+
+ // Allocate a big chuck of memory to store precomputed tables
+ p = malloc_aligned(ContextID);
+ if (p == NULL) return FALSE;
+
+ p -> ContextID = ContextID;
+
+ // Precompute tables
+ FillFirstShaper(p ->Shaper1R, Curve1[0]);
+ FillFirstShaper(p ->Shaper1G, Curve1[1]);
+ FillFirstShaper(p ->Shaper1B, Curve1[2]);
+
+ FillSecondShaper(p ->Shaper2R, Curve2[0]);
+ FillSecondShaper(p ->Shaper2G, Curve2[1]);
+ FillSecondShaper(p ->Shaper2B, Curve2[2]);
+
+
+ // Convert matrix to nFixed14. Note that those values may take more than 16 bits as
+ for (i=0; i < 3; i++) {
+ for (j=0; j < 3; j++) {
+ p ->Mat[j][i] = DOUBLE_TO_1FIXED14(Mat->v[i].n[j]);
+ }
+ }
+
+ for (i=0; i < 3; i++) {
+
+ if (Off == NULL) {
+
+ p->Mat[3][i] = DOUBLE_TO_1FIXED14(0.5);
+ }
+ else {
+ p->Mat[3][i] = DOUBLE_TO_1FIXED14(Off->n[i] + 0.5);
+ }
+ }
+
+
+ return p;
+}
+
+// A fast matrix-shaper evaluator for 8 bits. This is a bit ticky since I'm using 1.14 signed fixed point
+// to accomplish some performance. Actually it takes 256x3 16 bits tables and 16385 x 3 tables of 8 bits,
+// in total about 50K, and the performance boost is huge!
+
+static
+void MatShaperXform8(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ XMatShaper8Data* p = (XMatShaper8Data*) _cmsGetTransformUserData(CMMcargo);
+
+ cmsS1Fixed14Number l1, l2, l3;
+ cmsS1Fixed14Number r, g, b;
+ cmsUInt32Number ri, gi, bi;
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ // Across first shaper, which also converts to 1.14 fixed point. 16 bits guaranteed.
+ r = p->Shaper1R[*rin];
+ g = p->Shaper1G[*gin];
+ b = p->Shaper1B[*bin];
+
+ // Evaluate the matrix in 1.14 fixed point
+ l1 = (p->Mat[0][0] * r + p->Mat[1][0] * g + p->Mat[2][0] * b + p->Mat[3][0]) >> 14;
+ l2 = (p->Mat[0][1] * r + p->Mat[1][1] * g + p->Mat[2][1] * b + p->Mat[3][1]) >> 14;
+ l3 = (p->Mat[0][2] * r + p->Mat[1][2] * g + p->Mat[2][2] * b + p->Mat[3][2]) >> 14;
+
+
+ // Now we have to clip to 0..1.0 range
+ ri = (l1 < 0) ? 0 : ((l1 > 0x4000) ? 0x4000 : l1);
+ gi = (l2 < 0) ? 0 : ((l2 > 0x4000) ? 0x4000 : l2);
+ bi = (l3 < 0) ? 0 : ((l3 > 0x4000) ? 0x4000 : l3);
+
+
+ // And across second shaper,
+ *rout = p->Shaper2R[ri];
+ *gout = p->Shaper2G[gi];
+ *bout = p->Shaper2B[bi];
+
+ // Handle alpha
+ if (ain) {
+ *aout = *ain;
+ }
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+ if (ain) ain += SourceIncrements[3];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+ if (aout) aout += DestIncrements[3];
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+// 8 bits on input allows matrix-shaper boost up a little bit
+cmsBool Optimize8MatrixShaper(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsStage* Curve1, *Curve2;
+ cmsStage* Matrix1, *Matrix2;
+ _cmsStageMatrixData* Data1;
+ _cmsStageMatrixData* Data2;
+ cmsMAT3 res;
+ cmsBool IdentityMat = FALSE;
+ cmsPipeline* Dest, *Src;
+ cmsContext ContextID;
+ cmsUInt32Number nChans;
+ cmsFloat64Number factor = 1.0;
+
+ // Only works on RGB to RGB and gray to gray
+
+ if ( !( (T_CHANNELS(*InputFormat) == 3 && T_CHANNELS(*OutputFormat) == 3) ||
+ (T_CHANNELS(*InputFormat) == 1 && T_CHANNELS(*OutputFormat) == 1) )) return FALSE;
+
+ // Only works on 8 bit input
+ if (T_BYTES(*InputFormat) != 1 || T_BYTES(*OutputFormat) != 1) return FALSE;
+
+ // Seems suitable, proceed
+ Src = *Lut;
+
+ // Check for shaper-matrix-matrix-shaper structure, that is what this optimizer stands for
+ if (!cmsPipelineCheckAndRetreiveStages(Src, 4,
+ cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
+ &Curve1, &Matrix1, &Matrix2, &Curve2)) return FALSE;
+
+ ContextID = cmsGetPipelineContextID(Src);
+ nChans = T_CHANNELS(*InputFormat);
+
+ // Get both matrices, which are 3x3
+ Data1 = (_cmsStageMatrixData*) cmsStageData(Matrix1);
+ Data2 = (_cmsStageMatrixData*) cmsStageData(Matrix2);
+
+ // Input offset should be zero
+ if (Data1 ->Offset != NULL) return FALSE;
+
+ if (cmsStageInputChannels(Matrix1) == 1 && cmsStageOutputChannels(Matrix2) == 1)
+ {
+ // This is a gray to gray. Just multiply
+ factor = Data1->Double[0]*Data2->Double[0] +
+ Data1->Double[1]*Data2->Double[1] +
+ Data1->Double[2]*Data2->Double[2];
+
+ if (fabs(1 - factor) < (1.0 / 65535.0)) IdentityMat = TRUE;
+ }
+ else
+ {
+ // Multiply both matrices to get the result
+ _cmsMAT3per(&res, (cmsMAT3*) Data2 ->Double, (cmsMAT3*) Data1 ->Double);
+
+ // Now the result is in res + Data2 -> Offset. Maybe is a plain identity?
+ IdentityMat = FALSE;
+ if (_cmsMAT3isIdentity(&res) && Data2 ->Offset == NULL) {
+
+ // We can get rid of full matrix
+ IdentityMat = TRUE;
+ }
+ }
+
+ // Allocate an empty LUT
+ Dest = cmsPipelineAlloc(ContextID, nChans, nChans);
+ if (!Dest) return FALSE;
+
+ // Assamble the new LUT
+ cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1));
+
+ if (!IdentityMat) {
+
+ if (nChans == 1)
+ cmsPipelineInsertStage(Dest, cmsAT_END,
+ cmsStageAllocMatrix(ContextID, 1, 1, (const cmsFloat64Number*) &factor, Data2->Offset));
+ else
+ cmsPipelineInsertStage(Dest, cmsAT_END,
+ cmsStageAllocMatrix(ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset));
+ }
+
+
+ cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2));
+
+ // If identity on matrix, we can further optimize the curves, so call the join curves routine
+ if (IdentityMat) {
+
+ Optimize8ByJoiningCurves(TransformFn, UserData, FreeUserData, &Dest, InputFormat, OutputFormat, dwFlags);
+ }
+ else {
+ _cmsStageToneCurvesData* mpeC1 = (_cmsStageToneCurvesData*) cmsStageData(Curve1);
+ _cmsStageToneCurvesData* mpeC2 = (_cmsStageToneCurvesData*) cmsStageData(Curve2);
+
+ // In this particular optimization, caché does not help as it takes more time to deal with
+ // the caché that with the pixel handling
+ *dwFlags |= cmsFLAGS_NOCACHE;
+
+
+ // Setup the optimizarion routines
+ *UserData = SetMatShaper(ContextID, mpeC1 ->TheCurves, &res, (cmsVEC3*) Data2 ->Offset, mpeC2->TheCurves);
+ *FreeUserData = FreeMatShaper;
+
+ *TransformFn = MatShaperXform8;
+ }
+
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ cmsPipelineFree(Src);
+ *Lut = Dest;
+ return TRUE;
+}
+
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+// Optimization for matrix-shaper in 8 bits using SSE2 intrinsics
+
+#include "fast_float_internal.h"
+
+
+#ifndef CMS_DONT_USE_SSE2
+
+#ifdef _MSC_VER
+#include <intrin.h>
+#else
+#include <x86intrin.h>
+#include <cpuid.h>
+#endif
+
+#include <emmintrin.h>
+
+
+// This is the private data container used by this optimization
+typedef struct {
+
+ // This is for SSE, MUST be aligned at 16 bit boundary
+
+ cmsFloat32Number Mat[4][4]; // n.14 to n.14 (needs a saturation after that)
+
+ void * real_ptr;
+
+ cmsContext ContextID;
+
+ cmsFloat32Number Shaper1R[256]; // from 0..255 to 1.14 (0.0...1.0)
+ cmsFloat32Number Shaper1G[256];
+ cmsFloat32Number Shaper1B[256];
+
+ cmsUInt8Number Shaper2R[0x4001]; // 1.14 to 0..255
+ cmsUInt8Number Shaper2G[0x4001];
+ cmsUInt8Number Shaper2B[0x4001];
+
+} XMatShaper8Data;
+
+
+static
+XMatShaper8Data* malloc_aligned(cmsContext ContextID)
+{
+ cmsUInt8Number* real_ptr = (cmsUInt8Number*) _cmsMallocZero(ContextID, sizeof(XMatShaper8Data) + 32);
+ cmsUInt8Number* aligned = (cmsUInt8Number*) (((uintptr_t)real_ptr + 16) & ~0xf);
+ XMatShaper8Data* p = (XMatShaper8Data*) aligned;
+
+ p ->real_ptr = real_ptr;
+ return p;
+}
+
+static
+void free_aligned(XMatShaper8Data* a)
+{
+ _cmsFree(a->ContextID, a->real_ptr);
+}
+
+
+// Free the private data container
+static
+void FreeMatShaper(cmsContext ContextID, void* Data)
+{
+ UNUSED_PARAMETER(ContextID);
+
+ if (Data != NULL) free_aligned((XMatShaper8Data*) Data);
+}
+
+
+// This table converts from 8 bits to 1.14 after applying the curve
+static
+void FillFirstShaper(cmsFloat32Number* Table, cmsToneCurve* Curve)
+{
+ cmsInt32Number i;
+ cmsFloat32Number R;
+
+ for (i = 0; i < 256; i++) {
+
+ R = (cmsFloat32Number)(i / 255.0);
+ Table[i] = cmsEvalToneCurveFloat(Curve, R);
+ }
+}
+
+
+// This table converts form 1.14 (being 0x4000 the last entry) to 8 bits after applying the curve
+static
+void FillSecondShaper(cmsUInt8Number* Table, cmsToneCurve* Curve)
+{
+ int i;
+ cmsFloat32Number R, Val;
+ cmsInt32Number w;
+
+ for (i=0; i < 0x4001; i++) {
+
+ R = (cmsFloat32Number) (i / 16384.0f);
+ Val = cmsEvalToneCurveFloat(Curve, R);
+ w = (cmsInt32Number) (Val * 255.0f + 0.5f);
+ if (w < 0) w = 0;
+ if (w > 255) w = 255;
+
+ Table[i] = (cmsInt8Number) w;
+
+ }
+}
+
+// Compute the matrix-shaper structure
+static
+XMatShaper8Data* SetMatShaper(cmsContext ContextID, cmsToneCurve* Curve1[3], cmsMAT3* Mat, cmsVEC3* Off, cmsToneCurve* Curve2[3])
+{
+ XMatShaper8Data* p;
+ int i, j;
+
+ // Allocate a big chuck of memory to store precomputed tables
+ p = malloc_aligned(ContextID);
+ if (p == NULL) return FALSE;
+
+ p -> ContextID = ContextID;
+
+ // Precompute tables
+ FillFirstShaper(p ->Shaper1R, Curve1[0]);
+ FillFirstShaper(p ->Shaper1G, Curve1[1]);
+ FillFirstShaper(p ->Shaper1B, Curve1[2]);
+
+ FillSecondShaper(p ->Shaper2R, Curve2[0]);
+ FillSecondShaper(p ->Shaper2G, Curve2[1]);
+ FillSecondShaper(p ->Shaper2B, Curve2[2]);
+
+
+ // Convert matrix to float
+ for (i=0; i < 3; i++) {
+ for (j=0; j < 3; j++) {
+ p ->Mat[j][i] = (cmsFloat32Number) Mat->v[i].n[j];
+ }
+ }
+
+ // Roundoff
+ for (i=0; i < 3; i++) {
+
+ if (Off == NULL) {
+
+ p->Mat[3][i] = 0.0f;
+ }
+ else {
+ p->Mat[3][i] = (cmsFloat32Number)Off->n[i];
+ }
+ }
+
+
+ return p;
+}
+
+
+// A fast matrix-shaper evaluator for 8 bits.
+static
+void MatShaperXform8SSE(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ XMatShaper8Data* p = (XMatShaper8Data*) _cmsGetTransformUserData(CMMcargo);
+
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+
+ __m128 mat0 = _mm_load_ps(p->Mat[0]);
+ __m128 mat1 = _mm_load_ps(p->Mat[1]);
+ __m128 mat2 = _mm_load_ps(p->Mat[2]);
+ __m128 mat3 = _mm_load_ps(p->Mat[3]);
+
+ __m128 zero = _mm_setzero_ps();
+ __m128 one = _mm_set1_ps(1.0f);
+ __m128 scale = _mm_set1_ps((cmsFloat32Number)0x4000);
+
+ cmsUInt8Number buffer[32];
+ cmsUInt32Number* output_index = (cmsUInt32Number*)(((uintptr_t)buffer + 16) & ~0xf);
+
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+ /**
+ * Prefetch
+ */
+ __m128 rvector = _mm_set1_ps(p->Shaper1R[*rin]);
+ __m128 gvector = _mm_set1_ps(p->Shaper1G[*gin]);
+ __m128 bvector = _mm_set1_ps(p->Shaper1B[*bin]);
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ __m128 el1 = _mm_mul_ps(rvector, mat0);
+ __m128 el2 = _mm_mul_ps(gvector, mat1);
+ __m128 el3 = _mm_mul_ps(bvector, mat2);
+
+ __m128 sum = _mm_add_ps(el1, _mm_add_ps(el2, _mm_add_ps(el3, mat3)));
+
+ __m128 out = _mm_min_ps(_mm_max_ps(sum, zero), one);
+
+ out = _mm_mul_ps(out, scale);
+
+ /**
+ * Rounding and converting to index.
+ * Actually this is a costly instruction that may be blocking performance
+ */
+ _mm_store_si128((__m128i*)output_index, _mm_cvtps_epi32(out));
+
+
+ // Handle alpha
+ if (ain) {
+ *aout = *ain;
+ }
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+ if (ain) ain += SourceIncrements[3];
+
+ /**
+ * Take next value whilst store is being performed
+ */
+ if (ii < PixelsPerLine - 1)
+ {
+ rvector = _mm_set1_ps(p->Shaper1R[*rin]);
+ gvector = _mm_set1_ps(p->Shaper1G[*gin]);
+ bvector = _mm_set1_ps(p->Shaper1B[*bin]);
+ }
+
+ *rout = p->Shaper2R[output_index[0]];
+ *gout = p->Shaper2G[output_index[1]];
+ *bout = p->Shaper2B[output_index[2]];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+ if (aout) aout += DestIncrements[3];
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+static
+cmsBool IsSSE2Available(void)
+{
+#ifdef _MSC_VER
+ int cpuinfo[4];
+
+ __cpuid(cpuinfo, 1);
+ if (!(cpuinfo[3] & (1 << 26))) return FALSE;
+ return TRUE;
+
+#else
+ unsigned int level = 1u;
+ unsigned int eax, ebx, ecx, edx;
+ unsigned int bits = (1u << 26);
+ unsigned int max = __get_cpuid_max(0, NULL);
+ if (level > max) {
+ return FALSE;
+ }
+ __cpuid_count(level, 0, eax, ebx, ecx, edx);
+ return (edx & bits) == bits;
+#endif
+}
+
+
+// 8 bits on input allows matrix-shaper boost up a little bit
+cmsBool Optimize8MatrixShaperSSE(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsStage* Curve1, *Curve2;
+ cmsStage* Matrix1, *Matrix2;
+ _cmsStageMatrixData* Data1;
+ _cmsStageMatrixData* Data2;
+ cmsMAT3 res;
+ cmsBool IdentityMat = FALSE;
+ cmsPipeline* Dest, *Src;
+ cmsContext ContextID;
+ cmsUInt32Number nChans;
+
+ // Check for SSE2 support
+ if (!(IsSSE2Available())) return FALSE;
+
+ // Only works on 3 to 3, probably RGB
+ if ( !( (T_CHANNELS(*InputFormat) == 3 && T_CHANNELS(*OutputFormat) == 3) ) ) return FALSE;
+
+ // Only works on 8 bit input
+ if (T_BYTES(*InputFormat) != 1 || T_BYTES(*OutputFormat) != 1) return FALSE;
+
+ // Seems suitable, proceed
+ Src = *Lut;
+
+ // Check for shaper-matrix-matrix-shaper structure, that is what this optimizer stands for
+ if (!cmsPipelineCheckAndRetreiveStages(Src, 4,
+ cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
+ &Curve1, &Matrix1, &Matrix2, &Curve2)) return FALSE;
+
+ ContextID = cmsGetPipelineContextID(Src);
+ nChans = T_CHANNELS(*InputFormat);
+
+ // Get both matrices, which are 3x3
+ Data1 = (_cmsStageMatrixData*) cmsStageData(Matrix1);
+ Data2 = (_cmsStageMatrixData*) cmsStageData(Matrix2);
+
+ // Input offset should be zero
+ if (Data1->Offset != NULL) return FALSE;
+
+ // Multiply both matrices to get the result
+ _cmsMAT3per(&res, (cmsMAT3*)Data2->Double, (cmsMAT3*)Data1->Double);
+
+ // Now the result is in res + Data2 -> Offset. Maybe is a plain identity?
+ IdentityMat = FALSE;
+ if (_cmsMAT3isIdentity(&res) && Data2->Offset == NULL) {
+
+ // We can get rid of full matrix
+ IdentityMat = TRUE;
+ }
+
+ // Allocate an empty LUT
+ Dest = cmsPipelineAlloc(ContextID, nChans, nChans);
+ if (!Dest) return FALSE;
+
+ // Assamble the new LUT
+ cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1));
+
+ if (!IdentityMat) {
+
+ cmsPipelineInsertStage(Dest, cmsAT_END,
+ cmsStageAllocMatrix(ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset));
+ }
+
+
+ cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2));
+
+ // If identity on matrix, we can further optimize the curves, so call the join curves routine
+ if (IdentityMat) {
+
+ Optimize8ByJoiningCurves(TransformFn, UserData, FreeUserData, &Dest, InputFormat, OutputFormat, dwFlags);
+ }
+ else {
+ _cmsStageToneCurvesData* mpeC1 = (_cmsStageToneCurvesData*) cmsStageData(Curve1);
+ _cmsStageToneCurvesData* mpeC2 = (_cmsStageToneCurvesData*) cmsStageData(Curve2);
+
+ // In this particular optimization, cache does not help as it takes more time to deal with
+ // the cache that with the pixel handling
+ *dwFlags |= cmsFLAGS_NOCACHE;
+
+
+ // Setup the optimizarion routines
+ *UserData = SetMatShaper(ContextID, mpeC1 ->TheCurves, &res, (cmsVEC3*) Data2 ->Offset, mpeC2->TheCurves);
+ *FreeUserData = FreeMatShaper;
+
+ *TransformFn = MatShaperXform8SSE;
+ }
+
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ cmsPipelineFree(Src);
+ *Lut = Dest;
+ return TRUE;
+}
+
+#endif
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+#define PRELINEARIZATION_POINTS 4096
+
+// Optimization for 8 bits, 3 inputs only
+typedef struct {
+
+ cmsContext ContextID;
+
+ const cmsInterpParams* p; // Tetrahedrical interpolation parameters. This is a not-owned pointer.
+
+ cmsUInt16Number rx[256], ry[256], rz[256];
+ cmsUInt32Number X0[256], Y0[256], Z0[256]; // Precomputed nodes and offsets for 8-bit input data
+
+
+} Performance8Data;
+
+
+// Precomputes tables for 8-bit on input devicelink.
+static
+Performance8Data* Performance8alloc(cmsContext ContextID, const cmsInterpParams* p, cmsToneCurve* G[3])
+{
+ int i;
+ cmsUInt16Number Input[3];
+ cmsS15Fixed16Number v1, v2, v3;
+ Performance8Data* p8;
+
+ p8 = (Performance8Data*) _cmsMallocZero(ContextID, sizeof(Performance8Data));
+ if (p8 == NULL) return NULL;
+
+ // Since this only works for 8 bit input, values comes always as x * 257,
+ // we can safely take msb byte (x << 8 + x)
+ for (i=0; i < 256; i++) {
+
+ if (G != NULL) {
+
+ // Get 16-bit representation
+ Input[0] = cmsEvalToneCurve16(G[0], FROM_8_TO_16(i));
+ Input[1] = cmsEvalToneCurve16(G[1], FROM_8_TO_16(i));
+ Input[2] = cmsEvalToneCurve16(G[2], FROM_8_TO_16(i));
+ }
+ else {
+ Input[0] = FROM_8_TO_16(i);
+ Input[1] = FROM_8_TO_16(i);
+ Input[2] = FROM_8_TO_16(i);
+ }
+
+ // Move to 0..1.0 in fixed domain
+ v1 = _cmsToFixedDomain(Input[0] * p -> Domain[0]);
+ v2 = _cmsToFixedDomain(Input[1] * p -> Domain[1]);
+ v3 = _cmsToFixedDomain(Input[2] * p -> Domain[2]);
+
+ // Store the precalculated table of nodes
+ p8 ->X0[i] = (p->opta[2] * FIXED_TO_INT(v1));
+ p8 ->Y0[i] = (p->opta[1] * FIXED_TO_INT(v2));
+ p8 ->Z0[i] = (p->opta[0] * FIXED_TO_INT(v3));
+
+ // Store the precalculated table of offsets
+ p8 ->rx[i] = (cmsUInt16Number) FIXED_REST_TO_INT(v1);
+ p8 ->ry[i] = (cmsUInt16Number) FIXED_REST_TO_INT(v2);
+ p8 ->rz[i] = (cmsUInt16Number) FIXED_REST_TO_INT(v3);
+ }
+
+
+ p8 ->ContextID = ContextID;
+ p8 ->p = p;
+
+ return p8;
+}
+
+static
+void Performance8free(cmsContext ContextID, void* ptr)
+{
+ _cmsFree(ContextID, ptr);
+}
+
+
+// Sampler implemented by another LUT. This is a clean way to precalculate the devicelink 3D CLUT for
+// almost any transform. We use floating point precision and then convert from floating point to 16 bits.
+static
+int XFormSampler16(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)
+{
+ // Evaluate in 16 bits
+ cmsPipelineEval16(In, Out, (cmsPipeline*) Cargo);
+
+ // Always succeed
+ return TRUE;
+}
+
+
+// A optimized interpolation for 8-bit input.
+#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+
+static
+void PerformanceEval8(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+
+ cmsUInt8Number r, g, b;
+ cmsS15Fixed16Number rx, ry, rz;
+ cmsS15Fixed16Number c0, c1, c2, c3, Rest;
+ cmsUInt32Number OutChan, TotalPlusAlpha;
+ cmsS15Fixed16Number X0, X1, Y0, Y1, Z0, Z1;
+ Performance8Data* p8 = (Performance8Data*)_cmsGetTransformUserData(CMMcargo);
+ const cmsInterpParams* p = p8->p;
+ cmsUInt32Number TotalOut = p->nOutputs;
+ const cmsUInt16Number* LutTable = (const cmsUInt16Number*)p->Table;
+
+ cmsUInt8Number* out[cmsMAXCHANNELS];
+ cmsUInt16Number res16;
+
+ cmsUInt32Number i, ii;
+
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ TotalPlusAlpha = TotalOut;
+ if (ain) TotalPlusAlpha++;
+
+ for (OutChan = 0; OutChan < TotalPlusAlpha; OutChan++) {
+ out[OutChan] = (cmsUInt8Number*)Output + DestStartingOrder[OutChan] + strideOut;
+ }
+
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ r = *rin; g = *gin; b = *bin;
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+
+ X0 = X1 = p8->X0[r];
+ Y0 = Y1 = p8->Y0[g];
+ Z0 = Z1 = p8->Z0[b];
+
+ rx = p8->rx[r];
+ ry = p8->ry[g];
+ rz = p8->rz[b];
+
+ X1 = X0 + ((rx == 0) ? 0 : p->opta[2]);
+ Y1 = Y0 + ((ry == 0) ? 0 : p->opta[1]);
+ Z1 = Z0 + ((rz == 0) ? 0 : p->opta[0]);
+
+
+ // These are the 6 Tetrahedral
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz)
+ {
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+ }
+ else
+ if (rx >= rz && rz >= ry)
+ {
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+ }
+ else
+ if (rz >= rx && rx >= ry)
+ {
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+ }
+ else
+ if (ry >= rx && rx >= rz)
+ {
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+ }
+ else
+ if (ry >= rz && rz >= rx)
+ {
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+ }
+ else
+ if (rz >= ry && ry >= rx)
+ {
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ res16 = (cmsUInt16Number)c0 + ((Rest + (Rest >> 16)) >> 16);
+
+ *out[OutChan] = FROM_16_TO_8(res16);
+ out[OutChan] += DestIncrements[OutChan];
+
+ if (ain)
+ *out[TotalOut] = *ain;
+
+ }
+
+
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+#undef DENS
+
+
+// Curves that contain wide empty areas are not optimizeable
+static
+cmsBool IsDegenerated(const cmsToneCurve* g)
+{
+ int i, Zeros = 0, Poles = 0;
+ int nEntries = cmsGetToneCurveEstimatedTableEntries(g);
+ const cmsUInt16Number* Table16 = cmsGetToneCurveEstimatedTable(g);
+
+ for (i=0; i < nEntries; i++) {
+
+ if (Table16[i] == 0x0000) Zeros++;
+ if (Table16[i] == 0xffff) Poles++;
+ }
+
+ if (Zeros == 1 && Poles == 1) return FALSE; // For linear tables
+ if (Zeros > (nEntries / 4)) return TRUE; // Degenerated, mostly zeros
+ if (Poles > (nEntries / 4)) return TRUE; // Degenerated, mostly poles
+
+ return FALSE;
+}
+
+
+
+// Normalize endpoints by slope limiting max and min. This assures endpoints as well.
+// Descending curves are handled as well.
+static
+void SlopeLimiting(cmsUInt16Number* Table16, int nEntries)
+{
+ int BeginVal, EndVal;
+
+ int AtBegin = (int) floor((cmsFloat64Number)nEntries * 0.02 + 0.5); // Cutoff at 2%
+ int AtEnd = nEntries - AtBegin - 1; // And 98%
+ cmsFloat64Number Val, Slope, beta;
+ int i;
+
+
+ if (Table16[0] > Table16[nEntries-1]) {
+ BeginVal = 0xffff; EndVal = 0;
+ }
+ else {
+ BeginVal = 0; EndVal = 0xffff;
+ }
+
+ // Compute slope and offset for begin of curve
+ Val = Table16[AtBegin];
+ Slope = (Val - BeginVal) / AtBegin;
+ beta = Val - Slope * AtBegin;
+
+ for (i=0; i < AtBegin; i++)
+ Table16[i] = _cmsSaturateWord(i * Slope + beta);
+
+ // Compute slope and offset for the end
+ Val = Table16[AtEnd];
+ Slope = (EndVal - Val) / AtBegin; // AtBegin holds the X interval, which is same in both cases
+ beta = Val - Slope * AtEnd;
+
+ for (i = AtEnd; i < (int) nEntries; i++)
+ Table16[i] = _cmsSaturateWord(i * Slope + beta);
+}
+
+
+// --------------------------------------------------------------------------------------------------------------
+
+cmsBool Optimize8BitRGBTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsPipeline* OriginalLut;
+ int nGridPoints;
+ cmsToneCurve *Trans[cmsMAXCHANNELS], *TransReverse[cmsMAXCHANNELS];
+ cmsUInt32Number t, i, j;
+ cmsFloat32Number v, In[cmsMAXCHANNELS], Out[cmsMAXCHANNELS];
+ cmsBool lIsSuitable;
+ cmsPipeline* OptimizedLUT = NULL, *LutPlusCurves = NULL;
+ cmsStage* OptimizedCLUTmpe;
+ cmsStage* OptimizedPrelinMpe;
+ cmsStage* mpe;
+ Performance8Data* p8;
+ cmsUInt16Number* MyTable[3];
+ cmsContext ContextID;
+ _cmsStageCLutData* data;
+
+ // For empty transforms, do nothing
+ if (*Lut == NULL) return FALSE;
+
+ // This is a loosy optimization! does not apply in floating-point cases
+ if (T_FLOAT(*InputFormat) || T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only on 8-bit
+ if (T_BYTES(*InputFormat) != 1 || T_BYTES(*OutputFormat) != 1) return FALSE;
+
+ // Only on RGB
+ if (T_COLORSPACE(*InputFormat) != PT_RGB) return FALSE;
+
+ OriginalLut = *Lut;
+
+ // Named color pipelines cannot be optimized either
+ for (mpe = cmsPipelineGetPtrToFirstStage(OriginalLut);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+ if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE;
+ }
+
+ ContextID = cmsGetPipelineContextID(OriginalLut);
+ nGridPoints = _cmsReasonableGridpointsByColorspace(cmsSigRgbData, *dwFlags);
+
+ // Empty gamma containers
+ memset(Trans, 0, sizeof(Trans));
+ memset(TransReverse, 0, sizeof(TransReverse));
+
+ MyTable[0] = (cmsUInt16Number*) _cmsMallocZero(ContextID, sizeof(cmsUInt16Number) * PRELINEARIZATION_POINTS);
+ MyTable[1] = (cmsUInt16Number*) _cmsMallocZero(ContextID, sizeof(cmsUInt16Number) * PRELINEARIZATION_POINTS);
+ MyTable[2] = (cmsUInt16Number*) _cmsMallocZero(ContextID, sizeof(cmsUInt16Number) * PRELINEARIZATION_POINTS);
+
+ if (MyTable[0] == NULL || MyTable[1] == NULL || MyTable[2] == NULL) goto Error;
+
+ // Populate the curves
+
+ for (i=0; i < PRELINEARIZATION_POINTS; i++) {
+
+ v = (cmsFloat32Number) ((cmsFloat64Number) i / (PRELINEARIZATION_POINTS - 1));
+
+ // Feed input with a gray ramp
+ for (j=0; j < 3; j++)
+ In[j] = v;
+
+ // Evaluate the gray value
+ cmsPipelineEvalFloat(In, Out, OriginalLut);
+
+ // Store result in curve
+ for (j=0; j < 3; j++)
+ MyTable[j][i] = _cmsSaturateWord(Out[j] * 65535.0);
+ }
+
+ for (t=0; t < 3; t++) {
+
+ SlopeLimiting(MyTable[t], PRELINEARIZATION_POINTS);
+
+ Trans[t] = cmsBuildTabulatedToneCurve16(ContextID, PRELINEARIZATION_POINTS, MyTable[t]);
+ if (Trans[t] == NULL) goto Error;
+
+ _cmsFree(cmsGetPipelineContextID(OriginalLut), MyTable[t]);
+ }
+
+ // Check for validity
+ lIsSuitable = TRUE;
+ for (t=0; (lIsSuitable && (t < 3)); t++) {
+
+ // Exclude if non-monotonic
+ if (!cmsIsToneCurveMonotonic(Trans[t]))
+ lIsSuitable = FALSE;
+
+ if (IsDegenerated(Trans[t]))
+ lIsSuitable = FALSE;
+ }
+
+ // If it is not suitable, just quit
+ if (!lIsSuitable) goto Error;
+
+ // Invert curves if possible
+ for (t = 0; t < cmsPipelineInputChannels(OriginalLut); t++) {
+ TransReverse[t] = cmsReverseToneCurveEx(PRELINEARIZATION_POINTS, Trans[t]);
+ if (TransReverse[t] == NULL) goto Error;
+ }
+
+ // Now inset the reversed curves at the begin of transform
+ LutPlusCurves = cmsPipelineDup(OriginalLut);
+ if (LutPlusCurves == NULL) goto Error;
+
+ cmsPipelineInsertStage(LutPlusCurves, cmsAT_BEGIN, cmsStageAllocToneCurves(ContextID, 3, TransReverse));
+
+ // Create the result LUT
+ OptimizedLUT = cmsPipelineAlloc(cmsGetPipelineContextID(OriginalLut), 3, cmsPipelineOutputChannels(OriginalLut));
+ if (OptimizedLUT == NULL) goto Error;
+
+ OptimizedPrelinMpe = cmsStageAllocToneCurves(ContextID, 3, Trans);
+
+ // Create and insert the curves at the beginning
+ cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedPrelinMpe);
+
+ // Allocate the CLUT for result
+ OptimizedCLUTmpe = cmsStageAllocCLut16bit(ContextID, nGridPoints, 3, cmsPipelineOutputChannels(OriginalLut), NULL);
+
+ // Add the CLUT to the destination LUT
+ cmsPipelineInsertStage(OptimizedLUT, cmsAT_END, OptimizedCLUTmpe);
+
+ // Resample the LUT
+ if (!cmsStageSampleCLut16bit(OptimizedCLUTmpe, XFormSampler16, (void*) LutPlusCurves, 0)) goto Error;
+
+ // Set the evaluator
+ data = (_cmsStageCLutData*) cmsStageData(OptimizedCLUTmpe);
+
+ p8 = Performance8alloc(ContextID, data ->Params, Trans);
+ if (p8 == NULL) return FALSE;
+
+ // Free resources
+ for (t = 0; t <3; t++) {
+
+ if (Trans[t]) cmsFreeToneCurve(Trans[t]);
+ if (TransReverse[t]) cmsFreeToneCurve(TransReverse[t]);
+ }
+
+ cmsPipelineFree(LutPlusCurves);
+
+ // And return the obtained LUT
+ cmsPipelineFree(OriginalLut);
+
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ *Lut = OptimizedLUT;
+ *TransformFn = PerformanceEval8;
+ *UserData = p8;
+ *FreeDataFn = Performance8free;
+
+ return TRUE;
+
+Error:
+
+ for (t = 0; t < 3; t++) {
+
+ if (Trans[t]) cmsFreeToneCurve(Trans[t]);
+ if (TransReverse[t]) cmsFreeToneCurve(TransReverse[t]);
+ }
+
+ if (LutPlusCurves != NULL) cmsPipelineFree(LutPlusCurves);
+ if (OptimizedLUT != NULL) cmsPipelineFree(OptimizedLUT);
+
+ return FALSE;
+}
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+
+//---------------------------------------------------------------------------------
+
+// The internal photoshop 16 bit format range is 1.15 fixed point, which goes 0..32768
+// (NOT 32767) that means:
+//
+// 16 bits encoding 15 bit Photoshop encoding
+// ================ =========================
+//
+// 0x0000 0x0000
+// 0xFFFF 0x8000
+//
+// A nice (and fast) way to implement conversions is by using 64 bit values, which are
+// native CPU word size in most today architectures.
+// In CMYK, internal Photoshop format comes inverted, and this inversion happens after
+// the resizing, so values 32769 to 65535 are never used in PhotoShop.
+
+//---------------------------------------------------------------------------------
+
+// This macro converts 16 bits to 15 bits by using a 64 bits value
+cmsINLINE cmsUInt16Number From16To15(cmsUInt16Number x16)
+{
+ cmsUInt64Number r64 = (((cmsUInt64Number)x16 << 15)) / 0xFFFFL;
+ return (cmsUInt16Number)r64;
+}
+
+// This macro converts 15 bits to 16 bits by using a 64 bit value. It is based in fixed 1.15 math
+cmsINLINE cmsUInt16Number From15To16(cmsUInt16Number x15)
+{
+ cmsUInt64Number r64 = ((cmsUInt64Number) x15 * 0xFFFF + 0x4000L) >> 15;
+ return (cmsUInt16Number)r64;
+}
+
+// Specialized 1-channel formatters
+static
+cmsUInt8Number* Unroll15bitsGray(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ Values[0] = From15To16(*(cmsUInt16Number*)Buffer);
+
+ return Buffer + 2;
+}
+
+
+static
+cmsUInt8Number* Pack15bitsGray(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ *(cmsUInt16Number*)Buffer = From16To15(Values[0]);
+ return Buffer + 2;
+}
+
+// Specialized 3-channels formatters
+static
+cmsUInt8Number* Unroll15bitsRGB(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ Values[0] = From15To16(*(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[1] = From15To16(*(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[2] = From15To16(*(cmsUInt16Number*)Buffer);
+
+ return Buffer + 2;
+}
+
+
+static
+cmsUInt8Number* Pack15bitsRGB(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ *(cmsUInt16Number*)Buffer = From16To15(Values[0]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = From16To15(Values[1]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = From16To15(Values[2]);
+
+ return Buffer + 2;
+}
+
+
+static
+cmsUInt8Number* Unroll15bitsRGBA(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ Values[0] = From15To16(*(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[1] = From15To16(*(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[2] = From15To16(*(cmsUInt16Number*)Buffer);
+
+ return Buffer + 4;
+}
+
+
+static
+cmsUInt8Number* Pack15bitsRGBA(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ *(cmsUInt16Number*)Buffer = From16To15(Values[0]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = From16To15(Values[1]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = From16To15(Values[2]);
+
+ return Buffer + 4;
+}
+
+
+// Specialized 3 channels reversed formatters
+static
+cmsUInt8Number* Unroll15bitsBGR(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ Values[2] = From15To16(*(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[1] = From15To16(*(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[0] = From15To16(*(cmsUInt16Number*)Buffer);
+
+ return Buffer + 2;
+}
+
+
+static
+cmsUInt8Number* Pack15bitsBGR(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ *(cmsUInt16Number*)Buffer = From16To15(Values[2]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = From16To15(Values[1]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = From16To15(Values[0]);
+
+ return Buffer+2;
+}
+
+// Specialized 4 channels CMYK formatters. Note Photoshop stores CMYK reversed
+static
+cmsUInt8Number* Unroll15bitsCMYK(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ Values[0] = From15To16(0x8000 - *(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[1] = From15To16(0x8000 - *(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[2] = From15To16(0x8000 - *(cmsUInt16Number*)Buffer);
+ Buffer += 2;
+ Values[3] = From15To16(0x8000 - *(cmsUInt16Number*)Buffer);
+
+ return Buffer + 2;
+}
+
+static
+cmsUInt8Number* Pack15bitsCMYK(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ UNUSED_PARAMETER(CMMcargo);
+ UNUSED_PARAMETER(Stride);
+
+ *(cmsUInt16Number*)Buffer = 0x8000U - From16To15(Values[0]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = 0x8000U - From16To15(Values[1]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = 0x8000U - From16To15(Values[2]);
+ Buffer += 2;
+ *(cmsUInt16Number*)Buffer = 0x8000U - From16To15(Values[3]);
+
+ return Buffer + 2;
+}
+
+
+// This macros does all handling for fallthrough cases
+cmsINLINE cmsUInt16Number UnrollOne(cmsUInt16Number x, cmsBool Reverse, cmsBool SwapEndian)
+{
+ if (SwapEndian)
+ x = (x << 8) | (x >> 8);
+
+ if (Reverse)
+ x = 0xffff - x;
+
+ return From15To16(x);
+}
+
+cmsINLINE cmsUInt16Number PackOne(cmsUInt16Number x, cmsBool Reverse, cmsBool SwapEndian)
+{
+ x = From16To15(x);
+
+ if (Reverse)
+ x = 0xffff - x;
+
+ if (SwapEndian)
+ x = (x << 8) | (x >> 8);
+
+ return x;
+}
+
+// Generic planar support
+static
+cmsUInt8Number* Unroll15bitsPlanar(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ _xform_head* head = (_xform_head*) CMMcargo;
+ int nChan = T_CHANNELS(head->InputFormat);
+ int DoSwap = T_DOSWAP(head->InputFormat);
+ int Reverse = T_FLAVOR(head->InputFormat);
+ int SwapEndian = T_ENDIAN16(head->InputFormat);
+ int i;
+ cmsUInt8Number* Init = accum;
+
+ UNUSED_PARAMETER(Stride);
+
+ if (DoSwap) {
+ accum += T_EXTRA(head->InputFormat) * Stride * 2;
+ }
+
+ for (i = 0; i < nChan; i++) {
+
+ int index = DoSwap ? (nChan - i - 1) : i;
+
+ wIn[index] = UnrollOne(*(cmsUInt16Number*)accum, Reverse, SwapEndian);
+
+ accum += Stride * 2;
+ }
+
+ return (Init + 2);
+}
+
+
+static
+cmsUInt8Number* Pack15bitsPlanar(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ _xform_head* head = (_xform_head*)CMMcargo;
+ int nChan = T_CHANNELS(head->OutputFormat);
+ int DoSwap = T_DOSWAP(head->OutputFormat);
+ int Reverse = T_FLAVOR(head->OutputFormat);
+ int SwapEndian = T_ENDIAN16(head->OutputFormat);
+ CMSREGISTER int i;
+ cmsUInt8Number* Init = output;
+
+
+ if (DoSwap) {
+ output += T_EXTRA(head->OutputFormat) * Stride * 2;
+ }
+
+ for (i = 0; i < nChan; i++) {
+
+ int index = DoSwap ? (nChan - i - 1) : i;
+
+ *(cmsUInt16Number*)output = PackOne(wOut[index], Reverse, SwapEndian);
+ output += (Stride * sizeof(cmsUInt16Number));
+ }
+
+ return (Init + sizeof(cmsUInt16Number));
+}
+
+
+
+// Generic falltrough
+static
+cmsUInt8Number* Unroll15bitsChunky(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ _xform_head* head = (_xform_head*) CMMcargo;
+
+ int nChan = T_CHANNELS(head->InputFormat);
+ int DoSwap = T_DOSWAP(head->InputFormat);
+ int Reverse = T_FLAVOR(head->InputFormat);
+ int SwapEndian = T_ENDIAN16(head->InputFormat);
+
+ CMSREGISTER int i;
+
+ UNUSED_PARAMETER(Stride);
+
+ if (DoSwap) {
+ Buffer += T_EXTRA(head->OutputFormat) * 2;
+ }
+
+ for (i = 0; i < nChan; i++) {
+
+ int index = DoSwap ? (nChan - i - 1) : i;
+
+ Values[index] = UnrollOne(*(cmsUInt16Number*)Buffer, Reverse, SwapEndian);
+
+ Buffer += 2;
+ }
+
+
+ return Buffer;
+}
+
+
+static
+cmsUInt8Number* Pack15bitsChunky(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ _xform_head* head = (_xform_head*)CMMcargo;
+
+ int nChan = T_CHANNELS(head->OutputFormat);
+ int DoSwap = T_DOSWAP(head->OutputFormat);
+ int Reverse = T_FLAVOR(head->OutputFormat);
+ int SwapEndian = T_ENDIAN16(head->OutputFormat);
+
+ CMSREGISTER int i;
+
+ UNUSED_PARAMETER(Stride);
+
+ if (DoSwap) {
+ Buffer += T_EXTRA(head->OutputFormat) * 2;
+ }
+
+ for (i = 0; i < nChan; i++) {
+
+ int index = DoSwap ? (nChan - i - 1) : i;
+
+ *(cmsUInt16Number*)Buffer = PackOne(Values[index], Reverse, SwapEndian);
+
+ Buffer += 2;
+ }
+
+ return Buffer;
+}
+
+
+
+// Generic N-bytes plus dither 16-to-8 conversion.
+static int err[cmsMAXCHANNELS];
+
+static
+cmsUInt8Number* PackNBytesDither(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ _xform_head* info = (_xform_head*)CMMcargo;
+
+ int nChan = T_CHANNELS(info->OutputFormat);
+ CMSREGISTER int i;
+ unsigned int n, pe, pf;
+
+ UNUSED_PARAMETER(Stride);
+
+ for (i = 0; i < nChan; i++) {
+
+ n = Values[i] + err[i]; // Value
+
+ pe = (n / 257); // Whole part
+ pf = (n % 257); // Fractional part
+
+ err[i] = pf; // Store it for next pixel
+
+ *Buffer++ = (cmsUInt8Number) pe;
+ }
+
+ return Buffer + T_EXTRA(info->OutputFormat);
+}
+
+
+static
+cmsUInt8Number* PackNBytesSwapDither(CMSREGISTER struct _cmstransform_struct* CMMcargo,
+ CMSREGISTER cmsUInt16Number Values[],
+ CMSREGISTER cmsUInt8Number* Buffer,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ _xform_head* info = (_xform_head*)CMMcargo;
+
+ int nChan = T_CHANNELS(info->OutputFormat);
+ CMSREGISTER int i;
+ unsigned int n, pe, pf;
+
+ UNUSED_PARAMETER(Stride);
+
+ for (i = nChan - 1; i >= 0; --i) {
+
+ n = Values[i] + err[i]; // Value
+
+ pe = (n / 257); // Whole part
+ pf = (n % 257); // Fractional part
+
+ err[i] = pf; // Store it for next pixel
+
+ *Buffer++ = (cmsUInt8Number)pe;
+ }
+
+
+ return Buffer + T_EXTRA(info->OutputFormat);
+}
+
+
+// The factory for 15 bits. This function returns a pointer to specialized function
+// that would deal with the asked format. It return a pointer to NULL if the format
+// is not supported. This is tha basis of formatter plug-in for 15 bit formats.
+CMSCHECKPOINT cmsFormatter CMSEXPORT Formatter_15Bit_Factory(cmsUInt32Number Type,
+ cmsFormatterDirection Dir,
+ cmsUInt32Number dwFlags)
+{
+ cmsFormatter Result = { NULL };
+
+ UNUSED_PARAMETER(dwFlags);
+
+ switch (Type) {
+
+ // Simple Gray
+ case TYPE_GRAY_15:
+ Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsGray : Pack15bitsGray;
+ break;
+
+ // 3 channels
+ case TYPE_CMY_15:
+ case TYPE_RGB_15:
+ Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsRGB : Pack15bitsRGB;
+ break;
+
+ // 3 channels reversed
+ case TYPE_YMC_15:
+ case TYPE_BGR_15:
+ Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsBGR : Pack15bitsBGR;
+ break;
+
+ // 3 Channels plus one alpha
+ case TYPE_RGBA_15:
+ Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsRGBA : Pack15bitsRGBA;
+ break;
+
+ // 4 channels
+ case TYPE_CMYK_15:
+ Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsCMYK : Pack15bitsCMYK;
+ break;
+
+ // Planar versions
+ case TYPE_GRAYA_15_PLANAR:
+ case TYPE_RGB_15_PLANAR:
+ case TYPE_BGR_15_PLANAR:
+ case TYPE_RGBA_15_PLANAR:
+ case TYPE_ABGR_15_PLANAR:
+ case TYPE_CMY_15_PLANAR:
+ case TYPE_CMYK_15_PLANAR:
+ Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsPlanar : Pack15bitsPlanar;
+ break;
+
+ // Falltrough for remaining (corner) cases
+ case TYPE_GRAY_15_REV:
+ case TYPE_GRAY_15_SE:
+ case TYPE_GRAYA_15:
+ case TYPE_GRAYA_15_SE:
+ case TYPE_RGB_15_SE:
+ case TYPE_BGR_15_SE:
+ case TYPE_RGBA_15_SE:
+ case TYPE_ARGB_15:
+ case TYPE_ABGR_15:
+ case TYPE_ABGR_15_SE:
+ case TYPE_BGRA_15:
+ case TYPE_BGRA_15_SE:
+ case TYPE_CMY_15_SE:
+ case TYPE_CMYK_15_REV:
+ case TYPE_CMYK_15_SE:
+ case TYPE_KYMC_15:
+ case TYPE_KYMC_15_SE:
+ case TYPE_KCMY_15:
+ case TYPE_KCMY_15_REV:
+ case TYPE_KCMY_15_SE:
+ Result.Fmt16 = (Dir == cmsFormatterInput) ? Unroll15bitsChunky : Pack15bitsChunky;
+ break;
+
+ case TYPE_GRAY_8_DITHER:
+ case TYPE_RGB_8_DITHER:
+ case TYPE_RGBA_8_DITHER:
+ case TYPE_CMYK_8_DITHER:
+ if (Dir == cmsFormatterOutput) {
+ Result.Fmt16 = PackNBytesDither;
+ }
+ break;
+
+ case TYPE_ABGR_8_DITHER:
+ case TYPE_BGR_8_DITHER:
+ case TYPE_KYMC_8_DITHER:
+ if (Dir == cmsFormatterOutput) {
+ Result.Fmt16 = PackNBytesSwapDither;
+ }
+ break;
+
+ default:;
+ }
+
+ return Result;
+}
+
+
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+// Optimization for matrix-shaper in 15 bits. Numbers are operated in 1.15 usigned,
+
+#include "fast_float_internal.h"
+
+// An storage capable to keep 1.15 signed and some extra precission.
+// Actually I use 32 bits integer (signed)
+typedef cmsInt32Number cmsS1Fixed15Number;
+
+// Conversion to fixed. Note we don't use floor to get proper sign roundoff
+#define DOUBLE_TO_1FIXED15(x) ((cmsS1Fixed15Number) ((double) (x) * 0x8000 + 0.5))
+
+// This is the private data container used by this optimization
+typedef struct {
+
+ cmsS1Fixed15Number Mat[3][3];
+ cmsS1Fixed15Number Off[3];
+
+ // Precalculated tables for first shaper (375 Kb in total of both shapers)
+ cmsUInt16Number Shaper1R[MAX_NODES_IN_CURVE];
+ cmsUInt16Number Shaper1G[MAX_NODES_IN_CURVE];
+ cmsUInt16Number Shaper1B[MAX_NODES_IN_CURVE];
+
+ // Second shaper
+ cmsUInt16Number Shaper2R[MAX_NODES_IN_CURVE];
+ cmsUInt16Number Shaper2G[MAX_NODES_IN_CURVE];
+ cmsUInt16Number Shaper2B[MAX_NODES_IN_CURVE];
+
+ // A flag for fast operation if identity
+ cmsBool IdentityMat;
+
+ // The context
+ cmsContext ContextID;
+
+ // Poits to the raw, unaligned memory
+ void * real_ptr;
+
+
+} XMatShaperData;
+
+// A special malloc that returns memory aligned to DWORD boundary. Aligned memory access is way faster than unaligned
+// reference to the real block is kept for later free
+static XMatShaperData* malloc_aligned(cmsContext ContextID)
+{
+ cmsUInt8Number* real_ptr = (cmsUInt8Number*)_cmsMallocZero(ContextID, sizeof(XMatShaperData) + 32);
+ cmsUInt8Number* aligned = (cmsUInt8Number*)(((uintptr_t)real_ptr + 16) & ~0xf);
+ XMatShaperData* p = (XMatShaperData*)aligned;
+
+ p->real_ptr = real_ptr;
+ p->ContextID = ContextID;
+ return p;
+}
+
+
+// Free the private data container
+static
+void FreeMatShaper(cmsContext ContextID, void* Data)
+{
+
+ XMatShaperData* p = (XMatShaperData*)Data;
+ if (p != NULL)
+ _cmsFree(ContextID, p->real_ptr);
+}
+
+
+// This table converts from 8 bits to 1.14 after applying the curve
+static
+void FillShaper(cmsUInt16Number* Table, cmsToneCurve* Curve)
+{
+ int i;
+ cmsFloat32Number R, y;
+
+ for (i = 0; i < MAX_NODES_IN_CURVE; i++) {
+
+ R = (cmsFloat32Number)i / (cmsFloat32Number) (MAX_NODES_IN_CURVE - 1);
+ y = cmsEvalToneCurveFloat(Curve, R);
+
+ Table[i] = (cmsUInt16Number) DOUBLE_TO_1FIXED15(y);
+ }
+}
+
+
+// Compute the matrix-shaper structure
+static
+XMatShaperData* SetMatShaper(cmsContext ContextID, cmsToneCurve* Curve1[3], cmsMAT3* Mat, cmsVEC3* Off, cmsToneCurve* Curve2[3], cmsBool IdentityMat)
+{
+ XMatShaperData* p;
+ int i, j;
+
+ // Allocate a big chuck of memory to store precomputed tables
+ p = malloc_aligned(ContextID);
+ if (p == NULL) return FALSE;
+
+ p->ContextID = ContextID;
+
+ p->IdentityMat = IdentityMat;
+
+ // Precompute tables
+ FillShaper(p->Shaper1R, Curve1[0]);
+ FillShaper(p->Shaper1G, Curve1[1]);
+ FillShaper(p->Shaper1B, Curve1[2]);
+
+ FillShaper(p->Shaper2R, Curve2[0]);
+ FillShaper(p->Shaper2G, Curve2[1]);
+ FillShaper(p->Shaper2B, Curve2[2]);
+
+ // Convert matrix to nFixed14. Note that those values may take more than 16 bits if negative
+ for (i = 0; i < 3; i++) {
+ for (j = 0; j < 3; j++) {
+
+ p->Mat[i][j] = DOUBLE_TO_1FIXED15(Mat->v[i].n[j]);
+ }
+ }
+
+
+ for (i = 0; i < 3; i++) {
+
+ if (Off == NULL) {
+
+ p->Off[i] = 0x4000;
+
+ }
+ else {
+ p->Off[i] = DOUBLE_TO_1FIXED15(Off->n[i]) + 0x4000;
+
+ }
+ }
+
+
+ return p;
+}
+
+// A fast matrix-shaper evaluator for 15 bits. This is a bit ticky since I'm using 1.15 signed fixed point.
+static
+void MatShaperXform(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ XMatShaperData* p = (XMatShaperData*)_cmsGetTransformUserData(CMMcargo);
+
+ cmsS1Fixed15Number l1, l2, l3;
+
+ cmsS1Fixed15Number r, g, b;
+ cmsUInt32Number ri, gi, bi;
+ cmsUInt32Number i, ii;
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nalpha, strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, NULL, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, NULL, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ // Across first shaper, which also converts to 1.15 fixed point.
+ r = p->Shaper1R[*(cmsUInt16Number*)rin];
+ g = p->Shaper1G[*(cmsUInt16Number*)gin];
+ b = p->Shaper1B[*(cmsUInt16Number*)bin];
+
+ if (p->IdentityMat)
+ {
+ l1 = r; l2 = g; l3 = b;
+ }
+ else
+ {
+ // Evaluate the matrix in 1.14 fixed point
+ l1 = (p->Mat[0][0] * r + p->Mat[0][1] * g + p->Mat[0][2] * b + p->Off[0]) >> 15;
+ l2 = (p->Mat[1][0] * r + p->Mat[1][1] * g + p->Mat[1][2] * b + p->Off[1]) >> 15;
+ l3 = (p->Mat[2][0] * r + p->Mat[2][1] * g + p->Mat[2][2] * b + p->Off[2]) >> 15;
+ }
+
+ // Now we have to clip to 0..1.0 range
+ ri = (l1 < 0) ? 0 : ((l1 > 0x8000) ? 0x8000 : l1);
+ gi = (l2 < 0) ? 0 : ((l2 > 0x8000) ? 0x8000 : l2);
+ bi = (l3 < 0) ? 0 : ((l3 > 0x8000) ? 0x8000 : l3);
+
+
+ // And across second shaper,
+ *(cmsUInt16Number*)rout = p->Shaper2R[ri];
+ *(cmsUInt16Number*)gout = p->Shaper2G[gi];
+ *(cmsUInt16Number*)bout = p->Shaper2B[bi];
+
+
+ // Handle alpha
+ if (ain) {
+ memmove(aout, ain, 2);
+ }
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+ if (ain) ain += SourceIncrements[3];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+ if (aout) aout += DestIncrements[3];
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+
+// 15 bits on input allows matrix-shaper boost up a little bit
+cmsBool OptimizeMatrixShaper15(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsStage* Curve1, *Curve2;
+ cmsStage* Matrix1, *Matrix2;
+ _cmsStageMatrixData* Data1;
+ _cmsStageMatrixData* Data2;
+ cmsMAT3 res;
+ cmsBool IdentityMat = FALSE;
+ cmsPipeline* Dest, *Src;
+ cmsContext ContextID;
+ cmsUInt32Number nChans;
+
+ // Only works on RGB to RGB and gray
+
+ if (!(T_CHANNELS(*InputFormat) == 3 && T_CHANNELS(*OutputFormat) == 3)) return FALSE;
+
+ // Only works on 15 bit to 15 bit
+ if (T_BYTES(*InputFormat) != 2 || T_BYTES(*OutputFormat) != 2 ||
+ T_BIT15(*InputFormat) == 0 || T_BIT15(*OutputFormat) == 0) return FALSE;
+
+ // Seems suitable, proceed
+ Src = *Lut;
+
+ // Check for shaper-matrix-matrix-shaper structure, that is what this optimizer stands for
+ if (!cmsPipelineCheckAndRetreiveStages(Src, 4,
+ cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
+ &Curve1, &Matrix1, &Matrix2, &Curve2)) return FALSE;
+
+ ContextID = cmsGetPipelineContextID(Src);
+ nChans = T_CHANNELS(*InputFormat);
+
+ // Get both matrices, which are 3x3
+ Data1 = (_cmsStageMatrixData*)cmsStageData(Matrix1);
+ Data2 = (_cmsStageMatrixData*)cmsStageData(Matrix2);
+
+ // Input offset should be zero
+ if (Data1->Offset != NULL) return FALSE;
+
+ // Multiply both matrices to get the result
+ _cmsMAT3per(&res, (cmsMAT3*)Data2->Double, (cmsMAT3*)Data1->Double);
+
+ // Now the result is in res + Data2 -> Offset. Maybe is a plain identity?
+ IdentityMat = FALSE;
+ if (_cmsMAT3isIdentity(&res) && Data2->Offset == NULL) {
+
+ // We can get rid of full matrix
+ IdentityMat = TRUE;
+ }
+
+
+ // Allocate an empty LUT
+ Dest = cmsPipelineAlloc(ContextID, nChans, nChans);
+ if (!Dest) return FALSE;
+
+ // Assamble the new LUT
+ cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1));
+
+ if (!IdentityMat) {
+
+ cmsPipelineInsertStage(Dest, cmsAT_END,
+ cmsStageAllocMatrix(ContextID, 3, 3, (const cmsFloat64Number*)&res, Data2->Offset));
+ }
+
+ cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2));
+
+ {
+ _cmsStageToneCurvesData* mpeC1 = (_cmsStageToneCurvesData*)cmsStageData(Curve1);
+ _cmsStageToneCurvesData* mpeC2 = (_cmsStageToneCurvesData*)cmsStageData(Curve2);
+
+ // In this particular optimization, caché does not help as it takes more time to deal with
+ // the caché that with the pixel handling
+ *dwFlags |= cmsFLAGS_NOCACHE;
+
+ // Setup the optimizarion routines
+ *UserData = SetMatShaper(ContextID, mpeC1->TheCurves, &res, (cmsVEC3*)Data2->Offset, mpeC2->TheCurves, IdentityMat);
+ *FreeUserData = FreeMatShaper;
+
+ *TransformFn = MatShaperXform;
+ }
+
+
+ cmsPipelineFree(Src);
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ *Lut = Dest;
+ return TRUE;
+}
+
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+// Optimization for floating point tetrahedral interpolation
+typedef struct {
+
+ cmsContext ContextID;
+ const cmsInterpParams* p; // Tetrahedrical interpolation parameters. This is a not-owned pointer.
+
+} FloatCMYKData;
+
+
+
+// Precomputes tables on input devicelink.
+static
+FloatCMYKData* FloatCMYKAlloc(cmsContext ContextID, const cmsInterpParams* p)
+{
+ FloatCMYKData* fd;
+
+ fd = (FloatCMYKData*) _cmsMallocZero(ContextID, sizeof(FloatCMYKData));
+ if (fd == NULL) return NULL;
+
+ fd ->ContextID = ContextID;
+ fd ->p = p;
+ return fd;
+}
+
+
+static
+int XFormSampler(CMSREGISTER const cmsFloat32Number In[], CMSREGISTER cmsFloat32Number Out[], CMSREGISTER void* Cargo)
+{
+ // Evaluate in 16 bits
+ cmsPipelineEvalFloat(In, Out, (cmsPipeline*) Cargo);
+
+ // Always succeed
+ return TRUE;
+}
+
+cmsINLINE cmsFloat32Number LinearInterpInt(cmsFloat32Number a, cmsFloat32Number l, cmsFloat32Number h)
+{
+ return (h - l) * a + l;
+}
+
+// To prevent out of bounds indexing
+cmsINLINE cmsFloat32Number fclamp100(cmsFloat32Number v)
+{
+ return v < 0.0f ? 0.0f : (v > 100.0f ? 100.0f : v);
+}
+
+
+// A optimized interpolation for 8-bit input.
+#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+
+static
+void FloatCMYKCLUTEval(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+
+ cmsFloat32Number c, m, y, k;
+ cmsFloat32Number px, py, pz, pk;
+ int x0, y0, z0, k0;
+ int X0, Y0, Z0, K0, X1, Y1, Z1, K1;
+ cmsFloat32Number rx, ry, rz, rk;
+ cmsFloat32Number c0, c1 = 0, c2 = 0, c3 = 0;
+
+ cmsUInt32Number OutChan;
+ FloatCMYKData* pcmyk = (FloatCMYKData*) _cmsGetTransformUserData(CMMcargo);
+
+ const cmsInterpParams* p = pcmyk ->p;
+ cmsUInt32Number TotalOut = p -> nOutputs;
+ cmsUInt32Number TotalPlusAlpha;
+ const cmsFloat32Number* LutTable = (const cmsFloat32Number*)p->Table;
+ cmsUInt32Number i, ii;
+ const cmsUInt8Number* cin;
+ const cmsUInt8Number* min;
+ const cmsUInt8Number* yin;
+ const cmsUInt8Number* kin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsFloat32Number Tmp1[cmsMAXCHANNELS], Tmp2[cmsMAXCHANNELS];
+
+ cmsUInt8Number* out[cmsMAXCHANNELS];
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ cmsUInt32Number InputFormat = cmsGetTransformInputFormat((cmsHTRANSFORM) CMMcargo);
+ cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM) CMMcargo);
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ cin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ min = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ yin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ kin = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[4] + strideIn;
+
+ TotalPlusAlpha = TotalOut;
+ if (ain) TotalPlusAlpha++;
+
+ for (ii = 0; ii < TotalPlusAlpha; ii++)
+ out[ii] = (cmsUInt8Number*)Output + DestStartingOrder[ii] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ c = fclamp100(*(cmsFloat32Number*)cin) / 100.0f;
+ m = fclamp100(*(cmsFloat32Number*)min) / 100.0f;
+ y = fclamp100(*(cmsFloat32Number*)yin) / 100.0f;
+ k = fclamp100(*(cmsFloat32Number*)kin) / 100.0f;
+
+ cin += SourceIncrements[0];
+ min += SourceIncrements[1];
+ yin += SourceIncrements[2];
+ kin += SourceIncrements[3];
+
+ pk = c * p->Domain[0]; // C
+ px = m * p->Domain[1]; // M
+ py = y * p->Domain[2]; // Y
+ pz = k * p->Domain[3]; // K
+
+
+ k0 = (int)_cmsQuickFloor(pk); rk = (pk - (cmsFloat32Number)k0);
+ x0 = (int)_cmsQuickFloor(px); rx = (px - (cmsFloat32Number)x0);
+ y0 = (int)_cmsQuickFloor(py); ry = (py - (cmsFloat32Number)y0);
+ z0 = (int)_cmsQuickFloor(pz); rz = (pz - (cmsFloat32Number)z0);
+
+
+ K0 = p->opta[3] * k0;
+ K1 = K0 + (c >= 1.0 ? 0 : p->opta[3]);
+
+ X0 = p->opta[2] * x0;
+ X1 = X0 + (m >= 1.0 ? 0 : p->opta[2]);
+
+ Y0 = p->opta[1] * y0;
+ Y1 = Y0 + (y >= 1.0 ? 0 : p->opta[1]);
+
+ Z0 = p->opta[0] * z0;
+ Z1 = Z0 + (k >= 1.0 ? 0 : p->opta[0]);
+
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (rx >= rz && rz >= ry) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+
+ }
+ else
+ if (rz >= rx && rx >= ry) {
+
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else
+ if (ry >= rx && rx >= rz) {
+
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (ry >= rz && rz >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+
+ }
+ else
+ if (rz >= ry && ry >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+
+ Tmp1[OutChan] = c0 + c1 * rx + c2 * ry + c3 * rz;
+
+ }
+
+
+ LutTable = (cmsFloat32Number*)p->Table;
+ LutTable += K1;
+
+ for (OutChan = 0; OutChan < p->nOutputs; OutChan++) {
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (rx >= rz && rz >= ry) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+
+ }
+ else
+ if (rz >= rx && rx >= ry) {
+
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else
+ if (ry >= rx && rx >= rz) {
+
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (ry >= rz && rz >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+
+ }
+ else
+ if (rz >= ry && ry >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+ Tmp2[OutChan] = c0 + c1 * rx + c2 * ry + c3 * rz;
+ }
+
+
+ for (OutChan = 0; OutChan < p->nOutputs; OutChan++) {
+
+ *(cmsFloat32Number*)(out[OutChan]) = LinearInterpInt(rk, Tmp1[OutChan], Tmp2[OutChan]);
+ out[OutChan] += DestIncrements[OutChan];
+ }
+
+ if (ain)
+ *out[TotalOut] = *ain;
+
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+#undef DENS
+
+
+
+// --------------------------------------------------------------------------------------------------------------
+
+cmsBool OptimizeCLUTCMYKTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsPipeline* OriginalLut;
+ int nGridPoints;
+ cmsPipeline* OptimizedLUT = NULL;
+ cmsStage* OptimizedCLUTmpe;
+ cmsStage* mpe;
+ FloatCMYKData* pcmyk;
+ cmsContext ContextID;
+ _cmsStageCLutData* data;
+
+ // For empty transforms, do nothing
+ if (*Lut == NULL) return FALSE;
+
+ // This is a loosy optimization! does not apply in floating-point cases
+ if (!T_FLOAT(*InputFormat) || !T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only on 8-bit
+ if (T_BYTES(*InputFormat) != 4 || T_BYTES(*OutputFormat) != 4) return FALSE;
+
+ // Only on CMYK
+ if (T_COLORSPACE(*InputFormat) != PT_CMYK) return FALSE;
+
+ OriginalLut = *Lut;
+
+ // Named color pipelines cannot be optimized either
+ for (mpe = cmsPipelineGetPtrToFirstStage(OriginalLut);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+ if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE;
+ }
+
+ ContextID = cmsGetPipelineContextID(OriginalLut);
+ nGridPoints = _cmsReasonableGridpointsByColorspace(cmsSigRgbData, *dwFlags);
+
+ // Create the result LUT
+ OptimizedLUT = cmsPipelineAlloc(cmsGetPipelineContextID(OriginalLut), 4, cmsPipelineOutputChannels(OriginalLut));
+ if (OptimizedLUT == NULL) goto Error;
+
+
+ // Allocate the CLUT for result
+ OptimizedCLUTmpe = cmsStageAllocCLutFloat(ContextID, nGridPoints, 4, cmsPipelineOutputChannels(OriginalLut), NULL);
+
+ // Add the CLUT to the destination LUT
+ cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedCLUTmpe);
+
+ // Resample the LUT
+ if (!cmsStageSampleCLutFloat(OptimizedCLUTmpe, XFormSampler, (void*)OriginalLut, 0)) goto Error;
+
+ // Set the evaluator, copy parameters
+ data = (_cmsStageCLutData*) cmsStageData(OptimizedCLUTmpe);
+
+ pcmyk = FloatCMYKAlloc(ContextID, data ->Params);
+ if (pcmyk == NULL) return FALSE;
+
+ // And return the obtained LUT
+ cmsPipelineFree(OriginalLut);
+
+ *Lut = OptimizedLUT;
+ *TransformFn = FloatCMYKCLUTEval;
+ *UserData = pcmyk;
+ *FreeDataFn = _cmsFree;
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ return TRUE;
+
+Error:
+
+ if (OptimizedLUT != NULL) cmsPipelineFree(OptimizedLUT);
+
+ return FALSE;
+}
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+// Curves, optimization is valid for floating point curves
+typedef struct {
+
+ cmsFloat32Number CurveR[MAX_NODES_IN_CURVE];
+ cmsFloat32Number CurveG[MAX_NODES_IN_CURVE];
+ cmsFloat32Number CurveB[MAX_NODES_IN_CURVE];
+
+ void* real_ptr;
+
+} CurvesFloatData;
+
+
+
+// A special malloc that returns memory aligned to DWORD boundary. Aligned memory access is way faster than unaligned
+// reference to the real block is kept for later free
+static CurvesFloatData* malloc_aligned(cmsContext ContextID)
+{
+ cmsUInt8Number* real_ptr = (cmsUInt8Number*)_cmsMallocZero(ContextID, sizeof(CurvesFloatData) + 32);
+ cmsUInt8Number* aligned = (cmsUInt8Number*)(((uintptr_t)real_ptr + 16) & ~0xf);
+ CurvesFloatData* p = (CurvesFloatData*)aligned;
+
+ p->real_ptr = real_ptr;
+
+ return p;
+}
+
+// Free the private data container
+static void free_aligned(cmsContext ContextID, void* Data)
+{
+ CurvesFloatData* p = (CurvesFloatData*)Data;
+ if (p != NULL)
+ _cmsFree(ContextID, p->real_ptr);
+}
+
+// Evaluator for float curves. This are just 1D tables
+
+static void FastEvaluateFloatRGBCurves(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number InputFormat = cmsGetTransformInputFormat((cmsHTRANSFORM) CMMcargo);
+ cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM) CMMcargo);
+
+ CurvesFloatData* Data = (CurvesFloatData*) _cmsGetTransformUserData(CMMcargo);
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ *(cmsFloat32Number*)rout = flerp(Data->CurveR, *(cmsFloat32Number*)rin);
+ *(cmsFloat32Number*)gout = flerp(Data->CurveG, *(cmsFloat32Number*)gin);
+ *(cmsFloat32Number*)bout = flerp(Data->CurveB, *(cmsFloat32Number*)bin);
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+
+ if (ain)
+ {
+ *(cmsFloat32Number*)aout = *(cmsFloat32Number*)ain;
+ ain += SourceIncrements[3];
+ aout += DestIncrements[3];
+ }
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+// Do nothing but arrange the RGB format.
+static void FastFloatRGBIdentity(struct _cmstransform_struct *CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number InputFormat = cmsGetTransformInputFormat((cmsHTRANSFORM) CMMcargo);
+ cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM) CMMcargo);
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+
+ for (ii=0; ii < PixelsPerLine; ii++) {
+
+ *(cmsFloat32Number*)rout = *(cmsFloat32Number*)rin;
+ *(cmsFloat32Number*)gout = *(cmsFloat32Number*)gin;
+ *(cmsFloat32Number*)bout = *(cmsFloat32Number*)bin;
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+
+
+ if (ain)
+ {
+ *(cmsFloat32Number*)aout = *(cmsFloat32Number*)ain;
+ ain += SourceIncrements[3];
+ aout += DestIncrements[3];
+ }
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+// Evaluate 1 channel only
+static void FastEvaluateFloatGrayCurves(struct _cmstransform_struct* CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+ const cmsUInt8Number* kin;
+ const cmsUInt8Number* ain = NULL;
+ cmsUInt8Number* kout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number InputFormat = cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo);
+ cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo);
+
+ CurvesFloatData* Data = (CurvesFloatData*)_cmsGetTransformUserData(CMMcargo);
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ kin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ kout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+
+ if (nalpha)
+ {
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[1];
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[1];
+ }
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ *(cmsFloat32Number*)kout = flerp(Data->CurveR, *(cmsFloat32Number*)kin);
+
+ kin += SourceIncrements[0];
+ kout += DestIncrements[0];
+
+ if (ain)
+ {
+ *(cmsFloat32Number*)aout = *(cmsFloat32Number*)ain;
+ ain += SourceIncrements[1];
+ aout += DestIncrements[1];
+ }
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+static void FastFloatGrayIdentity(struct _cmstransform_struct* CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, ii;
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* kin;
+ const cmsUInt8Number* ain = NULL;
+ cmsUInt8Number* kout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number InputFormat = cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo);
+ cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo);
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+
+ kin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ kout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+
+ if (nalpha)
+ {
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[1];
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[1];
+ }
+
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ *(cmsFloat32Number*)kout = *(cmsFloat32Number*)kin;
+
+ kin += SourceIncrements[0];
+ kout += DestIncrements[0];
+
+ if (ain)
+ {
+ *(cmsFloat32Number*)aout = *(cmsFloat32Number*)ain;
+ ain += SourceIncrements[1];
+ aout += DestIncrements[1];
+ }
+ }
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+#define LINEAR_CURVES_EPSILON 0.00001
+
+// Try to see if the curves are linear
+static
+cmsBool AllRGBCurvesAreLinear(CurvesFloatData* data)
+{
+ int j;
+ cmsFloat32Number expected;
+
+ for (j = 0; j < MAX_NODES_IN_CURVE; j++) {
+
+ expected = (cmsFloat32Number)j / (cmsFloat32Number)(MAX_NODES_IN_CURVE - 1);
+
+ if (fabsf(data->CurveR[j] - expected) > LINEAR_CURVES_EPSILON ||
+ fabsf(data->CurveG[j] - expected) > LINEAR_CURVES_EPSILON ||
+ fabsf(data->CurveB[j] - expected) > LINEAR_CURVES_EPSILON) {
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+}
+
+static
+cmsBool KCurveIsLinear(CurvesFloatData* data)
+{
+ int j;
+ cmsFloat32Number expected;
+
+ for (j = 0; j < MAX_NODES_IN_CURVE; j++) {
+ expected = (cmsFloat32Number)j / (cmsFloat32Number)(MAX_NODES_IN_CURVE - 1);
+
+ if (fabs(data->CurveR[j] - expected) > LINEAR_CURVES_EPSILON) return FALSE;
+ }
+
+
+ return TRUE;
+}
+
+
+// Create linearization tables with a reasonable number of entries. Precission is about 32 bits.
+static
+CurvesFloatData* ComputeCompositeCurves(cmsUInt32Number nChan, cmsPipeline* Src)
+{
+ cmsUInt32Number i, j;
+ cmsFloat32Number InFloat[3], OutFloat[3];
+
+ CurvesFloatData* Data = malloc_aligned(cmsGetPipelineContextID(Src));
+ if (Data == NULL) return NULL;
+
+ // Create target curves
+ for (i = 0; i < MAX_NODES_IN_CURVE; i++) {
+
+ for (j=0; j <nChan; j++)
+ InFloat[j] = (cmsFloat32Number)i / (cmsFloat32Number)(MAX_NODES_IN_CURVE-1);
+
+ cmsPipelineEvalFloat(InFloat, OutFloat, Src);
+
+ if (nChan == 1) {
+
+ Data->CurveR[i] = OutFloat[0];
+ }
+ else {
+ Data->CurveR[i] = OutFloat[0];
+ Data->CurveG[i] = OutFloat[1];
+ Data->CurveB[i] = OutFloat[2];
+ }
+
+ }
+
+ return Data;
+}
+
+
+// If the target LUT holds only curves, the optimization procedure is to join all those
+// curves together. That only works on curves and does not work on matrices.
+cmsBool OptimizeFloatByJoiningCurves(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+
+ cmsPipeline* Src = *Lut;
+ cmsStage* mpe;
+ CurvesFloatData* Data;
+ cmsUInt32Number nChans;
+
+ // Apply only to floating-point cases
+ if (!T_FLOAT(*InputFormat) || !T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only on 8-bit
+ if (T_BYTES(*InputFormat) != 4 || T_BYTES(*OutputFormat) != 4) return FALSE;
+
+ // Curves need same channels on input and output (despite extra channels may differ)
+ nChans = T_CHANNELS(*InputFormat);
+ if (nChans != T_CHANNELS(*OutputFormat)) return FALSE;
+
+ // gray and RGB
+ if (nChans != 1 && nChans != 3) return FALSE;
+
+ // Only curves in this LUT?
+ for (mpe = cmsPipelineGetPtrToFirstStage(Src);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+
+ if (cmsStageType(mpe) != cmsSigCurveSetElemType) return FALSE;
+ }
+
+ Data = ComputeCompositeCurves(nChans, Src);
+
+ *dwFlags |= cmsFLAGS_NOCACHE;
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ *UserData = Data;
+ *FreeUserData = free_aligned;
+
+ // Maybe the curves are linear at the end
+ if (nChans == 1)
+ *TransformFn = (KCurveIsLinear(Data) ? FastFloatGrayIdentity : FastEvaluateFloatGrayCurves);
+ else
+ *TransformFn = (AllRGBCurvesAreLinear(Data) ? FastFloatRGBIdentity : FastEvaluateFloatRGBCurves);
+
+ return TRUE;
+
+}
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#ifndef _FAST_INTERNAL_H
+#define _FAST_INTERNAL_H
+
+#include "lcms2_fast_float.h"
+#include <stdint.h>
+
+#define REQUIRED_LCMS_VERSION 2120
+
+// Unused parameter warning supression
+#define UNUSED_PARAMETER(x) ((void)x)
+
+// For testbed
+#define CMSCHECKPOINT CMSAPI
+
+// The specification for "inline" is section 6.7.4 of the C99 standard (ISO/IEC 9899:1999).
+// unfortunately VisualC++ does not conform that
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+# define cmsINLINE __inline
+#else
+# define cmsINLINE static inline
+#endif
+
+// A fast way to convert from/to 16 <-> 8 bits
+#define FROM_8_TO_16(rgb) (cmsUInt16Number) ((((cmsUInt16Number) (rgb)) << 8)|(rgb))
+#define FROM_16_TO_8(rgb) (cmsUInt8Number) ((((rgb) * 65281 + 8388608) >> 24) & 0xFF)
+
+
+// This macro return words stored as big endian
+#define CHANGE_ENDIAN(w) (cmsUInt16Number) ((cmsUInt16Number) ((w)<<8)|((w)>>8))
+
+// This macro changes the polarity of a word
+#define REVERSE_FLAVOR_16(x) ((cmsUInt16Number)(0xffff-(x)))
+
+// Fixed point
+#define FIXED_TO_INT(x) ((x)>>16)
+#define FIXED_REST_TO_INT(x) ((x)&0xFFFFU)
+
+#define cmsFLAGS_CAN_CHANGE_FORMATTER 0x02000000 // Allow change buffer format
+
+// Utility macros to convert from to 0...1.0 in 15.16 fixed domain to 0..0xffff as integer
+cmsINLINE cmsS15Fixed16Number _cmsToFixedDomain(int a) { return a + ((a + 0x7fff) / 0xffff); }
+cmsINLINE int _cmsFromFixedDomain(cmsS15Fixed16Number a) { return a - ((a + 0x7fff) >> 16); }
+
+// This is the upper part of internal transform structure. Only format specifiers are used
+typedef struct {
+
+ cmsUInt32Number InputFormat, OutputFormat; // Keep formats for further reference
+
+} _xform_head;
+
+
+#define MAX_NODES_IN_CURVE 0x8001
+
+
+// To prevent out of bounds indexing
+cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v)
+{
+ return v < 0.0f ? 0.0f : (v > 1.0f ? 1.0f : v);
+}
+
+// Fast floor conversion logic.
+cmsINLINE int _cmsQuickFloor(cmsFloat64Number val)
+{
+#ifdef CMS_DONT_USE_FAST_FLOOR
+ return (int)floor(val);
+#else
+#define _lcms_double2fixmagic (68719476736.0 * 1.5)
+
+ union {
+ cmsFloat64Number val;
+ int halves[2];
+ } temp;
+
+ temp.val = val + _lcms_double2fixmagic;
+
+#ifdef CMS_USE_BIG_ENDIAN
+ return temp.halves[1] >> 16;
+#else
+ return temp.halves[0] >> 16;
+#endif
+#endif
+}
+
+// Floor to word, taking care of saturation. This is not critical in terms of performance
+cmsINLINE cmsUInt16Number _cmsSaturateWord(cmsFloat64Number d)
+{
+ d += 0.5;
+
+ if (d <= 0) return 0;
+ if (d >= 65535.0) return 0xffff;
+
+ return (cmsUInt16Number)floor(d);
+}
+
+
+cmsINLINE cmsFloat32Number flerp(const cmsFloat32Number LutTable[], cmsFloat32Number v)
+{
+ cmsFloat32Number y1, y0;
+ cmsFloat32Number rest;
+ int cell0, cell1;
+
+ if (v <= 0.0) {
+ return LutTable[0];
+ }
+ else
+ if (v >= 1.0) {
+ return LutTable[MAX_NODES_IN_CURVE - 1];
+ }
+
+ v *= (MAX_NODES_IN_CURVE - 1);
+
+ cell0 = _cmsQuickFloor(v);
+ cell1 = (int)ceilf(v);
+
+ // Rest is 16 LSB bits
+ rest = v - cell0;
+
+ y0 = LutTable[cell0];
+ y1 = LutTable[cell1];
+
+ return y0 + (y1 - y0) * rest;
+}
+
+
+
+// Some secret sauce from lcms
+CMSAPI cmsUInt32Number CMSEXPORT _cmsReasonableGridpointsByColorspace(cmsColorSpaceSignature Colorspace, cmsUInt32Number dwFlags);
+
+
+
+// Compute the increments to be used by the transform functions
+CMSCHECKPOINT void CMSEXPORT _cmsComputeComponentIncrements(cmsUInt32Number Format,
+ cmsUInt32Number BytesPerPlane,
+ cmsUInt32Number* nChannels,
+ cmsUInt32Number* nAlpha,
+ cmsUInt32Number ComponentStartingOrder[],
+ cmsUInt32Number ComponentPointerIncrements[]);
+
+// 15 bits formatters
+CMSCHECKPOINT cmsFormatter CMSEXPORT Formatter_15Bit_Factory(cmsUInt32Number Type,
+ cmsFormatterDirection Dir,
+ cmsUInt32Number dwFlags);
+
+// Optimizers
+
+// 8 bits on input allows matrix-shaper boost up a little bit
+cmsBool Optimize8MatrixShaper(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+// 8 bits using SSE
+cmsBool Optimize8MatrixShaperSSE(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+cmsBool OptimizeMatrixShaper15(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+
+cmsBool Optimize8ByJoiningCurves(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+cmsBool OptimizeFloatByJoiningCurves(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+cmsBool OptimizeFloatMatrixShaper(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+cmsBool Optimize8BitRGBTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+cmsBool Optimize16BitRGBTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+cmsBool OptimizeCLUTRGBTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+cmsBool OptimizeCLUTCMYKTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+
+cmsBool OptimizeCLUTLabTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags);
+
+
+#endif
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+
+#define SIGMOID_POINTS 1024
+
+// Optimization for floating point tetrahedral interpolation using Lab as indexing space
+typedef struct {
+
+ cmsContext ContextID;
+ const cmsInterpParams* p; // Tetrahedrical interpolation parameters. This is a not-owned pointer.
+
+ cmsFloat32Number sigmoidIn[SIGMOID_POINTS]; // to apply to a*/b* axis on indexing
+ cmsFloat32Number sigmoidOut[SIGMOID_POINTS]; // the curve above, inverted.
+
+} LabCLUTdata;
+
+
+typedef struct {
+
+ LabCLUTdata* data;
+ cmsPipeline* original;
+
+} ResamplingContainer;
+
+/**
+* Predefined tone curve
+*/
+#define TYPE_SIGMOID 109
+
+
+// Floating-point version of 1D interpolation
+cmsINLINE cmsFloat32Number LinLerp1D(cmsFloat32Number Value, const cmsFloat32Number* LutTable)
+{
+ if (Value >= 1.0f)
+ {
+ return LutTable[SIGMOID_POINTS - 1];
+ }
+ else
+ if (Value <= 0)
+ {
+ return LutTable[0];
+ }
+ else
+ {
+ cmsFloat32Number y1, y0;
+ cmsFloat32Number rest;
+ int cell0, cell1;
+
+ Value *= (SIGMOID_POINTS - 1);
+
+ cell0 = _cmsQuickFloor(Value);
+ cell1 = cell0 + 1;
+
+ rest = Value - cell0;
+
+ y0 = LutTable[cell0];
+ y1 = LutTable[cell1];
+
+ return y0 + (y1 - y0) * rest;
+ }
+}
+
+static
+void tabulateSigmoid(cmsContext ContextID, cmsInt32Number type, cmsFloat32Number table[], cmsInt32Number tablePoints)
+{
+ const cmsFloat64Number sigmoidal_slope = 2.5;
+ cmsToneCurve* original;
+ cmsInt32Number i;
+
+ memset(table, 0, sizeof(cmsFloat32Number) * tablePoints);
+ original = cmsBuildParametricToneCurve(ContextID, type, &sigmoidal_slope);
+ if (original != NULL)
+ {
+ for (i = 0; i < tablePoints; i++)
+ {
+ cmsFloat32Number v = (cmsFloat32Number)i / (cmsFloat32Number)(tablePoints - 1);
+
+ table[i] = fclamp(cmsEvalToneCurveFloat(original, v));
+ }
+
+ cmsFreeToneCurve(original);
+ }
+}
+
+
+// Allocates container and curves
+static
+LabCLUTdata* LabCLUTAlloc(cmsContext ContextID, const cmsInterpParams* p)
+{
+ LabCLUTdata* fd;
+
+ fd = (LabCLUTdata*) _cmsMallocZero(ContextID, sizeof(LabCLUTdata));
+ if (fd == NULL) return NULL;
+
+ fd ->ContextID = ContextID;
+ fd ->p = p;
+
+ tabulateSigmoid(ContextID, +TYPE_SIGMOID, fd->sigmoidIn, SIGMOID_POINTS);
+ tabulateSigmoid(ContextID, -TYPE_SIGMOID, fd->sigmoidOut, SIGMOID_POINTS);
+
+ return fd;
+}
+
+static
+void LabCLUTFree(cmsContext ContextID, void* v)
+{
+ _cmsFree(ContextID, v);
+}
+
+// Sampler implemented by another LUT.
+static
+int XFormSampler(CMSREGISTER const cmsFloat32Number In[], CMSREGISTER cmsFloat32Number Out[], CMSREGISTER void* Cargo)
+{
+ ResamplingContainer* container = (ResamplingContainer*)Cargo;
+ cmsFloat32Number linearized[3];
+
+ // Apply inverse sigmoid
+ linearized[0] = In[0];
+ linearized[1] = LinLerp1D(In[1], container->data->sigmoidOut);
+ linearized[2] = LinLerp1D(In[2], container->data->sigmoidOut);
+
+ cmsPipelineEvalFloat(linearized, Out, container->original);
+ return TRUE;
+}
+
+// A optimized interpolation for Lab.
+#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+
+static
+void LabCLUTEval(struct _cmstransform_struct* CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+
+{
+
+ LabCLUTdata* pfloat = (LabCLUTdata*)_cmsGetTransformUserData(CMMcargo);
+
+ cmsFloat32Number l, a, b;
+ cmsFloat32Number px, py, pz;
+ int x0, y0, z0;
+ int X0, Y0, Z0, X1, Y1, Z1;
+ cmsFloat32Number rx, ry, rz;
+ cmsFloat32Number c0, c1 = 0, c2 = 0, c3 = 0;
+ cmsUInt32Number OutChan;
+
+ const cmsInterpParams* p = pfloat->p;
+ cmsUInt32Number TotalOut = p->nOutputs;
+ cmsUInt32Number TotalPlusAlpha;
+ const cmsFloat32Number* LutTable = (const cmsFloat32Number*)p->Table;
+
+ cmsUInt32Number i, ii;
+ const cmsUInt8Number* lin;
+ const cmsUInt8Number* ain;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* xin = NULL;
+
+ cmsUInt8Number* out[cmsMAXCHANNELS];
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ cmsUInt32Number InputFormat = cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo);
+ cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo);
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ lin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+
+ if (nalpha)
+ xin = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ TotalPlusAlpha = TotalOut;
+ if (xin) TotalPlusAlpha++;
+
+ for (ii = 0; ii < TotalPlusAlpha; ii++)
+ out[ii] = (cmsUInt8Number*)Output + DestStartingOrder[ii] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ // Decode Lab and go across sigmoids on a*/b*
+ l = fclamp((*(cmsFloat32Number*)lin) / 100.0f);
+ a = LinLerp1D(((*(cmsFloat32Number*)ain) + 128.0f) / 255.0f, pfloat->sigmoidIn);
+ b = LinLerp1D(((*(cmsFloat32Number*)bin) + 128.0f) / 255.0f, pfloat->sigmoidIn);
+
+ lin += SourceIncrements[0];
+ ain += SourceIncrements[1];
+ bin += SourceIncrements[2];
+
+ px = l * p->Domain[0];
+ py = a * p->Domain[1];
+ pz = b * p->Domain[2];
+
+ x0 = _cmsQuickFloor(px); rx = (px - (cmsFloat32Number)x0);
+ y0 = _cmsQuickFloor(py); ry = (py - (cmsFloat32Number)y0);
+ z0 = _cmsQuickFloor(pz); rz = (pz - (cmsFloat32Number)z0);
+
+ X0 = p->opta[2] * x0;
+ X1 = X0 + (l >= 1.0f ? 0 : p->opta[2]);
+
+ Y0 = p->opta[1] * y0;
+ Y1 = Y0 + (a >= 1.0f ? 0 : p->opta[1]);
+
+ Z0 = p->opta[0] * z0;
+ Z1 = Z0 + (b >= 1.0f ? 0 : p->opta[0]);
+
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ // These are the 6 Tetrahedral
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (rx >= rz && rz >= ry) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+
+ }
+ else
+ if (rz >= rx && rx >= ry) {
+
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else
+ if (ry >= rx && rx >= rz) {
+
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (ry >= rz && rz >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+
+ }
+ else
+ if (rz >= ry && ry >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+ *(cmsFloat32Number*)(out[OutChan]) = c0 + c1 * rx + c2 * ry + c3 * rz;
+
+ out[OutChan] += DestIncrements[OutChan];
+ }
+
+ if (xin)
+ *out[TotalOut] = *xin;
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+#undef DENS
+
+
+/**
+* Get from flags
+*/
+static
+int GetGridpoints(cmsUInt32Number dwFlags)
+{
+ // Already specified?
+ if (dwFlags & 0x00FF0000) {
+ return (dwFlags >> 16) & 0xFF;
+ }
+
+ // HighResPrecalc is maximum resolution
+ if (dwFlags & cmsFLAGS_HIGHRESPRECALC) {
+ return 66;
+ }
+ else
+ // LowResPrecal is lower resolution
+ if (dwFlags & cmsFLAGS_LOWRESPRECALC) {
+ return 33;
+ }
+ else
+ return 51;
+
+}
+
+// --------------------------------------------------------------------------------------------------------------
+
+cmsBool OptimizeCLUTLabTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsPipeline* OriginalLut;
+ int nGridPoints;
+ cmsPipeline* OptimizedLUT = NULL;
+ cmsStage* OptimizedCLUTmpe;
+ cmsStage* mpe;
+ LabCLUTdata* pfloat;
+ cmsContext ContextID;
+ _cmsStageCLutData* data;
+ ResamplingContainer container;
+
+
+ // For empty transforms, do nothing
+ if (*Lut == NULL) return FALSE;
+
+ // Check for floating point only
+ if (!T_FLOAT(*InputFormat) || !T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only on floats
+ if (T_BYTES(*InputFormat) != sizeof(cmsFloat32Number) ||
+ T_BYTES(*OutputFormat) != sizeof(cmsFloat32Number)) return FALSE;
+
+ if (T_COLORSPACE(*InputFormat) != PT_Lab) return FALSE;
+
+ OriginalLut = *Lut;
+
+ // Named color pipelines cannot be optimized either
+ for (mpe = cmsPipelineGetPtrToFirstStage(OriginalLut);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+ if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE;
+ }
+
+ ContextID = cmsGetPipelineContextID(OriginalLut);
+ nGridPoints = GetGridpoints(*dwFlags);
+
+ // Create the result LUT
+ OptimizedLUT = cmsPipelineAlloc(cmsGetPipelineContextID(OriginalLut), 3, cmsPipelineOutputChannels(OriginalLut));
+ if (OptimizedLUT == NULL) goto Error;
+
+ // Allocate the CLUT for result
+ OptimizedCLUTmpe = cmsStageAllocCLutFloat(ContextID, nGridPoints, 3, cmsPipelineOutputChannels(OriginalLut), NULL);
+
+ // Add the CLUT to the destination LUT
+ cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedCLUTmpe);
+
+ // Set the evaluator, copy parameters
+ data = (_cmsStageCLutData*) cmsStageData(OptimizedCLUTmpe);
+
+ // Allocate data
+ pfloat = LabCLUTAlloc(ContextID, data ->Params);
+ if (pfloat == NULL) return FALSE;
+
+ container.data = pfloat;
+ container.original = OriginalLut;
+
+ // Resample the LUT
+ if (!cmsStageSampleCLutFloat(OptimizedCLUTmpe, XFormSampler, (void*)&container, 0)) goto Error;
+
+ // And return the obtained LUT
+ cmsPipelineFree(OriginalLut);
+
+ *Lut = OptimizedLUT;
+ *TransformFn = LabCLUTEval;
+ *UserData = pfloat;
+ *FreeDataFn = LabCLUTFree;
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ return TRUE;
+
+Error:
+
+ if (OptimizedLUT != NULL) cmsPipelineFree(OptimizedLUT);
+
+ return FALSE;
+}
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+// Optimization for matrix-shaper in float
+
+#include "fast_float_internal.h"
+
+
+// This is the private data container used by this optimization
+typedef struct {
+
+
+ cmsFloat32Number Mat[3][3];
+ cmsFloat32Number Off[3];
+
+ cmsFloat32Number Shaper1R[MAX_NODES_IN_CURVE];
+ cmsFloat32Number Shaper1G[MAX_NODES_IN_CURVE];
+ cmsFloat32Number Shaper1B[MAX_NODES_IN_CURVE];
+
+ cmsFloat32Number Shaper2R[MAX_NODES_IN_CURVE];
+ cmsFloat32Number Shaper2G[MAX_NODES_IN_CURVE];
+ cmsFloat32Number Shaper2B[MAX_NODES_IN_CURVE];
+
+ cmsBool UseOff;
+
+ void * real_ptr;
+
+} VXMatShaperFloatData;
+
+
+static
+VXMatShaperFloatData* malloc_aligned(cmsContext ContextID)
+{
+ cmsUInt8Number* real_ptr = (cmsUInt8Number*) _cmsMallocZero(ContextID, sizeof(VXMatShaperFloatData) + 32);
+ cmsUInt8Number* aligned = (cmsUInt8Number*) (((uintptr_t)real_ptr + 16) & ~0xf);
+ VXMatShaperFloatData* p = (VXMatShaperFloatData*) aligned;
+
+ p ->real_ptr = real_ptr;
+ return p;
+}
+
+
+
+// Free the private data container
+static
+void FreeMatShaper(cmsContext ContextID, void* Data)
+{
+ VXMatShaperFloatData* d = (VXMatShaperFloatData*)Data;
+
+ if (d != NULL)
+ _cmsFree(ContextID, d->real_ptr);
+}
+
+
+static
+void FillShaper(cmsFloat32Number* Table, cmsToneCurve* Curve)
+{
+ int i;
+ cmsFloat32Number R;
+
+ for (i = 0; i < MAX_NODES_IN_CURVE; i++) {
+
+ R = (cmsFloat32Number) i / (cmsFloat32Number) (MAX_NODES_IN_CURVE - 1);
+
+ Table[i] = cmsEvalToneCurveFloat(Curve, R);
+ }
+}
+
+
+// Compute the matrix-shaper structure
+static
+VXMatShaperFloatData* SetMatShaper(cmsContext ContextID, cmsToneCurve* Curve1[3], cmsMAT3* Mat, cmsVEC3* Off, cmsToneCurve* Curve2[3])
+{
+ VXMatShaperFloatData* p;
+ int i, j;
+
+ // Allocate a big chuck of memory to store precomputed tables
+ p = malloc_aligned(ContextID);
+ if (p == NULL) return FALSE;
+
+
+ // Precompute tables
+ FillShaper(p->Shaper1R, Curve1[0]);
+ FillShaper(p->Shaper1G, Curve1[1]);
+ FillShaper(p->Shaper1B, Curve1[2]);
+
+ FillShaper(p->Shaper2R, Curve2[0]);
+ FillShaper(p->Shaper2G, Curve2[1]);
+ FillShaper(p->Shaper2B, Curve2[2]);
+
+
+ for (i=0; i < 3; i++) {
+ for (j=0; j < 3; j++) {
+ p->Mat[i][j] = (cmsFloat32Number) Mat->v[i].n[j];
+ }
+ }
+
+
+ for (i = 0; i < 3; i++) {
+
+ if (Off == NULL) {
+
+ p->UseOff = FALSE;
+ p->Off[i] = 0.0;
+ }
+ else {
+ p->UseOff = TRUE;
+ p->Off[i] = (cmsFloat32Number)Off->n[i];
+
+ }
+ }
+
+
+ return p;
+}
+
+
+
+// A fast matrix-shaper evaluator for floating point
+static
+void MatShaperFloat(struct _cmstransform_struct* CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ VXMatShaperFloatData* p = (VXMatShaperFloatData*) _cmsGetTransformUserData(CMMcargo);
+ cmsFloat32Number l1, l2, l3;
+ cmsFloat32Number r, g, b;
+ cmsUInt32Number i, ii;
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* rout;
+ cmsUInt8Number* gout;
+ cmsUInt8Number* bout;
+ cmsUInt8Number* aout = NULL;
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo), Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ rout = (cmsUInt8Number*)Output + DestStartingOrder[0] + strideOut;
+ gout = (cmsUInt8Number*)Output + DestStartingOrder[1] + strideOut;
+ bout = (cmsUInt8Number*)Output + DestStartingOrder[2] + strideOut;
+
+ if (nalpha)
+ aout = (cmsUInt8Number*)Output + DestStartingOrder[3] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ r = flerp(p->Shaper1R, *(cmsFloat32Number*)rin);
+ g = flerp(p->Shaper1G, *(cmsFloat32Number*)gin);
+ b = flerp(p->Shaper1B, *(cmsFloat32Number*)bin);
+
+ l1 = p->Mat[0][0] * r + p->Mat[0][1] * g + p->Mat[0][2] * b;
+ l2 = p->Mat[1][0] * r + p->Mat[1][1] * g + p->Mat[1][2] * b;
+ l3 = p->Mat[2][0] * r + p->Mat[2][1] * g + p->Mat[2][2] * b;
+
+ if (p->UseOff) {
+
+ l1 += p->Off[0];
+ l2 += p->Off[1];
+ l3 += p->Off[2];
+ }
+
+ *(cmsFloat32Number*)rout = flerp(p->Shaper2R, l1);
+ *(cmsFloat32Number*)gout = flerp(p->Shaper2G, l2);
+ *(cmsFloat32Number*)bout = flerp(p->Shaper2B, l3);
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+
+ rout += DestIncrements[0];
+ gout += DestIncrements[1];
+ bout += DestIncrements[2];
+
+ if (ain)
+ {
+ *(cmsFloat32Number*)aout = *(cmsFloat32Number*)ain;
+ ain += SourceIncrements[3];
+ aout += DestIncrements[3];
+ }
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
+
+cmsBool OptimizeFloatMatrixShaper(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsStage* Curve1, *Curve2;
+ cmsStage* Matrix1, *Matrix2;
+ _cmsStageMatrixData* Data1;
+ _cmsStageMatrixData* Data2;
+ cmsMAT3 res;
+ cmsBool IdentityMat = FALSE;
+ cmsPipeline* Dest, *Src;
+ cmsContext ContextID;
+ cmsUInt32Number nChans;
+ cmsFloat64Number factor = 1.0;
+
+
+ // Apply only to floating-point cases
+ if (!T_FLOAT(*InputFormat) || !T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only works on RGB to RGB and gray to gray
+ if ( !( (T_CHANNELS(*InputFormat) == 3 && T_CHANNELS(*OutputFormat) == 3)) &&
+ !( (T_CHANNELS(*InputFormat) == 1 && T_CHANNELS(*OutputFormat) == 1))) return FALSE;
+
+ // Only works on float
+ if (T_BYTES(*InputFormat) != 4 || T_BYTES(*OutputFormat) != 4) return FALSE;
+
+ // Seems suitable, proceed
+ Src = *Lut;
+
+ // Check for shaper-matrix-matrix-shaper structure, that is what this optimizer stands for
+ if (!cmsPipelineCheckAndRetreiveStages(Src, 4,
+ cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
+ &Curve1, &Matrix1, &Matrix2, &Curve2)) return FALSE;
+
+ ContextID = cmsGetPipelineContextID(Src);
+ nChans = T_CHANNELS(*InputFormat);
+
+ // Get both matrices, which are 3x3
+ Data1 = (_cmsStageMatrixData*) cmsStageData(Matrix1);
+ Data2 = (_cmsStageMatrixData*) cmsStageData(Matrix2);
+
+ // Input offset should be zero
+ if (Data1 ->Offset != NULL) return FALSE;
+
+ if (cmsStageInputChannels(Matrix1) == 1 && cmsStageOutputChannels(Matrix2) == 1)
+ {
+ // This is a gray to gray. Just multiply
+ factor = Data1->Double[0]*Data2->Double[0] +
+ Data1->Double[1]*Data2->Double[1] +
+ Data1->Double[2]*Data2->Double[2];
+
+ if (fabs(1 - factor) < (1.0 / 65535.0)) IdentityMat = TRUE;
+ }
+ else
+ {
+ // Multiply both matrices to get the result
+ _cmsMAT3per(&res, (cmsMAT3*) Data2 ->Double, (cmsMAT3*) Data1 ->Double);
+
+ // Now the result is in res + Data2 -> Offset. Maybe is a plain identity?
+ IdentityMat = FALSE;
+ if (_cmsMAT3isIdentity(&res) && Data2 ->Offset == NULL) {
+
+ // We can get rid of full matrix
+ IdentityMat = TRUE;
+ }
+ }
+
+ // Allocate an empty LUT
+ Dest = cmsPipelineAlloc(ContextID, nChans, nChans);
+ if (!Dest) return FALSE;
+
+ // Assamble the new LUT
+ cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1));
+
+ if (!IdentityMat) {
+
+ if (nChans == 1)
+ cmsPipelineInsertStage(Dest, cmsAT_END,
+ cmsStageAllocMatrix(ContextID, 1, 1, (const cmsFloat64Number*) &factor, Data2->Offset));
+ else
+ cmsPipelineInsertStage(Dest, cmsAT_END,
+ cmsStageAllocMatrix(ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset));
+ }
+
+
+ cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2));
+
+ // If identity on matrix, we can further optimize the curves, so call the join curves routine
+ if (IdentityMat) {
+
+ OptimizeFloatByJoiningCurves(TransformFn, UserData, FreeUserData, &Dest, InputFormat, OutputFormat, dwFlags);
+ }
+ else {
+ _cmsStageToneCurvesData* mpeC1 = (_cmsStageToneCurvesData*) cmsStageData(Curve1);
+ _cmsStageToneCurvesData* mpeC2 = (_cmsStageToneCurvesData*) cmsStageData(Curve2);
+
+ // In this particular optimization, caché does not help as it takes more time to deal with
+ // the cachthat with the pixel handling
+ *dwFlags |= cmsFLAGS_NOCACHE;
+
+ // Setup the optimizarion routines
+ *UserData = SetMatShaper(ContextID, mpeC1 ->TheCurves, &res, (cmsVEC3*) Data2 ->Offset, mpeC2->TheCurves);
+ *FreeUserData = FreeMatShaper;
+
+ *TransformFn = MatShaperFloat;
+ }
+
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ cmsPipelineFree(Src);
+ *Lut = Dest;
+ return TRUE;
+}
+
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+// Separable input. It just computes the distance from
+// each component to the next one in bytes. It gives components RGB in this order
+//
+// Encoding Starting Increment DoSwap Swapfirst Extra
+// RGB, 012 333 0 0 0
+// RGBA, 012 444 0 0 1
+// ARGB, 123 444 0 1 1
+// BGR, 210 333 1 0 0
+// BGRA, 210 444 1 1 1
+// ABGR 321 444 1 0 1
+//
+//
+// On planar configurations, the distance is the stride added to any non-negative
+//
+// RGB 0, S, 2*S 111
+// RGBA 0, S, 2*S 111 (fourth plane is safely ignored)
+// ARGB S, 2*S, 3*S 111
+// BGR 2*S, S, 0 111
+// BGRA 2*S, S, 0, 111 (fourth plane is safely ignored)
+// ABGR 3*S, 2*S, S 111
+//
+//----------------------------------------------------------------------------------------
+
+
+// Return the size in bytes of a given formatter
+static
+int trueBytesSize(cmsUInt32Number Format)
+{
+ int fmt_bytes = T_BYTES(Format);
+
+ // For double, the T_BYTES field returns zero
+ if (fmt_bytes == 0)
+ return sizeof(double);
+
+ // Otherwise, it is already correct for all formats
+ return fmt_bytes;
+}
+
+// RGBA -> normal
+// ARGB -> swap first
+// ABGR -> doSwap
+// BGRA -> doSwap swapFirst
+
+// This function computes the distance from each component to the next one in bytes.
+static
+void ComputeIncrementsForChunky(cmsUInt32Number Format,
+ cmsUInt32Number BytesPerPlane,
+ cmsUInt32Number* nChannels,
+ cmsUInt32Number* nAlpha,
+ cmsUInt32Number ComponentStartingOrder[],
+ cmsUInt32Number ComponentPointerIncrements[])
+{
+ int extra = T_EXTRA(Format);
+ int channels = T_CHANNELS(Format);
+ int total_chans = channels + extra;
+ int i;
+ int channelSize = trueBytesSize(Format);
+ int pixelSize = channelSize * total_chans;
+
+ UNUSED_PARAMETER(BytesPerPlane);
+
+ // Setup the counts
+ if (nChannels != NULL)
+ *nChannels = channels;
+
+ if (nAlpha != NULL)
+ *nAlpha = extra;
+
+ // Separation is independent of starting point and only depends on channel size
+ for (i = 0; i < total_chans; i++)
+ ComponentPointerIncrements[i] = pixelSize;
+
+ // Handle do swap
+ for (i = 0; i < total_chans; i++)
+ {
+ if (T_DOSWAP(Format)) {
+ ComponentStartingOrder[i] = total_chans - i - 1;
+ }
+ else {
+ ComponentStartingOrder[i] = i;
+ }
+ }
+
+ // Handle swap first (ROL of positions), example CMYK -> KCMY | 0123 -> 3012
+ if (T_SWAPFIRST(Format)) {
+
+ cmsUInt32Number tmp = ComponentStartingOrder[0];
+ for (i = 0; i < total_chans-1; i++)
+ ComponentStartingOrder[i] = ComponentStartingOrder[i + 1];
+
+ ComponentStartingOrder[total_chans - 1] = tmp;
+ }
+
+ // Handle size
+ if (channelSize > 1)
+ for (i = 0; i < total_chans; i++) {
+ ComponentStartingOrder[i] *= channelSize;
+ }
+}
+
+
+
+// On planar configurations, the distance is the stride added to any non-negative
+static
+void ComputeIncrementsForPlanar(cmsUInt32Number Format,
+ cmsUInt32Number BytesPerPlane,
+ cmsUInt32Number* nChannels,
+ cmsUInt32Number* nAlpha,
+ cmsUInt32Number ComponentStartingOrder[],
+ cmsUInt32Number ComponentPointerIncrements[])
+{
+ int extra = T_EXTRA(Format);
+ int channels = T_CHANNELS(Format);
+ int total_chans = channels + extra;
+ int i;
+ int channelSize = trueBytesSize(Format);
+
+ // Setup the counts
+ if (nChannels != NULL)
+ *nChannels = channels;
+
+ if (nAlpha != NULL)
+ *nAlpha = extra;
+
+ // Separation is independent of starting point and only depends on channel size
+ for (i = 0; i < total_chans; i++)
+ ComponentPointerIncrements[i] = channelSize;
+
+ // Handle do swap
+ for (i = 0; i < total_chans; i++)
+ {
+ if (T_DOSWAP(Format)) {
+ ComponentStartingOrder[i] = total_chans - i - 1;
+ }
+ else {
+ ComponentStartingOrder[i] = i;
+ }
+ }
+
+ // Handle swap first (ROL of positions), example CMYK -> KCMY | 0123 -> 3012
+ if (T_SWAPFIRST(Format)) {
+
+ cmsUInt32Number tmp = ComponentStartingOrder[0];
+ for (i = 0; i < total_chans - 1; i++)
+ ComponentStartingOrder[i] = ComponentStartingOrder[i + 1];
+
+ ComponentStartingOrder[total_chans - 1] = tmp;
+ }
+
+ // Handle size
+ for (i = 0; i < total_chans; i++) {
+ ComponentStartingOrder[i] *= BytesPerPlane;
+ }
+}
+
+
+
+// Dispatcher por chunky and planar RGB
+CMSCHECKPOINT void CMSEXPORT _cmsComputeComponentIncrements(cmsUInt32Number Format,
+ cmsUInt32Number BytesPerPlane,
+ cmsUInt32Number* nChannels,
+ cmsUInt32Number* nAlpha,
+ cmsUInt32Number ComponentStartingOrder[],
+ cmsUInt32Number ComponentPointerIncrements[])
+{
+ if (T_PLANAR(Format)) {
+
+ ComputeIncrementsForPlanar(Format, BytesPerPlane, nChannels, nAlpha, ComponentStartingOrder, ComponentPointerIncrements);
+ }
+ else {
+ ComputeIncrementsForChunky(Format, BytesPerPlane, nChannels, nAlpha, ComponentStartingOrder, ComponentPointerIncrements);
+ }
+
+}
+
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+
+#include "fast_float_internal.h"
+
+
+// This is the main dispatcher
+static
+cmsBool Floating_Point_Transforms_Dispatcher(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeUserData,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+
+ // Try to optimize as a set of curves plus a matrix plus a set of curves
+ if (OptimizeMatrixShaper15(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize by joining curves
+ if (Optimize8ByJoiningCurves(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+#ifndef CMS_DONT_USE_SSE2
+ // Try to use SSE2 to optimize as a set of curves plus a matrix plus a set of curves
+ if (Optimize8MatrixShaperSSE(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+#endif
+ // Try to optimize as a set of curves plus a matrix plus a set of curves
+ if (Optimize8MatrixShaper(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize by joining curves
+ if (OptimizeFloatByJoiningCurves(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize as a set of curves plus a matrix plus a set of curves
+ if (OptimizeFloatMatrixShaper(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize using prelinearization plus tetrahedral
+ if (Optimize8BitRGBTransform(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize using prelinearization plus tetrahedral
+ if (Optimize16BitRGBTransform(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize using prelinearization plus tetrahedral
+ if (OptimizeCLUTRGBTransform(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize using prelinearization plus tetrahedral
+ if (OptimizeCLUTCMYKTransform(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Try to optimize for Lab float as input
+ if (OptimizeCLUTLabTransform(TransformFn, UserData, FreeUserData, Lut, InputFormat, OutputFormat, dwFlags)) return TRUE;
+
+ // Cannot optimize, use lcms normal process
+ return FALSE;
+}
+
+// The Plug-in entry points
+static cmsPluginFormatters PluginFastFloat = {
+ { cmsPluginMagicNumber, REQUIRED_LCMS_VERSION, cmsPluginFormattersSig, NULL },
+
+ Formatter_15Bit_Factory
+};
+
+static cmsPluginTransform PluginList = {
+
+ { cmsPluginMagicNumber, REQUIRED_LCMS_VERSION, cmsPluginTransformSig, (cmsPluginBase *) &PluginFastFloat },
+
+ // When initializing a union, the initializer list must have only one member, which initializes the first member of
+ // the union unless a designated initializer is used (C99)
+
+ { (_cmsTransformFactory) Floating_Point_Transforms_Dispatcher }
+};
+
+// This is the main plug-in installer.
+// Using a function to retrieve the plug-in entry point allows us to execute initialization data.
+void* CMSEXPORT cmsFastFloatExtensions(void)
+{
+ return (void*)&PluginList;
+}
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+// Optimization for floating point tetrahedral interpolation
+typedef struct {
+
+ cmsContext ContextID;
+ const cmsInterpParams* p; // Tetrahedrical interpolation parameters. This is a not-owned pointer.
+
+} FloatCLUTData;
+
+// Allocates container
+static
+FloatCLUTData* FloatCLUTAlloc(cmsContext ContextID, const cmsInterpParams* p)
+{
+ FloatCLUTData* fd;
+
+ fd = (FloatCLUTData*) _cmsMallocZero(ContextID, sizeof(FloatCLUTData));
+ if (fd == NULL) return NULL;
+
+ fd ->ContextID = ContextID;
+ fd ->p = p;
+
+ return fd;
+}
+
+
+// Sampler implemented by another LUT.
+static
+int XFormSampler(CMSREGISTER const cmsFloat32Number In[], CMSREGISTER cmsFloat32Number Out[], CMSREGISTER void* Cargo)
+{
+ cmsPipelineEvalFloat(In, Out, (cmsPipeline*) Cargo);
+ return TRUE;
+}
+
+// A optimized interpolation for input.
+#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+
+static
+void FloatCLUTEval(struct _cmstransform_struct* CMMcargo,
+ const void* Input,
+ void* Output,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+
+{
+
+ FloatCLUTData* pfloat = (FloatCLUTData*)_cmsGetTransformUserData(CMMcargo);
+
+ cmsFloat32Number r, g, b;
+ cmsFloat32Number px, py, pz;
+ int x0, y0, z0;
+ int X0, Y0, Z0, X1, Y1, Z1;
+ cmsFloat32Number rx, ry, rz;
+ cmsFloat32Number c0, c1 = 0, c2 = 0, c3 = 0;
+ cmsUInt32Number OutChan;
+
+ const cmsInterpParams* p = pfloat->p;
+ cmsUInt32Number TotalOut = p->nOutputs;
+ cmsUInt32Number TotalPlusAlpha;
+ const cmsFloat32Number* LutTable = (const cmsFloat32Number*)p->Table;
+
+ cmsUInt32Number i, ii;
+ const cmsUInt8Number* rin;
+ const cmsUInt8Number* gin;
+ const cmsUInt8Number* bin;
+ const cmsUInt8Number* ain = NULL;
+
+ cmsUInt8Number* out[cmsMAXCHANNELS];
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ cmsUInt32Number InputFormat = cmsGetTransformInputFormat((cmsHTRANSFORM)CMMcargo);
+ cmsUInt32Number OutputFormat = cmsGetTransformOutputFormat((cmsHTRANSFORM)CMMcargo);
+
+ cmsUInt32Number nchans, nalpha;
+ cmsUInt32Number strideIn, strideOut;
+
+ _cmsComputeComponentIncrements(InputFormat, Stride->BytesPerPlaneIn, &nchans, &nalpha, SourceStartingOrder, SourceIncrements);
+ _cmsComputeComponentIncrements(OutputFormat, Stride->BytesPerPlaneOut, &nchans, &nalpha, DestStartingOrder, DestIncrements);
+
+ if (!(_cmsGetTransformFlags((cmsHTRANSFORM)CMMcargo) & cmsFLAGS_COPY_ALPHA))
+ nalpha = 0;
+
+ strideIn = strideOut = 0;
+ for (i = 0; i < LineCount; i++) {
+
+ rin = (const cmsUInt8Number*)Input + SourceStartingOrder[0] + strideIn;
+ gin = (const cmsUInt8Number*)Input + SourceStartingOrder[1] + strideIn;
+ bin = (const cmsUInt8Number*)Input + SourceStartingOrder[2] + strideIn;
+ if (nalpha)
+ ain = (const cmsUInt8Number*)Input + SourceStartingOrder[3] + strideIn;
+
+ TotalPlusAlpha = TotalOut;
+ if (ain) TotalPlusAlpha++;
+
+ for (ii = 0; ii < TotalPlusAlpha; ii++)
+ out[ii] = (cmsUInt8Number*)Output + DestStartingOrder[ii] + strideOut;
+
+ for (ii = 0; ii < PixelsPerLine; ii++) {
+
+ r = fclamp(*(cmsFloat32Number*)rin);
+ g = fclamp(*(cmsFloat32Number*)gin);
+ b = fclamp(*(cmsFloat32Number*)bin);
+
+ rin += SourceIncrements[0];
+ gin += SourceIncrements[1];
+ bin += SourceIncrements[2];
+
+ px = r * p->Domain[0];
+ py = g * p->Domain[1];
+ pz = b * p->Domain[2];
+
+ x0 = _cmsQuickFloor(px); rx = (px - (cmsFloat32Number)x0);
+ y0 = _cmsQuickFloor(py); ry = (py - (cmsFloat32Number)y0);
+ z0 = _cmsQuickFloor(pz); rz = (pz - (cmsFloat32Number)z0);
+
+
+ X0 = p->opta[2] * x0;
+ X1 = X0 + (r >= 1.0 ? 0 : p->opta[2]);
+
+ Y0 = p->opta[1] * y0;
+ Y1 = Y0 + (g >= 1.0 ? 0 : p->opta[1]);
+
+ Z0 = p->opta[0] * z0;
+ Z1 = Z0 + (b >= 1.0 ? 0 : p->opta[0]);
+
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ // These are the 6 Tetrahedral
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (rx >= rz && rz >= ry) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+
+ }
+ else
+ if (rz >= rx && rx >= ry) {
+
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else
+ if (ry >= rx && rx >= rz) {
+
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (ry >= rz && rz >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+
+ }
+ else
+ if (rz >= ry && ry >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+ *(cmsFloat32Number*)(out[OutChan]) = c0 + c1 * rx + c2 * ry + c3 * rz;
+
+ out[OutChan] += DestIncrements[OutChan];
+ }
+
+ if (ain)
+ *out[TotalOut] = *ain;
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+#undef DENS
+
+
+
+// --------------------------------------------------------------------------------------------------------------
+
+cmsBool OptimizeCLUTRGBTransform(_cmsTransform2Fn* TransformFn,
+ void** UserData,
+ _cmsFreeUserDataFn* FreeDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsPipeline* OriginalLut;
+ int nGridPoints;
+ cmsPipeline* OptimizedLUT = NULL;
+ cmsStage* OptimizedCLUTmpe;
+ cmsStage* mpe;
+ FloatCLUTData* pfloat;
+ cmsContext ContextID;
+ _cmsStageCLutData* data;
+
+ // For empty transforms, do nothing
+ if (*Lut == NULL) return FALSE;
+
+ // Check for floating point only
+ if (!T_FLOAT(*InputFormat) || !T_FLOAT(*OutputFormat)) return FALSE;
+
+ // Only on floats
+ if (T_BYTES(*InputFormat) != sizeof(cmsFloat32Number) ||
+ T_BYTES(*OutputFormat) != sizeof(cmsFloat32Number)) return FALSE;
+
+ // Input has to be RGB, Output may be any
+ if (T_COLORSPACE(*InputFormat) != PT_RGB) return FALSE;
+
+ OriginalLut = *Lut;
+
+ // Named color pipelines cannot be optimized either
+ for (mpe = cmsPipelineGetPtrToFirstStage(OriginalLut);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+ if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE;
+ }
+
+ ContextID = cmsGetPipelineContextID(OriginalLut);
+ nGridPoints = _cmsReasonableGridpointsByColorspace(cmsSigRgbData, *dwFlags);
+
+ // Create the result LUT
+ OptimizedLUT = cmsPipelineAlloc(cmsGetPipelineContextID(OriginalLut), 3, cmsPipelineOutputChannels(OriginalLut));
+ if (OptimizedLUT == NULL) goto Error;
+
+ // Allocate the CLUT for result
+ OptimizedCLUTmpe = cmsStageAllocCLutFloat(ContextID, nGridPoints, 3, cmsPipelineOutputChannels(OriginalLut), NULL);
+
+ // Add the CLUT to the destination LUT
+ cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedCLUTmpe);
+
+ // Resample the LUT
+ if (!cmsStageSampleCLutFloat(OptimizedCLUTmpe, XFormSampler, (void*)OriginalLut, 0)) goto Error;
+
+ // Set the evaluator, copy parameters
+ data = (_cmsStageCLutData*) cmsStageData(OptimizedCLUTmpe);
+
+ pfloat = FloatCLUTAlloc(ContextID, data ->Params);
+ if (pfloat == NULL) return FALSE;
+
+ // And return the obtained LUT
+ cmsPipelineFree(OriginalLut);
+
+ *Lut = OptimizedLUT;
+ *TransformFn = FloatCLUTEval;
+ *UserData = pfloat;
+ *FreeDataFn = _cmsFree;
+ *dwFlags &= ~cmsFLAGS_CAN_CHANGE_FORMATTER;
+ return TRUE;
+
+Error:
+
+ if (OptimizedLUT != NULL) cmsPipelineFree(OptimizedLUT);
+
+ return FALSE;
+}
+
--- /dev/null
+#
+# Makefile for building fast_float_testbed
+#
+
+# Don't require all the GNU mandated files
+AUTOMAKE_OPTIONS = 1.7 foreign
+
+AM_CPPFLAGS = -I$(builddir)/../include -I$(srcdir)/../include -I$(srcdir)/../src \
+ -I$(top_builddir)/include
+
+check_PROGRAMS = fast_float_testbed
+
+fast_float_testbed_LDADD = $(srcdir)/../src/liblcms2_fast_float.la
+fast_float_testbed_LDFLAGS = @LDFLAGS@
+fast_float_testbed_SOURCES = fast_float_testbed.c
+
+EXTRA_DIST = test0.icc test1.icc test2.icc test3.icc test5.icc
+
+check:
+ ./fast_float_testbed
+
+
--- /dev/null
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2018 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@
+
+#
+# Makefile for building fast_float_testbed
+#
+VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
+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@
+check_PROGRAMS = fast_float_testbed$(EXEEXT)
+subdir = plugins/fast_float/testbed
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am_fast_float_testbed_OBJECTS = fast_float_testbed.$(OBJEXT)
+fast_float_testbed_OBJECTS = $(am_fast_float_testbed_OBJECTS)
+fast_float_testbed_DEPENDENCIES = \
+ $(srcdir)/../src/liblcms2_fast_float.la
+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 =
+fast_float_testbed_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(fast_float_testbed_LDFLAGS) \
+ $(LDFLAGS) -o $@
+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@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/fast_float_testbed.Po
+am__mv = mv -f
+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 = $(fast_float_testbed_SOURCES)
+DIST_SOURCES = $(fast_float_testbed_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JPEGICC_DEPLIBS = @JPEGICC_DEPLIBS@
+LCMS_LIB_DEPLIBS = @LCMS_LIB_DEPLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBRARY_AGE = @LIBRARY_AGE@
+LIBRARY_CURRENT = @LIBRARY_CURRENT@
+LIBRARY_REVISION = @LIBRARY_REVISION@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIB_JPEG = @LIB_JPEG@
+LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
+LIB_TIFF = @LIB_TIFF@
+LIB_ZLIB = @LIB_ZLIB@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TIFFICC_DEPLIBS = @TIFFICC_DEPLIBS@
+VERSION = @VERSION@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+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@
+inline = @inline@
+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@
+runstatedir = @runstatedir@
+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@
+
+# Don't require all the GNU mandated files
+AUTOMAKE_OPTIONS = 1.7 foreign
+AM_CPPFLAGS = -I$(builddir)/../include -I$(srcdir)/../include -I$(srcdir)/../src \
+ -I$(top_builddir)/include
+
+fast_float_testbed_LDADD = $(srcdir)/../src/liblcms2_fast_float.la
+fast_float_testbed_LDFLAGS = @LDFLAGS@
+fast_float_testbed_SOURCES = fast_float_testbed.c
+EXTRA_DIST = test0.icc test1.icc test2.icc test3.icc test5.icc
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --foreign plugins/fast_float/testbed/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign plugins/fast_float/testbed/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+fast_float_testbed$(EXEEXT): $(fast_float_testbed_OBJECTS) $(fast_float_testbed_DEPENDENCIES) $(EXTRA_fast_float_testbed_DEPENDENCIES)
+ @rm -f fast_float_testbed$(EXEEXT)
+ $(AM_V_CCLD)$(fast_float_testbed_LINK) $(fast_float_testbed_OBJECTS) $(fast_float_testbed_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast_float_testbed.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.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 $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+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`; \
+ $(am__define_uniq_tagged_files); \
+ 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-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
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile
+installdirs:
+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-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/fast_float_testbed.Po
+ -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-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 -f ./$(DEPDIR)/fast_float_testbed.Po
+ -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:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am 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-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
+
+.PRECIOUS: Makefile
+
+
+check:
+ ./fast_float_testbed
+
+# 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:
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System, fast floating point extensions
+// Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved
+//
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+//---------------------------------------------------------------------------------
+
+#include "fast_float_internal.h"
+
+#include <stdlib.h>
+#include <memory.h>
+
+
+// Some pixel representations
+typedef struct { cmsUInt8Number r, g, b; } Scanline_rgb8bits;
+typedef struct { cmsUInt8Number r, g, b, a; } Scanline_rgba8bits;
+typedef struct { cmsUInt8Number c, m, y, k; } Scanline_cmyk8bits;
+typedef struct { cmsUInt16Number r, g, b; } Scanline_rgb16bits;
+typedef struct { cmsUInt16Number r, g, b, a; } Scanline_rgba16bits;
+typedef struct { cmsUInt16Number c, m, y, k; } Scanline_cmyk16bits;
+typedef struct { cmsUInt16Number r, g, b; } Scanline_rgb15bits;
+typedef struct { cmsUInt16Number r, g, b, a; } Scanline_rgba15bits;
+typedef struct { cmsUInt16Number r, g, b, a; } Scanline_cmyk15bits;
+typedef struct { cmsFloat32Number r, g, b; } Scanline_rgbFloat;
+typedef struct { cmsFloat32Number r, g, b, a; } Scanline_rgbaFloat;
+typedef struct { cmsFloat32Number c, m, y, k; } Scanline_cmykFloat;
+typedef struct { cmsFloat32Number L, a, b; } Scanline_LabFloat;
+
+// 15 bit mode. <=> 8 bits mode
+#define FROM_8_TO_15(x8) (cmsUInt16Number) ((((cmsUInt64Number)x8 << 15)) / 0xFF)
+#define FROM_15_TO_8(x15) (cmsUInt8Number) (((cmsUInt64Number) x15 * 0xFF + 0x4000) >> 15)
+
+
+// Floating point acuracy for tests
+#define EPSILON_FLOAT_TESTS 0.005
+
+
+// The callback function used by cmsSetLogErrorHandler()
+static
+void FatalErrorQuit(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text)
+{
+ UNUSED_PARAMETER(ContextID);
+ UNUSED_PARAMETER(ErrorCode);
+
+ printf("** Fatal error: %s\n", Text);
+ exit(1);
+}
+
+// Rise an error and exit
+static
+void Fail(const char* frm, ...)
+{
+ char ReasonToFailBuffer[1024];
+ va_list args;
+
+ va_start(args, frm);
+ vsprintf(ReasonToFailBuffer, frm, args);
+ FatalErrorQuit(0, 0, ReasonToFailBuffer);
+
+ // unreacheable va_end(args);
+}
+
+
+// Creates a fake profile that only has a curve. Used in several places
+static
+cmsHPROFILE CreateCurves(void)
+{
+ cmsToneCurve* Gamma = cmsBuildGamma(0, 1.1);
+ cmsToneCurve* Transfer[3];
+ cmsHPROFILE h;
+
+ Transfer[0] = Transfer[1] = Transfer[2] = Gamma;
+ h = cmsCreateLinearizationDeviceLink(cmsSigRgbData, Transfer);
+
+ cmsFreeToneCurve(Gamma);
+
+ return h;
+}
+
+
+// Check for a single 15 bit Photoshop-like formatter
+static
+void CheckSingleFormatter15(cmsContext id, cmsUInt32Number Type, const char* Text)
+{
+ cmsUInt16Number Values[cmsMAXCHANNELS];
+ cmsUInt8Number Buffer[1024];
+ cmsFormatter f, b;
+ cmsInt32Number i, j, nChannels, bytes;
+ _xform_head info;
+
+ UNUSED_PARAMETER(id);
+
+ memset(&info, 0, sizeof(info));
+ info.OutputFormat = info.InputFormat = Type;
+
+ // Get functions to go forth and back
+ f = Formatter_15Bit_Factory(Type, cmsFormatterInput, CMS_PACK_FLAGS_16BITS);
+ b = Formatter_15Bit_Factory(Type, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS);
+
+ if (f.Fmt16 == NULL || b.Fmt16 == NULL) {
+
+ Fail("no formatter for %s", Text);
+ return;
+ }
+
+ nChannels = T_CHANNELS(Type);
+ bytes = T_BYTES(Type);
+
+ for (j = 0; j < 5; j++) {
+
+ for (i = 0; i < nChannels; i++) {
+
+ Values[i] = (cmsUInt16Number)(i + j) << 1;
+ }
+
+ b.Fmt16((struct _cmstransform_struct*) &info, Values, Buffer, 1);
+ memset(Values, 0, sizeof(Values));
+ f.Fmt16((struct _cmstransform_struct*) &info, Values, Buffer, 1);
+
+ for (i = 0; i < nChannels; i++) {
+
+ if (Values[i] != ((i + j) << 1)) {
+
+ Fail("%s failed", Text);
+ return;
+ }
+ }
+ }
+}
+
+#define C(a) CheckSingleFormatter15(0, a, #a)
+
+// Check for all 15 bits formatters
+static
+void CheckFormatters15(void)
+{
+ C(TYPE_GRAY_15);
+ C(TYPE_GRAY_15_REV);
+ C(TYPE_GRAY_15_SE);
+ C(TYPE_GRAYA_15);
+ C(TYPE_GRAYA_15_SE);
+ C(TYPE_GRAYA_15_PLANAR);
+ C(TYPE_RGB_15);
+ C(TYPE_RGB_15_PLANAR);
+ C(TYPE_RGB_15_SE);
+ C(TYPE_BGR_15);
+ C(TYPE_BGR_15_PLANAR);
+ C(TYPE_BGR_15_SE);
+ C(TYPE_RGBA_15);
+ C(TYPE_RGBA_15_PLANAR);
+ C(TYPE_RGBA_15_SE);
+ C(TYPE_ARGB_15);
+ C(TYPE_ABGR_15);
+ C(TYPE_ABGR_15_PLANAR);
+ C(TYPE_ABGR_15_SE);
+ C(TYPE_BGRA_15);
+ C(TYPE_BGRA_15_SE);
+ C(TYPE_YMC_15);
+ C(TYPE_CMY_15);
+ C(TYPE_CMY_15_PLANAR);
+ C(TYPE_CMY_15_SE);
+ C(TYPE_CMYK_15);
+ C(TYPE_CMYK_15_REV);
+ C(TYPE_CMYK_15_PLANAR);
+ C(TYPE_CMYK_15_SE);
+ C(TYPE_KYMC_15);
+ C(TYPE_KYMC_15_SE);
+ C(TYPE_KCMY_15);
+ C(TYPE_KCMY_15_REV);
+ C(TYPE_KCMY_15_SE);
+}
+#undef C
+
+
+static
+cmsInt32Number checkSingleComputeIncrements(cmsUInt32Number Format, cmsUInt32Number planeStride, cmsUInt32Number ExpectedChannels, cmsUInt32Number ExpectedAlpha, ...)
+{
+ cmsUInt32Number nChannels, nAlpha, nTotal, i, rc = 0 ;
+ cmsUInt32Number ComponentStartingOrder[cmsMAXCHANNELS], ComponentPointerIncrements[cmsMAXCHANNELS];
+ va_list args;
+
+
+ va_start(args, ExpectedAlpha);
+
+ _cmsComputeComponentIncrements(Format, planeStride, &nChannels, &nAlpha, ComponentStartingOrder, ComponentPointerIncrements);
+
+ if (nChannels != ExpectedChannels)
+ return 0;
+
+ if (nAlpha != ExpectedAlpha)
+ return 0;
+
+ nTotal = nAlpha + nChannels;
+
+ for (i = 0; i < nTotal; i++)
+ {
+ cmsUInt32Number so = va_arg(args, cmsUInt32Number);
+ if (so != ComponentStartingOrder[i])
+ goto Error;
+ }
+
+ for (i = 0; i < nTotal; i++)
+ {
+ cmsUInt32Number so = va_arg(args, cmsUInt32Number);
+ if (so != ComponentPointerIncrements[i])
+ goto Error;
+ }
+
+ // Success
+ rc = 1;
+
+Error:
+ va_end(args);
+
+ return rc;
+}
+
+#define CHECK(frm, plane, chans, alpha, ...) if (!checkSingleComputeIncrements(frm, plane, chans, alpha, __VA_ARGS__)) { printf("Format failed!\n"); return 0; }
+
+
+
+// Validate the compute increments function
+cmsInt32Number CheckComputeIncrements(void)
+{
+ CHECK(TYPE_GRAY_8, 0, 1, 0, /**/ 0, /**/ 1);
+ CHECK(TYPE_GRAYA_8, 0, 1, 1, /**/ 0, 1, /**/ 2, 2);
+ CHECK(TYPE_AGRAY_8, 0, 1, 1, /**/ 1, 0, /**/ 2, 2);
+ CHECK(TYPE_GRAY_16, 0, 1, 0, /**/ 0, /**/ 2);
+ CHECK(TYPE_GRAYA_16, 0, 1, 1, /**/ 0, 2, /**/ 4, 4);
+ CHECK(TYPE_AGRAY_16, 0, 1, 1, /**/ 2, 0, /**/ 4, 4);
+
+ CHECK(TYPE_GRAY_FLT, 0, 1, 0, /**/ 0, /**/ 4);
+ CHECK(TYPE_GRAYA_FLT, 0, 1, 1, /**/ 0, 4, /**/ 8, 8);
+ CHECK(TYPE_AGRAY_FLT, 0, 1, 1, /**/ 4, 0, /**/ 8, 8);
+
+ CHECK(TYPE_GRAY_DBL, 0, 1, 0, /**/ 0, /**/ 8);
+ CHECK(TYPE_AGRAY_DBL, 0, 1, 1, /**/ 8, 0, /**/ 16, 16);
+
+ CHECK(TYPE_RGB_8, 0, 3, 0, /**/ 0, 1, 2, /**/ 3, 3, 3);
+ CHECK(TYPE_RGBA_8, 0, 3, 1, /**/ 0, 1, 2, 3, /**/ 4, 4, 4, 4);
+ CHECK(TYPE_ARGB_8, 0, 3, 1, /**/ 1, 2, 3, 0, /**/ 4, 4, 4, 4);
+
+ CHECK(TYPE_RGB_16, 0, 3, 0, /**/ 0, 2, 4, /**/ 6, 6, 6);
+ CHECK(TYPE_RGBA_16, 0, 3, 1, /**/ 0, 2, 4, 6, /**/ 8, 8, 8, 8);
+ CHECK(TYPE_ARGB_16, 0, 3, 1, /**/ 2, 4, 6, 0, /**/ 8, 8, 8, 8);
+
+ CHECK(TYPE_RGB_FLT, 0, 3, 0, /**/ 0, 4, 8, /**/ 12, 12, 12);
+ CHECK(TYPE_RGBA_FLT, 0, 3, 1, /**/ 0, 4, 8, 12, /**/ 16, 16, 16, 16);
+ CHECK(TYPE_ARGB_FLT, 0, 3, 1, /**/ 4, 8, 12, 0, /**/ 16, 16, 16, 16);
+
+ CHECK(TYPE_BGR_8, 0, 3, 0, /**/ 2, 1, 0, /**/ 3, 3, 3);
+ CHECK(TYPE_BGRA_8, 0, 3, 1, /**/ 2, 1, 0, 3, /**/ 4, 4, 4, 4);
+ CHECK(TYPE_ABGR_8, 0, 3, 1, /**/ 3, 2, 1, 0, /**/ 4, 4, 4, 4);
+
+ CHECK(TYPE_BGR_16, 0, 3, 0, /**/ 4, 2, 0, /**/ 6, 6, 6);
+ CHECK(TYPE_BGRA_16, 0, 3, 1, /**/ 4, 2, 0, 6, /**/ 8, 8, 8, 8);
+ CHECK(TYPE_ABGR_16, 0, 3, 1, /**/ 6, 4, 2, 0, /**/ 8, 8, 8, 8);
+
+ CHECK(TYPE_BGR_FLT, 0, 3, 0, /**/ 8, 4, 0, /**/ 12, 12, 12);
+ CHECK(TYPE_BGRA_FLT, 0, 3, 1, /**/ 8, 4, 0, 12, /**/ 16, 16, 16, 16);
+ CHECK(TYPE_ABGR_FLT, 0, 3, 1, /**/ 12, 8, 4, 0, /**/ 16, 16, 16, 16);
+
+
+ CHECK(TYPE_CMYK_8, 0, 4, 0, /**/ 0, 1, 2, 3, /**/ 4, 4, 4, 4);
+ CHECK(TYPE_CMYKA_8, 0, 4, 1, /**/ 0, 1, 2, 3, 4, /**/ 5, 5, 5, 5, 5);
+ CHECK(TYPE_ACMYK_8, 0, 4, 1, /**/ 1, 2, 3, 4, 0, /**/ 5, 5, 5, 5, 5);
+
+ CHECK(TYPE_KYMC_8, 0, 4, 0, /**/ 3, 2, 1, 0, /**/ 4, 4, 4, 4);
+ CHECK(TYPE_KYMCA_8, 0, 4, 1, /**/ 3, 2, 1, 0, 4, /**/ 5, 5, 5, 5, 5);
+ CHECK(TYPE_AKYMC_8, 0, 4, 1, /**/ 4, 3, 2, 1, 0, /**/ 5, 5, 5, 5, 5);
+
+ CHECK(TYPE_KCMY_8, 0, 4, 0, /**/ 1, 2, 3, 0, /**/ 4, 4, 4, 4);
+
+ CHECK(TYPE_CMYK_16, 0, 4, 0, /**/ 0, 2, 4, 6, /**/ 8, 8, 8, 8);
+ CHECK(TYPE_CMYKA_16, 0, 4, 1, /**/ 0, 2, 4, 6, 8, /**/ 10, 10, 10, 10, 10);
+ CHECK(TYPE_ACMYK_16, 0, 4, 1, /**/ 2, 4, 6, 8, 0, /**/ 10, 10, 10, 10, 10);
+
+ CHECK(TYPE_KYMC_16, 0, 4, 0, /**/ 6, 4, 2, 0, /**/ 8, 8, 8, 8);
+ CHECK(TYPE_KYMCA_16, 0, 4, 1, /**/ 6, 4, 2, 0, 8, /**/ 10, 10, 10, 10, 10);
+ CHECK(TYPE_AKYMC_16, 0, 4, 1, /**/ 8, 6, 4, 2, 0, /**/ 10, 10, 10, 10, 10);
+
+ CHECK(TYPE_KCMY_16, 0, 4, 0, /**/ 2, 4, 6, 0, /**/ 8, 8, 8, 8);
+
+ // Planar
+
+ CHECK(TYPE_GRAYA_8_PLANAR, 100, 1, 1, /**/ 0, 100, /**/ 1, 1);
+ CHECK(TYPE_AGRAY_8_PLANAR, 100, 1, 1, /**/ 100, 0, /**/ 1, 1);
+
+ CHECK(TYPE_GRAYA_16_PLANAR, 100, 1, 1, /**/ 0, 100, /**/ 2, 2);
+ CHECK(TYPE_AGRAY_16_PLANAR, 100, 1, 1, /**/ 100, 0, /**/ 2, 2);
+
+ CHECK(TYPE_GRAYA_FLT_PLANAR, 100, 1, 1, /**/ 0, 100, /**/ 4, 4);
+ CHECK(TYPE_AGRAY_FLT_PLANAR, 100, 1, 1, /**/ 100, 0, /**/ 4, 4);
+
+ CHECK(TYPE_GRAYA_DBL_PLANAR, 100, 1, 1, /**/ 0, 100, /**/ 8, 8);
+ CHECK(TYPE_AGRAY_DBL_PLANAR, 100, 1, 1, /**/ 100, 0, /**/ 8, 8);
+
+ CHECK(TYPE_RGB_8_PLANAR, 100, 3, 0, /**/ 0, 100, 200, /**/ 1, 1, 1);
+ CHECK(TYPE_RGBA_8_PLANAR, 100, 3, 1, /**/ 0, 100, 200, 300, /**/ 1, 1, 1, 1);
+ CHECK(TYPE_ARGB_8_PLANAR, 100, 3, 1, /**/ 100, 200, 300, 0, /**/ 1, 1, 1, 1);
+
+ CHECK(TYPE_BGR_8_PLANAR, 100, 3, 0, /**/ 200, 100, 0, /**/ 1, 1, 1);
+ CHECK(TYPE_BGRA_8_PLANAR, 100, 3, 1, /**/ 200, 100, 0, 300, /**/ 1, 1, 1, 1);
+ CHECK(TYPE_ABGR_8_PLANAR, 100, 3, 1, /**/ 300, 200, 100, 0, /**/ 1, 1, 1, 1);
+
+ CHECK(TYPE_RGB_16_PLANAR, 100, 3, 0, /**/ 0, 100, 200, /**/ 2, 2, 2);
+ CHECK(TYPE_RGBA_16_PLANAR, 100, 3, 1, /**/ 0, 100, 200, 300, /**/ 2, 2, 2, 2);
+ CHECK(TYPE_ARGB_16_PLANAR, 100, 3, 1, /**/ 100, 200, 300, 0, /**/ 2, 2, 2, 2);
+
+ CHECK(TYPE_BGR_16_PLANAR, 100, 3, 0, /**/ 200, 100, 0, /**/ 2, 2, 2);
+ CHECK(TYPE_BGRA_16_PLANAR, 100, 3, 1, /**/ 200, 100, 0, 300, /**/ 2, 2, 2, 2);
+ CHECK(TYPE_ABGR_16_PLANAR, 100, 3, 1, /**/ 300, 200, 100, 0, /**/ 2, 2, 2, 2);
+
+ return 1;
+}
+
+
+
+// Check 15 bit mode accuracy
+static
+cmsBool Valid15(cmsUInt16Number a, cmsUInt8Number b)
+{
+ return abs(FROM_15_TO_8(a) - b) <= 2;
+}
+
+// Check the test macros itselves
+static
+void Check15bitMacros(void)
+{
+ int i;
+
+ printf("Checking 15 bit <=> 8 bit macros...");
+
+ for (i = 0; i < 256; i++)
+ {
+ cmsUInt16Number n = FROM_8_TO_15(i);
+ cmsUInt8Number m = FROM_15_TO_8(n);
+
+ if (m != i)
+ Fail("Failed on %d (->%d->%d)", i, n, m);
+ }
+ printf("ok\n");
+}
+
+// Do an in-depth test by checking all RGB cube of 8 bits, going from profilein to profileout.
+// Results should be same except for 2 contone levels allowed for roundoff. Note 15 bits is more
+// precise than 8 bits and this is a source of discrepancies. Cache is disabled
+static
+void TryAllValues15(cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+{
+ Scanline_rgb8bits* buffer8in;
+ Scanline_rgb15bits* buffer15in;
+ Scanline_rgb8bits* buffer8out;
+ Scanline_rgb15bits* buffer15out;
+ int r, g, b, j;
+ cmsUInt32Number npixels = 256 * 256 * 256; // All RGB cube in 8 bits
+
+ cmsHTRANSFORM xform15 = cmsCreateTransformTHR(0, hlcmsProfileIn, TYPE_RGB_15, hlcmsProfileOut, TYPE_RGB_15, Intent, cmsFLAGS_NOCACHE);
+ cmsHTRANSFORM xform8 = cmsCreateTransformTHR(0, hlcmsProfileIn, TYPE_RGB_8, hlcmsProfileOut, TYPE_RGB_8, Intent, cmsFLAGS_NOCACHE); // Transforms already created
+
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ if (xform15 == NULL || xform8 == NULL) {
+
+ Fail("NULL transforms on check for 15 bit conversions");
+ }
+
+ // Since this is just a test, I will not check memory allocation...
+ buffer8in = (Scanline_rgb8bits*)malloc(npixels * sizeof(Scanline_rgb8bits));
+ buffer15in = (Scanline_rgb15bits*)malloc(npixels * sizeof(Scanline_rgb15bits));
+ buffer8out = (Scanline_rgb8bits*)malloc(npixels * sizeof(Scanline_rgb8bits));
+ buffer15out = (Scanline_rgb15bits*)malloc(npixels * sizeof(Scanline_rgb15bits));
+
+ // Fill input values for 8 and 15 bits
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ buffer8in[j].r = (cmsUInt8Number)r;
+ buffer8in[j].g = (cmsUInt8Number)g;
+ buffer8in[j].b = (cmsUInt8Number)b;
+
+ buffer15in[j].r = FROM_8_TO_15(r);
+ buffer15in[j].g = FROM_8_TO_15(g);
+ buffer15in[j].b = FROM_8_TO_15(b);
+
+ j++;
+ }
+
+ cmsDoTransform(xform15, buffer15in, buffer15out, npixels);
+ cmsDoTransform(xform8, buffer8in, buffer8out, npixels);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ // Check the results
+ if (!Valid15(buffer15out[j].r, buffer8out[j].r) ||
+ !Valid15(buffer15out[j].g, buffer8out[j].g) ||
+ !Valid15(buffer15out[j].b, buffer8out[j].b))
+ Fail("Conversion failed at (%d %d %d) != (%d %d %d)", buffer8out[j].r, buffer8out[j].g, buffer8out[j].b,
+ FROM_15_TO_8(buffer15out[j].r), FROM_15_TO_8(buffer15out[j].g), FROM_15_TO_8(buffer15out[j].b));
+
+ j++;
+ }
+
+ free(buffer8in); free(buffer15in);
+ free(buffer8out); free(buffer15out);
+ cmsDeleteTransform(xform15);
+ cmsDeleteTransform(xform8);
+}
+
+// Convert some known values
+static
+void Check15bitsConversions(void)
+{
+ Check15bitMacros();
+
+ printf("Checking accuracy of 15 bits on CLUT...");
+ TryAllValues15(cmsOpenProfileFromFile("test5.icc", "r"), cmsOpenProfileFromFile("test3.icc", "r"), INTENT_PERCEPTUAL);
+ printf("Ok\n");
+
+ printf("Checking accuracy of 15 bits on same profile ...");
+ TryAllValues15(cmsOpenProfileFromFile("test0.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL);
+ printf("Ok\n");
+
+ printf("Checking accuracy of 15 bits on Matrix...");
+ TryAllValues15(cmsOpenProfileFromFile("test5.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL);
+ printf("Ok\n");
+
+ printf("All 15 bits tests passed OK\n\n");
+}
+
+// Next test checks results of optimized 16 bits versus raw 16 bits.
+static
+void TryAllValues16bits(cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+{
+ cmsContext Raw = cmsCreateContext(NULL, NULL);
+ cmsContext Plugin = cmsCreateContext(cmsFastFloatExtensions(), NULL);
+
+ Scanline_rgba16bits* bufferIn;
+ Scanline_rgba16bits* bufferRawOut;
+ Scanline_rgba16bits* bufferPluginOut;
+ int r, g, b;
+
+ int j;
+ cmsUInt32Number npixels = 256 * 256 * 256;
+
+ cmsHTRANSFORM xformRaw = cmsCreateTransformTHR(Raw, hlcmsProfileIn, TYPE_RGBA_16, hlcmsProfileOut, TYPE_RGBA_16, Intent, cmsFLAGS_NOCACHE| cmsFLAGS_COPY_ALPHA);
+ cmsHTRANSFORM xformPlugin = cmsCreateTransformTHR(Plugin, hlcmsProfileIn, TYPE_RGBA_16, hlcmsProfileOut, TYPE_RGBA_16, Intent, cmsFLAGS_NOCACHE| cmsFLAGS_COPY_ALPHA);
+
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ if (xformRaw == NULL || xformPlugin == NULL) {
+
+ Fail("NULL transforms on check float conversions");
+ }
+
+ // Again, no checking on mem alloc because this is just a test
+ bufferIn = (Scanline_rgba16bits*)malloc(npixels * sizeof(Scanline_rgba16bits));
+ bufferRawOut = (Scanline_rgba16bits*)malloc(npixels * sizeof(Scanline_rgba16bits));
+ bufferPluginOut = (Scanline_rgba16bits*)malloc(npixels * sizeof(Scanline_rgba16bits));
+
+ // Same input to both transforms
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ bufferIn[j].r = FROM_8_TO_16(0xf8);
+ bufferIn[j].g = FROM_8_TO_16(0xf8);
+ bufferIn[j].b = FROM_8_TO_16(0xf8);
+ bufferIn[j].a = 0xffff;
+
+ j++;
+ }
+
+ // Different transforms, different output buffers
+ cmsDoTransform(xformRaw, bufferIn, bufferRawOut, npixels);
+ cmsDoTransform(xformPlugin, bufferIn, bufferPluginOut, npixels);
+
+ // Lets compare results
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ if (bufferRawOut[j].r != bufferPluginOut[j].r ||
+ bufferRawOut[j].g != bufferPluginOut[j].g ||
+ bufferRawOut[j].b != bufferPluginOut[j].b ||
+ bufferRawOut[j].a != bufferPluginOut[j].a)
+ Fail(
+ "Conversion failed at [%x %x %x %x] (%x %x %x %x) != (%x %x %x %x)",
+ bufferIn[j].r, bufferIn[j].g, bufferIn[j].b, bufferIn[j].a,
+ bufferRawOut[j].r, bufferRawOut[j].g, bufferRawOut[j].b, bufferRawOut[j].a,
+ bufferPluginOut[j].r, bufferPluginOut[j].g, bufferPluginOut[j].b, bufferPluginOut[j].a);
+
+ j++;
+ }
+
+ free(bufferIn); free(bufferRawOut);
+ free(bufferPluginOut);
+
+ cmsDeleteTransform(xformRaw);
+ cmsDeleteTransform(xformPlugin);
+
+ cmsDeleteContext(Plugin);
+ cmsDeleteContext(Raw);
+}
+
+static
+void CheckAccuracy16Bits(void)
+{
+ // CLUT should be as 16 bits or better
+ printf("Checking accuracy of 16 bits CLUT...");
+ TryAllValues16bits(cmsOpenProfileFromFile("test5.icc", "r"), cmsOpenProfileFromFile("test3.icc", "r"), INTENT_PERCEPTUAL);
+ printf("All 16 bits tests passed OK\n\n");
+}
+
+// --------------------------------------------------------------------------------------------------
+// A C C U R A C Y C H E C K S
+// --------------------------------------------------------------------------------------------------
+
+
+// Check result accuracy
+static
+cmsBool ValidFloat(cmsFloat32Number a, cmsFloat32Number b)
+{
+ return fabsf(a-b) < EPSILON_FLOAT_TESTS;
+}
+
+// Do an in-depth test by checking all RGB cube of 8 bits, going from profilein to profileout.
+// Values with and without optimization are checked (different contexts, one with the plugin and another without)
+// Results should be same except for EPSILON_FLOAT_TESTS allowed for accuracy/speed tradeoff. Cache is disabled
+static
+void TryAllValuesFloat(cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+{
+ cmsContext Raw = cmsCreateContext(NULL, NULL);
+ cmsContext Plugin = cmsCreateContext(cmsFastFloatExtensions(), NULL);
+
+ Scanline_rgbFloat* bufferIn;
+ Scanline_rgbFloat* bufferRawOut;
+ Scanline_rgbFloat* bufferPluginOut;
+ int r, g, b;
+
+ int j;
+ cmsUInt32Number npixels = 256 * 256 * 256;
+
+ cmsHTRANSFORM xformRaw = cmsCreateTransformTHR(Raw, hlcmsProfileIn, TYPE_RGB_FLT, hlcmsProfileOut, TYPE_RGB_FLT, Intent, cmsFLAGS_NOCACHE);
+ cmsHTRANSFORM xformPlugin = cmsCreateTransformTHR(Plugin, hlcmsProfileIn, TYPE_RGB_FLT, hlcmsProfileOut, TYPE_RGB_FLT, Intent, cmsFLAGS_NOCACHE);
+
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ if (xformRaw == NULL || xformPlugin == NULL) {
+
+ Fail("NULL transforms on check float conversions");
+ }
+
+ // Again, no checking on mem alloc because this is just a test
+ bufferIn = (Scanline_rgbFloat*)malloc(npixels * sizeof(Scanline_rgbFloat));
+ bufferRawOut = (Scanline_rgbFloat*)malloc(npixels * sizeof(Scanline_rgbFloat));
+ bufferPluginOut = (Scanline_rgbFloat*)malloc(npixels * sizeof(Scanline_rgbFloat));
+
+ // Same input to both transforms
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ bufferIn[j].r = (cmsFloat32Number)r / 255.0f;
+ bufferIn[j].g = (cmsFloat32Number)g / 255.0f;
+ bufferIn[j].b = (cmsFloat32Number)b / 255.0f;
+
+ j++;
+ }
+
+ // Different transforms, different output buffers
+ cmsDoTransform(xformRaw, bufferIn, bufferRawOut, npixels);
+ cmsDoTransform(xformPlugin, bufferIn, bufferPluginOut, npixels);
+
+ // Lets compare results
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ if (!ValidFloat(bufferRawOut[j].r, bufferPluginOut[j].r) ||
+ !ValidFloat(bufferRawOut[j].g, bufferPluginOut[j].g) ||
+ !ValidFloat(bufferRawOut[j].b, bufferPluginOut[j].b))
+ Fail("Conversion failed at (%f %f %f) != (%f %f %f)", bufferRawOut[j].r, bufferRawOut[j].g, bufferRawOut[j].b,
+ bufferPluginOut[j].r, bufferPluginOut[j].g, bufferPluginOut[j].b);
+
+ j++;
+ }
+
+ free(bufferIn); free(bufferRawOut);
+ free(bufferPluginOut);
+
+ cmsDeleteTransform(xformRaw);
+ cmsDeleteTransform(xformPlugin);
+
+ cmsDeleteContext(Plugin);
+ cmsDeleteContext(Raw);
+}
+
+static
+void TryAllValuesFloatAlpha(cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent, cmsBool copyAlpha)
+{
+ cmsContext Raw = cmsCreateContext(NULL, NULL);
+ cmsContext Plugin = cmsCreateContext(cmsFastFloatExtensions(), NULL);
+
+ Scanline_rgbaFloat* bufferIn;
+ Scanline_rgbaFloat* bufferRawOut;
+ Scanline_rgbaFloat* bufferPluginOut;
+ int r, g, b;
+
+ int j;
+ cmsUInt32Number npixels = 256 * 256 * 256;
+
+ cmsUInt32Number flags = cmsFLAGS_NOCACHE | ( copyAlpha? cmsFLAGS_COPY_ALPHA : 0);
+
+ cmsHTRANSFORM xformRaw = cmsCreateTransformTHR(Raw, hlcmsProfileIn, TYPE_RGBA_FLT, hlcmsProfileOut, TYPE_RGBA_FLT, Intent, flags);
+ cmsHTRANSFORM xformPlugin = cmsCreateTransformTHR(Plugin, hlcmsProfileIn, TYPE_RGBA_FLT, hlcmsProfileOut, TYPE_RGBA_FLT, Intent, flags);
+
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ if (xformRaw == NULL || xformPlugin == NULL) {
+
+ Fail("NULL transforms on check float conversions");
+ }
+
+ // Again, no checking on mem alloc because this is just a test
+ bufferIn = (Scanline_rgbaFloat*)malloc(npixels * sizeof(Scanline_rgbaFloat));
+ bufferRawOut = (Scanline_rgbaFloat*)malloc(npixels * sizeof(Scanline_rgbaFloat));
+ bufferPluginOut = (Scanline_rgbaFloat*)malloc(npixels * sizeof(Scanline_rgbaFloat));
+
+ memset(bufferRawOut, 0, npixels * sizeof(Scanline_rgbaFloat));
+ memset(bufferPluginOut, 0, npixels * sizeof(Scanline_rgbaFloat));
+
+ // Same input to both transforms
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ bufferIn[j].r = (cmsFloat32Number)r / 255.0f;
+ bufferIn[j].g = (cmsFloat32Number)g / 255.0f;
+ bufferIn[j].b = (cmsFloat32Number)b / 255.0f;
+ bufferIn[j].a = (cmsFloat32Number) 1.0f;
+
+ j++;
+ }
+
+ // Different transforms, different output buffers
+ cmsDoTransform(xformRaw, bufferIn, bufferRawOut, npixels);
+ cmsDoTransform(xformPlugin, bufferIn, bufferPluginOut, npixels);
+
+ // Lets compare results
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ if (!ValidFloat(bufferRawOut[j].r, bufferPluginOut[j].r) ||
+ !ValidFloat(bufferRawOut[j].g, bufferPluginOut[j].g) ||
+ !ValidFloat(bufferRawOut[j].b, bufferPluginOut[j].b) ||
+ !ValidFloat(bufferRawOut[j].a, bufferPluginOut[j].a))
+ Fail("Conversion failed at (%f %f %f %f) != (%f %f %f %f)", bufferRawOut[j].r, bufferRawOut[j].g, bufferRawOut[j].b, bufferRawOut[j].a,
+ bufferPluginOut[j].r, bufferPluginOut[j].g, bufferPluginOut[j].b, bufferPluginOut[j].a);
+
+ j++;
+ }
+
+ free(bufferIn); free(bufferRawOut);
+ free(bufferPluginOut);
+
+ cmsDeleteTransform(xformRaw);
+ cmsDeleteTransform(xformPlugin);
+
+ cmsDeleteContext(Plugin);
+ cmsDeleteContext(Raw);
+}
+
+
+
+// Next test checks results of optimized floating point versus 16 bits. That is, converting the float to 16 bits, operating
+// in 16 bits and back to float. Results again should be in range of epsilon
+static
+cmsBool Valid16Float(cmsUInt16Number a, cmsFloat32Number b)
+{
+ return fabs(((cmsFloat32Number)a / (cmsFloat32Number) 0xFFFF) - b) < EPSILON_FLOAT_TESTS;
+}
+
+// Do an in-depth test by checking all RGB cube of 8 bits, going from profilein to profileout. 16 bits temporary is used as reference
+static
+void TryAllValuesFloatVs16(cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+{
+ Scanline_rgbFloat* bufferIn;
+ Scanline_rgb16bits* bufferIn16;
+
+ Scanline_rgbFloat* bufferFloatOut;
+ Scanline_rgb16bits* buffer16Out;
+ int r, g, b;
+
+ int j;
+ cmsUInt32Number npixels = 256 * 256 * 256;
+
+ cmsHTRANSFORM xformRaw = cmsCreateTransform(hlcmsProfileIn, TYPE_RGB_16, hlcmsProfileOut, TYPE_RGB_16, Intent, cmsFLAGS_NOCACHE);
+ cmsHTRANSFORM xformPlugin = cmsCreateTransform(hlcmsProfileIn, TYPE_RGB_FLT, hlcmsProfileOut, TYPE_RGB_FLT, Intent, cmsFLAGS_NOCACHE);
+
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ if (xformRaw == NULL || xformPlugin == NULL) {
+
+ Fail("NULL transforms on check float vs 16 conversions");
+ }
+
+ // Again, no checking on mem alloc because this is just a test
+ bufferIn = (Scanline_rgbFloat*)malloc(npixels * sizeof(Scanline_rgbFloat));
+ bufferIn16 = (Scanline_rgb16bits*)malloc(npixels * sizeof(Scanline_rgb16bits));
+ bufferFloatOut = (Scanline_rgbFloat*)malloc(npixels * sizeof(Scanline_rgbFloat));
+ buffer16Out = (Scanline_rgb16bits*)malloc(npixels * sizeof(Scanline_rgb16bits));
+
+
+ // Fill two equivalent input buffers
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ bufferIn[j].r = (cmsFloat32Number)r / 255.0f;
+ bufferIn[j].g = (cmsFloat32Number)g / 255.0f;
+ bufferIn[j].b = (cmsFloat32Number)b / 255.0f;
+
+ bufferIn16[j].r = FROM_8_TO_16(r);
+ bufferIn16[j].g = FROM_8_TO_16(g);
+ bufferIn16[j].b = FROM_8_TO_16(b);
+
+ j++;
+ }
+
+ // Convert
+ cmsDoTransform(xformRaw, bufferIn16, buffer16Out, npixels);
+ cmsDoTransform(xformPlugin, bufferIn, bufferFloatOut, npixels);
+
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ // Check for same values
+ if (!Valid16Float(buffer16Out[j].r, bufferFloatOut[j].r) ||
+ !Valid16Float(buffer16Out[j].g, bufferFloatOut[j].g) ||
+ !Valid16Float(buffer16Out[j].b, bufferFloatOut[j].b))
+ Fail("Conversion failed at (%f %f %f) != (%f %f %f)", buffer16Out[j].r / 65535.0, buffer16Out[j].g / 65535.0, buffer16Out[j].b / 65535.0,
+ bufferFloatOut[j].r, bufferFloatOut[j].g, bufferFloatOut[j].b);
+
+ j++;
+ }
+
+ free(bufferIn16); free(buffer16Out);
+ free(bufferIn); free(bufferFloatOut);
+ cmsDeleteTransform(xformRaw);
+ cmsDeleteTransform(xformPlugin);
+}
+
+
+// Check change format feature
+static
+void CheckChangeFormat(void)
+{
+ cmsHPROFILE hsRGB, hLab;
+ cmsHTRANSFORM xform;
+ cmsUInt8Number rgb8[3] = { 10, 120, 40 };
+ cmsUInt16Number rgb16[3] = { 10* 257, 120*257, 40*257 };
+ cmsUInt16Number lab16_1[3], lab16_2[3];
+
+ printf("Checking change format feature...");
+
+ hsRGB = cmsCreate_sRGBProfile();
+ hLab = cmsCreateLab4Profile(NULL);
+
+ xform = cmsCreateTransform(hsRGB, TYPE_RGB_16, hLab, TYPE_Lab_16, INTENT_PERCEPTUAL, 0);
+
+ cmsCloseProfile(hsRGB);
+ cmsCloseProfile(hLab);
+
+ cmsDoTransform(xform, rgb16, lab16_1, 1);
+
+ cmsChangeBuffersFormat(xform, TYPE_RGB_8, TYPE_Lab_16);
+
+ cmsDoTransform(xform, rgb8, lab16_2, 1);
+ cmsDeleteTransform(xform);
+
+ if (memcmp(lab16_1, lab16_2, sizeof(lab16_1)) != 0)
+ Fail("Change format failed!");
+
+ printf("Ok\n");
+
+}
+
+static
+cmsBool ValidInt(cmsUInt16Number a, cmsUInt16Number b)
+{
+ return abs(a - b) <= 32;
+}
+
+static
+void CheckLab2Roundtrip(void)
+{
+ cmsHPROFILE hsRGB, hLab;
+ cmsHTRANSFORM xform, xform2;
+ cmsInt8Number* lab;
+ cmsInt32Number Mb, j;
+ cmsInt32Number r, g, b;
+ Scanline_rgb8bits* In;
+ Scanline_rgb8bits* Out;
+
+ printf("Checking lab2 roundtrip...");
+
+ hsRGB = cmsCreate_sRGBProfile();
+ hLab = cmsCreateLab2Profile(NULL);
+
+
+ xform = cmsCreateTransform(hsRGB, TYPE_RGB_8, hLab, TYPE_Lab_8, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE|cmsFLAGS_BLACKPOINTCOMPENSATION);
+ xform2 = cmsCreateTransform(hLab, TYPE_Lab_8, hsRGB, TYPE_RGB_8, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_BLACKPOINTCOMPENSATION);
+
+ cmsCloseProfile(hsRGB);
+ cmsCloseProfile(hLab);
+
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_rgb8bits);
+ In = (Scanline_rgb8bits*)malloc(Mb);
+ Out = (Scanline_rgb8bits*)malloc(Mb);
+ lab = (cmsInt8Number*)malloc(256 * 256 * 256 * 3 * sizeof(cmsInt8Number));
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++)
+ {
+
+ In[j].r = (cmsUInt8Number)r;
+ In[j].g = (cmsUInt8Number)g;
+ In[j].b = (cmsUInt8Number)b;
+ j++;
+ }
+
+
+ cmsDoTransform(xform, In, lab, 256 * 256 * 256);
+ cmsDoTransform(xform2, lab, Out, 256 * 256 * 256);
+
+ cmsDeleteTransform(xform);
+ cmsDeleteTransform(xform2);
+
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ // Check for same values
+ if (!ValidInt(In[j].r, Out[j].r) ||
+ !ValidInt(In[j].g, Out[j].g) ||
+ !ValidInt(In[j].b, Out[j].b))
+ Fail("Conversion failed at (%d %d %d) != (%d %d %d)", In[j].r, In[j].g, In[j].b,
+ Out[j].r, Out[j].g, Out[j].b);
+
+ j++;
+ }
+
+
+ free(In);
+ free(Out);
+ free(lab);
+ printf("Ok\n");
+
+}
+
+// Convert some known values
+static
+void CheckConversionFloat(void)
+{
+ printf("Crash test.");
+ TryAllValuesFloatAlpha(cmsOpenProfileFromFile("test5.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL, FALSE);
+ printf("..");
+ TryAllValuesFloatAlpha(cmsOpenProfileFromFile("test5.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL, TRUE);
+ printf("Ok\n");
+
+
+ printf("Crash (II) test.");
+ TryAllValuesFloatAlpha(cmsOpenProfileFromFile("test0.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL, FALSE);
+ printf("..");
+ TryAllValuesFloatAlpha(cmsOpenProfileFromFile("test0.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL, TRUE);
+ printf("Ok\n");
+
+ // Matrix-shaper should be accurate
+ printf("Checking accuracy on Matrix-shaper...");
+ TryAllValuesFloat(cmsOpenProfileFromFile("test5.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL);
+ printf("Ok\n");
+
+ // CLUT should be as 16 bits or better
+ printf("Checking accuracy of CLUT...");
+ TryAllValuesFloatVs16(cmsOpenProfileFromFile("test5.icc", "r"), cmsOpenProfileFromFile("test3.icc", "r"), INTENT_PERCEPTUAL);
+ printf("Ok\n");
+
+ // Same profile should give same values (we test both methods)
+ printf("Checking accuracy on same profile ...");
+ TryAllValuesFloatVs16(cmsOpenProfileFromFile("test0.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL);
+ TryAllValuesFloat(cmsOpenProfileFromFile("test0.icc", "r"), cmsOpenProfileFromFile("test0.icc", "r"), INTENT_PERCEPTUAL);
+ printf("Ok\n");
+}
+
+
+static
+cmsBool ValidFloat2(cmsFloat32Number a, cmsFloat32Number b)
+{
+ return fabsf(a - b) < 0.007;
+}
+
+
+static
+cmsFloat32Number distance(cmsFloat32Number rgb1[], cmsFloat32Number rgb2[])
+{
+ cmsFloat32Number dr = rgb2[0] - rgb1[0];
+ cmsFloat32Number dg = rgb2[1] - rgb1[1];
+ cmsFloat32Number db = rgb2[2] - rgb1[2];
+
+ return dr * dr + dg * dg + db * db;
+}
+
+static
+void CheckLab2RGB(void)
+{
+ cmsHPROFILE hLab = cmsCreateLab4Profile(NULL);
+ cmsHPROFILE hRGB = cmsOpenProfileFromFile("test3.icc", "r");
+ cmsContext noPlugin = cmsCreateContext(0, 0);
+
+ cmsHTRANSFORM hXformNoPlugin = cmsCreateTransformTHR(noPlugin, hLab, TYPE_Lab_FLT, hRGB, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOCACHE);
+ cmsHTRANSFORM hXformPlugin = cmsCreateTransformTHR(0, hLab, TYPE_Lab_FLT, hRGB, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOCACHE);
+
+ cmsFloat32Number Lab[3], RGB[3], RGB2[3];
+
+ cmsFloat32Number maxInside = 0, maxOutside = 0, L, a, b;
+
+ printf("Checking Lab -> RGB...");
+ for (L = 4; L <= 100; L++)
+ {
+ for (a = -30; a < +30; a++)
+ for (b = -30; b < +30; b++)
+ {
+ cmsFloat32Number d;
+
+ Lab[0] = L; Lab[1] = a; Lab[2] = b;
+ cmsDoTransform(hXformNoPlugin, Lab, RGB, 1);
+ cmsDoTransform(hXformPlugin, Lab, RGB2, 1);
+
+ d = distance(RGB, RGB2);
+ if (d > maxInside)
+ maxInside = d;
+ }
+ }
+
+
+ for (L = 1; L <= 100; L += 5)
+ {
+ for (a = -100; a < +100; a += 5)
+ for (b = -100; b < +100; b += 5)
+ {
+ cmsFloat32Number d;
+
+ Lab[0] = L; Lab[1] = a; Lab[2] = b;
+ cmsDoTransform(hXformNoPlugin, Lab, RGB, 1);
+ cmsDoTransform(hXformPlugin, Lab, RGB2, 1);
+
+ d = distance(RGB, RGB2);
+ if (d > maxOutside)
+ maxOutside = d;
+ }
+
+ }
+
+
+ printf("Max distance: Inside gamut %f, Outside gamut %f\n", sqrtf(maxInside), sqrtf(maxOutside));
+
+ cmsDeleteTransform(hXformNoPlugin);
+ cmsDeleteTransform(hXformPlugin);
+
+ cmsDeleteContext(noPlugin);
+}
+
+
+
+
+// --------------------------------------------------------------------------------------------------
+// P E R F O R M A N C E C H E C K S
+// --------------------------------------------------------------------------------------------------
+
+
+static
+cmsFloat64Number MPixSec(cmsFloat64Number diff)
+{
+ cmsFloat64Number seconds = (cmsFloat64Number)diff / (cmsFloat64Number)CLOCKS_PER_SEC;
+ return (256.0 * 256.0 * 256.0) / (1024.0*1024.0*seconds);
+}
+
+typedef cmsFloat64Number(*perf_fn)(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut);
+
+
+static
+void PerformanceHeader(void)
+{
+ printf(" MPixel/sec. MByte/sec.\n");
+}
+
+
+static
+cmsHPROFILE loadProfile(const char* name)
+{
+ if (*name == '*')
+ {
+ if (strcmp(name, "*lab") == 0)
+ {
+ return cmsCreateLab4Profile(NULL);
+ }
+ else
+ if (strcmp(name, "*xyz") == 0)
+ {
+ return cmsCreateXYZProfile();
+ }
+ else
+ if (strcmp(name, "*curves") == 0)
+ {
+ return CreateCurves();
+ }
+ else
+ Fail("Unknown builtin '%s'", name);
+
+ }
+
+ return cmsOpenProfileFromFile(name, "r");
+}
+
+
+static
+cmsFloat64Number Performance(const char* Title, perf_fn fn, cmsContext ct, const char* inICC, const char* outICC, size_t sz, cmsFloat64Number prev)
+{
+ cmsHPROFILE hlcmsProfileIn = loadProfile(inICC);
+ cmsHPROFILE hlcmsProfileOut = loadProfile(outICC);
+
+ cmsFloat64Number n = fn(ct, hlcmsProfileIn, hlcmsProfileOut);
+
+ printf("%-30s: ", Title); fflush(stdout);
+ printf("%-12.2f %-12.2f", n, n * sz);
+
+ if (prev > 0.0) {
+
+ cmsFloat64Number imp = n / prev;
+ if (imp > 1)
+ printf(" (x %-2.1f)", imp);
+ }
+
+ printf("\n"); fflush(stdout);
+ return n;
+}
+
+
+static
+void ComparativeCt(cmsContext ct1, cmsContext ct2, const char* Title, perf_fn fn1, perf_fn fn2, const char* inICC, const char* outICC)
+{
+ cmsHPROFILE hlcmsProfileIn;
+ cmsHPROFILE hlcmsProfileOut;
+
+ if (inICC == NULL)
+ hlcmsProfileIn = CreateCurves();
+ else
+ hlcmsProfileIn = cmsOpenProfileFromFile(inICC, "r");
+
+ if (outICC == NULL)
+ hlcmsProfileOut = CreateCurves();
+ else
+ hlcmsProfileOut = cmsOpenProfileFromFile(outICC, "r");
+
+
+ cmsFloat64Number n1 = fn1(ct1, hlcmsProfileIn, hlcmsProfileOut);
+
+ if (inICC == NULL)
+ hlcmsProfileIn = CreateCurves();
+ else
+ hlcmsProfileIn = cmsOpenProfileFromFile(inICC, "r");
+
+ if (outICC == NULL)
+ hlcmsProfileOut = CreateCurves();
+ else
+ hlcmsProfileOut = cmsOpenProfileFromFile(outICC, "r");
+
+ cmsFloat64Number n2 = fn2(ct2, hlcmsProfileIn, hlcmsProfileOut);
+
+
+ printf("%-30s: ", Title); fflush(stdout);
+ printf("%-12.2f %-12.2f\n", n1, n2);
+}
+
+static
+void Comparative(const char* Title, perf_fn fn1, perf_fn fn2, const char* inICC, const char* outICC)
+{
+ ComparativeCt(0, 0, Title, fn1, fn2, inICC, outICC);
+}
+
+// The worst case is used, no cache and all rgb combinations
+static
+cmsFloat64Number SpeedTest8bitsRGB(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_rgb8bits *In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_RGB_8, hlcmsProfileOut, TYPE_RGB_8, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_rgb8bits);
+ In = (Scanline_rgb8bits*)malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].r = (cmsUInt8Number)r;
+ In[j].g = (cmsUInt8Number)g;
+ In[j].b = (cmsUInt8Number)b;
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256 * 256 * 256);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+
+ return MPixSec(diff);
+}
+
+static
+cmsFloat64Number SpeedTest8bitsRGBA(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_rgba8bits *In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_RGBA_8, hlcmsProfileOut, TYPE_RGBA_8, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_rgba8bits);
+ In = (Scanline_rgba8bits*)malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].r = (cmsUInt8Number)r;
+ In[j].g = (cmsUInt8Number)g;
+ In[j].b = (cmsUInt8Number)b;
+ In[j].a = 0;
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256 * 256 * 256);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+ return MPixSec(diff);
+
+}
+
+
+// The worst case is used, no cache and all rgb combinations
+static
+cmsFloat64Number SpeedTest15bitsRGB(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_rgb15bits *In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_RGB_15, hlcmsProfileOut, TYPE_RGB_15, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_rgb15bits);
+ In = (Scanline_rgb15bits*)malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].r = (cmsUInt16Number)r;
+ In[j].g = (cmsUInt16Number)g;
+ In[j].b = (cmsUInt16Number)b;
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256 * 256 * 256);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+
+ return MPixSec(diff);
+}
+
+static
+cmsFloat64Number SpeedTest15bitsRGBA(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_rgba15bits *In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_RGBA_15, hlcmsProfileOut, TYPE_RGBA_15, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_rgba15bits);
+ In = (Scanline_rgba15bits*)malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].r = (cmsUInt16Number)r;
+ In[j].g = (cmsUInt16Number)g;
+ In[j].b = (cmsUInt16Number)b;
+ In[j].a = 0;
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256 * 256 * 256);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+ return MPixSec(diff);
+
+}
+
+static
+cmsFloat64Number SpeedTest15bitsCMYK(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_cmyk15bits *In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_CMYK_15, hlcmsProfileOut, TYPE_CMYK_15, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_cmyk15bits);
+ In = (Scanline_cmyk15bits*)malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].r = (cmsUInt16Number)r;
+ In[j].g = (cmsUInt16Number)g;
+ In[j].b = (cmsUInt16Number)b;
+ In[j].a = (cmsUInt16Number)0;
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256 * 256 * 256);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+ return MPixSec(diff);
+}
+
+// The worst case is used, no cache and all rgb combinations
+static
+cmsFloat64Number SpeedTest16bitsRGB(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_rgb16bits *In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_RGB_16, hlcmsProfileOut, TYPE_RGB_16, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_rgb16bits);
+ In = (Scanline_rgb16bits*)malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].r = (cmsUInt16Number)FROM_8_TO_16(r);
+ In[j].g = (cmsUInt16Number)FROM_8_TO_16(g);
+ In[j].b = (cmsUInt16Number)FROM_8_TO_16(b);
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256 * 256 * 256);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+
+ return MPixSec(diff);
+}
+
+static
+cmsFloat64Number SpeedTest16bitsCMYK(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_cmyk16bits* In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_CMYK_16, hlcmsProfileOut, TYPE_CMYK_16, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 256 * 256 * 256 * sizeof(Scanline_cmyk16bits);
+ In = (Scanline_cmyk16bits*)malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].c = (cmsUInt16Number)r;
+ In[j].m = (cmsUInt16Number)g;
+ In[j].y = (cmsUInt16Number)b;
+ In[j].k = (cmsUInt16Number)r;
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256 * 256 * 256);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+ return MPixSec(diff);
+}
+
+
+
+static
+void SpeedTest8(void)
+{
+ cmsContext noPlugin = cmsCreateContext(0, 0);
+
+ cmsFloat64Number t[10];
+
+ printf("\n\n");
+ printf("P E R F O R M A N C E T E S T S 8 B I T S (D E F A U L T)\n");
+ printf("==============================================================\n\n");
+ fflush(stdout);
+
+ PerformanceHeader();
+ t[0] = Performance("8 bits on CLUT profiles ", SpeedTest8bitsRGB, noPlugin, "test5.icc", "test3.icc", sizeof(Scanline_rgb8bits), 0);
+ t[1] = Performance("8 bits on Matrix-Shaper ", SpeedTest8bitsRGB, noPlugin, "test5.icc", "test0.icc", sizeof(Scanline_rgb8bits), 0);
+ t[2] = Performance("8 bits on same MatrixSh ", SpeedTest8bitsRGB, noPlugin, "test0.icc", "test0.icc", sizeof(Scanline_rgb8bits), 0);
+ t[3] = Performance("8 bits on curves ", SpeedTest8bitsRGB, noPlugin, "*curves", "*curves", sizeof(Scanline_rgb8bits), 0);
+
+ // Note that context 0 has the plug-in installed
+
+ printf("\n\n");
+ printf("P E R F O R M A N C E T E S T S 8 B I T S (P L U G I N)\n");
+ printf("===========================================================\n\n");
+ fflush(stdout);
+
+ PerformanceHeader();
+ Performance("8 bits on CLUT profiles ", SpeedTest8bitsRGB, 0, "test5.icc", "test3.icc", sizeof(Scanline_rgb8bits), t[0]);
+ Performance("8 bits on Matrix-Shaper ", SpeedTest8bitsRGB, 0, "test5.icc", "test0.icc", sizeof(Scanline_rgb8bits), t[1]);
+ Performance("8 bits on same MatrixSh ", SpeedTest8bitsRGB, 0, "test0.icc", "test0.icc", sizeof(Scanline_rgb8bits), t[2]);
+ Performance("8 bits on curves ", SpeedTest8bitsRGB, 0, "*curves", "*curves", sizeof(Scanline_rgb8bits), t[3]);
+
+ cmsDeleteContext(noPlugin);
+}
+
+static
+void SpeedTest15(void)
+{
+ printf("\n\nP E R F O R M A N C E T E S T S 1 5 B I T S (P L U G I N)\n");
+ printf( "===============================================================\n\n");
+
+ PerformanceHeader();
+ Performance("15 bits on CLUT profiles ", SpeedTest15bitsRGB, 0, "test5.icc", "test3.icc", sizeof(Scanline_rgb15bits), 0);
+ Performance("15 bits on Matrix-Shaper profiles", SpeedTest15bitsRGB, 0, "test5.icc", "test0.icc", sizeof(Scanline_rgb15bits), 0);
+ Performance("15 bits on same Matrix-Shaper ", SpeedTest15bitsRGB, 0, "test0.icc", "test0.icc", sizeof(Scanline_rgb15bits), 0);
+ Performance("15 bits on curves ", SpeedTest15bitsRGB, 0, "*curves", "*curves", sizeof(Scanline_rgb15bits), 0);
+ Performance("15 bits on CMYK CLUT profiles ", SpeedTest15bitsCMYK, 0, "test1.icc", "test2.icc", sizeof(Scanline_rgba15bits), 0);
+}
+
+static
+void SpeedTest16(void)
+{
+ cmsContext noPlugin = cmsCreateContext(0, 0);
+
+
+ printf("\n\n");
+ printf("P E R F O R M A N C E T E S T S 1 6 B I T S (D E F A U L T)\n");
+ printf("=================================================================\n\n");
+
+ PerformanceHeader();
+ Performance("16 bits on CLUT profiles ", SpeedTest16bitsRGB, noPlugin, "test5.icc", "test3.icc", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on Matrix-Shaper profiles", SpeedTest16bitsRGB, noPlugin, "test5.icc", "test0.icc", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on same Matrix-Shaper ", SpeedTest16bitsRGB, noPlugin, "test0.icc", "test0.icc", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on curves ", SpeedTest16bitsRGB, noPlugin, "*curves", "*curves", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on CMYK CLUT profiles ", SpeedTest16bitsCMYK, noPlugin, "test1.icc", "test2.icc", sizeof(Scanline_cmyk16bits), 0);
+
+ printf("\n\n");
+ printf("P E R F O R M A N C E T E S T S 1 6 B I T S (P L U G I N)\n");
+ printf("===============================================================\n\n");
+
+ PerformanceHeader();
+ Performance("16 bits on CLUT profiles ", SpeedTest16bitsRGB, 0, "test5.icc", "test3.icc", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on Matrix-Shaper profiles", SpeedTest16bitsRGB, 0, "test5.icc", "test0.icc", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on same Matrix-Shaper ", SpeedTest16bitsRGB, 0, "test0.icc", "test0.icc", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on curves ", SpeedTest16bitsRGB, 0, "*curves", "*curves", sizeof(Scanline_rgb16bits), 0);
+ Performance("16 bits on CMYK CLUT profiles ", SpeedTest16bitsCMYK, 0, "test1.icc", "test2.icc", sizeof(Scanline_cmyk16bits), 0);
+}
+
+// The worst case is used, no cache and all rgb combinations
+static
+cmsFloat64Number SpeedTestFloatRGB(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ void *In;
+ cmsUInt32Number size, Mb;
+ cmsUInt32Number inFormatter=0, outFormatter=0;
+ cmsFloat64Number seconds;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+
+ switch (cmsGetColorSpace(hlcmsProfileIn))
+ {
+ case cmsSigRgbData: inFormatter = TYPE_RGB_FLT; break;
+ case cmsSigLabData: inFormatter = TYPE_Lab_FLT; break;
+
+ default:
+ Fail("Invalid colorspace");
+ }
+
+ switch (cmsGetColorSpace(hlcmsProfileOut))
+ {
+ case cmsSigRgbData: outFormatter = TYPE_RGB_FLT; break;
+ case cmsSigLabData: outFormatter = TYPE_Lab_FLT; break;
+ case cmsSigXYZData: outFormatter = TYPE_XYZ_FLT; break;
+
+ default:
+ Fail("Invalid colorspace");
+ }
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, inFormatter, hlcmsProfileOut, outFormatter, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+
+
+ j = 0;
+
+ if (inFormatter == TYPE_RGB_FLT)
+ {
+ cmsInt32Number r, g, b;
+ Scanline_rgbFloat* fill;
+
+ size = 256 * 256 * 256;
+ Mb = size * sizeof(Scanline_rgbFloat);
+ In = malloc(Mb);
+ fill = (Scanline_rgbFloat*)In;
+
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ fill[j].r = (cmsFloat32Number)r / 255.0f;
+ fill[j].g = (cmsFloat32Number)g / 255.0f;
+ fill[j].b = (cmsFloat32Number)b / 255.0f;
+
+ j++;
+ }
+
+ }
+ else
+ {
+ cmsFloat32Number L, a, b;
+ Scanline_LabFloat* fill;
+
+ size = 100 * 256 * 256;
+ Mb = size * sizeof(Scanline_LabFloat);
+ In = malloc(Mb);
+ fill = (Scanline_LabFloat*)In;
+
+ for (L = 0; L < 100; L++)
+ for (a = -127.0; a < 127.0; a++)
+ for (b = -127.0; b < +127.0; b++) {
+
+ fill[j].L = L;
+ fill[j].a = a;
+ fill[j].b = b;
+
+ j++;
+ }
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, size);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+
+ seconds = (cmsFloat64Number)diff / (cmsFloat64Number)CLOCKS_PER_SEC;
+ return ((cmsFloat64Number)size) / (1024.0 * 1024.0 * seconds);
+}
+
+
+static
+cmsFloat64Number SpeedTestFloatCMYK(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number c, m, y, k, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_cmykFloat* In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_CMYK_FLT, hlcmsProfileOut, TYPE_CMYK_FLT, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ Mb = 64 * 64 * 64 * 64 * sizeof(Scanline_cmykFloat);
+ In = (Scanline_cmykFloat*)malloc(Mb);
+
+ j = 0;
+ for (c = 0; c < 256; c += 4)
+ for (m = 0; m < 256; m += 4)
+ for (y = 0; y < 256; y += 4)
+ for (k = 0; k < 256; k += 4) {
+
+ In[j].c = (cmsFloat32Number)c / 255.0f;
+ In[j].m = (cmsFloat32Number)m / 255.0f;
+ In[j].y = (cmsFloat32Number)y / 255.0f;
+ In[j].k = (cmsFloat32Number)k / 255.0f;
+
+ j++;
+ }
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 64 * 64 * 64 * 64);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+ return MPixSec(diff);
+}
+
+
+static
+cmsFloat64Number SpeedTestFloatLab(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ void* In;
+ cmsUInt32Number size, Mb;
+ cmsUInt32Number outFormatter = 0;
+ cmsFloat64Number seconds;
+ cmsFloat32Number L, a, b;
+ Scanline_LabFloat* fill;
+
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+
+ if (cmsGetColorSpace(hlcmsProfileIn) != cmsSigLabData)
+ {
+ Fail("Invalid colorspace");
+ }
+
+ switch (cmsGetColorSpace(hlcmsProfileOut))
+ {
+ case cmsSigRgbData: outFormatter = TYPE_RGB_FLT; break;
+ case cmsSigLabData: outFormatter = TYPE_Lab_FLT; break;
+ case cmsSigXYZData: outFormatter = TYPE_XYZ_FLT; break;
+
+ default:
+ Fail("Invalid colorspace");
+ }
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_Lab_FLT, hlcmsProfileOut, outFormatter, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ j = 0;
+
+ size = 100 * 256 * 256;
+ Mb = size * sizeof(Scanline_LabFloat);
+ In = malloc(Mb);
+ fill = (Scanline_LabFloat*)In;
+
+ for (L = 0; L < 100; L++)
+ for (a = -127.0; a < 127.0; a++)
+ for (b = -127.0; b < +127.0; b++) {
+
+ fill[j].L = L;
+ fill[j].a = a;
+ fill[j].b = b;
+
+ j++;
+ }
+
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, size);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+
+ seconds = (cmsFloat64Number)diff / (cmsFloat64Number)CLOCKS_PER_SEC;
+ return ((cmsFloat64Number)size) / (1024.0 * 1024.0 * seconds);
+}
+
+
+
+static
+void SpeedTestFloat(void)
+{
+ cmsContext noPlugin = cmsCreateContext(0, 0);
+
+ cmsFloat64Number t[10] = { 0 };
+
+ printf("\n\n");
+ printf("P E R F O R M A N C E T E S T S F L O A T (D E F A U L T)\n");
+ printf("==============================================================\n\n");
+ fflush(stdout);
+
+ PerformanceHeader();
+ t[0] = Performance("Floating point on CLUT profiles ", SpeedTestFloatRGB, noPlugin, "test5.icc", "test3.icc", sizeof(Scanline_rgbFloat), 0);
+ t[1] = Performance("Floating point on Matrix-Shaper ", SpeedTestFloatRGB, noPlugin, "test5.icc", "test0.icc", sizeof(Scanline_rgbFloat), 0);
+ t[2] = Performance("Floating point on same MatrixSh ", SpeedTestFloatRGB, noPlugin, "test0.icc", "test0.icc", sizeof(Scanline_rgbFloat), 0);
+ t[3] = Performance("Floating point on curves ", SpeedTestFloatRGB, noPlugin, "*curves", "*curves", sizeof(Scanline_rgbFloat), 0);
+ t[4] = Performance("Floating point on RGB->Lab ", SpeedTestFloatRGB, noPlugin, "test5.icc", "*lab", sizeof(Scanline_rgbFloat), 0);
+ t[5] = Performance("Floating point on RGB->XYZ ", SpeedTestFloatRGB, noPlugin, "test3.icc", "*xyz", sizeof(Scanline_rgbFloat), 0);
+ t[6] = Performance("Floating point on CMYK->CMYK ", SpeedTestFloatCMYK, noPlugin, "test1.icc", "test2.icc",sizeof(Scanline_cmykFloat), 0);
+ t[7] = Performance("Floating point on Lab->RGB ", SpeedTestFloatLab, noPlugin, "*lab", "test3.icc", sizeof(Scanline_LabFloat), 0);
+
+
+ // Note that context 0 has the plug-in installed
+
+ printf("\n\n");
+ printf("P E R F O R M A N C E T E S T S F L O A T (P L U G I N)\n");
+ printf("===========================================================\n\n");
+ fflush(stdout);
+
+ PerformanceHeader();
+ Performance("Floating point on CLUT profiles ", SpeedTestFloatRGB, 0, "test5.icc", "test3.icc", sizeof(Scanline_rgbFloat), t[0]);
+ Performance("Floating point on Matrix-Shaper ", SpeedTestFloatRGB, 0, "test5.icc", "test0.icc", sizeof(Scanline_rgbFloat), t[1]);
+ Performance("Floating point on same MatrixSh ", SpeedTestFloatRGB, 0, "test0.icc", "test0.icc", sizeof(Scanline_rgbFloat), t[2]);
+ Performance("Floating point on curves ", SpeedTestFloatRGB, 0, "*curves", "*curves", sizeof(Scanline_rgbFloat), t[3]);
+ Performance("Floating point on RGB->Lab ", SpeedTestFloatRGB, 0, "test5.icc", "*lab", sizeof(Scanline_rgbFloat), t[4]);
+ Performance("Floating point on RGB->XYZ ", SpeedTestFloatRGB, 0, "test3.icc", "*xyz", sizeof(Scanline_rgbFloat), t[5]);
+ Performance("Floating point on CMYK->CMYK ", SpeedTestFloatCMYK, 0, "test1.icc", "test2.icc", sizeof(Scanline_cmykFloat), t[6]);
+ Performance("Floating point on Lab->RGB ", SpeedTestFloatLab, 0, "*lab", "test3.icc", sizeof(Scanline_LabFloat), t[7]);
+
+ cmsDeleteContext(noPlugin);
+}
+
+
+static
+cmsFloat64Number SpeedTestFloatByUsing16BitsRGB(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM xform16;
+ Scanline_rgbFloat *In;
+ Scanline_rgb16bits *tmp16;
+ cmsUInt32Number MbFloat, Mb16;
+
+ UNUSED_PARAMETER(ct);
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ xform16 = cmsCreateTransformTHR(0, hlcmsProfileIn, TYPE_RGB_16, hlcmsProfileOut, TYPE_RGB_16, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ MbFloat = 256 * 256 * 256 * sizeof(Scanline_rgbFloat);
+ Mb16 = 256 * 256 * 256 * sizeof(Scanline_rgb16bits);
+
+ In = (Scanline_rgbFloat*)malloc(MbFloat);
+ tmp16 = (Scanline_rgb16bits*)malloc(Mb16);
+
+
+ j = 0;
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In[j].r = (cmsFloat32Number)r / 255.0f;
+ In[j].g = (cmsFloat32Number)g / 255.0f;
+ In[j].b = (cmsFloat32Number)b / 255.0f;
+
+ j++;
+ }
+
+
+ atime = clock();
+
+
+ for (j = 0; j < 256 * 256 * 256; j++) {
+
+ tmp16[j].r = (cmsUInt16Number)floor(In[j].r * 65535.0 + 0.5);
+ tmp16[j].g = (cmsUInt16Number)floor(In[j].g * 65535.0 + 0.5);
+ tmp16[j].b = (cmsUInt16Number)floor(In[j].b * 65535.0 + 0.5);
+
+ j++;
+ }
+
+ cmsDoTransform(xform16, tmp16, tmp16, 256 * 256 * 256);
+
+ for (j = 0; j < 256 * 256 * 256; j++) {
+
+ In[j].r = (cmsFloat32Number) (tmp16[j].r / 65535.0 );
+ In[j].g = (cmsFloat32Number) (tmp16[j].g / 65535.0);
+ In[j].b = (cmsFloat32Number) (tmp16[j].b / 65535.0);
+
+ j++;
+ }
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(xform16);
+ return MPixSec(diff);
+}
+
+
+
+
+
+static
+void ComparativeFloatVs16bits(void)
+{
+ printf("\n\n");
+ printf("C O M P A R A T I V E converting to 16 bit vs. using float plug-in.\n");
+ printf(" values given in MegaPixels per second.\n");
+ printf("====================================================================\n");
+ printf(" 16 bits tmp. Float plugin\n");
+ fflush(stdout);
+
+ Comparative("Floating point on CLUT profiles ", SpeedTestFloatByUsing16BitsRGB, SpeedTestFloatRGB, "test5.icc", "test3.icc");
+ Comparative("Floating point on Matrix-Shaper ", SpeedTestFloatByUsing16BitsRGB, SpeedTestFloatRGB, "test5.icc", "test0.icc");
+ Comparative("Floating point on same MatrixSh ", SpeedTestFloatByUsing16BitsRGB, SpeedTestFloatRGB, "test0.icc", "test0.icc");
+ Comparative("Floating point on curves ", SpeedTestFloatByUsing16BitsRGB, SpeedTestFloatRGB, NULL, NULL);
+}
+
+
+
+
+
+
+
+typedef struct
+{
+ Scanline_rgba8bits pixels[256][256];
+ cmsUInt8Number padding[4];
+
+} padded_line;
+
+typedef struct
+{
+ padded_line line[256];
+} big_bitmap;
+
+
+static
+cmsFloat64Number SpeedTest8bitDoTransform(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ big_bitmap* In;
+ big_bitmap* Out;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_RGBA_8, hlcmsProfileOut, TYPE_RGBA_8, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+
+ // Our test bitmap is 256 x 256 padded lines
+ Mb = sizeof(big_bitmap);
+
+ In = (big_bitmap*)malloc(Mb);
+ Out = (big_bitmap*)malloc(Mb);
+
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In->line[r].pixels[g][b].r = (cmsUInt8Number)r;
+ In->line[r].pixels[g][b].g = (cmsUInt8Number)g;
+ In->line[r].pixels[g][b].b = (cmsUInt8Number)b;
+ In->line[r].pixels[g][b].a = 0;
+ }
+
+ atime = clock();
+
+ for (j = 0; j < 256; j++) {
+
+ cmsDoTransform(hlcmsxform, In->line[j].pixels, Out->line[j].pixels, 256 * 256);
+ }
+
+ diff = clock() - atime;
+ free(In); free(Out);
+
+ cmsDeleteTransform(hlcmsxform);
+ return MPixSec(diff);
+
+}
+
+
+static
+cmsFloat64Number SpeedTest8bitLineStride(cmsContext ct, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ big_bitmap* In;
+ big_bitmap* Out;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Fail("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(ct, hlcmsProfileIn, TYPE_RGBA_8, hlcmsProfileOut, TYPE_RGBA_8, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+
+ // Our test bitmap is 256 x 256 padded lines
+ Mb = sizeof(big_bitmap);
+
+ In = (big_bitmap*)malloc(Mb);
+ Out = (big_bitmap*)malloc(Mb);
+
+ for (r = 0; r < 256; r++)
+ for (g = 0; g < 256; g++)
+ for (b = 0; b < 256; b++) {
+
+ In->line[r].pixels[g][b].r = (cmsUInt8Number)r;
+ In->line[r].pixels[g][b].g = (cmsUInt8Number)g;
+ In->line[r].pixels[g][b].b = (cmsUInt8Number)b;
+ In->line[r].pixels[g][b].a = 0;
+ }
+
+ atime = clock();
+
+ cmsDoTransformLineStride(hlcmsxform, In, Out, 256*256, 256, sizeof(padded_line), sizeof(padded_line), 0, 0);
+
+ diff = clock() - atime;
+ free(In); free(Out);
+
+ cmsDeleteTransform(hlcmsxform);
+ return MPixSec(diff);
+
+}
+
+static
+void ComparativeLineStride8bits(void)
+{
+ cmsContext NoPlugin, Plugin;
+
+ printf("\n\n");
+ printf("C O M P A R A T I V E cmsDoTransform() vs. cmsDoTransformLineStride()\n");
+ printf(" values given in MegaPixels per second.\n");
+ printf("====================================================================\n");
+
+ fflush(stdout);
+
+ NoPlugin = cmsCreateContext(NULL, NULL);
+ Plugin = cmsCreateContext(cmsFastFloatExtensions(), NULL);
+
+ ComparativeCt(NoPlugin, Plugin, "CLUT profiles ", SpeedTest8bitDoTransform, SpeedTest8bitLineStride, "test5.icc", "test3.icc");
+ ComparativeCt(NoPlugin, Plugin, "CLUT 16 bits ", SpeedTest16bitsRGB, SpeedTest16bitsRGB, "test5.icc", "test3.icc");
+ ComparativeCt(NoPlugin, Plugin, "Matrix-Shaper ", SpeedTest8bitDoTransform, SpeedTest8bitLineStride, "test5.icc", "test0.icc");
+ ComparativeCt(NoPlugin, Plugin, "same MatrixSh ", SpeedTest8bitDoTransform, SpeedTest8bitLineStride, "test0.icc", "test0.icc");
+ ComparativeCt(NoPlugin, Plugin, "curves ", SpeedTest8bitDoTransform, SpeedTest8bitLineStride, NULL, NULL);
+
+ cmsDeleteContext(Plugin);
+ cmsDeleteContext(NoPlugin);
+}
+
+
+
+static
+void TestGrayTransformPerformance()
+{
+ cmsInt32Number j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ float *In;
+
+ cmsInt32Number pixels;
+ cmsUInt32Number Mb;
+ cmsToneCurve* gamma18;
+ cmsToneCurve* gamma22;
+
+ cmsHPROFILE hlcmsProfileIn;
+ cmsHPROFILE hlcmsProfileOut;
+
+
+ gamma18 = cmsBuildGamma(0, 1.8);
+ gamma22 = cmsBuildGamma(0, 2.2);
+
+ hlcmsProfileIn = cmsCreateGrayProfile(NULL, gamma18);
+ hlcmsProfileOut = cmsCreateGrayProfile(NULL, gamma22);
+
+
+ cmsFreeToneCurve(gamma18);
+ cmsFreeToneCurve(gamma22);
+
+ hlcmsxform = cmsCreateTransform(hlcmsProfileIn, TYPE_GRAY_FLT | EXTRA_SH(1), hlcmsProfileOut, TYPE_GRAY_FLT|EXTRA_SH(1), INTENT_PERCEPTUAL, 0);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ pixels = 256 * 256 * 256;
+ Mb = pixels* 2*sizeof(float);
+ In = (float*) malloc(Mb);
+
+ for (j = 0; j < pixels*2; j++)
+ In[j] = (j % 256) / 255.0f;
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, pixels);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+ printf("Gray conversion using two gray profiles\t %-12.2f MPixels/Sec.\n", MPixSec(diff));
+}
+
+static
+void TestGrayTransformPerformance1()
+{
+ cmsInt32Number j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ float *In;
+
+ cmsInt32Number pixels;
+ cmsUInt32Number Mb;
+ cmsToneCurve* gamma18;
+ cmsToneCurve* gamma22;
+
+ cmsHPROFILE hlcmsProfileIn;
+ cmsHPROFILE hlcmsProfileOut;
+
+
+ gamma18 = cmsBuildGamma(0, 1.8);
+ gamma22 = cmsBuildGamma(0, 1./2.2);
+
+ hlcmsProfileIn = cmsCreateLinearizationDeviceLink(cmsSigGrayData, &gamma18);
+ hlcmsProfileOut = cmsCreateLinearizationDeviceLink(cmsSigGrayData, &gamma22);
+
+
+ cmsFreeToneCurve(gamma18);
+ cmsFreeToneCurve(gamma22);
+
+ hlcmsxform = cmsCreateTransform(hlcmsProfileIn, TYPE_GRAY_FLT, hlcmsProfileOut, TYPE_GRAY_FLT, INTENT_PERCEPTUAL, 0);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ pixels = 256 * 256 * 256;
+ Mb = pixels* sizeof(float);
+ In = (float*) malloc(Mb);
+
+ for (j = 0; j < pixels; j++)
+ In[j] = (j % 256) / 255.0f;
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, pixels);
+
+ diff = clock() - atime;
+ free(In);
+
+ cmsDeleteTransform(hlcmsxform);
+ printf("Gray conversion using two devicelinks\t %-12.2f MPixels/Sec.\n", MPixSec(diff));
+}
+
+
+// The harness test
+int main()
+{
+ printf("FastFloating point extensions testbed - 1.3\n");
+ printf("Copyright (c) 1998-2020 Marti Maria Saguer, all rights reserved\n");
+
+ printf("\nInstalling error logger ... ");
+ cmsSetLogErrorHandler(FatalErrorQuit);
+ printf("done.\n");
+
+ printf("Installing plug-in ... ");
+ cmsPlugin(cmsFastFloatExtensions());
+ printf("done.\n\n");
+
+
+ CheckComputeIncrements();
+
+ // 15 bit functionality
+ CheckFormatters15();
+ Check15bitsConversions();
+
+ // 16 bits functionality
+ CheckAccuracy16Bits();
+
+ // Lab to whatever
+ CheckLab2RGB();
+
+ // Change format
+ CheckChangeFormat();
+
+ // Floating point functionality
+ CheckConversionFloat();
+ printf("All floating point tests passed OK\n");
+
+ SpeedTest8();
+ SpeedTest16();
+ SpeedTest15();
+ SpeedTestFloat();
+
+ ComparativeFloatVs16bits();
+ ComparativeLineStride8bits();
+
+ // Test gray performance
+ printf("\n\n");
+ printf("F L O A T G R A Y conversions performance.\n");
+ printf("====================================================================\n");
+ TestGrayTransformPerformance();
+ TestGrayTransformPerformance1();
+
+ printf("\nAll tests passed OK\n");
+
+
+ return 0;
+}
+
+
+
LIBRARY_REVISION = @LIBRARY_REVISION@
LIBRARY_AGE = @LIBRARY_AGE@
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
liblcms2_la_LDFLAGS = -no-undefined \
-version-info $(LIBRARY_CURRENT):$(LIBRARY_REVISION):$(LIBRARY_AGE)
cmscnvrt.c cmserr.c cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c cmsio1.c cmslut.c \
cmsplugin.c cmssm.c cmsmd5.c cmsmtrx.c cmspack.c cmspcs.c cmswtpnt.c cmsxform.c \
cmssamp.c cmsnamed.c cmscam02.c cmsvirt.c cmstypes.c cmscgats.c cmsps2.c cmsopt.c \
- cmshalf.c lcms2_internal.h
+ cmshalf.c cmsalpha.c lcms2_internal.h
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
#
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
build_triplet = @build@
host_triplet = @host@
subdir = src
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
cmsintrp.lo cmsio0.lo cmsio1.lo cmslut.lo cmsplugin.lo \
cmssm.lo cmsmd5.lo cmsmtrx.lo cmspack.lo cmspcs.lo cmswtpnt.lo \
cmsxform.lo cmssamp.lo cmsnamed.lo cmscam02.lo cmsvirt.lo \
- cmstypes.lo cmscgats.lo cmsps2.lo cmsopt.lo cmshalf.lo
+ cmstypes.lo cmscgats.lo cmsps2.lo cmsopt.lo cmshalf.lo \
+ cmsalpha.lo
liblcms2_la_OBJECTS = $(am_liblcms2_la_OBJECTS)
-liblcms2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+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 =
+liblcms2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(liblcms2_la_LDFLAGS) $(LDFLAGS) -o $@
+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@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/cmsalpha.Plo \
+ ./$(DEPDIR)/cmscam02.Plo ./$(DEPDIR)/cmscgats.Plo \
+ ./$(DEPDIR)/cmscnvrt.Plo ./$(DEPDIR)/cmserr.Plo \
+ ./$(DEPDIR)/cmsgamma.Plo ./$(DEPDIR)/cmsgmt.Plo \
+ ./$(DEPDIR)/cmshalf.Plo ./$(DEPDIR)/cmsintrp.Plo \
+ ./$(DEPDIR)/cmsio0.Plo ./$(DEPDIR)/cmsio1.Plo \
+ ./$(DEPDIR)/cmslut.Plo ./$(DEPDIR)/cmsmd5.Plo \
+ ./$(DEPDIR)/cmsmtrx.Plo ./$(DEPDIR)/cmsnamed.Plo \
+ ./$(DEPDIR)/cmsopt.Plo ./$(DEPDIR)/cmspack.Plo \
+ ./$(DEPDIR)/cmspcs.Plo ./$(DEPDIR)/cmsplugin.Plo \
+ ./$(DEPDIR)/cmsps2.Plo ./$(DEPDIR)/cmssamp.Plo \
+ ./$(DEPDIR)/cmssm.Plo ./$(DEPDIR)/cmstypes.Plo \
+ ./$(DEPDIR)/cmsvirt.Plo ./$(DEPDIR)/cmswtpnt.Plo \
+ ./$(DEPDIR)/cmsxform.Plo
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)
+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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 = $(liblcms2_la_SOURCES)
DIST_SOURCES = $(liblcms2_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
# Shared libraries built in this directory
lib_LTLIBRARIES = liblcms2.la
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
liblcms2_la_LDFLAGS = -no-undefined \
-version-info $(LIBRARY_CURRENT):$(LIBRARY_REVISION):$(LIBRARY_AGE)
cmscnvrt.c cmserr.c cmsgamma.c cmsgmt.c cmsintrp.c cmsio0.c cmsio1.c cmslut.c \
cmsplugin.c cmssm.c cmsmd5.c cmsmtrx.c cmspack.c cmspcs.c cmswtpnt.c cmsxform.c \
cmssamp.c cmsnamed.c cmscam02.c cmsvirt.c cmstypes.c cmscgats.c cmsps2.c cmsopt.c \
- cmshalf.c lcms2_internal.h
+ cmshalf.c cmsalpha.c lcms2_internal.h
all: all-am
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign 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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
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)"; \
}
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @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}; \
+ }
+
liblcms2.la: $(liblcms2_la_OBJECTS) $(liblcms2_la_DEPENDENCIES) $(EXTRA_liblcms2_la_DEPENDENCIES)
- $(liblcms2_la_LINK) -rpath $(libdir) $(liblcms2_la_OBJECTS) $(liblcms2_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(liblcms2_la_LINK) -rpath $(libdir) $(liblcms2_la_OBJECTS) $(liblcms2_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmscam02.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmscgats.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmscnvrt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmserr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsgamma.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsgmt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmshalf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsintrp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsio0.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsio1.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmslut.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsmd5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsmtrx.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsnamed.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsopt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmspack.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmspcs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsplugin.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsps2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmssamp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmssm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmstypes.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsvirt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmswtpnt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsxform.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsalpha.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmscam02.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmscgats.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmscnvrt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmserr.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsgamma.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsgmt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmshalf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsintrp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsio0.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsio1.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmslut.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsmd5.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsmtrx.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsnamed.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsopt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmspack.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmspcs.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsplugin.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsps2.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmssamp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmssm.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmstypes.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsvirt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmswtpnt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmsxform.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.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@
+@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@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.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@
+@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@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(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@
+@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@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
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)
+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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/cmsalpha.Plo
+ -rm -f ./$(DEPDIR)/cmscam02.Plo
+ -rm -f ./$(DEPDIR)/cmscgats.Plo
+ -rm -f ./$(DEPDIR)/cmscnvrt.Plo
+ -rm -f ./$(DEPDIR)/cmserr.Plo
+ -rm -f ./$(DEPDIR)/cmsgamma.Plo
+ -rm -f ./$(DEPDIR)/cmsgmt.Plo
+ -rm -f ./$(DEPDIR)/cmshalf.Plo
+ -rm -f ./$(DEPDIR)/cmsintrp.Plo
+ -rm -f ./$(DEPDIR)/cmsio0.Plo
+ -rm -f ./$(DEPDIR)/cmsio1.Plo
+ -rm -f ./$(DEPDIR)/cmslut.Plo
+ -rm -f ./$(DEPDIR)/cmsmd5.Plo
+ -rm -f ./$(DEPDIR)/cmsmtrx.Plo
+ -rm -f ./$(DEPDIR)/cmsnamed.Plo
+ -rm -f ./$(DEPDIR)/cmsopt.Plo
+ -rm -f ./$(DEPDIR)/cmspack.Plo
+ -rm -f ./$(DEPDIR)/cmspcs.Plo
+ -rm -f ./$(DEPDIR)/cmsplugin.Plo
+ -rm -f ./$(DEPDIR)/cmsps2.Plo
+ -rm -f ./$(DEPDIR)/cmssamp.Plo
+ -rm -f ./$(DEPDIR)/cmssm.Plo
+ -rm -f ./$(DEPDIR)/cmstypes.Plo
+ -rm -f ./$(DEPDIR)/cmsvirt.Plo
+ -rm -f ./$(DEPDIR)/cmswtpnt.Plo
+ -rm -f ./$(DEPDIR)/cmsxform.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/cmsalpha.Plo
+ -rm -f ./$(DEPDIR)/cmscam02.Plo
+ -rm -f ./$(DEPDIR)/cmscgats.Plo
+ -rm -f ./$(DEPDIR)/cmscnvrt.Plo
+ -rm -f ./$(DEPDIR)/cmserr.Plo
+ -rm -f ./$(DEPDIR)/cmsgamma.Plo
+ -rm -f ./$(DEPDIR)/cmsgmt.Plo
+ -rm -f ./$(DEPDIR)/cmshalf.Plo
+ -rm -f ./$(DEPDIR)/cmsintrp.Plo
+ -rm -f ./$(DEPDIR)/cmsio0.Plo
+ -rm -f ./$(DEPDIR)/cmsio1.Plo
+ -rm -f ./$(DEPDIR)/cmslut.Plo
+ -rm -f ./$(DEPDIR)/cmsmd5.Plo
+ -rm -f ./$(DEPDIR)/cmsmtrx.Plo
+ -rm -f ./$(DEPDIR)/cmsnamed.Plo
+ -rm -f ./$(DEPDIR)/cmsopt.Plo
+ -rm -f ./$(DEPDIR)/cmspack.Plo
+ -rm -f ./$(DEPDIR)/cmspcs.Plo
+ -rm -f ./$(DEPDIR)/cmsplugin.Plo
+ -rm -f ./$(DEPDIR)/cmsps2.Plo
+ -rm -f ./$(DEPDIR)/cmssamp.Plo
+ -rm -f ./$(DEPDIR)/cmssm.Plo
+ -rm -f ./$(DEPDIR)/cmstypes.Plo
+ -rm -f ./$(DEPDIR)/cmsvirt.Plo
+ -rm -f ./$(DEPDIR)/cmswtpnt.Plo
+ -rm -f ./$(DEPDIR)/cmsxform.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool 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-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \
+ ctags ctags-am 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-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
+ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+
+#include "lcms2_internal.h"
+
+// Alpha copy ------------------------------------------------------------------------------------------------------------------
+
+// This macro return words stored as big endian
+#define CHANGE_ENDIAN(w) (cmsUInt16Number) ((cmsUInt16Number) ((w)<<8)|((w)>>8))
+
+
+// Floor to byte, taking care of saturation
+cmsINLINE cmsUInt8Number _cmsQuickSaturateByte(cmsFloat64Number d)
+{
+ d += 0.5;
+ if (d <= 0) return 0;
+ if (d >= 255.0) return 255;
+
+ return (cmsUInt8Number) _cmsQuickFloorWord(d);
+}
+
+
+// Return the size in bytes of a given formatter
+static
+cmsUInt32Number trueBytesSize(cmsUInt32Number Format)
+{
+ cmsUInt32Number fmt_bytes = T_BYTES(Format);
+
+ // For double, the T_BYTES field returns zero
+ if (fmt_bytes == 0)
+ return sizeof(double);
+
+ // Otherwise, it is already correct for all formats
+ return fmt_bytes;
+}
+
+
+// Several format converters
+
+typedef void(*cmsFormatterAlphaFn)(void* dst, const void* src);
+
+
+// From 8
+
+static
+void copy8(void* dst, const void* src)
+{
+ memmove(dst, src, 1);
+}
+
+static
+void from8to16(void* dst, const void* src)
+{
+ cmsUInt8Number n = *(cmsUInt8Number*)src;
+ *(cmsUInt16Number*) dst = (cmsUInt16Number) FROM_8_TO_16(n);
+}
+
+static
+void from8to16SE(void* dst, const void* src)
+{
+ cmsUInt8Number n = *(cmsUInt8Number*)src;
+ *(cmsUInt16Number*)dst = CHANGE_ENDIAN(FROM_8_TO_16(n));
+}
+
+static
+void from8toFLT(void* dst, const void* src)
+{
+ *(cmsFloat32Number*)dst = (cmsFloat32Number) (*(cmsUInt8Number*)src) / 255.0f;
+}
+
+static
+void from8toDBL(void* dst, const void* src)
+{
+ *(cmsFloat64Number*)dst = (cmsFloat64Number) (*(cmsUInt8Number*)src) / 255.0;
+}
+
+static
+void from8toHLF(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = (*(cmsUInt8Number*)src) / 255.0f;
+ *(cmsUInt16Number*)dst = _cmsFloat2Half(n);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+// From 16
+
+static
+void from16to8(void* dst, const void* src)
+{
+ cmsUInt16Number n = *(cmsUInt16Number*)src;
+ *(cmsUInt8Number*) dst = FROM_16_TO_8(n);
+}
+
+static
+void from16SEto8(void* dst, const void* src)
+{
+ cmsUInt16Number n = *(cmsUInt16Number*)src;
+ *(cmsUInt8Number*)dst = FROM_16_TO_8(CHANGE_ENDIAN(n));
+}
+
+static
+void copy16(void* dst, const void* src)
+{
+ memmove(dst, src, 2);
+}
+
+static
+void from16to16(void* dst, const void* src)
+{
+ cmsUInt16Number n = *(cmsUInt16Number*)src;
+ *(cmsUInt16Number*)dst = CHANGE_ENDIAN(n);
+}
+
+static
+void from16toFLT(void* dst, const void* src)
+{
+ *(cmsFloat32Number*)dst = (*(cmsUInt16Number*)src) / 65535.0f;
+}
+
+static
+void from16SEtoFLT(void* dst, const void* src)
+{
+ *(cmsFloat32Number*)dst = (CHANGE_ENDIAN(*(cmsUInt16Number*)src)) / 65535.0f;
+}
+
+static
+void from16toDBL(void* dst, const void* src)
+{
+ *(cmsFloat64Number*)dst = (cmsFloat64Number) (*(cmsUInt16Number*)src) / 65535.0;
+}
+
+static
+void from16SEtoDBL(void* dst, const void* src)
+{
+ *(cmsFloat64Number*)dst = (cmsFloat64Number) (CHANGE_ENDIAN(*(cmsUInt16Number*)src)) / 65535.0;
+}
+
+static
+void from16toHLF(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = (*(cmsUInt16Number*)src) / 65535.0f;
+ *(cmsUInt16Number*)dst = _cmsFloat2Half(n);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+static
+void from16SEtoHLF(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = (CHANGE_ENDIAN(*(cmsUInt16Number*)src)) / 65535.0f;
+ *(cmsUInt16Number*)dst = _cmsFloat2Half(n);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+// From Float
+
+static
+void fromFLTto8(void* dst, const void* src)
+{
+ cmsFloat32Number n = *(cmsFloat32Number*)src;
+ *(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0f);
+}
+
+static
+void fromFLTto16(void* dst, const void* src)
+{
+ cmsFloat32Number n = *(cmsFloat32Number*)src;
+ *(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0f);
+}
+
+static
+void fromFLTto16SE(void* dst, const void* src)
+{
+ cmsFloat32Number n = *(cmsFloat32Number*)src;
+ cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0f);
+
+ *(cmsUInt16Number*)dst = CHANGE_ENDIAN(i);
+}
+
+static
+void copy32(void* dst, const void* src)
+{
+ memmove(dst, src, sizeof(cmsFloat32Number));
+}
+
+static
+void fromFLTtoDBL(void* dst, const void* src)
+{
+ cmsFloat32Number n = *(cmsFloat32Number*)src;
+ *(cmsFloat64Number*)dst = (cmsFloat64Number)n;
+}
+
+static
+void fromFLTtoHLF(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = *(cmsFloat32Number*)src;
+ *(cmsUInt16Number*)dst = _cmsFloat2Half(n);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+
+// From HALF
+
+static
+void fromHLFto8(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
+ *(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0f);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+
+}
+
+static
+void fromHLFto16(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
+ *(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0f);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+static
+void fromHLFto16SE(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = _cmsHalf2Float(*(cmsUInt16Number*)src);
+ cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0f);
+ *(cmsUInt16Number*)dst = CHANGE_ENDIAN(i);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+static
+void fromHLFtoFLT(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ *(cmsFloat32Number*)dst = _cmsHalf2Float(*(cmsUInt16Number*)src);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+static
+void fromHLFtoDBL(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ *(cmsFloat64Number*)dst = (cmsFloat64Number)_cmsHalf2Float(*(cmsUInt16Number*)src);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+// From double
+static
+void fromDBLto8(void* dst, const void* src)
+{
+ cmsFloat64Number n = *(cmsFloat64Number*)src;
+ *(cmsUInt8Number*)dst = _cmsQuickSaturateByte(n * 255.0);
+}
+
+static
+void fromDBLto16(void* dst, const void* src)
+{
+ cmsFloat64Number n = *(cmsFloat64Number*)src;
+ *(cmsUInt16Number*)dst = _cmsQuickSaturateWord(n * 65535.0f);
+}
+
+static
+void fromDBLto16SE(void* dst, const void* src)
+{
+ cmsFloat64Number n = *(cmsFloat64Number*)src;
+ cmsUInt16Number i = _cmsQuickSaturateWord(n * 65535.0f);
+ *(cmsUInt16Number*)dst = CHANGE_ENDIAN(i);
+}
+
+static
+void fromDBLtoFLT(void* dst, const void* src)
+{
+ cmsFloat64Number n = *(cmsFloat64Number*)src;
+ *(cmsFloat32Number*)dst = (cmsFloat32Number) n;
+}
+
+static
+void fromDBLtoHLF(void* dst, const void* src)
+{
+#ifndef CMS_NO_HALF_SUPPORT
+ cmsFloat32Number n = (cmsFloat32Number) *(cmsFloat64Number*)src;
+ *(cmsUInt16Number*)dst = _cmsFloat2Half(n);
+#else
+ cmsUNUSED_PARAMETER(dst);
+ cmsUNUSED_PARAMETER(src);
+#endif
+}
+
+static
+void copy64(void* dst, const void* src)
+{
+ memmove(dst, src, sizeof(cmsFloat64Number));
+}
+
+
+// Returns the position (x or y) of the formatter in the table of functions
+static
+int FormatterPos(cmsUInt32Number frm)
+{
+ cmsUInt32Number b = T_BYTES(frm);
+
+ if (b == 0 && T_FLOAT(frm))
+ return 5; // DBL
+#ifndef CMS_NO_HALF_SUPPORT
+ if (b == 2 && T_FLOAT(frm))
+ return 3; // HLF
+#endif
+ if (b == 4 && T_FLOAT(frm))
+ return 4; // FLT
+ if (b == 2 && !T_FLOAT(frm))
+ {
+ if (T_ENDIAN16(frm))
+ return 2; // 16SE
+ else
+ return 1; // 16
+ }
+ if (b == 1 && !T_FLOAT(frm))
+ return 0; // 8
+ return -1; // not recognized
+}
+
+// Obtains an alpha-to-alpha function formatter
+static
+cmsFormatterAlphaFn _cmsGetFormatterAlpha(cmsContext id, cmsUInt32Number in, cmsUInt32Number out)
+{
+static cmsFormatterAlphaFn FormattersAlpha[6][6] = {
+
+ /* from 8 */ { copy8, from8to16, from8to16SE, from8toHLF, from8toFLT, from8toDBL },
+ /* from 16*/ { from16to8, copy16, from16to16, from16toHLF, from16toFLT, from16toDBL },
+ /* from 16SE*/{ from16SEto8, from16to16, copy16, from16SEtoHLF,from16SEtoFLT, from16SEtoDBL },
+ /* from HLF*/ { fromHLFto8, fromHLFto16, fromHLFto16SE, copy16, fromHLFtoFLT, fromHLFtoDBL },
+ /* from FLT*/ { fromFLTto8, fromFLTto16, fromFLTto16SE, fromFLTtoHLF, copy32, fromFLTtoDBL },
+ /* from DBL*/ { fromDBLto8, fromDBLto16, fromDBLto16SE, fromDBLtoHLF, fromDBLtoFLT, copy64 }};
+
+ int in_n = FormatterPos(in);
+ int out_n = FormatterPos(out);
+
+ if (in_n < 0 || out_n < 0 || in_n > 5 || out_n > 5) {
+
+ cmsSignalError(id, cmsERROR_UNKNOWN_EXTENSION, "Unrecognized alpha channel width");
+ return NULL;
+ }
+
+ return FormattersAlpha[in_n][out_n];
+}
+
+
+
+// This function computes the distance from each component to the next one in bytes.
+static
+void ComputeIncrementsForChunky(cmsUInt32Number Format,
+ cmsUInt32Number ComponentStartingOrder[],
+ cmsUInt32Number ComponentPointerIncrements[])
+{
+ cmsUInt32Number channels[cmsMAXCHANNELS];
+ cmsUInt32Number extra = T_EXTRA(Format);
+ cmsUInt32Number nchannels = T_CHANNELS(Format);
+ cmsUInt32Number total_chans = nchannels + extra;
+ cmsUInt32Number i;
+ cmsUInt32Number channelSize = trueBytesSize(Format);
+ cmsUInt32Number pixelSize = channelSize * total_chans;
+
+ // Sanity check
+ if (total_chans <= 0 || total_chans >= cmsMAXCHANNELS)
+ return;
+
+ memset(channels, 0, sizeof(channels));
+
+ // Separation is independent of starting point and only depends on channel size
+ for (i = 0; i < extra; i++)
+ ComponentPointerIncrements[i] = pixelSize;
+
+ // Handle do swap
+ for (i = 0; i < total_chans; i++)
+ {
+ if (T_DOSWAP(Format)) {
+ channels[i] = total_chans - i - 1;
+ }
+ else {
+ channels[i] = i;
+ }
+ }
+
+ // Handle swap first (ROL of positions), example CMYK -> KCMY | 0123 -> 3012
+ if (T_SWAPFIRST(Format) && total_chans > 1) {
+
+ cmsUInt32Number tmp = channels[0];
+ for (i = 0; i < total_chans-1; i++)
+ channels[i] = channels[i + 1];
+
+ channels[total_chans - 1] = tmp;
+ }
+
+ // Handle size
+ if (channelSize > 1)
+ for (i = 0; i < total_chans; i++) {
+ channels[i] *= channelSize;
+ }
+
+ for (i = 0; i < extra; i++)
+ ComponentStartingOrder[i] = channels[i + nchannels];
+}
+
+
+
+// On planar configurations, the distance is the stride added to any non-negative
+static
+void ComputeIncrementsForPlanar(cmsUInt32Number Format,
+ cmsUInt32Number BytesPerPlane,
+ cmsUInt32Number ComponentStartingOrder[],
+ cmsUInt32Number ComponentPointerIncrements[])
+{
+ cmsUInt32Number channels[cmsMAXCHANNELS];
+ cmsUInt32Number extra = T_EXTRA(Format);
+ cmsUInt32Number nchannels = T_CHANNELS(Format);
+ cmsUInt32Number total_chans = nchannels + extra;
+ cmsUInt32Number i;
+ cmsUInt32Number channelSize = trueBytesSize(Format);
+
+ // Sanity check
+ if (total_chans <= 0 || total_chans >= cmsMAXCHANNELS)
+ return;
+
+ memset(channels, 0, sizeof(channels));
+
+ // Separation is independent of starting point and only depends on channel size
+ for (i = 0; i < extra; i++)
+ ComponentPointerIncrements[i] = channelSize;
+
+ // Handle do swap
+ for (i = 0; i < total_chans; i++)
+ {
+ if (T_DOSWAP(Format)) {
+ channels[i] = total_chans - i - 1;
+ }
+ else {
+ channels[i] = i;
+ }
+ }
+
+ // Handle swap first (ROL of positions), example CMYK -> KCMY | 0123 -> 3012
+ if (T_SWAPFIRST(Format) && total_chans > 0) {
+
+ cmsUInt32Number tmp = channels[0];
+ for (i = 0; i < total_chans - 1; i++)
+ channels[i] = channels[i + 1];
+
+ channels[total_chans - 1] = tmp;
+ }
+
+ // Handle size
+ for (i = 0; i < total_chans; i++) {
+ channels[i] *= BytesPerPlane;
+ }
+
+ for (i = 0; i < extra; i++)
+ ComponentStartingOrder[i] = channels[i + nchannels];
+}
+
+
+
+// Dispatcher por chunky and planar RGB
+static
+void ComputeComponentIncrements(cmsUInt32Number Format,
+ cmsUInt32Number BytesPerPlane,
+ cmsUInt32Number ComponentStartingOrder[],
+ cmsUInt32Number ComponentPointerIncrements[])
+{
+ if (T_PLANAR(Format)) {
+
+ ComputeIncrementsForPlanar(Format, BytesPerPlane, ComponentStartingOrder, ComponentPointerIncrements);
+ }
+ else {
+ ComputeIncrementsForChunky(Format, ComponentStartingOrder, ComponentPointerIncrements);
+ }
+
+}
+
+
+
+// Handles extra channels copying alpha if requested by the flags
+void _cmsHandleExtraChannels(_cmsTRANSFORM* p, const void* in,
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+ cmsUInt32Number i, j, k;
+ cmsUInt32Number nExtra;
+ cmsUInt32Number SourceStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number SourceIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStartingOrder[cmsMAXCHANNELS];
+ cmsUInt32Number DestIncrements[cmsMAXCHANNELS];
+
+ cmsFormatterAlphaFn copyValueFn;
+
+ // Make sure we need some copy
+ if (!(p->dwOriginalFlags & cmsFLAGS_COPY_ALPHA))
+ return;
+
+ // Exit early if in-place color-management is occurring - no need to copy extra channels to themselves.
+ if (p->InputFormat == p->OutputFormat && in == out)
+ return;
+
+ // Make sure we have same number of alpha channels. If not, just return as this should be checked at transform creation time.
+ nExtra = T_EXTRA(p->InputFormat);
+ if (nExtra != T_EXTRA(p->OutputFormat))
+ return;
+
+ // Anything to do?
+ if (nExtra == 0)
+ return;
+
+ // Compute the increments
+ ComputeComponentIncrements(p->InputFormat, Stride->BytesPerPlaneIn, SourceStartingOrder, SourceIncrements);
+ ComputeComponentIncrements(p->OutputFormat, Stride->BytesPerPlaneOut, DestStartingOrder, DestIncrements);
+
+ // Check for conversions 8, 16, half, float, dbl
+ copyValueFn = _cmsGetFormatterAlpha(p->ContextID, p->InputFormat, p->OutputFormat);
+ if (copyValueFn == NULL)
+ return;
+
+ if (nExtra == 1) { // Optimized routine for copying a single extra channel quickly
+
+ cmsUInt8Number* SourcePtr;
+ cmsUInt8Number* DestPtr;
+
+ cmsUInt32Number SourceStrideIncrement = 0;
+ cmsUInt32Number DestStrideIncrement = 0;
+
+ // The loop itself
+ for (i = 0; i < LineCount; i++) {
+
+ // Prepare pointers for the loop
+ SourcePtr = (cmsUInt8Number*)in + SourceStartingOrder[0] + SourceStrideIncrement;
+ DestPtr = (cmsUInt8Number*)out + DestStartingOrder[0] + DestStrideIncrement;
+
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ copyValueFn(DestPtr, SourcePtr);
+
+ SourcePtr += SourceIncrements[0];
+ DestPtr += DestIncrements[0];
+ }
+
+ SourceStrideIncrement += Stride->BytesPerLineIn;
+ DestStrideIncrement += Stride->BytesPerLineOut;
+ }
+
+ }
+ else { // General case with more than one extra channel
+
+ cmsUInt8Number* SourcePtr[cmsMAXCHANNELS];
+ cmsUInt8Number* DestPtr[cmsMAXCHANNELS];
+
+ cmsUInt32Number SourceStrideIncrements[cmsMAXCHANNELS];
+ cmsUInt32Number DestStrideIncrements[cmsMAXCHANNELS];
+
+ memset(SourceStrideIncrements, 0, sizeof(SourceStrideIncrements));
+ memset(DestStrideIncrements, 0, sizeof(DestStrideIncrements));
+
+ // The loop itself
+ for (i = 0; i < LineCount; i++) {
+
+ // Prepare pointers for the loop
+ for (j = 0; j < nExtra; j++) {
+
+ SourcePtr[j] = (cmsUInt8Number*)in + SourceStartingOrder[j] + SourceStrideIncrements[j];
+ DestPtr[j] = (cmsUInt8Number*)out + DestStartingOrder[j] + DestStrideIncrements[j];
+ }
+
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ for (k = 0; k < nExtra; k++) {
+
+ copyValueFn(DestPtr[k], SourcePtr[k]);
+
+ SourcePtr[k] += SourceIncrements[k];
+ DestPtr[k] += DestIncrements[k];
+ }
+ }
+
+ for (j = 0; j < nExtra; j++) {
+
+ SourceStrideIncrements[j] += Stride->BytesPerLineIn;
+ DestStrideIncrements[j] += Stride->BytesPerLineOut;
+ }
+ }
+ }
+}
+
+
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
cmsUInt32Number surround;
cmsFloat64Number n, Nbb, Ncb, z, FL, D;
- cmsContext ContextID;
+ cmsContext ContextID;
} cmsCIECAM02;
cmsHANDLE CMSEXPORT cmsCIECAM02Init(cmsContext ContextID, const cmsViewingConditions* pVC)
{
- cmsCIECAM02* lpMod;
+ cmsCIECAM02* lpMod;
- _cmsAssert(pVC != NULL);
+ _cmsAssert(pVC != NULL);
- if((lpMod = (cmsCIECAM02*) _cmsMallocZero(ContextID, sizeof(cmsCIECAM02))) == NULL) {
- return NULL;
- }
+ if((lpMod = (cmsCIECAM02*) _cmsMallocZero(ContextID, sizeof(cmsCIECAM02))) == NULL) {
+ return NULL;
+ }
- lpMod ->ContextID = ContextID;
+ lpMod ->ContextID = ContextID;
- lpMod ->adoptedWhite.XYZ[0] = pVC ->whitePoint.X;
- lpMod ->adoptedWhite.XYZ[1] = pVC ->whitePoint.Y;
- lpMod ->adoptedWhite.XYZ[2] = pVC ->whitePoint.Z;
+ lpMod ->adoptedWhite.XYZ[0] = pVC ->whitePoint.X;
+ lpMod ->adoptedWhite.XYZ[1] = pVC ->whitePoint.Y;
+ lpMod ->adoptedWhite.XYZ[2] = pVC ->whitePoint.Z;
- lpMod -> LA = pVC ->La;
- lpMod -> Yb = pVC ->Yb;
- lpMod -> D = pVC ->D_value;
- lpMod -> surround = pVC ->surround;
+ lpMod -> LA = pVC ->La;
+ lpMod -> Yb = pVC ->Yb;
+ lpMod -> D = pVC ->D_value;
+ lpMod -> surround = pVC ->surround;
- switch (lpMod -> surround) {
+ switch (lpMod -> surround) {
- case CUTSHEET_SURROUND:
- lpMod->F = 0.8;
- lpMod->c = 0.41;
- lpMod->Nc = 0.8;
- break;
+ case CUTSHEET_SURROUND:
+ lpMod->F = 0.8;
+ lpMod->c = 0.41;
+ lpMod->Nc = 0.8;
+ break;
- case DARK_SURROUND:
- lpMod -> F = 0.8;
- lpMod -> c = 0.525;
- lpMod -> Nc = 0.8;
- break;
+ case DARK_SURROUND:
+ lpMod -> F = 0.8;
+ lpMod -> c = 0.525;
+ lpMod -> Nc = 0.8;
+ break;
- case DIM_SURROUND:
- lpMod -> F = 0.9;
- lpMod -> c = 0.59;
- lpMod -> Nc = 0.95;
- break;
+ case DIM_SURROUND:
+ lpMod -> F = 0.9;
+ lpMod -> c = 0.59;
+ lpMod -> Nc = 0.95;
+ break;
- default:
- // Average surround
- lpMod -> F = 1.0;
- lpMod -> c = 0.69;
- lpMod -> Nc = 1.0;
- }
+ default:
+ // Average surround
+ lpMod -> F = 1.0;
+ lpMod -> c = 0.69;
+ lpMod -> Nc = 1.0;
+ }
- lpMod -> n = compute_n(lpMod);
- lpMod -> z = compute_z(lpMod);
- lpMod -> Nbb = computeNbb(lpMod);
- lpMod -> FL = computeFL(lpMod);
+ lpMod -> n = compute_n(lpMod);
+ lpMod -> z = compute_z(lpMod);
+ lpMod -> Nbb = computeNbb(lpMod);
+ lpMod -> FL = computeFL(lpMod);
- if (lpMod -> D == D_CALCULATE) {
- lpMod -> D = computeD(lpMod);
- }
+ if (lpMod -> D == D_CALCULATE) {
+ lpMod -> D = computeD(lpMod);
+ }
- lpMod -> Ncb = lpMod -> Nbb;
+ lpMod -> Ncb = lpMod -> Nbb;
- lpMod -> adoptedWhite = XYZtoCAT02(lpMod -> adoptedWhite);
- lpMod -> adoptedWhite = ChromaticAdaptation(lpMod -> adoptedWhite, lpMod);
- lpMod -> adoptedWhite = CAT02toHPE(lpMod -> adoptedWhite);
- lpMod -> adoptedWhite = NonlinearCompression(lpMod -> adoptedWhite, lpMod);
+ lpMod -> adoptedWhite = XYZtoCAT02(lpMod -> adoptedWhite);
+ lpMod -> adoptedWhite = ChromaticAdaptation(lpMod -> adoptedWhite, lpMod);
+ lpMod -> adoptedWhite = CAT02toHPE(lpMod -> adoptedWhite);
+ lpMod -> adoptedWhite = NonlinearCompression(lpMod -> adoptedWhite, lpMod);
- return (cmsHANDLE) lpMod;
+ return (cmsHANDLE) lpMod;
}
{
cmsCIECAM02* lpMod = (cmsCIECAM02*) hModel;
- if (lpMod) _cmsFree(lpMod ->ContextID, lpMod);
+ if (lpMod) _cmsFree(lpMod ->ContextID, lpMod);
}
{
CAM02COLOR clr;
cmsCIECAM02* lpMod = (cmsCIECAM02*) hModel;
+
+ _cmsAssert(lpMod != NULL);
+ _cmsAssert(pIn != NULL);
+ _cmsAssert(pOut != NULL);
- _cmsAssert(lpMod != NULL);
- _cmsAssert(pIn != NULL);
- _cmsAssert(pOut != NULL);
+ memset(&clr, 0, sizeof(clr));
clr.XYZ[0] = pIn ->X;
clr.XYZ[1] = pIn ->Y;
{
CAM02COLOR clr;
cmsCIECAM02* lpMod = (cmsCIECAM02*) hModel;
+
+ _cmsAssert(lpMod != NULL);
+ _cmsAssert(pIn != NULL);
+ _cmsAssert(pOut != NULL);
- _cmsAssert(lpMod != NULL);
- _cmsAssert(pIn != NULL);
- _cmsAssert(pOut != NULL);
+ memset(&clr, 0, sizeof(clr));
clr.J = pIn -> J;
clr.C = pIn -> C;
pOut ->Y = clr.XYZ[1];
pOut ->Z = clr.XYZ[2];
}
-
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// IT8.7 / CGATS.17-200x handling -----------------------------------------------------------------------------
-#define MAXID 128 // Max lenght of identifier
-#define MAXSTR 1024 // Max lenght of string
+#define MAXID 128 // Max length of identifier
+#define MAXSTR 1024 // Max length of string
#define MAXTABLES 255 // Max Number of tables in a single stream
#define MAXINCLUDE 20 // Max number of nested includes
// Symbols
typedef enum {
- SNONE,
+ SUNDEFINED,
SINUM, // Integer
SDNUM, // Real
SIDENT, // Identifier
// File stream being parsed
typedef struct _FileContext {
- char FileName[cmsMAX_PATH]; // File name if being readed from file
+ char FileName[cmsMAX_PATH]; // File name if being read from file
FILE* Stream; // File stream or NULL if holded in memory
} FILECTX;
SUBALLOCATOR Allocator; // String suballocator -- just to keep it fast
// Parser state machine
- SYMBOL sy; // Current symbol
- int ch; // Current character
+ SYMBOL sy; // Current symbol
+ int ch; // Current character
+
+ cmsInt32Number inum; // integer value
+ cmsFloat64Number dnum; // real value
- int inum; // integer value
- cmsFloat64Number dnum; // real value
char id[MAXID]; // identifier
char str[MAXSTR]; // string
// Allowed keywords & datasets. They have visibility on whole stream
- KEYVALUE* ValidKeywords;
- KEYVALUE* ValidSampleID;
+ KEYVALUE* ValidKeywords;
+ KEYVALUE* ValidSampleID;
char* Source; // Points to loc. being parsed
- int lineno; // line counter for error reporting
+ cmsInt32Number lineno; // line counter for error reporting
FILECTX* FileStack[MAXINCLUDE]; // Stack of files being parsed
- int IncludeSP; // Include Stack Pointer
+ cmsInt32Number IncludeSP; // Include Stack Pointer
char* MemoryBlock; // The stream if holded in memory
{"PROD_DATE", WRITE_STRINGIFY}, // Identifies year and month of production of the target in the form yyyy:mm.
{"SERIAL", WRITE_STRINGIFY}, // Uniquely identifies individual physical target.
- {"MATERIAL", WRITE_STRINGIFY}, // Identifies the material on which the target was produced using a code
- // uniquely identifying th e material. This is intend ed to be used for IT8.7
- // physical targets only (i.e . IT8.7/1 a nd IT8.7/2).
-
- {"INSTRUMENTATION", WRITE_STRINGIFY}, // Used to report the specific instrumentation used (manufacturer and
- // model number) to generate the data reported. This data will often
- // provide more information about the particular data collected than an
- // extensive list of specific details. This is particularly important for
- // spectral data or data derived from spectrophotometry.
-
- {"MEASUREMENT_SOURCE", WRITE_STRINGIFY}, // Illumination used for spectral measurements. This data helps provide
- // a guide to the potential for issues of paper fluorescence, etc.
+ {"MATERIAL", WRITE_STRINGIFY}, // Identifies the material on which the target was produced using a code
+ // uniquely identifying th e material. This is intend ed to be used for IT8.7
+ // physical targets only (i.e . IT8.7/1 a nd IT8.7/2).
- {"PRINT_CONDITIONS", WRITE_STRINGIFY}, // Used to define the characteristics of the printed sheet being reported.
- // Where standard conditions have been defined (e.g., SWOP at nominal)
- // named conditions may suffice. Otherwise, detailed information is
- // needed.
+ {"INSTRUMENTATION", WRITE_STRINGIFY}, // Used to report the specific instrumentation used (manufacturer and
+ // model number) to generate the data reported. This data will often
+ // provide more information about the particular data collected than an
+ // extensive list of specific details. This is particularly important for
+ // spectral data or data derived from spectrophotometry.
- {"SAMPLE_BACKING", WRITE_STRINGIFY}, // Identifies the backing material used behind the sample during
- // measurement. Allowed values are \93black\94, \93white\94, or {"na".
+ {"MEASUREMENT_SOURCE", WRITE_STRINGIFY}, // Illumination used for spectral measurements. This data helps provide
+ // a guide to the potential for issues of paper fluorescence, etc.
- {"CHISQ_DOF", WRITE_STRINGIFY}, // Degrees of freedom associated with the Chi squared statistic
+ {"PRINT_CONDITIONS", WRITE_STRINGIFY}, // Used to define the characteristics of the printed sheet being reported.
+ // Where standard conditions have been defined (e.g., SWOP at nominal)
+ // named conditions may suffice. Otherwise, detailed information is
+ // needed.
- // below properties are new in recent specs:
+ {"SAMPLE_BACKING", WRITE_STRINGIFY}, // Identifies the backing material used behind the sample during
+ // measurement. Allowed values are "black", "white", or {"na".
+
+ {"CHISQ_DOF", WRITE_STRINGIFY}, // Degrees of freedom associated with the Chi squared statistic
+ // below properties are new in recent specs:
{"MEASUREMENT_GEOMETRY", WRITE_STRINGIFY}, // The type of measurement, either reflection or transmission, should be indicated
- // along with details of the geometry and the aperture size and shape. For example,
- // for transmission measurements it is important to identify 0/diffuse, diffuse/0,
- // opal or integrating sphere, etc. For reflection it is important to identify 0/45,
- // 45/0, sphere (specular included or excluded), etc.
-
- {"FILTER", WRITE_STRINGIFY}, // Identifies the use of physical filter(s) during measurement. Typically used to
- // denote the use of filters such as none, D65, Red, Green or Blue.
-
- {"POLARIZATION", WRITE_STRINGIFY}, // Identifies the use of a physical polarization filter during measurement. Allowed
- // values are {"yes\94, \93white\94, \93none\94 or \93na\94.
-
- {"WEIGHTING_FUNCTION", WRITE_PAIR}, // Indicates such functions as: the CIE standard observer functions used in the
- // calculation of various data parameters (2 degree and 10 degree), CIE standard
- // illuminant functions used in the calculation of various data parameters (e.g., D50,
- // D65, etc.), density status response, etc. If used there shall be at least one
- // name-value pair following the WEIGHTING_FUNCTION tag/keyword. The first attribute
- // in the set shall be {"name" and shall identify the particular parameter used.
- // The second shall be {"value" and shall provide the value associated with that name.
- // For ASCII data, a string containing the Name and Value attribute pairs shall follow
- // the weighting function keyword. A semi-colon separates attribute pairs from each
- // other and within the attribute the name and value are separated by a comma.
-
- {"COMPUTATIONAL_PARAMETER", WRITE_PAIR}, // Parameter that is used in computing a value from measured data. Name is the name
- // of the calculation, parameter is the name of the parameter used in the calculation
- // and value is the value of the parameter.
-
- {"TARGET_TYPE", WRITE_STRINGIFY}, // The type of target being measured, e.g. IT8.7/1, IT8.7/3, user defined, etc.
-
- {"COLORANT", WRITE_STRINGIFY}, // Identifies the colorant(s) used in creating the target.
-
- {"TABLE_DESCRIPTOR", WRITE_STRINGIFY}, // Describes the purpose or contents of a data table.
-
- {"TABLE_NAME", WRITE_STRINGIFY} // Provides a short name for a data table.
+ // along with details of the geometry and the aperture size and shape. For example,
+ // for transmission measurements it is important to identify 0/diffuse, diffuse/0,
+ // opal or integrating sphere, etc. For reflection it is important to identify 0/45,
+ // 45/0, sphere (specular included or excluded), etc.
+
+ {"FILTER", WRITE_STRINGIFY}, // Identifies the use of physical filter(s) during measurement. Typically used to
+ // denote the use of filters such as none, D65, Red, Green or Blue.
+
+ {"POLARIZATION", WRITE_STRINGIFY}, // Identifies the use of a physical polarization filter during measurement. Allowed
+ // values are {"yes", "white", "none" or "na".
+
+ {"WEIGHTING_FUNCTION", WRITE_PAIR}, // Indicates such functions as: the CIE standard observer functions used in the
+ // calculation of various data parameters (2 degree and 10 degree), CIE standard
+ // illuminant functions used in the calculation of various data parameters (e.g., D50,
+ // D65, etc.), density status response, etc. If used there shall be at least one
+ // name-value pair following the WEIGHTING_FUNCTION tag/keyword. The first attribute
+ // in the set shall be {"name" and shall identify the particular parameter used.
+ // The second shall be {"value" and shall provide the value associated with that name.
+ // For ASCII data, a string containing the Name and Value attribute pairs shall follow
+ // the weighting function keyword. A semi-colon separates attribute pairs from each
+ // other and within the attribute the name and value are separated by a comma.
+
+ {"COMPUTATIONAL_PARAMETER", WRITE_PAIR}, // Parameter that is used in computing a value from measured data. Name is the name
+ // of the calculation, parameter is the name of the parameter used in the calculation
+ // and value is the value of the parameter.
+
+ {"TARGET_TYPE", WRITE_STRINGIFY}, // The type of target being measured, e.g. IT8.7/1, IT8.7/3, user defined, etc.
+
+ {"COLORANT", WRITE_STRINGIFY}, // Identifies the colorant(s) used in creating the target.
+
+ {"TABLE_DESCRIPTOR", WRITE_STRINGIFY}, // Describes the purpose or contents of a data table.
+
+ {"TABLE_NAME", WRITE_STRINGIFY} // Provides a short name for a data table.
};
#define NUMPREDEFINEDPROPS (sizeof(PredefinedProperties)/sizeof(PROPERTY))
"XYZ_X", // X component of tristimulus data
"XYZ_Y", // Y component of tristimulus data
"XYZ_Z", // Z component of tristimulus data
- "XYY_X" // x component of chromaticity data
+ "XYY_X", // x component of chromaticity data
"XYY_Y", // y component of chromaticity data
"XYY_CAPY", // Y component of tristimulus data
"LAB_L", // L* component of Lab data
//Forward declaration of some internal functions
static void* AllocChunk(cmsIT8* it8, cmsUInt32Number size);
-// Checks if c is a separator
+// Checks whatever c is a separator
static
cmsBool isseparator(int c)
{
- return (c == ' ') || (c == '\t') || (c == '\r');
+ return (c == ' ') || (c == '\t') ;
}
-// Checks whatever if c is a valid identifier char
+// Checks whatever c is a valid identifier char
static
cmsBool ismiddle(int c)
{
return (!isseparator(c) && (c != '#') && (c !='\"') && (c != '\'') && (c > 32) && (c < 127));
}
-// Checks whatsever if c is a valid identifier middle char.
+// Checks whatsever c is a valid identifier middle char.
static
cmsBool isidchar(int c)
{
return isalnum(c) || ismiddle(c);
}
-// Checks whatsever if c is a valid identifier first char.
+// Checks whatsever c is a valid identifier first char.
static
cmsBool isfirstidchar(int c)
{
}
-
// Makes a file path based on a given reference path
// NOTE: this function doesn't check if the path exists or even if it's legal
static
else l = x + 1;
}
- return SNONE;
+ return SUNDEFINED;
}
// Reads a Real number, tries to follow from integer number
static
-void ReadReal(cmsIT8* it8, int inum)
+void ReadReal(cmsIT8* it8, cmsInt32Number inum)
{
- it8->dnum = (cmsFloat64Number) inum;
+ it8->dnum = (cmsFloat64Number)inum;
while (isdigit(it8->ch)) {
- it8->dnum = it8->dnum * 10.0 + (it8->ch - '0');
+ it8->dnum = (cmsFloat64Number)it8->dnum * 10.0 + (cmsFloat64Number)(it8->ch - '0');
NextCh(it8);
}
while (isdigit(it8->ch)) {
- frac = frac * 10.0 + (it8->ch - '0');
+ frac = frac * 10.0 + (cmsFloat64Number)(it8->ch - '0');
prec++;
NextCh(it8);
}
// Exponent, example 34.00E+20
if (toupper(it8->ch) == 'E') {
- int e;
- int sgn;
+ cmsInt32Number e;
+ cmsInt32Number sgn;
NextCh(it8); sgn = 1;
NextCh(it8);
}
- e = 0;
- while (isdigit(it8->ch)) {
+ e = 0;
+ while (isdigit(it8->ch)) {
+
+ cmsInt32Number digit = (it8->ch - '0');
- if ((cmsFloat64Number) e * 10L < INT_MAX)
- e = e * 10 + (it8->ch - '0');
+ if ((cmsFloat64Number)e * 10.0 + (cmsFloat64Number)digit < (cmsFloat64Number)+2147483647.0)
+ e = e * 10 + digit;
- NextCh(it8);
- }
+ NextCh(it8);
+ }
- e = sgn*e;
- it8 -> dnum = it8 -> dnum * xpow10(e);
+ e = sgn*e;
+ it8->dnum = it8->dnum * xpow10(e);
}
}
// Parses a float number
-// This can not call directly atof because it uses locale dependant
+// This can not call directly atof because it uses locale dependent
// parsing, while CCMX files always use . as decimal separator
static
cmsFloat64Number ParseFloatNumber(const char *Buffer)
cmsFloat64Number dnum = 0.0;
int sign = 1;
+ // keep safe
+ if (Buffer == NULL) return 0.0;
+
if (*Buffer == '-' || *Buffer == '+') {
- sign = (*Buffer == '-') ? -1 : 1;
- Buffer++;
+ sign = (*Buffer == '-') ? -1 : 1;
+ Buffer++;
}
- while (*Buffer && isdigit((int) *Buffer)) {
+ while (*Buffer && isdigit((int)*Buffer)) {
dnum = dnum * 10.0 + (*Buffer - '0');
if (*Buffer) Buffer++;
if (*Buffer == '.') {
cmsFloat64Number frac = 0.0; // fraction
- int prec = 0; // precission
+ int prec = 0; // precision
if (*Buffer) Buffer++;
- while (*Buffer && isdigit((int) *Buffer)) {
+ while (*Buffer && isdigit((int)*Buffer)) {
frac = frac * 10.0 + (*Buffer - '0');
prec++;
if (*Buffer) Buffer++;
}
- e = 0;
- while (*Buffer && isdigit((int) *Buffer)) {
+ e = 0;
+ while (*Buffer && isdigit((int)*Buffer)) {
- if ((cmsFloat64Number) e * 10L < INT_MAX)
- e = e * 10 + (*Buffer - '0');
+ cmsInt32Number digit = (*Buffer - '0');
- if (*Buffer) Buffer++;
- }
+ if ((cmsFloat64Number)e * 10.0 + digit < (cmsFloat64Number)+2147483647.0)
+ e = e * 10 + digit;
- e = sgn*e;
- dnum = dnum * xpow10(e);
+ if (*Buffer) Buffer++;
+ }
+
+ e = sgn*e;
+ dnum = dnum * xpow10(e);
}
return sign * dnum;
static
void InSymbol(cmsIT8* it8)
{
- register char *idptr;
- register int k;
+ CMSREGISTER char *idptr;
+ CMSREGISTER int k;
SYMBOL key;
int sng;
-
+
do {
while (isseparator(it8->ch))
key = BinSrchKey(it8->id);
- if (key == SNONE) it8->sy = SIDENT;
+ if (key == SUNDEFINED) it8->sy = SIDENT;
else it8->sy = key;
}
if (it8->ch >= 'A' && it8->ch <= 'F') j = it8->ch -'A'+10;
else j = it8->ch - '0';
- if ((long) it8->inum * 16L > (long) INT_MAX)
+ if ((cmsFloat64Number) it8->inum * 16.0 + (cmsFloat64Number) j > (cmsFloat64Number)+2147483647.0)
{
SynError(it8, "Invalid hexadecimal number");
return;
{
j = it8->ch - '0';
- if ((long) it8->inum * 2L > (long) INT_MAX)
+ if ((cmsFloat64Number) it8->inum * 2.0 + j > (cmsFloat64Number)+2147483647.0)
{
SynError(it8, "Invalid binary number");
return;
while (isdigit(it8->ch)) {
- if ((long) it8->inum * 10L > (long) INT_MAX) {
+ cmsInt32Number digit = (it8->ch - '0');
+
+ if ((cmsFloat64Number) it8->inum * 10.0 + (cmsFloat64Number) digit > (cmsFloat64Number) +2147483647.0) {
ReadReal(it8, it8->inum);
it8->sy = SDNUM;
it8->dnum *= sign;
return;
}
- it8->inum = it8->inum * 10 + (it8->ch - '0');
+ it8->inum = it8->inum * 10 + digit;
NextCh(it8);
}
if (it8 ->sy == SINUM) {
- sprintf(it8->id, "%d", it8->inum);
+ snprintf(it8->id, 127, "%d", it8->inum);
}
else {
- sprintf(it8->id, it8 ->DoubleFormatter, it8->dnum);
+ snprintf(it8->id, 127, it8 ->DoubleFormatter, it8->dnum);
}
k = (int) strlen(it8 ->id);
// Next line
+ case '\r':
+ NextCh(it8);
+ if (it8 ->ch == '\n')
+ NextCh(it8);
+ it8->sy = SEOLN;
+ it8->lineno++;
+ break;
+
case '\n':
NextCh(it8);
it8->sy = SEOLN;
// Comment
case '#':
NextCh(it8);
- while (it8->ch && it8->ch != '\n')
+ while (it8->ch && it8->ch != '\n' && it8->ch != '\r')
NextCh(it8);
it8->sy = SCOMMENT;
k = 0;
NextCh(it8);
- while (k < MAXSTR && it8->ch != sng) {
+ while (k < (MAXSTR-1) && it8->ch != sng) {
if (it8->ch == '\n'|| it8->ch == '\r') k = MAXSTR+1;
else {
{
switch (it8->sy) {
+ case SEOLN: // Empty value
+ Buffer[0]=0;
+ break;
case SIDENT: strncpy(Buffer, it8->id, max);
Buffer[max-1]=0;
break;
if (*Key != '#') { // Comments are ignored
if (cmsstrcasecmp(Key, p->Keyword) == 0)
- break;
- }
+ break;
}
+ }
if (p == NULL)
return FALSE;
for (; p != NULL; p = p->NextSubkey) {
+ if (p ->Subkey == NULL) continue;
+
if (LastPtr) *LastPtr = p;
if (cmsstrcasecmp(Subkey, p->Subkey) == 0)
- return TRUE;
- }
+ return TRUE;
+ }
return FALSE;
}
it8 ->nTable = nTable;
- return nTable;
+ return (cmsInt32Number) nTable;
}
it8->ValidKeywords = NULL;
it8->ValidSampleID = NULL;
- it8 -> sy = SNONE;
+ it8 -> sy = SUNDEFINED;
it8 -> ch = ' ';
it8 -> Source = NULL;
it8 -> inum = 0;
cmsIT8* it8 = (cmsIT8*) hIT8;
char Buffer[1024];
- sprintf(Buffer, it8->DoubleFormatter, Val);
+ snprintf(Buffer, 1023, it8->DoubleFormatter, Val);
return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_UNCOOKED) != NULL;
}
cmsIT8* it8 = (cmsIT8*) hIT8;
char Buffer[1024];
- sprintf(Buffer, "%d", Val);
+ snprintf(Buffer, 1023, "%u", Val);
return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_HEXADECIMAL) != NULL;
}
{
const char *v = cmsIT8GetProperty(hIT8, cProp);
+ if (v == NULL) return 0.0;
+
return ParseFloatNumber(v);
}
t -> nSamples = 10;
}
- t -> DataFormat = (char**) AllocChunk (it8, (t->nSamples + 1) * sizeof(char *));
+ t -> DataFormat = (char**) AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * sizeof(char *));
if (t->DataFormat == NULL) {
SynError(it8, "AllocateDataFormat: Unable to allocate dataFormat array");
cmsBool CMSEXPORT cmsIT8SetDataFormat(cmsHANDLE h, int n, const char *Sample)
{
- cmsIT8* it8 = (cmsIT8*) h;
- return SetDataFormat(it8, n, Sample);
+ cmsIT8* it8 = (cmsIT8*)h;
+ return SetDataFormat(it8, n, Sample);
+}
+
+// A safe atoi that returns 0 when NULL input is given
+static
+cmsInt32Number satoi(const char* b)
+{
+ if (b == NULL) return 0;
+ return atoi(b);
}
static
if (t -> Data) return; // Already allocated
- t-> nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS"));
- t-> nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS"));
+ t-> nSamples = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS"));
+ t-> nPatches = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS"));
- t-> Data = (char**)AllocChunk (it8, (t->nSamples + 1) * (t->nPatches + 1) *sizeof (char*));
- if (t->Data == NULL) {
+ if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe)
+ {
+ SynError(it8, "AllocateDataSet: too much data");
+ }
+ else {
+ // Some dumb analizers warns of possible overflow here, just take a look couple of lines above.
+ t->Data = (char**)AllocChunk(it8, ((cmsUInt32Number)t->nSamples + 1) * ((cmsUInt32Number)t->nPatches + 1) * sizeof(char*));
+ if (t->Data == NULL) {
- SynError(it8, "AllocateDataSet: Unable to allocate data array");
+ SynError(it8, "AllocateDataSet: Unable to allocate data array");
+ }
}
}
char* GetData(cmsIT8* it8, int nSet, int nField)
{
TABLE* t = GetTable(it8);
- int nSamples = t -> nSamples;
- int nPatches = t -> nPatches;
+ int nSamples = t -> nSamples;
+ int nPatches = t -> nPatches;
if (nSet >= nPatches || nField >= nSamples)
return NULL;
if (str == NULL)
str = " ";
- // Lenghth to write
+ // Length to write
len = (cmsUInt32Number) strlen(str);
f ->Used += len;
break;
case WRITE_HEXADECIMAL:
- Writef(fp, "\t0x%X", atoi(p ->Value));
+ Writef(fp, "\t0x%X", satoi(p ->Value));
break;
case WRITE_BINARY:
- Writef(fp, "\t0x%B", atoi(p ->Value));
+ Writef(fp, "\t0x%B", satoi(p ->Value));
break;
case WRITE_PAIR:
WriteStr(fp, "BEGIN_DATA_FORMAT\n");
WriteStr(fp, " ");
- nSamples = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS"));
+ nSamples = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS"));
for (i = 0; i < nSamples; i++) {
WriteStr (fp, "BEGIN_DATA\n");
- t->nPatches = atoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS"));
+ t->nPatches = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS"));
for (i = 0; i < t-> nPatches; i++) {
}
-// -------------------------------------------------------------- Higer level parsing
+// -------------------------------------------------------------- Higher level parsing
static
cmsBool DataFormatSection(cmsIT8* it8)
case SIDENT:
- strncpy(VarName, it8->id, MAXID-1);
- VarName[MAXID-1] = 0;
+ strncpy(VarName, it8->id, MAXID - 1);
+ VarName[MAXID - 1] = 0;
- if (!IsAvailableOnList(it8-> ValidKeywords, VarName, NULL, &Key)) {
+ if (!IsAvailableOnList(it8->ValidKeywords, VarName, NULL, &Key)) {
#ifdef CMS_STRICT_CGATS
- return SynError(it8, "Undefined keyword '%s'", VarName);
+ return SynError(it8, "Undefined keyword '%s'", VarName);
#else
- Key = AddAvailableProperty(it8, VarName, WRITE_UNCOOKED);
- if (Key == NULL) return FALSE;
+ Key = AddAvailableProperty(it8, VarName, WRITE_UNCOOKED);
+ if (Key == NULL) return FALSE;
#endif
- }
+ }
- InSymbol(it8);
- if (!GetVal(it8, Buffer, MAXSTR-1, "Property data expected")) return FALSE;
+ InSymbol(it8);
+ if (!GetVal(it8, Buffer, MAXSTR - 1, "Property data expected")) return FALSE;
- if(Key->WriteAs != WRITE_PAIR) {
- AddToList(it8, &GetTable(it8)->HeaderList, VarName, NULL, Buffer,
- (it8->sy == SSTRING) ? WRITE_STRINGIFY : WRITE_UNCOOKED);
- }
- else {
- const char *Subkey;
- char *Nextkey;
- if (it8->sy != SSTRING)
- return SynError(it8, "Invalid value '%s' for property '%s'.", Buffer, VarName);
-
- // chop the string as a list of "subkey, value" pairs, using ';' as a separator
- for (Subkey = Buffer; Subkey != NULL; Subkey = Nextkey)
- {
- char *Value, *temp;
-
- // identify token pair boundary
- Nextkey = (char*) strchr(Subkey, ';');
- if(Nextkey)
- *Nextkey++ = '\0';
-
- // for each pair, split the subkey and the value
- Value = (char*) strrchr(Subkey, ',');
- if(Value == NULL)
- return SynError(it8, "Invalid value for property '%s'.", VarName);
-
- // gobble the spaces before the coma, and the coma itself
- temp = Value++;
- do *temp-- = '\0'; while(temp >= Subkey && *temp == ' ');
-
- // gobble any space at the right
- temp = Value + strlen(Value) - 1;
- while(*temp == ' ') *temp-- = '\0';
-
- // trim the strings from the left
- Subkey += strspn(Subkey, " ");
- Value += strspn(Value, " ");
-
- if(Subkey[0] == 0 || Value[0] == 0)
- return SynError(it8, "Invalid value for property '%s'.", VarName);
- AddToList(it8, &GetTable(it8)->HeaderList, VarName, Subkey, Value, WRITE_PAIR);
- }
+ if (Key->WriteAs != WRITE_PAIR) {
+ AddToList(it8, &GetTable(it8)->HeaderList, VarName, NULL, Buffer,
+ (it8->sy == SSTRING) ? WRITE_STRINGIFY : WRITE_UNCOOKED);
+ }
+ else {
+ const char *Subkey;
+ char *Nextkey;
+ if (it8->sy != SSTRING)
+ return SynError(it8, "Invalid value '%s' for property '%s'.", Buffer, VarName);
+
+ // chop the string as a list of "subkey, value" pairs, using ';' as a separator
+ for (Subkey = Buffer; Subkey != NULL; Subkey = Nextkey)
+ {
+ char *Value, *temp;
+
+ // identify token pair boundary
+ Nextkey = (char*)strchr(Subkey, ';');
+ if (Nextkey)
+ *Nextkey++ = '\0';
+
+ // for each pair, split the subkey and the value
+ Value = (char*)strrchr(Subkey, ',');
+ if (Value == NULL)
+ return SynError(it8, "Invalid value for property '%s'.", VarName);
+
+ // gobble the spaces before the coma, and the coma itself
+ temp = Value++;
+ do *temp-- = '\0'; while (temp >= Subkey && *temp == ' ');
+
+ // gobble any space at the right
+ temp = Value + strlen(Value) - 1;
+ while (*temp == ' ') *temp-- = '\0';
+
+ // trim the strings from the left
+ Subkey += strspn(Subkey, " ");
+ Value += strspn(Value, " ");
+
+ if (Subkey[0] == 0 || Value[0] == 0)
+ return SynError(it8, "Invalid value for property '%s'.", VarName);
+ AddToList(it8, &GetTable(it8)->HeaderList, VarName, Subkey, Value, WRITE_PAIR);
}
+ }
- InSymbol(it8);
- break;
+ InSymbol(it8);
+ break;
case SEOLN: break;
static
void ReadType(cmsIT8* it8, char* SheetTypePtr)
{
+ cmsInt32Number cnt = 0;
+
// First line is a very special case.
while (isseparator(it8->ch))
NextCh(it8);
- while (it8->ch != '\r' && it8 ->ch != '\n' && it8->ch != '\t' && it8 -> ch != -1) {
+ while (it8->ch != '\r' && it8 ->ch != '\n' && it8->ch != '\t' && it8 -> ch != 0) {
- *SheetTypePtr++= (char) it8 ->ch;
+ if (cnt++ < MAXSTR)
+ *SheetTypePtr++= (char) it8 ->ch;
NextCh(it8);
}
NextCh(it8);
// If a newline is found, then this is a type string
- if (it8 ->ch == '\n') {
+ if (it8 ->ch == '\n' || it8->ch == '\r') {
cmsIT8SetSheetType(it8, it8 ->id);
InSymbol(it8);
-// Init usefull pointers
+// Init useful pointers
static
void CookPointers(cmsIT8* it8)
if (cmsstrcasecmp(Fld, "SAMPLE_ID") == 0) {
- t -> SampleID = idField;
-
- for (i=0; i < t -> nPatches; i++) {
-
- char *Data = GetData(it8, i, idField);
- if (Data) {
- char Buffer[256];
-
- strncpy(Buffer, Data, 255);
- Buffer[255] = 0;
-
- if (strlen(Buffer) <= strlen(Data))
- strcpy(Data, Buffer);
- else
- SetData(it8, i, idField, Buffer);
-
- }
- }
-
+ t -> SampleID = idField;
}
// "LABEL" is an extension. It keeps references to forward tables
- if ((cmsstrcasecmp(Fld, "LABEL") == 0) || Fld[0] == '$' ) {
+ if ((cmsstrcasecmp(Fld, "LABEL") == 0) || Fld[0] == '$') {
- // Search for table references...
- for (i=0; i < t -> nPatches; i++) {
+ // Search for table references...
+ for (i = 0; i < t->nPatches; i++) {
- char *Label = GetData(it8, i, idField);
+ char* Label = GetData(it8, i, idField);
- if (Label) {
+ if (Label) {
- cmsUInt32Number k;
+ cmsUInt32Number k;
- // This is the label, search for a table containing
- // this property
+ // This is the label, search for a table containing
+ // this property
- for (k=0; k < it8 ->TablesCount; k++) {
+ for (k = 0; k < it8->TablesCount; k++) {
- TABLE* Table = it8 ->Tab + k;
- KEYVALUE* p;
+ TABLE* Table = it8->Tab + k;
+ KEYVALUE* p;
- if (IsAvailableOnList(Table->HeaderList, Label, NULL, &p)) {
+ if (IsAvailableOnList(Table->HeaderList, Label, NULL, &p)) {
- // Available, keep type and table
- char Buffer[256];
+ // Available, keep type and table
+ char Buffer[256];
- char *Type = p ->Value;
- int nTable = k;
+ char* Type = p->Value;
+ int nTable = (int)k;
- snprintf(Buffer, 255, "%s %d %s", Label, nTable, Type );
+ snprintf(Buffer, 255, "%s %d %s", Label, nTable, Type);
- SetData(it8, i, idField, Buffer);
- }
- }
+ SetData(it8, i, idField, Buffer);
+ }
+ }
- }
+ }
- }
+ }
}
// that should be something like some printable characters plus a \n
// returns 0 if this is not like a CGATS, or an integer otherwise. This integer is the number of words in first line?
static
-int IsMyBlock(cmsUInt8Number* Buffer, int n)
+int IsMyBlock(const cmsUInt8Number* Buffer, cmsUInt32Number n)
{
int words = 1, space = 0, quot = 0;
- int i;
+ cmsUInt32Number i;
if (n < 10) return 0; // Too small
// ---------------------------------------------------------- Exported routines
-cmsHANDLE CMSEXPORT cmsIT8LoadFromMem(cmsContext ContextID, void *Ptr, cmsUInt32Number len)
+cmsHANDLE CMSEXPORT cmsIT8LoadFromMem(cmsContext ContextID, const void *Ptr, cmsUInt32Number len)
{
cmsHANDLE hIT8;
cmsIT8* it8;
_cmsAssert(Ptr != NULL);
_cmsAssert(len != 0);
- type = IsMyBlock((cmsUInt8Number*)Ptr, len);
+ type = IsMyBlock((const cmsUInt8Number*)Ptr, len);
if (type == 0) return NULL;
hIT8 = cmsIT8Alloc(ContextID);
it8 = (cmsIT8*) hIT8;
it8 ->MemoryBlock = (char*) _cmsMalloc(ContextID, len + 1);
+ if (it8->MemoryBlock == NULL)
+ {
+ cmsIT8Free(hIT8);
+ return FALSE;
+ }
strncpy(it8 ->MemoryBlock, (const char*) Ptr, len);
it8 ->MemoryBlock[len] = 0;
for (i=0; i < t->nSamples; i++) {
fld = GetDataFormat(it8, i);
- if (cmsstrcasecmp(fld, cSample) == 0)
- return i;
+ if (fld != NULL) {
+ if (cmsstrcasecmp(fld, cSample) == 0)
+ return i;
+ }
}
return -1;
Buffer = cmsIT8GetDataRowCol(hIT8, row, col);
+ if (Buffer == NULL) return 0.0;
+
return ParseFloatNumber(Buffer);
}
_cmsAssert(hIT8 != NULL);
- sprintf(Buff, it8->DoubleFormatter, Val);
+ snprintf(Buff, 255, it8->DoubleFormatter, Val);
return SetData(it8, row, col, Buff);
}
{
const char* cLabelFld;
char Type[256], Label[256];
- int nTable;
+ cmsUInt32Number nTable;
_cmsAssert(hIT8 != NULL);
cLabelFld = cmsIT8GetData(hIT8, cSet, cField);
if (!cLabelFld) return -1;
- if (sscanf(cLabelFld, "%255s %d %255s", Label, &nTable, Type) != 3)
+ if (sscanf(cLabelFld, "%255s %u %255s", Label, &nTable, Type) != 3)
return -1;
if (ExpectedType != NULL && *ExpectedType == 0)
if (Formatter == NULL)
strcpy(it8->DoubleFormatter, DEFAULT_DBL_FORMAT);
else
- strcpy(it8->DoubleFormatter, Formatter);
+ strncpy(it8->DoubleFormatter, Formatter, sizeof(it8->DoubleFormatter));
it8 ->DoubleFormatter[sizeof(it8 ->DoubleFormatter)-1] = 0;
}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
#include "lcms2_internal.h"
-// Link several profiles to obtain a single LUT modelling the whole color transform. Intents, Black point
-// compensation and Adaptation parameters may vary across profiles. BPC and Adaptation refers to the PCS
-// after the profile. I.e, BPC[0] refers to connexion between profile(0) and profile(1)
-cmsPipeline* _cmsLinkProfiles(cmsContext ContextID,
- cmsUInt32Number nProfiles,
- cmsUInt32Number Intents[],
- cmsHPROFILE hProfiles[],
- cmsBool BPC[],
- cmsFloat64Number AdaptationStates[],
- cmsUInt32Number dwFlags);
-
-//---------------------------------------------------------------------------------
-
// This is the default routine for ICC-style intents. A user may decide to override it by using a plugin.
// Supported intents are perceptual, relative colorimetric, saturation and ICC-absolute colorimetric
static
};
-// A pointer to the begining of the list
-static cmsIntentsList *Intents = DefaultIntents;
+// A pointer to the beginning of the list
+_cmsIntentsPluginChunkType _cmsIntentsPluginChunk = { NULL };
+
+// Duplicates the zone of memory used by the plug-in in the new context
+static
+void DupPluginIntentsList(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ _cmsIntentsPluginChunkType newHead = { NULL };
+ cmsIntentsList* entry;
+ cmsIntentsList* Anterior = NULL;
+ _cmsIntentsPluginChunkType* head = (_cmsIntentsPluginChunkType*) src->chunks[IntentPlugin];
+
+ // Walk the list copying all nodes
+ for (entry = head->Intents;
+ entry != NULL;
+ entry = entry ->Next) {
+
+ cmsIntentsList *newEntry = ( cmsIntentsList *) _cmsSubAllocDup(ctx ->MemPool, entry, sizeof(cmsIntentsList));
+
+ if (newEntry == NULL)
+ return;
+
+ // We want to keep the linked list order, so this is a little bit tricky
+ newEntry -> Next = NULL;
+ if (Anterior)
+ Anterior -> Next = newEntry;
+
+ Anterior = newEntry;
+
+ if (newHead.Intents == NULL)
+ newHead.Intents = newEntry;
+ }
+
+ ctx ->chunks[IntentPlugin] = _cmsSubAllocDup(ctx->MemPool, &newHead, sizeof(_cmsIntentsPluginChunkType));
+}
+
+void _cmsAllocIntentsPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ if (src != NULL) {
+
+ // Copy all linked list
+ DupPluginIntentsList(ctx, src);
+ }
+ else {
+ static _cmsIntentsPluginChunkType IntentsPluginChunkType = { NULL };
+ ctx ->chunks[IntentPlugin] = _cmsSubAllocDup(ctx ->MemPool, &IntentsPluginChunkType, sizeof(_cmsIntentsPluginChunkType));
+ }
+}
+
// Search the list for a suitable intent. Returns NULL if not found
static
-cmsIntentsList* SearchIntent(cmsUInt32Number Intent)
+cmsIntentsList* SearchIntent(cmsContext ContextID, cmsUInt32Number Intent)
{
+ _cmsIntentsPluginChunkType* ctx = ( _cmsIntentsPluginChunkType*) _cmsContextGetClientChunk(ContextID, IntentPlugin);
cmsIntentsList* pt;
- for (pt = Intents; pt != NULL; pt = pt -> Next)
+ for (pt = ctx -> Intents; pt != NULL; pt = pt -> Next)
+ if (pt ->Intent == Intent) return pt;
+
+ for (pt = DefaultIntents; pt != NULL; pt = pt -> Next)
if (pt ->Intent == Intent) return pt;
return NULL;
{
cmsMAT3 Scale, m1, m2, m3, m4;
+ // TODO: Follow Marc Mahy's recommendation to check if CHAD is same by using M1*M2 == M2*M1. If so, do nothing.
+ // TODO: Add support for ArgyllArts tag
+
// Adaptation state
if (AdaptationState == 1.0) {
if (AdaptationState == 0.0) {
-
+
m1 = *ChromaticAdaptationMatrixOut;
_cmsMAT3per(&m2, &m1, &Scale);
// m2 holds CHAD from output white to D50 times abs. col. scaling
// Observer is not adapted, undo the chromatic adaptation
- _cmsMAT3per(m, &m3, ChromaticAdaptationMatrixOut);
+ _cmsMAT3per(m, &m2, ChromaticAdaptationMatrixOut);
m3 = *ChromaticAdaptationMatrixIn;
if (!_cmsMAT3inverse(&m3, &m4)) return FALSE;
// Compute the conversion layer
static
-cmsBool ComputeConversion(int i, cmsHPROFILE hProfiles[],
- cmsUInt32Number Intent,
- cmsBool BPC,
- cmsFloat64Number AdaptationState,
- cmsMAT3* m, cmsVEC3* off)
+cmsBool ComputeConversion(cmsUInt32Number i,
+ cmsHPROFILE hProfiles[],
+ cmsUInt32Number Intent,
+ cmsBool BPC,
+ cmsFloat64Number AdaptationState,
+ cmsMAT3* m, cmsVEC3* off)
{
int k;
// Handle PCS mismatches. A specialized stage is added to the LUT in such case
switch (InPCS) {
- case cmsSigXYZData: // Input profile operates in XYZ
-
- switch (OutPCS) {
+ case cmsSigXYZData: // Input profile operates in XYZ
- case cmsSigXYZData: // XYZ -> XYZ
- if (!IsEmptyLayer(m, off))
- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl));
- break;
+ switch (OutPCS) {
- case cmsSigLabData: // XYZ -> Lab
- if (!IsEmptyLayer(m, off))
- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl));
- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID));
- break;
-
- default:
- return FALSE; // Colorspace mismatch
- }
- break;
+ case cmsSigXYZData: // XYZ -> XYZ
+ if (!IsEmptyLayer(m, off) &&
+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)))
+ return FALSE;
+ break;
+ case cmsSigLabData: // XYZ -> Lab
+ if (!IsEmptyLayer(m, off) &&
+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)))
+ return FALSE;
+ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID)))
+ return FALSE;
+ break;
- case cmsSigLabData: // Input profile operates in Lab
+ default:
+ return FALSE; // Colorspace mismatch
+ }
+ break;
- switch (OutPCS) {
+ case cmsSigLabData: // Input profile operates in Lab
- case cmsSigXYZData: // Lab -> XYZ
+ switch (OutPCS) {
- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID));
- if (!IsEmptyLayer(m, off))
- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl));
- break;
+ case cmsSigXYZData: // Lab -> XYZ
- case cmsSigLabData: // Lab -> Lab
+ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)))
+ return FALSE;
+ if (!IsEmptyLayer(m, off) &&
+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)))
+ return FALSE;
+ break;
- if (!IsEmptyLayer(m, off)) {
- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID));
- cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl));
- cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID));
- }
- break;
+ case cmsSigLabData: // Lab -> Lab
- default:
- return FALSE; // Mismatch
+ if (!IsEmptyLayer(m, off)) {
+ if (!cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocLab2XYZ(Result ->ContextID)) ||
+ !cmsPipelineInsertStage(Result, cmsAT_END, cmsStageAllocMatrix(Result ->ContextID, 3, 3, m_as_dbl, off_as_dbl)) ||
+ !cmsPipelineInsertStage(Result, cmsAT_END, _cmsStageAllocXYZ2Lab(Result ->ContextID)))
+ return FALSE;
}
break;
-
- // On colorspaces other than PCS, check for same space
default:
- if (InPCS != OutPCS) return FALSE;
- break;
+ return FALSE; // Mismatch
+ }
+ break;
+
+ // On colorspaces other than PCS, check for same space
+ default:
+ if (InPCS != OutPCS) return FALSE;
+ break;
}
return TRUE;
cmsFloat64Number AdaptationStates[],
cmsUInt32Number dwFlags)
{
- cmsPipeline* Lut, *Result;
+ cmsPipeline* Lut = NULL;
+ cmsPipeline* Result;
cmsHPROFILE hProfile;
cmsMAT3 m;
cmsVEC3 off;
- cmsColorSpaceSignature ColorSpaceIn, ColorSpaceOut, CurrentColorSpace;
+ cmsColorSpaceSignature ColorSpaceIn, ColorSpaceOut = cmsSigLabData, CurrentColorSpace;
cmsProfileClassSignature ClassSig;
cmsUInt32Number i, Intent;
}
// Concatenate to the output LUT
- cmsPipelineCat(Result, Lut);
+ if (!cmsPipelineCat(Result, Lut))
+ goto Error;
+
cmsPipelineFree(Lut);
+ Lut = NULL;
// Update current space
CurrentColorSpace = ColorSpaceOut;
}
+ // Check for non-negatives clip
+ if (dwFlags & cmsFLAGS_NONEGATIVES) {
+
+ if (ColorSpaceOut == cmsSigGrayData ||
+ ColorSpaceOut == cmsSigRgbData ||
+ ColorSpaceOut == cmsSigCmykData) {
+
+ cmsStage* clip = _cmsStageClipNegatives(Result->ContextID, cmsChannelsOf(ColorSpaceOut));
+ if (clip == NULL) goto Error;
+
+ if (!cmsPipelineInsertStage(Result, cmsAT_END, clip))
+ goto Error;
+ }
+
+ }
+
return Result;
Error:
+ if (Lut != NULL) cmsPipelineFree(Lut);
if (Result != NULL) cmsPipelineFree(Result);
return NULL;
// Translate black-preserving intents to ICC ones
static
-int TranslateNonICCIntents(int Intent)
+cmsUInt32Number TranslateNonICCIntents(cmsUInt32Number Intent)
{
switch (Intent) {
case INTENT_PRESERVE_K_ONLY_PERCEPTUAL:
// Preserve black only if that is the only ink used
static
-int BlackPreservingGrayOnlySampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+int BlackPreservingGrayOnlySampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)
{
GrayOnlyParams* bp = (GrayOnlyParams*) Cargo;
cmsUInt32Number ICCIntents[256];
cmsStage* CLUT;
cmsUInt32Number i, nGridPoints;
+ cmsUInt32Number lastProfilePos;
+ cmsUInt32Number preservationProfilesCount;
+ cmsHPROFILE hLastProfile;
// Sanity check
for (i=0; i < nProfiles; i++)
ICCIntents[i] = TranslateNonICCIntents(TheIntents[i]);
+
+ // Trim all CMYK devicelinks at the end
+ lastProfilePos = nProfiles - 1;
+ hLastProfile = hProfiles[lastProfilePos];
+
+ while (lastProfilePos > 1)
+ {
+ hLastProfile = hProfiles[--lastProfilePos];
+ if (cmsGetColorSpace(hLastProfile) != cmsSigCmykData ||
+ cmsGetDeviceClass(hLastProfile) != cmsSigLinkClass)
+ break;
+ }
+
+ preservationProfilesCount = lastProfilePos + 1;
+
// Check for non-cmyk profiles
if (cmsGetColorSpace(hProfiles[0]) != cmsSigCmykData ||
- cmsGetColorSpace(hProfiles[nProfiles-1]) != cmsSigCmykData)
+ !(cmsGetColorSpace(hLastProfile) == cmsSigCmykData ||
+ cmsGetDeviceClass(hLastProfile) == cmsSigOutputClass))
return DefaultICCintents(ContextID, nProfiles, ICCIntents, hProfiles, BPC, AdaptationStates, dwFlags);
- memset(&bp, 0, sizeof(bp));
-
// Allocate an empty LUT for holding the result
Result = cmsPipelineAlloc(ContextID, 4, 4);
if (Result == NULL) return NULL;
+ memset(&bp, 0, sizeof(bp));
+
// Create a LUT holding normal ICC transform
bp.cmyk2cmyk = DefaultICCintents(ContextID,
- nProfiles,
+ preservationProfilesCount,
ICCIntents,
hProfiles,
BPC,
// Now, compute the tone curve
bp.KTone = _cmsBuildKToneCurve(ContextID,
4096,
- nProfiles,
+ preservationProfilesCount,
ICCIntents,
hProfiles,
BPC,
if (CLUT == NULL) goto Error;
// This is the one and only MPE in this LUT
- cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT);
+ if (!cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT))
+ goto Error;
// Sample it. We cannot afford pre/post linearization this time.
if (!cmsStageSampleCLut16bit(CLUT, BlackPreservingGrayOnlySampler, (void*) &bp, 0))
goto Error;
+
+ // Insert possible devicelinks at the end
+ for (i = lastProfilePos + 1; i < nProfiles; i++)
+ {
+ cmsPipeline* devlink = _cmsReadDevicelinkLUT(hProfiles[i], ICCIntents[i]);
+ if (devlink == NULL)
+ goto Error;
+
+ if (!cmsPipelineCat(Result, devlink))
+ goto Error;
+ }
+
+
// Get rid of xform and tone curve
cmsPipelineFree(bp.cmyk2cmyk);
cmsFreeToneCurve(bp.KTone);
// The CLUT will be stored at 16 bits, but calculations are performed at cmsFloat32Number precision
static
-int BlackPreservingSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+int BlackPreservingSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)
{
int i;
cmsFloat32Number Inf[4], Outf[4];
}
// Try the original transform,
- cmsPipelineEvalFloat( Inf, Outf, bp ->cmyk2cmyk);
+ cmsPipelineEvalFloat(Inf, Outf, bp ->cmyk2cmyk);
// Store a copy of the floating point result into 16-bit
for (i=0; i < 4; i++)
Out[i] = _cmsQuickSaturateWord(Outf[i] * 65535.0);
// Maybe K is already ok (mostly on K=0)
- if ( fabs(Outf[3] - LabK[3]) < (3.0 / 65535.0) ) {
+ if (fabsf(Outf[3] - LabK[3]) < (3.0 / 65535.0)) {
return TRUE;
}
- // K differ, mesure and keep Lab measurement for further usage
+ // K differ, measure and keep Lab measurement for further usage
// this is done in relative colorimetric intent
cmsDoTransform(bp->hProofOutput, Out, &ColorimetricLab, 1);
return TRUE;
}
- // Make sure to pass thru K (which now is fixed)
+ // Make sure to pass through K (which now is fixed)
Outf[3] = LabK[3];
// Apply TAC if needed
- SumCMY = Outf[0] + Outf[1] + Outf[2];
+ SumCMY = (cmsFloat64Number) Outf[0] + Outf[1] + Outf[2];
SumCMYK = SumCMY + Outf[3];
if (SumCMYK > bp ->MaxTAC) {
return TRUE;
}
+
+
// This is the entry for black-plane preserving, which are non-ICC
static
cmsPipeline* BlackPreservingKPlaneIntents(cmsContext ContextID,
cmsUInt32Number dwFlags)
{
PreserveKPlaneParams bp;
+
cmsPipeline* Result = NULL;
cmsUInt32Number ICCIntents[256];
cmsStage* CLUT;
cmsUInt32Number i, nGridPoints;
+ cmsUInt32Number lastProfilePos;
+ cmsUInt32Number preservationProfilesCount;
+ cmsHPROFILE hLastProfile;
cmsHPROFILE hLab;
// Sanity check
for (i=0; i < nProfiles; i++)
ICCIntents[i] = TranslateNonICCIntents(TheIntents[i]);
+ // Trim all CMYK devicelinks at the end
+ lastProfilePos = nProfiles - 1;
+ hLastProfile = hProfiles[lastProfilePos];
+
+ while (lastProfilePos > 1)
+ {
+ hLastProfile = hProfiles[--lastProfilePos];
+ if (cmsGetColorSpace(hLastProfile) != cmsSigCmykData ||
+ cmsGetDeviceClass(hLastProfile) != cmsSigLinkClass)
+ break;
+ }
+
+ preservationProfilesCount = lastProfilePos + 1;
+
// Check for non-cmyk profiles
if (cmsGetColorSpace(hProfiles[0]) != cmsSigCmykData ||
- !(cmsGetColorSpace(hProfiles[nProfiles-1]) == cmsSigCmykData ||
- cmsGetDeviceClass(hProfiles[nProfiles-1]) == cmsSigOutputClass))
+ !(cmsGetColorSpace(hLastProfile) == cmsSigCmykData ||
+ cmsGetDeviceClass(hLastProfile) == cmsSigOutputClass))
return DefaultICCintents(ContextID, nProfiles, ICCIntents, hProfiles, BPC, AdaptationStates, dwFlags);
// Allocate an empty LUT for holding the result
Result = cmsPipelineAlloc(ContextID, 4, 4);
if (Result == NULL) return NULL;
-
memset(&bp, 0, sizeof(bp));
// We need the input LUT of the last profile, assuming this one is responsible of
- // black generation. This LUT will be seached in inverse order.
- bp.LabK2cmyk = _cmsReadInputLUT(hProfiles[nProfiles-1], INTENT_RELATIVE_COLORIMETRIC);
+ // black generation. This LUT will be searched in inverse order.
+ bp.LabK2cmyk = _cmsReadInputLUT(hLastProfile, INTENT_RELATIVE_COLORIMETRIC);
if (bp.LabK2cmyk == NULL) goto Cleanup;
// Get total area coverage (in 0..1 domain)
- bp.MaxTAC = cmsDetectTAC(hProfiles[nProfiles-1]) / 100.0;
+ bp.MaxTAC = cmsDetectTAC(hLastProfile) / 100.0;
if (bp.MaxTAC <= 0) goto Cleanup;
// Create a LUT holding normal ICC transform
bp.cmyk2cmyk = DefaultICCintents(ContextID,
- nProfiles,
+ preservationProfilesCount,
ICCIntents,
hProfiles,
BPC,
if (bp.cmyk2cmyk == NULL) goto Cleanup;
// Now the tone curve
- bp.KTone = _cmsBuildKToneCurve(ContextID, 4096, nProfiles,
+ bp.KTone = _cmsBuildKToneCurve(ContextID, 4096, preservationProfilesCount,
ICCIntents,
hProfiles,
BPC,
// To measure the output, Last profile to Lab
hLab = cmsCreateLab4ProfileTHR(ContextID, NULL);
- bp.hProofOutput = cmsCreateTransformTHR(ContextID, hProfiles[nProfiles-1],
+ bp.hProofOutput = cmsCreateTransformTHR(ContextID, hLastProfile,
CHANNELS_SH(4)|BYTES_SH(2), hLab, TYPE_Lab_DBL,
INTENT_RELATIVE_COLORIMETRIC,
cmsFLAGS_NOCACHE|cmsFLAGS_NOOPTIMIZE);
if ( bp.hProofOutput == NULL) goto Cleanup;
// Same as anterior, but lab in the 0..1 range
- bp.cmyk2Lab = cmsCreateTransformTHR(ContextID, hProfiles[nProfiles-1],
+ bp.cmyk2Lab = cmsCreateTransformTHR(ContextID, hLastProfile,
FLOAT_SH(1)|CHANNELS_SH(4)|BYTES_SH(4), hLab,
FLOAT_SH(1)|CHANNELS_SH(3)|BYTES_SH(4),
INTENT_RELATIVE_COLORIMETRIC,
CLUT = cmsStageAllocCLut16bit(ContextID, nGridPoints, 4, 4, NULL);
if (CLUT == NULL) goto Cleanup;
- cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT);
+ if (!cmsPipelineInsertStage(Result, cmsAT_BEGIN, CLUT))
+ goto Cleanup;
cmsStageSampleCLut16bit(CLUT, BlackPreservingSampler, (void*) &bp, 0);
+ // Insert possible devicelinks at the end
+ for (i = lastProfilePos + 1; i < nProfiles; i++)
+ {
+ cmsPipeline* devlink = _cmsReadDevicelinkLUT(hProfiles[i], ICCIntents[i]);
+ if (devlink == NULL)
+ goto Cleanup;
+
+ if (!cmsPipelineCat(Result, devlink))
+ goto Cleanup;
+ }
+
+
Cleanup:
if (bp.cmyk2cmyk) cmsPipelineFree(bp.cmyk2cmyk);
return Result;
}
+
+
// Link routines ------------------------------------------------------------------------------------------------------
// Chain several profiles into a single LUT. It just checks the parameters and then calls the handler
if (TheIntents[i] == INTENT_PERCEPTUAL || TheIntents[i] == INTENT_SATURATION) {
// Force BPC for V4 profiles in perceptual and saturation
- if (cmsGetProfileVersion(hProfiles[i]) >= 4.0)
+ if (cmsGetEncodedICCversion(hProfiles[i]) >= 0x4000000)
BPC[i] = TRUE;
}
}
// this case would present some issues if the custom intent tries to do things like
// preserve primaries. This solution is not perfect, but works well on most cases.
- Intent = SearchIntent(TheIntents[0]);
+ Intent = SearchIntent(ContextID, TheIntents[0]);
if (Intent == NULL) {
cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported intent '%d'", TheIntents[0]);
return NULL;
// Get information about available intents. nMax is the maximum space for the supplied "Codes"
// and "Descriptions" the function returns the total number of intents, which may be greater
// than nMax, although the matrices are not populated beyond this level.
-cmsUInt32Number CMSEXPORT cmsGetSupportedIntents(cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions)
+cmsUInt32Number CMSEXPORT cmsGetSupportedIntentsTHR(cmsContext ContextID, cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions)
{
+ _cmsIntentsPluginChunkType* ctx = ( _cmsIntentsPluginChunkType*) _cmsContextGetClientChunk(ContextID, IntentPlugin);
cmsIntentsList* pt;
cmsUInt32Number nIntents;
- for (nIntents=0, pt = Intents; pt != NULL; pt = pt -> Next)
+
+ for (nIntents=0, pt = ctx->Intents; pt != NULL; pt = pt -> Next)
{
if (nIntents < nMax) {
if (Codes != NULL)
nIntents++;
}
+ for (nIntents=0, pt = DefaultIntents; pt != NULL; pt = pt -> Next)
+ {
+ if (nIntents < nMax) {
+ if (Codes != NULL)
+ Codes[nIntents] = pt ->Intent;
+
+ if (Descriptions != NULL)
+ Descriptions[nIntents] = pt ->Description;
+ }
+
+ nIntents++;
+ }
return nIntents;
}
+cmsUInt32Number CMSEXPORT cmsGetSupportedIntents(cmsUInt32Number nMax, cmsUInt32Number* Codes, char** Descriptions)
+{
+ return cmsGetSupportedIntentsTHR(NULL, nMax, Codes, Descriptions);
+}
+
// The plug-in registration. User can add new intents or override default routines
-cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Data)
+cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext id, cmsPluginBase* Data)
{
+ _cmsIntentsPluginChunkType* ctx = ( _cmsIntentsPluginChunkType*) _cmsContextGetClientChunk(id, IntentPlugin);
cmsPluginRenderingIntent* Plugin = (cmsPluginRenderingIntent*) Data;
cmsIntentsList* fl;
- // Do we have to reset the intents?
+ // Do we have to reset the custom intents?
if (Data == NULL) {
- Intents = DefaultIntents;
- return TRUE;
+ ctx->Intents = NULL;
+ return TRUE;
}
- fl = SearchIntent(Plugin ->Intent);
+ fl = (cmsIntentsList*) _cmsPluginMalloc(id, sizeof(cmsIntentsList));
+ if (fl == NULL) return FALSE;
- if (fl == NULL) {
- fl = (cmsIntentsList*) _cmsPluginMalloc(sizeof(cmsIntentsList));
- if (fl == NULL) return FALSE;
- }
fl ->Intent = Plugin ->Intent;
- strncpy(fl ->Description, Plugin ->Description, 255);
- fl ->Description[255] = 0;
+ strncpy(fl ->Description, Plugin ->Description, sizeof(fl ->Description)-1);
+ fl ->Description[sizeof(fl ->Description)-1] = 0;
fl ->Link = Plugin ->Link;
- fl ->Next = Intents;
- Intents = fl;
+ fl ->Next = ctx ->Intents;
+ ctx ->Intents = fl;
return TRUE;
}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
#include "lcms2_internal.h"
+
+// This function is here to help applications to prevent mixing lcms versions on header and shared objects.
+int CMSEXPORT cmsGetEncodedCMMversion(void)
+{
+ return LCMS_VERSION;
+}
+
// I am so tired about incompatibilities on those functions that here are some replacements
// that hopefully would be fully portable.
// compare two strings ignoring case
int CMSEXPORT cmsstrcasecmp(const char* s1, const char* s2)
{
- register const unsigned char *us1 = (const unsigned char *)s1,
- *us2 = (const unsigned char *)s2;
+ CMSREGISTER const unsigned char *us1 = (const unsigned char *)s1,
+ *us2 = (const unsigned char *)s2;
- while (toupper(*us1) == toupper(*us2++))
- if (*us1++ == '\0')
- return (0);
- return (toupper(*us1) - toupper(*--us2));
+ while (toupper(*us1) == toupper(*us2++))
+ if (*us1++ == '\0')
+ return 0;
+
+ return (toupper(*us1) - toupper(*--us2));
}
// long int because C99 specifies ftell in such way (7.19.9.2)
long int p , n;
p = ftell(f); // register current file position
+ if (p == -1L)
+ return -1L;
if (fseek(f, 0, SEEK_END) != 0) {
- return -1;
+ return -1L;
}
n = ftell(f);
//
// This is the interface to low-level memory management routines. By default a simple
// wrapping to malloc/free/realloc is provided, although there is a limit on the max
-// amount of memoy that can be reclaimed. This is mostly as a safety feature to
-// prevent bogus or malintentionated code to allocate huge blocks that otherwise lcms
-// would never need.
+// amount of memoy that can be reclaimed. This is mostly as a safety feature to prevent
+// bogus or evil code to allocate huge blocks that otherwise lcms would never need.
#define MAX_MEMORY_FOR_ALLOC ((cmsUInt32Number)(1024U*1024U*512U))
// required to be implemented: malloc, realloc and free, although the user may want to
// replace the optional mallocZero, calloc and dup as well.
-cmsBool _cmsRegisterMemHandlerPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// *********************************************************************************
// This is the default memory allocation function. It does a very coarse
-// check of amout of memory, just to prevent exploits
+// check of amount of memory, just to prevent exploits
static
void* _cmsMallocDefaultFn(cmsContext ContextID, cmsUInt32Number size)
{
cmsUNUSED_PARAMETER(ContextID);
}
-// The default realloc function. Again it check for exploits. If Ptr is NULL,
+// The default realloc function. Again it checks for exploits. If Ptr is NULL,
// realloc behaves the same way as malloc and allocates a new block of size bytes.
static
void* _cmsReallocDefaultFn(cmsContext ContextID, void* Ptr, cmsUInt32Number size)
return mem;
}
-// Pointers to malloc and _cmsFree functions in current environment
-static void * (* MallocPtr)(cmsContext ContextID, cmsUInt32Number size) = _cmsMallocDefaultFn;
-static void * (* MallocZeroPtr)(cmsContext ContextID, cmsUInt32Number size) = _cmsMallocZeroDefaultFn;
-static void (* FreePtr)(cmsContext ContextID, void *Ptr) = _cmsFreeDefaultFn;
-static void * (* ReallocPtr)(cmsContext ContextID, void *Ptr, cmsUInt32Number NewSize) = _cmsReallocDefaultFn;
-static void * (* CallocPtr)(cmsContext ContextID, cmsUInt32Number num, cmsUInt32Number size)= _cmsCallocDefaultFn;
-static void * (* DupPtr)(cmsContext ContextID, const void* Org, cmsUInt32Number size) = _cmsDupDefaultFn;
+
+// Pointers to memory manager functions in Context0
+_cmsMemPluginChunkType _cmsMemPluginChunk = { _cmsMallocDefaultFn, _cmsMallocZeroDefaultFn, _cmsFreeDefaultFn,
+ _cmsReallocDefaultFn, _cmsCallocDefaultFn, _cmsDupDefaultFn
+ };
+
+
+// Reset and duplicate memory manager
+void _cmsAllocMemPluginChunk(struct _cmsContext_struct* ctx, const struct _cmsContext_struct* src)
+{
+ _cmsAssert(ctx != NULL);
+
+ if (src != NULL) {
+
+ // Duplicate
+ ctx ->chunks[MemPlugin] = _cmsSubAllocDup(ctx ->MemPool, src ->chunks[MemPlugin], sizeof(_cmsMemPluginChunkType));
+ }
+ else {
+
+ // To reset it, we use the default allocators, which cannot be overridden
+ ctx ->chunks[MemPlugin] = &ctx ->DefaultMemoryManager;
+ }
+}
+
+// Auxiliary to fill memory management functions from plugin (or context 0 defaults)
+void _cmsInstallAllocFunctions(cmsPluginMemHandler* Plugin, _cmsMemPluginChunkType* ptr)
+{
+ if (Plugin == NULL) {
+
+ memcpy(ptr, &_cmsMemPluginChunk, sizeof(_cmsMemPluginChunk));
+ }
+ else {
+
+ ptr ->MallocPtr = Plugin -> MallocPtr;
+ ptr ->FreePtr = Plugin -> FreePtr;
+ ptr ->ReallocPtr = Plugin -> ReallocPtr;
+
+ // Make sure we revert to defaults
+ ptr ->MallocZeroPtr= _cmsMallocZeroDefaultFn;
+ ptr ->CallocPtr = _cmsCallocDefaultFn;
+ ptr ->DupPtr = _cmsDupDefaultFn;
+
+ if (Plugin ->MallocZeroPtr != NULL) ptr ->MallocZeroPtr = Plugin -> MallocZeroPtr;
+ if (Plugin ->CallocPtr != NULL) ptr ->CallocPtr = Plugin -> CallocPtr;
+ if (Plugin ->DupPtr != NULL) ptr ->DupPtr = Plugin -> DupPtr;
+
+ }
+}
+
// Plug-in replacement entry
-cmsBool _cmsRegisterMemHandlerPlugin(cmsPluginBase *Data)
+cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase *Data)
{
- cmsPluginMemHandler* Plugin = (cmsPluginMemHandler*) Data;
+ cmsPluginMemHandler* Plugin = (cmsPluginMemHandler*) Data;
+ _cmsMemPluginChunkType* ptr;
- // NULL forces to reset to defaults
+ // NULL forces to reset to defaults. In this special case, the defaults are stored in the context structure.
+ // Remaining plug-ins does NOT have any copy in the context structure, but this is somehow special as the
+ // context internal data should be malloce'd by using those functions.
if (Data == NULL) {
- MallocPtr = _cmsMallocDefaultFn;
- MallocZeroPtr= _cmsMallocZeroDefaultFn;
- FreePtr = _cmsFreeDefaultFn;
- ReallocPtr = _cmsReallocDefaultFn;
- CallocPtr = _cmsCallocDefaultFn;
- DupPtr = _cmsDupDefaultFn;
+ struct _cmsContext_struct* ctx = ( struct _cmsContext_struct*) ContextID;
+
+ // Return to the default allocators
+ if (ContextID != NULL) {
+ ctx->chunks[MemPlugin] = (void*) &ctx->DefaultMemoryManager;
+ }
return TRUE;
}
Plugin -> ReallocPtr == NULL) return FALSE;
// Set replacement functions
- MallocPtr = Plugin -> MallocPtr;
- FreePtr = Plugin -> FreePtr;
- ReallocPtr = Plugin -> ReallocPtr;
-
- if (Plugin ->MallocZeroPtr != NULL) MallocZeroPtr = Plugin ->MallocZeroPtr;
- if (Plugin ->CallocPtr != NULL) CallocPtr = Plugin -> CallocPtr;
- if (Plugin ->DupPtr != NULL) DupPtr = Plugin -> DupPtr;
+ ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin);
+ if (ptr == NULL)
+ return FALSE;
+ _cmsInstallAllocFunctions(Plugin, ptr);
return TRUE;
}
// Generic allocate
void* CMSEXPORT _cmsMalloc(cmsContext ContextID, cmsUInt32Number size)
{
- return MallocPtr(ContextID, size);
+ _cmsMemPluginChunkType* ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin);
+ return ptr ->MallocPtr(ContextID, size);
}
// Generic allocate & zero
void* CMSEXPORT _cmsMallocZero(cmsContext ContextID, cmsUInt32Number size)
{
- return MallocZeroPtr(ContextID, size);
+ _cmsMemPluginChunkType* ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin);
+ return ptr->MallocZeroPtr(ContextID, size);
}
// Generic calloc
void* CMSEXPORT _cmsCalloc(cmsContext ContextID, cmsUInt32Number num, cmsUInt32Number size)
{
- return CallocPtr(ContextID, num, size);
+ _cmsMemPluginChunkType* ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin);
+ return ptr->CallocPtr(ContextID, num, size);
}
// Generic reallocate
void* CMSEXPORT _cmsRealloc(cmsContext ContextID, void* Ptr, cmsUInt32Number size)
{
- return ReallocPtr(ContextID, Ptr, size);
+ _cmsMemPluginChunkType* ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin);
+ return ptr->ReallocPtr(ContextID, Ptr, size);
}
// Generic free memory
void CMSEXPORT _cmsFree(cmsContext ContextID, void* Ptr)
{
- if (Ptr != NULL) FreePtr(ContextID, Ptr);
+ if (Ptr != NULL) {
+ _cmsMemPluginChunkType* ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin);
+ ptr ->FreePtr(ContextID, Ptr);
+ }
}
// Generic block duplication
void* CMSEXPORT _cmsDupMem(cmsContext ContextID, const void* Org, cmsUInt32Number size)
{
- return DupPtr(ContextID, Org, size);
+ _cmsMemPluginChunkType* ptr = (_cmsMemPluginChunkType*) _cmsContextGetClientChunk(ContextID, MemPlugin);
+ return ptr ->DupPtr(ContextID, Org, size);
}
// ********************************************************************************************
return NULL;
}
-
-
chunk ->BlockSize = Initial;
chunk ->Used = 0;
chunk ->next = NULL;
return (void*) ptr;
}
+// Duplicate in pool
+void* _cmsSubAllocDup(_cmsSubAllocator* s, const void *ptr, cmsUInt32Number size)
+{
+ void *NewPtr;
+
+ // Dup of null pointer is also NULL
+ if (ptr == NULL)
+ return NULL;
+
+ NewPtr = _cmsSubAlloc(s, size);
+
+ if (ptr != NULL && NewPtr != NULL) {
+ memcpy(NewPtr, ptr, size);
+ }
+
+ return NewPtr;
+}
+
+
+
// Error logging ******************************************************************
-// There is no error handling at all. When a funtion fails, it returns proper value.
+// There is no error handling at all. When a function fails, it returns proper value.
// For example, all create functions does return NULL on failure. Other return FALSE
// It may be interesting, for the developer, to know why the function is failing.
-// for that reason, lcms2 does offer a logging function. This function does recive
+// for that reason, lcms2 does offer a logging function. This function does receive
// a ENGLISH string with some clues on what is going wrong. You can show this
// info to the end user, or just create some sort of log.
// The logging function should NOT terminate the program, as this obviously can leave
-// resources. It is the programmer's responsability to check each function return code
+// resources. It is the programmer's responsibility to check each function return code
// to make sure it didn't fail.
// Error messages are limited to MAX_ERROR_MESSAGE_LEN
// This is our default log error
static void DefaultLogErrorHandlerFunction(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text);
-// The current handler in actual environment
-static cmsLogErrorHandlerFunction LogErrorHandler = DefaultLogErrorHandlerFunction;
+// Context0 storage, which is global
+_cmsLogErrorChunkType _cmsLogErrorChunk = { DefaultLogErrorHandlerFunction };
+
+// Allocates and inits error logger container for a given context. If src is NULL, only initializes the value
+// to the default. Otherwise, it duplicates the value. The interface is standard across all context clients
+void _cmsAllocLogErrorChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ static _cmsLogErrorChunkType LogErrorChunk = { DefaultLogErrorHandlerFunction };
+ void* from;
+
+ if (src != NULL) {
+ from = src ->chunks[Logger];
+ }
+ else {
+ from = &LogErrorChunk;
+ }
+
+ ctx ->chunks[Logger] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsLogErrorChunkType));
+}
// The default error logger does nothing.
static
cmsUNUSED_PARAMETER(Text);
}
-// Change log error
+// Change log error, context based
+void CMSEXPORT cmsSetLogErrorHandlerTHR(cmsContext ContextID, cmsLogErrorHandlerFunction Fn)
+{
+ _cmsLogErrorChunkType* lhg = (_cmsLogErrorChunkType*) _cmsContextGetClientChunk(ContextID, Logger);
+
+ if (lhg != NULL) {
+
+ if (Fn == NULL)
+ lhg -> LogErrorHandler = DefaultLogErrorHandlerFunction;
+ else
+ lhg -> LogErrorHandler = Fn;
+ }
+}
+
+// Change log error, legacy
void CMSEXPORT cmsSetLogErrorHandler(cmsLogErrorHandlerFunction Fn)
{
- if (Fn == NULL)
- LogErrorHandler = DefaultLogErrorHandlerFunction;
- else
- LogErrorHandler = Fn;
+ cmsSetLogErrorHandlerTHR(NULL, Fn);
}
// Log an error
{
va_list args;
char Buffer[MAX_ERROR_MESSAGE_LEN];
+ _cmsLogErrorChunkType* lhg;
+
va_start(args, ErrorText);
vsnprintf(Buffer, MAX_ERROR_MESSAGE_LEN-1, ErrorText, args);
va_end(args);
- // Call handler
- LogErrorHandler(ContextID, ErrorCode, Buffer);
+ // Check for the context, if specified go there. If not, go for the global
+ lhg = (_cmsLogErrorChunkType*) _cmsContextGetClientChunk(ContextID, Logger);
+ if (lhg ->LogErrorHandler) {
+ lhg ->LogErrorHandler(ContextID, ErrorCode, Buffer);
+ }
}
// Utility function to print signatures
String[4] = 0;
}
+//--------------------------------------------------------------------------------------------------
+
+
+static
+void* defMtxCreate(cmsContext id)
+{
+ _cmsMutex* ptr_mutex = (_cmsMutex*) _cmsMalloc(id, sizeof(_cmsMutex));
+ _cmsInitMutexPrimitive(ptr_mutex);
+ return (void*) ptr_mutex;
+}
+
+static
+void defMtxDestroy(cmsContext id, void* mtx)
+{
+ _cmsDestroyMutexPrimitive((_cmsMutex *) mtx);
+ _cmsFree(id, mtx);
+}
+
+static
+cmsBool defMtxLock(cmsContext id, void* mtx)
+{
+ cmsUNUSED_PARAMETER(id);
+ return _cmsLockPrimitive((_cmsMutex *) mtx) == 0;
+}
+
+static
+void defMtxUnlock(cmsContext id, void* mtx)
+{
+ cmsUNUSED_PARAMETER(id);
+ _cmsUnlockPrimitive((_cmsMutex *) mtx);
+}
+
+
+
+// Pointers to memory manager functions in Context0
+_cmsMutexPluginChunkType _cmsMutexPluginChunk = { defMtxCreate, defMtxDestroy, defMtxLock, defMtxUnlock };
+
+// Allocate and init mutex container.
+void _cmsAllocMutexPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ static _cmsMutexPluginChunkType MutexChunk = {defMtxCreate, defMtxDestroy, defMtxLock, defMtxUnlock };
+ void* from;
+
+ if (src != NULL) {
+ from = src ->chunks[MutexPlugin];
+ }
+ else {
+ from = &MutexChunk;
+ }
+
+ ctx ->chunks[MutexPlugin] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsMutexPluginChunkType));
+}
+
+// Register new ways to transform
+cmsBool _cmsRegisterMutexPlugin(cmsContext ContextID, cmsPluginBase* Data)
+{
+ cmsPluginMutex* Plugin = (cmsPluginMutex*) Data;
+ _cmsMutexPluginChunkType* ctx = ( _cmsMutexPluginChunkType*) _cmsContextGetClientChunk(ContextID, MutexPlugin);
+
+ if (Data == NULL) {
+
+ // No lock routines
+ ctx->CreateMutexPtr = NULL;
+ ctx->DestroyMutexPtr = NULL;
+ ctx->LockMutexPtr = NULL;
+ ctx ->UnlockMutexPtr = NULL;
+ return TRUE;
+ }
+
+ // Factory callback is required
+ if (Plugin ->CreateMutexPtr == NULL || Plugin ->DestroyMutexPtr == NULL ||
+ Plugin ->LockMutexPtr == NULL || Plugin ->UnlockMutexPtr == NULL) return FALSE;
+
+
+ ctx->CreateMutexPtr = Plugin->CreateMutexPtr;
+ ctx->DestroyMutexPtr = Plugin ->DestroyMutexPtr;
+ ctx ->LockMutexPtr = Plugin ->LockMutexPtr;
+ ctx ->UnlockMutexPtr = Plugin ->UnlockMutexPtr;
+
+ // All is ok
+ return TRUE;
+}
+
+// Generic Mutex fns
+void* CMSEXPORT _cmsCreateMutex(cmsContext ContextID)
+{
+ _cmsMutexPluginChunkType* ptr = (_cmsMutexPluginChunkType*) _cmsContextGetClientChunk(ContextID, MutexPlugin);
+
+ if (ptr ->CreateMutexPtr == NULL) return NULL;
+
+ return ptr ->CreateMutexPtr(ContextID);
+}
+
+void CMSEXPORT _cmsDestroyMutex(cmsContext ContextID, void* mtx)
+{
+ _cmsMutexPluginChunkType* ptr = (_cmsMutexPluginChunkType*) _cmsContextGetClientChunk(ContextID, MutexPlugin);
+
+ if (ptr ->DestroyMutexPtr != NULL) {
+
+ ptr ->DestroyMutexPtr(ContextID, mtx);
+ }
+}
+
+cmsBool CMSEXPORT _cmsLockMutex(cmsContext ContextID, void* mtx)
+{
+ _cmsMutexPluginChunkType* ptr = (_cmsMutexPluginChunkType*) _cmsContextGetClientChunk(ContextID, MutexPlugin);
+
+ if (ptr ->LockMutexPtr == NULL) return TRUE;
+
+ return ptr ->LockMutexPtr(ContextID, mtx);
+}
+
+void CMSEXPORT _cmsUnlockMutex(cmsContext ContextID, void* mtx)
+{
+ _cmsMutexPluginChunkType* ptr = (_cmsMutexPluginChunkType*) _cmsContextGetClientChunk(ContextID, MutexPlugin);
+
+ if (ptr ->UnlockMutexPtr != NULL) {
+
+ ptr ->UnlockMutexPtr(ContextID, mtx);
+ }
+}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// The list of supported parametric curves
typedef struct _cmsParametricCurvesCollection_st {
- int nFunctions; // Number of supported functions in this chunk
- int FunctionTypes[MAX_TYPES_IN_LCMS_PLUGIN]; // The identification types
- int ParameterCount[MAX_TYPES_IN_LCMS_PLUGIN]; // Number of parameters for each function
- cmsParametricCurveEvaluator Evaluator; // The evaluator
+ cmsUInt32Number nFunctions; // Number of supported functions in this chunk
+ cmsInt32Number FunctionTypes[MAX_TYPES_IN_LCMS_PLUGIN]; // The identification types
+ cmsUInt32Number ParameterCount[MAX_TYPES_IN_LCMS_PLUGIN]; // Number of parameters for each function
+
+ cmsParametricCurveEvaluator Evaluator; // The evaluator
struct _cmsParametricCurvesCollection_st* Next; // Next in list
} _cmsParametricCurvesCollection;
-
// This is the default (built-in) evaluator
static cmsFloat64Number DefaultEvalParametricFn(cmsInt32Number Type, const cmsFloat64Number Params[], cmsFloat64Number R);
// The built-in list
static _cmsParametricCurvesCollection DefaultCurves = {
- 9, // # of curve types
- { 1, 2, 3, 4, 5, 6, 7, 8, 108 }, // Parametric curve ID
- { 1, 3, 4, 5, 7, 4, 5, 5, 1 }, // Parameters by type
- DefaultEvalParametricFn, // Evaluator
- NULL // Next in chain
+ 10, // # of curve types
+ { 1, 2, 3, 4, 5, 6, 7, 8, 108, 109 }, // Parametric curve ID
+ { 1, 3, 4, 5, 7, 4, 5, 5, 1, 1 }, // Parameters by type
+ DefaultEvalParametricFn, // Evaluator
+ NULL // Next in chain
};
+// Duplicates the zone of memory used by the plug-in in the new context
+static
+void DupPluginCurvesList(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ _cmsCurvesPluginChunkType newHead = { NULL };
+ _cmsParametricCurvesCollection* entry;
+ _cmsParametricCurvesCollection* Anterior = NULL;
+ _cmsCurvesPluginChunkType* head = (_cmsCurvesPluginChunkType*) src->chunks[CurvesPlugin];
+
+ _cmsAssert(head != NULL);
+
+ // Walk the list copying all nodes
+ for (entry = head->ParametricCurves;
+ entry != NULL;
+ entry = entry ->Next) {
+
+ _cmsParametricCurvesCollection *newEntry = ( _cmsParametricCurvesCollection *) _cmsSubAllocDup(ctx ->MemPool, entry, sizeof(_cmsParametricCurvesCollection));
+
+ if (newEntry == NULL)
+ return;
+
+ // We want to keep the linked list order, so this is a little bit tricky
+ newEntry -> Next = NULL;
+ if (Anterior)
+ Anterior -> Next = newEntry;
+
+ Anterior = newEntry;
+
+ if (newHead.ParametricCurves == NULL)
+ newHead.ParametricCurves = newEntry;
+ }
+
+ ctx ->chunks[CurvesPlugin] = _cmsSubAllocDup(ctx->MemPool, &newHead, sizeof(_cmsCurvesPluginChunkType));
+}
+
+// The allocator have to follow the chain
+void _cmsAllocCurvesPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ _cmsAssert(ctx != NULL);
+
+ if (src != NULL) {
+
+ // Copy all linked list
+ DupPluginCurvesList(ctx, src);
+ }
+ else {
+ static _cmsCurvesPluginChunkType CurvesPluginChunk = { NULL };
+ ctx ->chunks[CurvesPlugin] = _cmsSubAllocDup(ctx ->MemPool, &CurvesPluginChunk, sizeof(_cmsCurvesPluginChunkType));
+ }
+}
+
+
// The linked list head
-static _cmsParametricCurvesCollection* ParametricCurves = &DefaultCurves;
+_cmsCurvesPluginChunkType _cmsCurvesPluginChunk = { NULL };
// As a way to install new parametric curves
-cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Data)
+cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Data)
{
+ _cmsCurvesPluginChunkType* ctx = ( _cmsCurvesPluginChunkType*) _cmsContextGetClientChunk(ContextID, CurvesPlugin);
cmsPluginParametricCurves* Plugin = (cmsPluginParametricCurves*) Data;
_cmsParametricCurvesCollection* fl;
if (Data == NULL) {
- ParametricCurves = &DefaultCurves;
+ ctx -> ParametricCurves = NULL;
return TRUE;
}
- fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(sizeof(_cmsParametricCurvesCollection));
+ fl = (_cmsParametricCurvesCollection*) _cmsPluginMalloc(ContextID, sizeof(_cmsParametricCurvesCollection));
if (fl == NULL) return FALSE;
// Copy the parameters
memmove(fl->ParameterCount, Plugin ->ParameterCount, fl->nFunctions * sizeof(cmsUInt32Number));
// Keep linked list
- fl ->Next = ParametricCurves;
- ParametricCurves = fl;
+ fl ->Next = ctx->ParametricCurves;
+ ctx->ParametricCurves = fl;
// All is ok
return TRUE;
{
int i;
- for (i=0; i < c ->nFunctions; i++)
+ for (i=0; i < (int) c ->nFunctions; i++)
if (abs(Type) == c ->FunctionTypes[i]) return i;
return -1;
// Search for the collection which contains a specific type
static
-_cmsParametricCurvesCollection *GetParametricCurveByType(int Type, int* index)
+_cmsParametricCurvesCollection *GetParametricCurveByType(cmsContext ContextID, int Type, int* index)
{
_cmsParametricCurvesCollection* c;
int Position;
+ _cmsCurvesPluginChunkType* ctx = ( _cmsCurvesPluginChunkType*) _cmsContextGetClientChunk(ContextID, CurvesPlugin);
+
+ for (c = ctx->ParametricCurves; c != NULL; c = c ->Next) {
- for (c = ParametricCurves; c != NULL; c = c ->Next) {
+ Position = IsInSet(Type, c);
+
+ if (Position != -1) {
+ if (index != NULL)
+ *index = Position;
+ return c;
+ }
+ }
+ // If none found, revert for defaults
+ for (c = &DefaultCurves; c != NULL; c = c ->Next) {
Position = IsInSet(Type, c);
// no optimation curve is computed. nSegments may also be zero in the inverse case, where only the
// optimization curve is given. Both features simultaneously is an error
static
-cmsToneCurve* AllocateToneCurveStruct(cmsContext ContextID, cmsInt32Number nEntries,
- cmsInt32Number nSegments, const cmsCurveSegment* Segments,
+cmsToneCurve* AllocateToneCurveStruct(cmsContext ContextID, cmsUInt32Number nEntries,
+ cmsUInt32Number nSegments, const cmsCurveSegment* Segments,
const cmsUInt16Number* Values)
{
cmsToneCurve* p;
- int i;
+ cmsUInt32Number i;
// We allow huge tables, which are then restricted for smoothing operations
- if (nEntries > 65530 || nEntries < 0) {
+ if (nEntries > 65530) {
cmsSignalError(ContextID, cmsERROR_RANGE, "Couldn't create tone curve of more than 65530 entries");
return NULL;
}
- if (nEntries <= 0 && nSegments <= 0) {
+ if (nEntries == 0 && nSegments == 0) {
cmsSignalError(ContextID, cmsERROR_RANGE, "Couldn't create tone curve with zero segments and no table");
return NULL;
}
if (!p) return NULL;
// In this case, there are no segments
- if (nSegments <= 0) {
+ if (nSegments == 0) {
p ->Segments = NULL;
p ->Evals = NULL;
}
// This 16-bit table contains a limited precision representation of the whole curve and is kept for
// increasing xput on certain operations.
- if (nEntries <= 0) {
+ if (nEntries == 0) {
p ->Table16 = NULL;
}
else {
p ->SegInterp = (cmsInterpParams**) _cmsCalloc(ContextID, nSegments, sizeof(cmsInterpParams*));
if (p ->SegInterp == NULL) goto Error;
- for (i=0; i< nSegments; i++) {
+ for (i=0; i < nSegments; i++) {
// Type 0 is a special marker for table-based curves
if (Segments[i].Type == 0)
p ->Segments[i].SampledPoints = NULL;
- c = GetParametricCurveByType(Segments[i].Type, NULL);
+ c = GetParametricCurveByType(ContextID, Segments[i].Type, NULL);
if (c != NULL)
p ->Evals[i] = c ->Evaluator;
}
}
p ->InterpParams = _cmsComputeInterpParams(ContextID, p ->nEntries, 1, 1, p->Table16, CMS_LERP_FLAGS_16BITS);
- return p;
+ if (p->InterpParams != NULL)
+ return p;
Error:
- if (p -> Segments) _cmsFree(ContextID, p ->Segments);
+ if (p -> SegInterp) _cmsFree(ContextID, p -> SegInterp);
+ if (p -> Segments) _cmsFree(ContextID, p -> Segments);
if (p -> Evals) _cmsFree(ContextID, p -> Evals);
if (p ->Table16) _cmsFree(ContextID, p ->Table16);
_cmsFree(ContextID, p);
}
+// Generates a sigmoidal function with desired steepness.
+cmsINLINE double sigmoid_base(double k, double t)
+{
+ return (1.0 / (1.0 + exp(-k * t))) - 0.5;
+}
+
+cmsINLINE double inverted_sigmoid_base(double k, double t)
+{
+ return -log((1.0 / (t + 0.5)) - 1.0) / k;
+}
+
+cmsINLINE double sigmoid_factory(double k, double t)
+{
+ double correction = 0.5 / sigmoid_base(k, 1);
+
+ return correction * sigmoid_base(k, 2.0 * t - 1.0) + 0.5;
+}
+
+cmsINLINE double inverse_sigmoid_factory(double k, double t)
+{
+ double correction = 0.5 / sigmoid_base(k, 1);
+
+ return (inverted_sigmoid_base(k, (t - 0.5) / correction) + 1.0) / 2.0;
+}
+
+
// Parametric Fn using floating point
static
cmsFloat64Number DefaultEvalParametricFn(cmsInt32Number Type, const cmsFloat64Number Params[], cmsFloat64Number R)
// Type 1 Reversed: X = Y ^1/gamma
case -1:
- if (R < 0) {
+ if (R < 0) {
if (fabs(Params[0] - 1.0) < MATRIX_DET_TOLERANCE)
Val = R;
Val = 0;
}
else
- Val = pow(R, 1/Params[0]);
+ {
+ if (fabs(Params[0]) < MATRIX_DET_TOLERANCE)
+ Val = PLUS_INF;
+ else
+ Val = pow(R, 1 / Params[0]);
+ }
break;
// CIE 122-1966
// Y = (aX + b)^Gamma | X >= -b/a
// Y = 0 | else
case 2:
- disc = -Params[2] / Params[1];
+ {
- if (R >= disc ) {
+ if (fabs(Params[1]) < MATRIX_DET_TOLERANCE)
+ {
+ Val = 0;
+ }
+ else
+ {
+ disc = -Params[2] / Params[1];
- e = Params[1]*R + Params[2];
+ if (R >= disc) {
- if (e > 0)
- Val = pow(e, Params[0]);
+ e = Params[1] * R + Params[2];
+
+ if (e > 0)
+ Val = pow(e, Params[0]);
+ else
+ Val = 0;
+ }
else
Val = 0;
}
- else
- Val = 0;
- break;
+ }
+ break;
// Type 2 Reversed
// X = (Y ^1/g - b) / a
case -2:
- if (R < 0)
+ {
+ if (fabs(Params[0]) < MATRIX_DET_TOLERANCE ||
+ fabs(Params[1]) < MATRIX_DET_TOLERANCE)
+ {
Val = 0;
+ }
else
- Val = (pow(R, 1.0/Params[0]) - Params[2]) / Params[1];
+ {
+ if (R < 0)
+ Val = 0;
+ else
+ Val = (pow(R, 1.0 / Params[0]) - Params[2]) / Params[1];
- if (Val < 0)
- Val = 0;
- break;
+ if (Val < 0)
+ Val = 0;
+ }
+ }
+ break;
// IEC 61966-3
// Y = (aX + b)^Gamma | X <= -b/a
// Y = c | else
case 3:
- disc = -Params[2] / Params[1];
- if (disc < 0)
- disc = 0;
+ {
+ if (fabs(Params[1]) < MATRIX_DET_TOLERANCE)
+ {
+ Val = 0;
+ }
+ else
+ {
+ disc = -Params[2] / Params[1];
+ if (disc < 0)
+ disc = 0;
- if (R >= disc) {
+ if (R >= disc) {
- e = Params[1]*R + Params[2];
+ e = Params[1] * R + Params[2];
- if (e > 0)
- Val = pow(e, Params[0]) + Params[3];
+ if (e > 0)
+ Val = pow(e, Params[0]) + Params[3];
+ else
+ Val = 0;
+ }
else
- Val = 0;
+ Val = Params[3];
}
- else
- Val = Params[3];
- break;
+ }
+ break;
// Type 3 reversed
// X=((Y-c)^1/g - b)/a | (Y>=c)
// X=-b/a | (Y<c)
case -3:
- if (R >= Params[3]) {
+ {
+ if (fabs(Params[1]) < MATRIX_DET_TOLERANCE)
+ {
+ Val = 0;
+ }
+ else
+ {
+ if (R >= Params[3]) {
- e = R - Params[3];
+ e = R - Params[3];
- if (e > 0)
- Val = (pow(e, 1/Params[0]) - Params[2]) / Params[1];
- else
- Val = 0;
- }
- else {
- Val = -Params[2] / Params[1];
+ if (e > 0)
+ Val = (pow(e, 1 / Params[0]) - Params[2]) / Params[1];
+ else
+ Val = 0;
+ }
+ else {
+ Val = -Params[2] / Params[1];
+ }
}
- break;
+ }
+ break;
// IEC 61966-2.1 (sRGB)
// X=((Y^1/g-b)/a) | Y >= (ad+b)^g
// X=Y/c | Y< (ad+b)^g
case -4:
- e = Params[1] * Params[4] + Params[2];
- if (e < 0)
- disc = 0;
+ {
+ if (fabs(Params[0]) < MATRIX_DET_TOLERANCE ||
+ fabs(Params[1]) < MATRIX_DET_TOLERANCE ||
+ fabs(Params[3]) < MATRIX_DET_TOLERANCE)
+ {
+ Val = 0;
+ }
else
- disc = pow(e, Params[0]);
+ {
+ e = Params[1] * Params[4] + Params[2];
+ if (e < 0)
+ disc = 0;
+ else
+ disc = pow(e, Params[0]);
- if (R >= disc) {
+ if (R >= disc) {
- Val = (pow(R, 1.0/Params[0]) - Params[2]) / Params[1];
- }
- else {
- Val = R / Params[3];
+ Val = (pow(R, 1.0 / Params[0]) - Params[2]) / Params[1];
+ }
+ else {
+ Val = R / Params[3];
+ }
}
- break;
+ }
+ break;
// Y = (aX + b)^Gamma + e | X >= d
if (e > 0)
Val = pow(e, Params[0]) + Params[5];
else
- Val = 0;
+ Val = Params[5];
}
else
Val = R*Params[3] + Params[6];
// X=((Y-e)1/g-b)/a | Y >=(ad+b)^g+e), cd+f
// X=(Y-f)/c | else
case -5:
-
- disc = Params[3] * Params[4] + Params[6];
- if (R >= disc) {
-
- e = R - Params[5];
- if (e < 0)
- Val = 0;
- else
- Val = (pow(e, 1.0/Params[0]) - Params[2]) / Params[1];
+ {
+ if (fabs(Params[1]) < MATRIX_DET_TOLERANCE ||
+ fabs(Params[3]) < MATRIX_DET_TOLERANCE)
+ {
+ Val = 0;
}
- else {
- Val = (R - Params[6]) / Params[3];
+ else
+ {
+ disc = Params[3] * Params[4] + Params[6];
+ if (R >= disc) {
+
+ e = R - Params[5];
+ if (e < 0)
+ Val = 0;
+ else
+ Val = (pow(e, 1.0 / Params[0]) - Params[2]) / Params[1];
+ }
+ else {
+ Val = (R - Params[6]) / Params[3];
+ }
}
- break;
+ }
+ break;
// Types 6,7,8 comes from segmented curves as described in ICCSpecRevision_02_11_06_Float.pdf
e = Params[1]*R + Params[2];
if (e < 0)
- Val = 0;
+ Val = Params[3];
else
Val = pow(e, Params[0]) + Params[3];
break;
// ((Y - c) ^1/Gamma - b) / a
case -6:
- e = R - Params[3];
- if (e < 0)
+ {
+ if (fabs(Params[1]) < MATRIX_DET_TOLERANCE)
+ {
Val = 0;
+ }
else
- Val = (pow(e, 1.0/Params[0]) - Params[2]) / Params[1];
- break;
+ {
+ e = R - Params[3];
+ if (e < 0)
+ Val = 0;
+ else
+ Val = (pow(e, 1.0 / Params[0]) - Params[2]) / Params[1];
+ }
+ }
+ break;
// Y = a * log (b * X^Gamma + c) + d
e = Params[2] * pow(R, Params[0]) + Params[3];
if (e <= 0)
- Val = 0;
+ Val = Params[4];
else
Val = Params[1]*log10(e) + Params[4];
break;
// pow(10, (Y-d) / a) = b * X ^Gamma + c
// pow((pow(10, (Y-d) / a) - c) / b, 1/g) = X
case -7:
- Val = pow((pow(10.0, (R-Params[4]) / Params[1]) - Params[3]) / Params[2], 1.0 / Params[0]);
- break;
+ {
+ if (fabs(Params[0]) < MATRIX_DET_TOLERANCE ||
+ fabs(Params[1]) < MATRIX_DET_TOLERANCE ||
+ fabs(Params[2]) < MATRIX_DET_TOLERANCE)
+ {
+ Val = 0;
+ }
+ else
+ {
+ Val = pow((pow(10.0, (R - Params[4]) / Params[1]) - Params[3]) / Params[2], 1.0 / Params[0]);
+ }
+ }
+ break;
//Y = a * b^(c*X+d) + e
disc = R - Params[4];
if (disc < 0) Val = 0;
else
- Val = (log(disc / Params[0]) / log(Params[1]) - Params[3]) / Params[2];
+ {
+ if (fabs(Params[0]) < MATRIX_DET_TOLERANCE ||
+ fabs(Params[2]) < MATRIX_DET_TOLERANCE)
+ {
+ Val = 0;
+ }
+ else
+ {
+ Val = (log(disc / Params[0]) / log(Params[1]) - Params[3]) / Params[2];
+ }
+ }
break;
+
// S-Shaped: (1 - (1-x)^1/g)^1/g
case 108:
- Val = pow(1.0 - pow(1 - R, 1/Params[0]), 1/Params[0]);
+ if (fabs(Params[0]) < MATRIX_DET_TOLERANCE)
+ Val = 0;
+ else
+ Val = pow(1.0 - pow(1 - R, 1/Params[0]), 1/Params[0]);
break;
// y = (1 - (1-x)^1/g)^1/g
Val = 1 - pow(1 - pow(R, Params[0]), Params[0]);
break;
+ // Sigmoidals
+ case 109:
+ Val = sigmoid_factory(Params[0], R);
+ break;
+
+ case -109:
+ Val = inverse_sigmoid_factory(Params[0], R);
+ break;
+
default:
// Unsupported parametric curve. Should never reach here
return 0;
return Val;
}
-// Evaluate a segmented funtion for a single value. Return -1 if no valid segment found .
+// Evaluate a segmented function for a single value. Return -Inf if no valid segment found .
// If fn type is 0, perform an interpolation on the table
static
cmsFloat64Number EvalSegmentedFn(const cmsToneCurve *g, cmsFloat64Number R)
{
int i;
+ cmsFloat32Number Out32;
+ cmsFloat64Number Out;
- for (i = g ->nSegments-1; i >= 0 ; --i) {
+ for (i = (int) g->nSegments - 1; i >= 0; --i) {
// Check for domain
- if ((R > g ->Segments[i].x0) && (R <= g ->Segments[i].x1)) {
+ if ((R > g->Segments[i].x0) && (R <= g->Segments[i].x1)) {
// Type == 0 means segment is sampled
- if (g ->Segments[i].Type == 0) {
+ if (g->Segments[i].Type == 0) {
- cmsFloat32Number R1 = (cmsFloat32Number) (R - g ->Segments[i].x0);
- cmsFloat32Number Out;
+ cmsFloat32Number R1 = (cmsFloat32Number)(R - g->Segments[i].x0) / (g->Segments[i].x1 - g->Segments[i].x0);
// Setup the table (TODO: clean that)
- g ->SegInterp[i]-> Table = g ->Segments[i].SampledPoints;
+ g->SegInterp[i]->Table = g->Segments[i].SampledPoints;
- g ->SegInterp[i] -> Interpolation.LerpFloat(&R1, &Out, g ->SegInterp[i]);
+ g->SegInterp[i]->Interpolation.LerpFloat(&R1, &Out32, g->SegInterp[i]);
+ Out = (cmsFloat64Number) Out32;
- return Out;
}
+ else {
+ Out = g->Evals[i](g->Segments[i].Type, g->Segments[i].Params, R);
+ }
+
+ if (isinf(Out))
+ return PLUS_INF;
else
- return g ->Evals[i](g->Segments[i].Type, g ->Segments[i].Params, R);
+ {
+ if (isinf(-Out))
+ return MINUS_INF;
+ }
+
+ return Out;
}
}
// Create an empty gamma curve, by using tables. This specifies only the limited-precision part, and leaves the
// floating point description empty.
-cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsInt32Number nEntries, const cmsUInt16Number Values[])
+cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsUInt32Number nEntries, const cmsUInt16Number Values[])
{
return AllocateToneCurveStruct(ContextID, nEntries, 0, NULL, Values);
}
static
-int EntriesByGamma(cmsFloat64Number Gamma)
+cmsUInt32Number EntriesByGamma(cmsFloat64Number Gamma)
{
if (fabs(Gamma - 1.0) < 0.001) return 2;
return 4096;
// Create a segmented gamma, fill the table
cmsToneCurve* CMSEXPORT cmsBuildSegmentedToneCurve(cmsContext ContextID,
- cmsInt32Number nSegments, const cmsCurveSegment Segments[])
+ cmsUInt32Number nSegments, const cmsCurveSegment Segments[])
{
- int i;
+ cmsUInt32Number i;
cmsFloat64Number R, Val;
cmsToneCurve* g;
- int nGridPoints = 4096;
+ cmsUInt32Number nGridPoints = 4096;
_cmsAssert(Segments != NULL);
// Once we have the floating point version, we can approximate a 16 bit table of 4096 entries
// for performance reasons. This table would normally not be used except on 8/16 bits transforms.
- for (i=0; i < nGridPoints; i++) {
+ for (i = 0; i < nGridPoints; i++) {
R = (cmsFloat64Number) i / (nGridPoints-1);
// Use a segmented curve to store the floating point table
cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[])
{
- cmsCurveSegment Seg[2];
+ cmsCurveSegment Seg[3];
- // Initialize segmented curve part up to 0
- Seg[0].x0 = -1;
+ // A segmented tone curve should have function segments in the first and last positions
+ // Initialize segmented curve part up to 0 to constant value = samples[0]
+ Seg[0].x0 = MINUS_INF;
Seg[0].x1 = 0;
Seg[0].Type = 6;
Seg[0].Params[0] = 1;
Seg[0].Params[1] = 0;
Seg[0].Params[2] = 0;
- Seg[0].Params[3] = 0;
+ Seg[0].Params[3] = values[0];
Seg[0].Params[4] = 0;
- // From zero to any
+ // From zero to 1
Seg[1].x0 = 0;
Seg[1].x1 = 1.0;
Seg[1].Type = 0;
Seg[1].nGridPoints = nEntries;
Seg[1].SampledPoints = (cmsFloat32Number*) values;
- return cmsBuildSegmentedToneCurve(ContextID, 2, Seg);
+ // Final segment is constant = lastsample
+ Seg[2].x0 = 1.0;
+ Seg[2].x1 = PLUS_INF;
+ Seg[2].Type = 6;
+
+ Seg[2].Params[0] = 1;
+ Seg[2].Params[1] = 0;
+ Seg[2].Params[2] = 0;
+ Seg[2].Params[3] = values[nEntries-1];
+ Seg[2].Params[4] = 0;
+
+
+ return cmsBuildSegmentedToneCurve(ContextID, 3, Seg);
}
// Parametric curves
//
// Parameters goes as: Curve, a, b, c, d, e, f
// Type is the ICC type +1
-// if type is negative, then the curve is analyticaly inverted
+// if type is negative, then the curve is analytically inverted
cmsToneCurve* CMSEXPORT cmsBuildParametricToneCurve(cmsContext ContextID, cmsInt32Number Type, const cmsFloat64Number Params[])
{
cmsCurveSegment Seg0;
int Pos = 0;
cmsUInt32Number size;
- _cmsParametricCurvesCollection* c = GetParametricCurveByType(Type, &Pos);
+ _cmsParametricCurvesCollection* c = GetParametricCurveByType(ContextID, Type, &Pos);
_cmsAssert(Params != NULL);
if (c == NULL) {
- cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Invalid parametric curve type %d", Type);
+ cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Invalid parametric curve type %d", Type);
return NULL;
}
if (Curve -> Evals)
_cmsFree(ContextID, Curve -> Evals);
- if (Curve) _cmsFree(ContextID, Curve);
+ _cmsFree(ContextID, Curve);
}
// Utility function, free 3 gamma tables
//Iterate
for (i=0; i < nResultingPoints; i++) {
- t = (cmsFloat32Number) i / (nResultingPoints-1);
+ t = (cmsFloat32Number) i / (cmsFloat32Number)(nResultingPoints-1);
x = cmsEvalToneCurveFloat(X, t);
Res[i] = cmsEvalToneCurveFloat(Yreversed, x);
}
if (LutTable[0] < LutTable[p ->Domain[0]]) {
// Table is overall ascending
- for (i=p->Domain[0]-1; i >=0; --i) {
+ for (i = (int) p->Domain[0] - 1; i >= 0; --i) {
y0 = LutTable[i];
y1 = LutTable[i+1];
}
// Reverse a gamma table
-cmsToneCurve* CMSEXPORT cmsReverseToneCurveEx(cmsInt32Number nResultSamples, const cmsToneCurve* InCurve)
+cmsToneCurve* CMSEXPORT cmsReverseToneCurveEx(cmsUInt32Number nResultSamples, const cmsToneCurve* InCurve)
{
cmsToneCurve *out;
cmsFloat64Number a = 0, b = 0, y, x1, y1, x2, y2;
_cmsAssert(InCurve != NULL);
// Try to reverse it analytically whatever possible
- if (InCurve ->nSegments == 1 && InCurve ->Segments[0].Type > 0 && InCurve -> Segments[0].Type <= 5) {
+
+ if (InCurve ->nSegments == 1 && InCurve ->Segments[0].Type > 0 &&
+ /* InCurve -> Segments[0].Type <= 5 */
+ GetParametricCurveByType(InCurve ->InterpParams->ContextID, InCurve ->Segments[0].Type, NULL) != NULL) {
return cmsBuildParametricToneCurve(InCurve ->InterpParams->ContextID,
-(InCurve -> Segments[0].Type),
Ascending = !cmsIsToneCurveDescending(InCurve);
// Iterate across Y axis
- for (i=0; i < nResultSamples; i++) {
+ for (i=0; i < (int) nResultSamples; i++) {
y = (cmsFloat64Number) i * 65535.0 / (nResultSamples - 1);
// Output: smoothed vector (z): vector from 1 to m.
static
-cmsBool smooth2(cmsContext ContextID, cmsFloat32Number w[], cmsFloat32Number y[], cmsFloat32Number z[], cmsFloat32Number lambda, int m)
+cmsBool smooth2(cmsContext ContextID, cmsFloat32Number w[], cmsFloat32Number y[],
+ cmsFloat32Number z[], cmsFloat32Number lambda, int m)
{
int i, i1, i2;
cmsFloat32Number *c, *d, *e;
// Smooths a curve sampled at regular intervals.
cmsBool CMSEXPORT cmsSmoothToneCurve(cmsToneCurve* Tab, cmsFloat64Number lambda)
{
- cmsFloat32Number w[MAX_NODES_IN_CURVE], y[MAX_NODES_IN_CURVE], z[MAX_NODES_IN_CURVE];
- int i, nItems, Zeros, Poles;
-
- if (Tab == NULL) return FALSE;
-
- if (cmsIsToneCurveLinear(Tab)) return FALSE; // Nothing to do
-
- nItems = Tab -> nEntries;
-
- if (nItems >= MAX_NODES_IN_CURVE) {
- cmsSignalError(Tab ->InterpParams->ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: too many points.");
- return FALSE;
- }
-
- memset(w, 0, nItems * sizeof(cmsFloat32Number));
- memset(y, 0, nItems * sizeof(cmsFloat32Number));
- memset(z, 0, nItems * sizeof(cmsFloat32Number));
+ cmsBool SuccessStatus = TRUE;
+ cmsFloat32Number *w, *y, *z;
+ cmsUInt32Number i, nItems, Zeros, Poles;
+ cmsBool notCheck = FALSE;
- for (i=0; i < nItems; i++)
+ if (Tab != NULL && Tab->InterpParams != NULL)
{
- y[i+1] = (cmsFloat32Number) Tab -> Table16[i];
- w[i+1] = 1.0;
- }
+ cmsContext ContextID = Tab->InterpParams->ContextID;
+
+ if (!cmsIsToneCurveLinear(Tab)) // Only non-linear curves need smoothing
+ {
+ nItems = Tab->nEntries;
+ if (nItems < MAX_NODES_IN_CURVE)
+ {
+ // Allocate one more item than needed
+ w = (cmsFloat32Number *)_cmsCalloc(ContextID, nItems + 1, sizeof(cmsFloat32Number));
+ y = (cmsFloat32Number *)_cmsCalloc(ContextID, nItems + 1, sizeof(cmsFloat32Number));
+ z = (cmsFloat32Number *)_cmsCalloc(ContextID, nItems + 1, sizeof(cmsFloat32Number));
+
+ if (w != NULL && y != NULL && z != NULL) // Ensure no memory allocation failure
+ {
+ memset(w, 0, (nItems + 1) * sizeof(cmsFloat32Number));
+ memset(y, 0, (nItems + 1) * sizeof(cmsFloat32Number));
+ memset(z, 0, (nItems + 1) * sizeof(cmsFloat32Number));
+
+ for (i = 0; i < nItems; i++)
+ {
+ y[i + 1] = (cmsFloat32Number)Tab->Table16[i];
+ w[i + 1] = 1.0;
+ }
+
+ if (lambda < 0)
+ {
+ notCheck = TRUE;
+ lambda = -lambda;
+ }
+
+ if (smooth2(ContextID, w, y, z, (cmsFloat32Number)lambda, (int)nItems))
+ {
+ // Do some reality - checking...
+
+ Zeros = Poles = 0;
+ for (i = nItems; i > 1; --i)
+ {
+ if (z[i] == 0.) Zeros++;
+ if (z[i] >= 65535.) Poles++;
+ if (z[i] < z[i - 1])
+ {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Non-Monotonic.");
+ SuccessStatus = notCheck;
+ break;
+ }
+ }
+
+ if (SuccessStatus && Zeros > (nItems / 3))
+ {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly zeros.");
+ SuccessStatus = notCheck;
+ }
+
+ if (SuccessStatus && Poles > (nItems / 3))
+ {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Degenerated, mostly poles.");
+ SuccessStatus = notCheck;
+ }
+
+ if (SuccessStatus) // Seems ok
+ {
+ for (i = 0; i < nItems; i++)
+ {
+ // Clamp to cmsUInt16Number
+ Tab->Table16[i] = _cmsQuickSaturateWord(z[i + 1]);
+ }
+ }
+ }
+ else // Could not smooth
+ {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Function smooth2 failed.");
+ SuccessStatus = FALSE;
+ }
+ }
+ else // One or more buffers could not be allocated
+ {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Could not allocate memory.");
+ SuccessStatus = FALSE;
+ }
- if (!smooth2(Tab ->InterpParams->ContextID, w, y, z, (cmsFloat32Number) lambda, nItems)) return FALSE;
+ if (z != NULL)
+ _cmsFree(ContextID, z);
- // Do some reality - checking...
- Zeros = Poles = 0;
- for (i=nItems; i > 1; --i) {
+ if (y != NULL)
+ _cmsFree(ContextID, y);
- if (z[i] == 0.) Zeros++;
- if (z[i] >= 65535.) Poles++;
- if (z[i] < z[i-1]) return FALSE; // Non-Monotonic
+ if (w != NULL)
+ _cmsFree(ContextID, w);
+ }
+ else // too many items in the table
+ {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "cmsSmoothToneCurve: Too many points.");
+ SuccessStatus = FALSE;
+ }
+ }
}
-
- if (Zeros > (nItems / 3)) return FALSE; // Degenerated, mostly zeros
- if (Poles > (nItems / 3)) return FALSE; // Degenerated, mostly poles
-
- // Seems ok
- for (i=0; i < nItems; i++) {
-
- // Clamp to cmsUInt16Number
- Tab -> Table16[i] = _cmsQuickSaturateWord(z[i+1]);
+ else // Tab parameter or Tab->InterpParams is NULL
+ {
+ // Can't signal an error here since the ContextID is not known at this point
+ SuccessStatus = FALSE;
}
- return TRUE;
+ return SuccessStatus;
}
// Is a table linear? Do not use parametric since we cannot guarantee some weird parameters resulting
-// in a linear table. This way assures it is linear in 12 bits, which should be enought in most cases.
+// in a linear table. This way assures it is linear in 12 bits, which should be enough in most cases.
cmsBool CMSEXPORT cmsIsToneCurveLinear(const cmsToneCurve* Curve)
{
- cmsUInt32Number i;
+ int i;
int diff;
_cmsAssert(Curve != NULL);
- for (i=0; i < Curve ->nEntries; i++) {
+ for (i=0; i < (int) Curve ->nEntries; i++) {
diff = abs((int) Curve->Table16[i] - (int) _cmsQuantizeVal(i, Curve ->nEntries));
if (diff > 0x0f)
// Same, but for monotonicity
cmsBool CMSEXPORT cmsIsToneCurveMonotonic(const cmsToneCurve* t)
{
- int n;
+ cmsUInt32Number n;
int i, last;
cmsBool lDescending;
last = t ->Table16[0];
- for (i = 1; i < n; i++) {
+ for (i = 1; i < (int) n; i++) {
if (t ->Table16[i] - last > 2) // We allow some ripple
return FALSE;
last = t ->Table16[n-1];
- for (i = n-2; i >= 0; --i) {
+ for (i = (int) n - 2; i >= 0; --i) {
if (t ->Table16[i] - last > 2)
return FALSE;
return (sum / n); // The mean
}
+
+
+// Retrieve parameters on one-segment tone curves
+
+cmsFloat64Number* CMSEXPORT cmsGetToneCurveParams(const cmsToneCurve* t)
+{
+ _cmsAssert(t != NULL);
+
+ if (t->nSegments != 1) return NULL;
+ return t->Segments[0].Params;
+}
//---------------------------------------------------------------------------------\r
//\r
// Little Color Management System\r
-// Copyright (c) 1998-2012 Marti Maria Saguer\r
+// Copyright (c) 1998-2020 Marti Maria Saguer\r
//\r
// Permission is hereby granted, free of charge, to any person obtaining\r
// a copy of this software and associated documentation files (the "Software"),\r
#include "lcms2_internal.h"\r
\r
\r
-// Auxiliar: append a Lab identity after the given sequence of profiles\r
+// Auxiliary: append a Lab identity after the given sequence of profiles\r
// and return the transform. Lab profile is closed, rest of profiles are kept open.\r
cmsHTRANSFORM _cmsChain2Lab(cmsContext ContextID,\r
cmsUInt32Number nProfiles,\r
\r
out = ComputeKToLstar(ContextID, nPoints, 1,\r
Intents + (nProfiles - 1),\r
- hProfiles + (nProfiles - 1),\r
+ &hProfiles [nProfiles - 1],\r
BPC + (nProfiles - 1),\r
AdaptationStates + (nProfiles - 1),\r
dwFlags);\r
}\r
\r
// Build the relationship. This effectively limits the maximum accuracy to 16 bits, but\r
- // since this is used on black-preserving LUTs, we are not loosing accuracy in any case\r
+ // since this is used on black-preserving LUTs, we are not losing accuracy in any case\r
KTone = cmsJoinToneCurve(ContextID, in, out, nPoints);\r
\r
// Get rid of components\r
\r
\r
static\r
-int GamutSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)\r
+int GamutSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)\r
{\r
GAMUTCHAIN* t = (GAMUTCHAIN* ) Cargo;\r
cmsCIELab LabIn1, LabOut1;\r
cmsFloat64Number dE1, dE2, ErrorRatio;\r
\r
// Assume in-gamut by default.\r
- dE1 = 0.;\r
- dE2 = 0;\r
ErrorRatio = 1.0;\r
\r
// Convert input to Lab\r
- if (t -> hInput != NULL)\r
- cmsDoTransform(t -> hInput, In, &LabIn1, 1);\r
+ cmsDoTransform(t -> hInput, In, &LabIn1, 1);\r
\r
// converts from PCS to colorant. This always\r
// does return in-gamut values,\r
memmove(&LabIn2, &LabOut1, sizeof(cmsCIELab));\r
\r
// Try again, but this time taking Check as input\r
- cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1);\r
+ cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1);\r
cmsDoTransform(t -> hReverse, Proof2, &LabOut2, 1);\r
\r
// Take difference of direct value\r
}\r
\r
// Does compute a gamut LUT going back and forth across pcs -> relativ. colorimetric intent -> pcs\r
-// the dE obtained is then annotated on the LUT. Values truely out of gamut are clipped to dE = 0xFFFE\r
+// the dE obtained is then annotated on the LUT. Values truly out of gamut are clipped to dE = 0xFFFE\r
// and values changed are supposed to be handled by any gamut remapping, so, are out of gamut as well.\r
//\r
// **WARNING: This algorithm does assume that gamut remapping algorithms does NOT move in-gamut colors,\r
// of course, many perceptual and saturation intents does not work in such way, but relativ. ones should.\r
\r
cmsPipeline* _cmsCreateGamutCheckPipeline(cmsContext ContextID,\r
- cmsHPROFILE hProfiles[],\r
- cmsBool BPC[],\r
- cmsUInt32Number Intents[],\r
- cmsFloat64Number AdaptationStates[],\r
- cmsUInt32Number nGamutPCSposition,\r
- cmsHPROFILE hGamut)\r
+ cmsHPROFILE hProfiles[],\r
+ cmsBool BPC[],\r
+ cmsUInt32Number Intents[],\r
+ cmsFloat64Number AdaptationStates[],\r
+ cmsUInt32Number nGamutPCSposition,\r
+ cmsHPROFILE hGamut)\r
{\r
- cmsHPROFILE hLab;\r
- cmsPipeline* Gamut;\r
- cmsStage* CLUT;\r
- cmsUInt32Number dwFormat;\r
- GAMUTCHAIN Chain;\r
- int nChannels, nGridpoints;\r
- cmsColorSpaceSignature ColorSpace;\r
- cmsUInt32Number i;\r
- cmsHPROFILE ProfileList[256];\r
- cmsBool BPCList[256];\r
- cmsFloat64Number AdaptationList[256];\r
- cmsUInt32Number IntentList[256];\r
-\r
- memset(&Chain, 0, sizeof(GAMUTCHAIN));\r
-\r
-\r
- if (nGamutPCSposition <= 0 || nGamutPCSposition > 255) {\r
- cmsSignalError(ContextID, cmsERROR_RANGE, "Wrong position of PCS. 1..255 expected, %d found.", nGamutPCSposition);\r
- return NULL;\r
- }\r
-\r
- hLab = cmsCreateLab4ProfileTHR(ContextID, NULL);\r
- if (hLab == NULL) return NULL;\r
-\r
-\r
- // The figure of merit. On matrix-shaper profiles, should be almost zero as\r
- // the conversion is pretty exact. On LUT based profiles, different resolutions\r
- // of input and output CLUT may result in differences.\r
-\r
- if (cmsIsMatrixShaper(hGamut)) {\r
-\r
- Chain.Thereshold = 1.0;\r
- }\r
- else {\r
- Chain.Thereshold = ERR_THERESHOLD;\r
- }\r
-\r
-\r
- // Create a copy of parameters\r
- for (i=0; i < nGamutPCSposition; i++) {\r
- ProfileList[i] = hProfiles[i];\r
- BPCList[i] = BPC[i];\r
- AdaptationList[i] = AdaptationStates[i];\r
- IntentList[i] = Intents[i];\r
- }\r
-\r
- // Fill Lab identity\r
- ProfileList[nGamutPCSposition] = hLab;\r
- BPCList[nGamutPCSposition] = 0;\r
- AdaptationList[nGamutPCSposition] = 1.0;\r
- Intents[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC;\r
-\r
-\r
- ColorSpace = cmsGetColorSpace(hGamut);\r
-\r
- nChannels = cmsChannelsOf(ColorSpace);\r
- nGridpoints = _cmsReasonableGridpointsByColorspace(ColorSpace, cmsFLAGS_HIGHRESPRECALC);\r
- dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2));\r
-\r
- // 16 bits to Lab double\r
- Chain.hInput = cmsCreateExtendedTransform(ContextID,\r
- nGamutPCSposition + 1,\r
- ProfileList,\r
- BPCList,\r
- Intents,\r
- AdaptationList,\r
- NULL, 0,\r
- dwFormat, TYPE_Lab_DBL,\r
- cmsFLAGS_NOCACHE);\r
-\r
-\r
- // Does create the forward step. Lab double to device\r
- dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2));\r
- Chain.hForward = cmsCreateTransformTHR(ContextID,\r
- hLab, TYPE_Lab_DBL,\r
- hGamut, dwFormat,\r
- INTENT_RELATIVE_COLORIMETRIC,\r
- cmsFLAGS_NOCACHE);\r
-\r
- // Does create the backwards step\r
- Chain.hReverse = cmsCreateTransformTHR(ContextID, hGamut, dwFormat,\r
- hLab, TYPE_Lab_DBL,\r
- INTENT_RELATIVE_COLORIMETRIC,\r
- cmsFLAGS_NOCACHE);\r
-\r
-\r
- // All ok?\r
- if (Chain.hForward && Chain.hReverse) {\r
-\r
- // Go on, try to compute gamut LUT from PCS. This consist on a single channel containing\r
- // dE when doing a transform back and forth on the colorimetric intent.\r
-\r
- Gamut = cmsPipelineAlloc(ContextID, 3, 1);\r
-\r
- if (Gamut != NULL) {\r
-\r
- CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL);\r
- cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT);\r
-\r
- cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0);\r
- }\r
- }\r
- else\r
- Gamut = NULL; // Didn't work...\r
+ cmsHPROFILE hLab;\r
+ cmsPipeline* Gamut;\r
+ cmsStage* CLUT;\r
+ cmsUInt32Number dwFormat;\r
+ GAMUTCHAIN Chain;\r
+ cmsUInt32Number nChannels, nGridpoints;\r
+ cmsColorSpaceSignature ColorSpace;\r
+ cmsUInt32Number i;\r
+ cmsHPROFILE ProfileList[256];\r
+ cmsBool BPCList[256];\r
+ cmsFloat64Number AdaptationList[256];\r
+ cmsUInt32Number IntentList[256];\r
+\r
+ memset(&Chain, 0, sizeof(GAMUTCHAIN));\r
+\r
+\r
+ if (nGamutPCSposition <= 0 || nGamutPCSposition > 255) {\r
+ cmsSignalError(ContextID, cmsERROR_RANGE, "Wrong position of PCS. 1..255 expected, %d found.", nGamutPCSposition);\r
+ return NULL;\r
+ }\r
+\r
+ hLab = cmsCreateLab4ProfileTHR(ContextID, NULL);\r
+ if (hLab == NULL) return NULL;\r
\r
- // Free all needed stuff.\r
- if (Chain.hInput) cmsDeleteTransform(Chain.hInput);\r
- if (Chain.hForward) cmsDeleteTransform(Chain.hForward);\r
- if (Chain.hReverse) cmsDeleteTransform(Chain.hReverse);\r
- if (hLab) cmsCloseProfile(hLab);\r
\r
- // And return computed hull\r
- return Gamut;\r
+ // The figure of merit. On matrix-shaper profiles, should be almost zero as\r
+ // the conversion is pretty exact. On LUT based profiles, different resolutions\r
+ // of input and output CLUT may result in differences.\r
+\r
+ if (cmsIsMatrixShaper(hGamut)) {\r
+\r
+ Chain.Thereshold = 1.0;\r
+ }\r
+ else {\r
+ Chain.Thereshold = ERR_THERESHOLD;\r
+ }\r
+\r
+\r
+ // Create a copy of parameters\r
+ for (i=0; i < nGamutPCSposition; i++) {\r
+ ProfileList[i] = hProfiles[i];\r
+ BPCList[i] = BPC[i];\r
+ AdaptationList[i] = AdaptationStates[i];\r
+ IntentList[i] = Intents[i];\r
+ }\r
+\r
+ // Fill Lab identity\r
+ ProfileList[nGamutPCSposition] = hLab;\r
+ BPCList[nGamutPCSposition] = 0;\r
+ AdaptationList[nGamutPCSposition] = 1.0;\r
+ IntentList[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC;\r
+\r
+\r
+ ColorSpace = cmsGetColorSpace(hGamut);\r
+\r
+ nChannels = cmsChannelsOf(ColorSpace);\r
+ nGridpoints = _cmsReasonableGridpointsByColorspace(ColorSpace, cmsFLAGS_HIGHRESPRECALC);\r
+ dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2));\r
+\r
+ // 16 bits to Lab double\r
+ Chain.hInput = cmsCreateExtendedTransform(ContextID,\r
+ nGamutPCSposition + 1,\r
+ ProfileList,\r
+ BPCList,\r
+ IntentList,\r
+ AdaptationList,\r
+ NULL, 0,\r
+ dwFormat, TYPE_Lab_DBL,\r
+ cmsFLAGS_NOCACHE);\r
+\r
+\r
+ // Does create the forward step. Lab double to device\r
+ dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2));\r
+ Chain.hForward = cmsCreateTransformTHR(ContextID,\r
+ hLab, TYPE_Lab_DBL,\r
+ hGamut, dwFormat,\r
+ INTENT_RELATIVE_COLORIMETRIC,\r
+ cmsFLAGS_NOCACHE);\r
+\r
+ // Does create the backwards step\r
+ Chain.hReverse = cmsCreateTransformTHR(ContextID, hGamut, dwFormat,\r
+ hLab, TYPE_Lab_DBL,\r
+ INTENT_RELATIVE_COLORIMETRIC,\r
+ cmsFLAGS_NOCACHE);\r
+\r
+\r
+ // All ok?\r
+ if (Chain.hInput && Chain.hForward && Chain.hReverse) {\r
+\r
+ // Go on, try to compute gamut LUT from PCS. This consist on a single channel containing\r
+ // dE when doing a transform back and forth on the colorimetric intent.\r
+\r
+ Gamut = cmsPipelineAlloc(ContextID, 3, 1);\r
+ if (Gamut != NULL) {\r
+\r
+ CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL);\r
+ if (!cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT)) {\r
+ cmsPipelineFree(Gamut);\r
+ Gamut = NULL;\r
+ } \r
+ else {\r
+ cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0);\r
+ }\r
+ }\r
+ }\r
+ else\r
+ Gamut = NULL; // Didn't work...\r
+\r
+ // Free all needed stuff.\r
+ if (Chain.hInput) cmsDeleteTransform(Chain.hInput);\r
+ if (Chain.hForward) cmsDeleteTransform(Chain.hForward);\r
+ if (Chain.hReverse) cmsDeleteTransform(Chain.hReverse);\r
+ if (hLab) cmsCloseProfile(hLab);\r
+\r
+ // And return computed hull\r
+ return Gamut;\r
}\r
\r
// Total Area Coverage estimation ----------------------------------------------------------------\r
// This callback just accounts the maximum ink dropped in the given node. It does not populate any\r
// memory, as the destination table is NULL. Its only purpose it to know the global maximum.\r
static\r
-int EstimateTAC(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void * Cargo)\r
+int EstimateTAC(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void * Cargo)\r
{\r
cmsTACestimator* bp = (cmsTACestimator*) Cargo;\r
cmsFloat32Number RoundTrip[cmsMAXCHANNELS];\r
GridPoints[2] = 74;\r
\r
\r
- if (!cmsSliceSpace16(3, GridPoints, EstimateTAC, &bp)) {\r
- bp.MaxTAC = 0;\r
- }\r
+ if (!cmsSliceSpace16(3, GridPoints, EstimateTAC, &bp)) {\r
+ bp.MaxTAC = 0;\r
+ }\r
\r
cmsDeleteTransform(bp.hRoundTrip);\r
\r
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// This code is inspired in the paper "Fast Half Float Conversions"
// by Jeroen van der Zijp
-static cmsUInt32Number Mantissa[2048] = {
+static const cmsUInt32Number Mantissa[2048] = {
0x00000000, 0x33800000, 0x34000000, 0x34400000, 0x34800000, 0x34a00000,
0x34c00000, 0x34e00000, 0x35000000, 0x35100000, 0x35200000, 0x35300000,
0x0400, 0x0400, 0x0400, 0x0400
};
-static cmsUInt32Number Exponent[64] = {
+static const cmsUInt32Number Exponent[64] = {
0x00000000, 0x00800000, 0x01000000, 0x01800000, 0x02000000, 0x02800000,
0x03000000, 0x03800000, 0x04000000, 0x04800000, 0x05000000, 0x05800000,
0x06000000, 0x06800000, 0x07000000, 0x07800000, 0x08000000, 0x08800000,
0x8e000000, 0x8e800000, 0x8f000000, 0xc7800000
};
-static cmsUInt16Number Base[512] = {
+static const cmsUInt16Number Base[512] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0xfc00, 0xfc00
};
-static cmsUInt8Number Shift[512] = {
+static const cmsUInt8Number Shift[512] = {
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18, 0x18, 0x18, 0x0d
};
-cmsFloat32Number _cmsHalf2Float(cmsUInt16Number h)
+cmsFloat32Number CMSEXPORT _cmsHalf2Float(cmsUInt16Number h)
{
union {
cmsFloat32Number flt;
return out.flt;
}
-cmsUInt16Number _cmsFloat2Half(cmsFloat32Number flt)
+cmsUInt16Number CMSEXPORT _cmsFloat2Half(cmsFloat32Number flt)
{
union {
cmsFloat32Number flt;
-//---------------------------------------------------------------------------------\r
-//\r
-// Little Color Management System\r
-// Copyright (c) 1998-2012 Marti Maria Saguer\r
-//\r
-// Permission is hereby granted, free of charge, to any person obtaining\r
-// a copy of this software and associated documentation files (the "Software"),\r
-// to deal in the Software without restriction, including without limitation\r
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
-// and/or sell copies of the Software, and to permit persons to whom the Software\r
-// is furnished to do so, subject to the following conditions:\r
-//\r
-// The above copyright notice and this permission notice shall be included in\r
-// all copies or substantial portions of the Software.\r
-//\r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r
-// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-//\r
-//---------------------------------------------------------------------------------\r
-//\r
-\r
-#include "lcms2_internal.h"\r
-\r
-// This module incorporates several interpolation routines, for 1 to 8 channels on input and\r
-// up to 65535 channels on output. The user may change those by using the interpolation plug-in\r
-\r
-// Interpolation routines by default\r
-static cmsInterpFunction DefaultInterpolatorsFactory(cmsUInt32Number nInputChannels, cmsUInt32Number nOutputChannels, cmsUInt32Number dwFlags);\r
-\r
-// This is the default factory\r
-static cmsInterpFnFactory Interpolators = DefaultInterpolatorsFactory;\r
-\r
-\r
-// Main plug-in entry\r
-cmsBool _cmsRegisterInterpPlugin(cmsPluginBase* Data)\r
-{\r
- cmsPluginInterpolation* Plugin = (cmsPluginInterpolation*) Data;\r
-\r
- if (Data == NULL) {\r
-\r
- Interpolators = DefaultInterpolatorsFactory;\r
- return TRUE;\r
- }\r
-\r
- // Set replacement functions\r
- Interpolators = Plugin ->InterpolatorsFactory;\r
- return TRUE;\r
-}\r
-\r
-\r
-// Set the interpolation method\r
-\r
-cmsBool _cmsSetInterpolationRoutine(cmsInterpParams* p)\r
-{\r
- // Invoke factory, possibly in the Plug-in\r
- p ->Interpolation = Interpolators(p -> nInputs, p ->nOutputs, p ->dwFlags);\r
-\r
- // If unsupported by the plug-in, go for the LittleCMS default.\r
- // If happens only if an extern plug-in is being used\r
- if (p ->Interpolation.Lerp16 == NULL)\r
- p ->Interpolation = DefaultInterpolatorsFactory(p ->nInputs, p ->nOutputs, p ->dwFlags);\r
-\r
- // Check for valid interpolator (we just check one member of the union)\r
- if (p ->Interpolation.Lerp16 == NULL) {\r
- return FALSE;\r
- }\r
- return TRUE;\r
-}\r
-\r
-\r
-// This function precalculates as many parameters as possible to speed up the interpolation.\r
-cmsInterpParams* _cmsComputeInterpParamsEx(cmsContext ContextID,\r
- const cmsUInt32Number nSamples[],\r
- int InputChan, int OutputChan,\r
- const void *Table,\r
- cmsUInt32Number dwFlags)\r
-{\r
- cmsInterpParams* p;\r
- int i;\r
-\r
- // Check for maximum inputs\r
- if (InputChan > MAX_INPUT_DIMENSIONS) {\r
- cmsSignalError(ContextID, cmsERROR_RANGE, "Too many input channels (%d channels, max=%d)", InputChan, MAX_INPUT_DIMENSIONS);\r
- return NULL;\r
- }\r
-\r
- // Creates an empty object\r
- p = (cmsInterpParams*) _cmsMallocZero(ContextID, sizeof(cmsInterpParams));\r
- if (p == NULL) return NULL;\r
-\r
- // Keep original parameters\r
- p -> dwFlags = dwFlags;\r
- p -> nInputs = InputChan;\r
- p -> nOutputs = OutputChan;\r
- p ->Table = Table;\r
- p ->ContextID = ContextID;\r
-\r
- // Fill samples per input direction and domain (which is number of nodes minus one)\r
- for (i=0; i < InputChan; i++) {\r
-\r
- p -> nSamples[i] = nSamples[i];\r
- p -> Domain[i] = nSamples[i] - 1;\r
- }\r
-\r
- // Compute factors to apply to each component to index the grid array\r
- p -> opta[0] = p -> nOutputs;\r
- for (i=1; i < InputChan; i++)\r
- p ->opta[i] = p ->opta[i-1] * nSamples[InputChan-i];\r
-\r
-\r
- if (!_cmsSetInterpolationRoutine(p)) {\r
- cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported interpolation (%d->%d channels)", InputChan, OutputChan);\r
- _cmsFree(ContextID, p);\r
- return NULL;\r
- }\r
-\r
- // All seems ok\r
- return p;\r
-}\r
-\r
-\r
-// This one is a wrapper on the anterior, but assuming all directions have same number of nodes\r
-cmsInterpParams* _cmsComputeInterpParams(cmsContext ContextID, int nSamples, int InputChan, int OutputChan, const void* Table, cmsUInt32Number dwFlags)\r
-{\r
- int i;\r
- cmsUInt32Number Samples[MAX_INPUT_DIMENSIONS];\r
-\r
- // Fill the auxiliar array\r
- for (i=0; i < MAX_INPUT_DIMENSIONS; i++)\r
- Samples[i] = nSamples;\r
-\r
- // Call the extended function\r
- return _cmsComputeInterpParamsEx(ContextID, Samples, InputChan, OutputChan, Table, dwFlags);\r
-}\r
-\r
-\r
-// Free all associated memory\r
-void _cmsFreeInterpParams(cmsInterpParams* p)\r
-{\r
- if (p != NULL) _cmsFree(p ->ContextID, p);\r
-}\r
-\r
-\r
-// Inline fixed point interpolation\r
-cmsINLINE cmsUInt16Number LinearInterp(cmsS15Fixed16Number a, cmsS15Fixed16Number l, cmsS15Fixed16Number h)\r
-{\r
- cmsUInt32Number dif = (cmsUInt32Number) (h - l) * a + 0x8000;\r
- dif = (dif >> 16) + l;\r
- return (cmsUInt16Number) (dif);\r
-}\r
-\r
-\r
-// Linear interpolation (Fixed-point optimized)\r
-static\r
-void LinLerp1D(register const cmsUInt16Number Value[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p)\r
-{\r
- cmsUInt16Number y1, y0;\r
- int cell0, rest;\r
- int val3;\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p ->Table;\r
-\r
- // if last value...\r
- if (Value[0] == 0xffff) {\r
-\r
- Output[0] = LutTable[p -> Domain[0]];\r
- return;\r
- }\r
-\r
- val3 = p -> Domain[0] * Value[0];\r
- val3 = _cmsToFixedDomain(val3); // To fixed 15.16\r
-\r
- cell0 = FIXED_TO_INT(val3); // Cell is 16 MSB bits\r
- rest = FIXED_REST_TO_INT(val3); // Rest is 16 LSB bits\r
-\r
- y0 = LutTable[cell0];\r
- y1 = LutTable[cell0+1];\r
-\r
-\r
- Output[0] = LinearInterp(rest, y0, y1);\r
-}\r
-\r
-\r
-// Floating-point version of 1D interpolation\r
-static\r
-void LinLerp1Dfloat(const cmsFloat32Number Value[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- cmsFloat32Number y1, y0;\r
- cmsFloat32Number val2, rest;\r
- int cell0, cell1;\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;\r
-\r
- // if last value...\r
- if (Value[0] == 1.0) {\r
- Output[0] = LutTable[p -> Domain[0]];\r
- return;\r
- }\r
-\r
- val2 = p -> Domain[0] * Value[0];\r
-\r
- cell0 = (int) floor(val2);\r
- cell1 = (int) ceil(val2);\r
-\r
- // Rest is 16 LSB bits\r
- rest = val2 - cell0;\r
-\r
- y0 = LutTable[cell0] ;\r
- y1 = LutTable[cell1] ;\r
-\r
- Output[0] = y0 + (y1 - y0) * rest;\r
-}\r
-\r
-\r
-\r
-// Eval gray LUT having only one input channel\r
-static\r
-void Eval1Input(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p16)\r
-{\r
- cmsS15Fixed16Number fk;\r
- cmsS15Fixed16Number k0, k1, rk, K0, K1;\r
- int v;\r
- cmsUInt32Number OutChan;\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;\r
-\r
- v = Input[0] * p16 -> Domain[0];\r
- fk = _cmsToFixedDomain(v);\r
-\r
- k0 = FIXED_TO_INT(fk);\r
- rk = (cmsUInt16Number) FIXED_REST_TO_INT(fk);\r
-\r
- k1 = k0 + (Input[0] != 0xFFFFU ? 1 : 0);\r
-\r
- K0 = p16 -> opta[0] * k0;\r
- K1 = p16 -> opta[0] * k1;\r
-\r
- for (OutChan=0; OutChan < p16->nOutputs; OutChan++) {\r
-\r
- Output[OutChan] = LinearInterp(rk, LutTable[K0+OutChan], LutTable[K1+OutChan]);\r
- }\r
-}\r
-\r
-\r
-\r
-// Eval gray LUT having only one input channel\r
-static\r
-void Eval1InputFloat(const cmsFloat32Number Value[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- cmsFloat32Number y1, y0;\r
- cmsFloat32Number val2, rest;\r
- int cell0, cell1;\r
- cmsUInt32Number OutChan;\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;\r
-\r
- // if last value...\r
- if (Value[0] == 1.0) {\r
- Output[0] = LutTable[p -> Domain[0]];\r
- return;\r
- }\r
-\r
- val2 = p -> Domain[0] * Value[0];\r
-\r
- cell0 = (int) floor(val2);\r
- cell1 = (int) ceil(val2);\r
-\r
- // Rest is 16 LSB bits\r
- rest = val2 - cell0;\r
-\r
- cell0 *= p -> opta[0];\r
- cell1 *= p -> opta[0];\r
-\r
- for (OutChan=0; OutChan < p->nOutputs; OutChan++) {\r
-\r
- y0 = LutTable[cell0 + OutChan] ;\r
- y1 = LutTable[cell1 + OutChan] ;\r
-\r
- Output[OutChan] = y0 + (y1 - y0) * rest;\r
- }\r
-}\r
-\r
-// Bilinear interpolation (16 bits) - cmsFloat32Number version\r
-static\r
-void BilinearInterpFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-\r
-{\r
-# define LERP(a,l,h) (cmsFloat32Number) ((l)+(((h)-(l))*(a)))\r
-# define DENS(i,j) (LutTable[(i)+(j)+OutChan])\r
-\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;\r
- cmsFloat32Number px, py;\r
- int x0, y0,\r
- X0, Y0, X1, Y1;\r
- int TotalOut, OutChan;\r
- cmsFloat32Number fx, fy,\r
- d00, d01, d10, d11,\r
- dx0, dx1,\r
- dxy;\r
-\r
- TotalOut = p -> nOutputs;\r
- px = Input[0] * p->Domain[0];\r
- py = Input[1] * p->Domain[1];\r
-\r
- x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0;\r
- y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0;\r
-\r
- X0 = p -> opta[1] * x0;\r
- X1 = X0 + (Input[0] >= 1.0 ? 0 : p->opta[1]);\r
-\r
- Y0 = p -> opta[0] * y0;\r
- Y1 = Y0 + (Input[1] >= 1.0 ? 0 : p->opta[0]);\r
-\r
- for (OutChan = 0; OutChan < TotalOut; OutChan++) {\r
-\r
- d00 = DENS(X0, Y0);\r
- d01 = DENS(X0, Y1);\r
- d10 = DENS(X1, Y0);\r
- d11 = DENS(X1, Y1);\r
-\r
- dx0 = LERP(fx, d00, d10);\r
- dx1 = LERP(fx, d01, d11);\r
-\r
- dxy = LERP(fy, dx0, dx1);\r
-\r
- Output[OutChan] = dxy;\r
- }\r
-\r
-\r
-# undef LERP\r
-# undef DENS\r
-}\r
-\r
-// Bilinear interpolation (16 bits) - optimized version\r
-static\r
-void BilinearInterp16(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p)\r
-\r
-{\r
-#define DENS(i,j) (LutTable[(i)+(j)+OutChan])\r
-#define LERP(a,l,h) (cmsUInt16Number) (l + ROUND_FIXED_TO_INT(((h-l)*a)))\r
-\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p ->Table;\r
- int OutChan, TotalOut;\r
- cmsS15Fixed16Number fx, fy;\r
- register int rx, ry;\r
- int x0, y0;\r
- register int X0, X1, Y0, Y1;\r
- int d00, d01, d10, d11,\r
- dx0, dx1,\r
- dxy;\r
-\r
- TotalOut = p -> nOutputs;\r
-\r
- fx = _cmsToFixedDomain((int) Input[0] * p -> Domain[0]);\r
- x0 = FIXED_TO_INT(fx);\r
- rx = FIXED_REST_TO_INT(fx); // Rest in 0..1.0 domain\r
-\r
-\r
- fy = _cmsToFixedDomain((int) Input[1] * p -> Domain[1]);\r
- y0 = FIXED_TO_INT(fy);\r
- ry = FIXED_REST_TO_INT(fy);\r
-\r
-\r
- X0 = p -> opta[1] * x0;\r
- X1 = X0 + (Input[0] == 0xFFFFU ? 0 : p->opta[1]);\r
-\r
- Y0 = p -> opta[0] * y0;\r
- Y1 = Y0 + (Input[1] == 0xFFFFU ? 0 : p->opta[0]);\r
-\r
- for (OutChan = 0; OutChan < TotalOut; OutChan++) {\r
-\r
- d00 = DENS(X0, Y0);\r
- d01 = DENS(X0, Y1);\r
- d10 = DENS(X1, Y0);\r
- d11 = DENS(X1, Y1);\r
-\r
- dx0 = LERP(rx, d00, d10);\r
- dx1 = LERP(rx, d01, d11);\r
-\r
- dxy = LERP(ry, dx0, dx1);\r
-\r
- Output[OutChan] = (cmsUInt16Number) dxy;\r
- }\r
-\r
-\r
-# undef LERP\r
-# undef DENS\r
-}\r
-\r
-\r
-// Trilinear interpolation (16 bits) - cmsFloat32Number version\r
-static\r
-void TrilinearInterpFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-\r
-{\r
-# define LERP(a,l,h) (cmsFloat32Number) ((l)+(((h)-(l))*(a)))\r
-# define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])\r
-\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;\r
- cmsFloat32Number px, py, pz;\r
- int x0, y0, z0,\r
- X0, Y0, Z0, X1, Y1, Z1;\r
- int TotalOut, OutChan;\r
- cmsFloat32Number fx, fy, fz,\r
- d000, d001, d010, d011,\r
- d100, d101, d110, d111,\r
- dx00, dx01, dx10, dx11,\r
- dxy0, dxy1, dxyz;\r
-\r
- TotalOut = p -> nOutputs;\r
-\r
- // We need some clipping here\r
- px = Input[0];\r
- py = Input[1];\r
- pz = Input[2];\r
-\r
- if (px < 0) px = 0;\r
- if (px > 1) px = 1;\r
- if (py < 0) py = 0;\r
- if (py > 1) py = 1;\r
- if (pz < 0) pz = 0;\r
- if (pz > 1) pz = 1;\r
-\r
- px *= p->Domain[0];\r
- py *= p->Domain[1];\r
- pz *= p->Domain[2];\r
-\r
- x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0;\r
- y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0;\r
- z0 = (int) _cmsQuickFloor(pz); fz = pz - (cmsFloat32Number) z0;\r
-\r
- X0 = p -> opta[2] * x0;\r
- X1 = X0 + (Input[0] >= 1.0 ? 0 : p->opta[2]);\r
-\r
- Y0 = p -> opta[1] * y0;\r
- Y1 = Y0 + (Input[1] >= 1.0 ? 0 : p->opta[1]);\r
-\r
- Z0 = p -> opta[0] * z0;\r
- Z1 = Z0 + (Input[2] >= 1.0 ? 0 : p->opta[0]);\r
-\r
- for (OutChan = 0; OutChan < TotalOut; OutChan++) {\r
-\r
- d000 = DENS(X0, Y0, Z0);\r
- d001 = DENS(X0, Y0, Z1);\r
- d010 = DENS(X0, Y1, Z0);\r
- d011 = DENS(X0, Y1, Z1);\r
-\r
- d100 = DENS(X1, Y0, Z0);\r
- d101 = DENS(X1, Y0, Z1);\r
- d110 = DENS(X1, Y1, Z0);\r
- d111 = DENS(X1, Y1, Z1);\r
-\r
-\r
- dx00 = LERP(fx, d000, d100);\r
- dx01 = LERP(fx, d001, d101);\r
- dx10 = LERP(fx, d010, d110);\r
- dx11 = LERP(fx, d011, d111);\r
-\r
- dxy0 = LERP(fy, dx00, dx10);\r
- dxy1 = LERP(fy, dx01, dx11);\r
-\r
- dxyz = LERP(fz, dxy0, dxy1);\r
-\r
- Output[OutChan] = dxyz;\r
- }\r
-\r
-\r
-# undef LERP\r
-# undef DENS\r
-}\r
-\r
-// Trilinear interpolation (16 bits) - optimized version\r
-static\r
-void TrilinearInterp16(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p)\r
-\r
-{\r
-#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])\r
-#define LERP(a,l,h) (cmsUInt16Number) (l + ROUND_FIXED_TO_INT(((h-l)*a)))\r
-\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p ->Table;\r
- int OutChan, TotalOut;\r
- cmsS15Fixed16Number fx, fy, fz;\r
- register int rx, ry, rz;\r
- int x0, y0, z0;\r
- register int X0, X1, Y0, Y1, Z0, Z1;\r
- int d000, d001, d010, d011,\r
- d100, d101, d110, d111,\r
- dx00, dx01, dx10, dx11,\r
- dxy0, dxy1, dxyz;\r
-\r
- TotalOut = p -> nOutputs;\r
-\r
- fx = _cmsToFixedDomain((int) Input[0] * p -> Domain[0]);\r
- x0 = FIXED_TO_INT(fx);\r
- rx = FIXED_REST_TO_INT(fx); // Rest in 0..1.0 domain\r
-\r
-\r
- fy = _cmsToFixedDomain((int) Input[1] * p -> Domain[1]);\r
- y0 = FIXED_TO_INT(fy);\r
- ry = FIXED_REST_TO_INT(fy);\r
-\r
- fz = _cmsToFixedDomain((int) Input[2] * p -> Domain[2]);\r
- z0 = FIXED_TO_INT(fz);\r
- rz = FIXED_REST_TO_INT(fz);\r
-\r
-\r
- X0 = p -> opta[2] * x0;\r
- X1 = X0 + (Input[0] == 0xFFFFU ? 0 : p->opta[2]);\r
-\r
- Y0 = p -> opta[1] * y0;\r
- Y1 = Y0 + (Input[1] == 0xFFFFU ? 0 : p->opta[1]);\r
-\r
- Z0 = p -> opta[0] * z0;\r
- Z1 = Z0 + (Input[2] == 0xFFFFU ? 0 : p->opta[0]);\r
-\r
- for (OutChan = 0; OutChan < TotalOut; OutChan++) {\r
-\r
- d000 = DENS(X0, Y0, Z0);\r
- d001 = DENS(X0, Y0, Z1);\r
- d010 = DENS(X0, Y1, Z0);\r
- d011 = DENS(X0, Y1, Z1);\r
-\r
- d100 = DENS(X1, Y0, Z0);\r
- d101 = DENS(X1, Y0, Z1);\r
- d110 = DENS(X1, Y1, Z0);\r
- d111 = DENS(X1, Y1, Z1);\r
-\r
-\r
- dx00 = LERP(rx, d000, d100);\r
- dx01 = LERP(rx, d001, d101);\r
- dx10 = LERP(rx, d010, d110);\r
- dx11 = LERP(rx, d011, d111);\r
-\r
- dxy0 = LERP(ry, dx00, dx10);\r
- dxy1 = LERP(ry, dx01, dx11);\r
-\r
- dxyz = LERP(rz, dxy0, dxy1);\r
-\r
- Output[OutChan] = (cmsUInt16Number) dxyz;\r
- }\r
-\r
-\r
-# undef LERP\r
-# undef DENS\r
-}\r
-\r
-\r
-// Tetrahedral interpolation, using Sakamoto algorithm.\r
-#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])\r
-static\r
-void TetrahedralInterpFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;\r
- cmsFloat32Number px, py, pz;\r
- int x0, y0, z0,\r
- X0, Y0, Z0, X1, Y1, Z1;\r
- cmsFloat32Number rx, ry, rz;\r
- cmsFloat32Number c0, c1=0, c2=0, c3=0;\r
- int OutChan, TotalOut;\r
-\r
- TotalOut = p -> nOutputs;\r
-\r
- // We need some clipping here\r
- px = Input[0];\r
- py = Input[1];\r
- pz = Input[2];\r
-\r
- if (px < 0) px = 0;\r
- if (px > 1) px = 1;\r
- if (py < 0) py = 0;\r
- if (py > 1) py = 1;\r
- if (pz < 0) pz = 0;\r
- if (pz > 1) pz = 1;\r
-\r
- px *= p->Domain[0];\r
- py *= p->Domain[1];\r
- pz *= p->Domain[2];\r
-\r
- x0 = (int) _cmsQuickFloor(px); rx = (px - (cmsFloat32Number) x0);\r
- y0 = (int) _cmsQuickFloor(py); ry = (py - (cmsFloat32Number) y0);\r
- z0 = (int) _cmsQuickFloor(pz); rz = (pz - (cmsFloat32Number) z0);\r
-\r
-\r
- X0 = p -> opta[2] * x0;\r
- X1 = X0 + (Input[0] >= 1.0 ? 0 : p->opta[2]);\r
-\r
- Y0 = p -> opta[1] * y0;\r
- Y1 = Y0 + (Input[1] >= 1.0 ? 0 : p->opta[1]);\r
-\r
- Z0 = p -> opta[0] * z0;\r
- Z1 = Z0 + (Input[2] >= 1.0 ? 0 : p->opta[0]);\r
-\r
- for (OutChan=0; OutChan < TotalOut; OutChan++) {\r
-\r
- // These are the 6 Tetrahedral\r
-\r
- c0 = DENS(X0, Y0, Z0);\r
-\r
- if (rx >= ry && ry >= rz) {\r
-\r
- c1 = DENS(X1, Y0, Z0) - c0;\r
- c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);\r
- c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);\r
-\r
- }\r
- else\r
- if (rx >= rz && rz >= ry) {\r
-\r
- c1 = DENS(X1, Y0, Z0) - c0;\r
- c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);\r
- c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);\r
-\r
- }\r
- else\r
- if (rz >= rx && rx >= ry) {\r
-\r
- c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);\r
- c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);\r
- c3 = DENS(X0, Y0, Z1) - c0;\r
-\r
- }\r
- else\r
- if (ry >= rx && rx >= rz) {\r
-\r
- c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);\r
- c2 = DENS(X0, Y1, Z0) - c0;\r
- c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);\r
-\r
- }\r
- else\r
- if (ry >= rz && rz >= rx) {\r
-\r
- c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);\r
- c2 = DENS(X0, Y1, Z0) - c0;\r
- c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);\r
-\r
- }\r
- else\r
- if (rz >= ry && ry >= rx) {\r
-\r
- c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);\r
- c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);\r
- c3 = DENS(X0, Y0, Z1) - c0;\r
-\r
- }\r
- else {\r
- c1 = c2 = c3 = 0;\r
- }\r
-\r
- Output[OutChan] = c0 + c1 * rx + c2 * ry + c3 * rz;\r
- }\r
-\r
-}\r
-\r
-#undef DENS\r
-\r
-\r
-\r
-\r
-static\r
-void TetrahedralInterp16(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p)\r
-{\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p -> Table;\r
- cmsS15Fixed16Number fx, fy, fz;\r
- cmsS15Fixed16Number rx, ry, rz;\r
- int x0, y0, z0;\r
- cmsS15Fixed16Number c0, c1, c2, c3, Rest;\r
- cmsS15Fixed16Number X0, X1, Y0, Y1, Z0, Z1;\r
- cmsUInt32Number TotalOut = p -> nOutputs;\r
-\r
- fx = _cmsToFixedDomain((int) Input[0] * p -> Domain[0]);\r
- fy = _cmsToFixedDomain((int) Input[1] * p -> Domain[1]);\r
- fz = _cmsToFixedDomain((int) Input[2] * p -> Domain[2]);\r
-\r
- x0 = FIXED_TO_INT(fx);\r
- y0 = FIXED_TO_INT(fy);\r
- z0 = FIXED_TO_INT(fz);\r
-\r
- rx = FIXED_REST_TO_INT(fx);\r
- ry = FIXED_REST_TO_INT(fy);\r
- rz = FIXED_REST_TO_INT(fz);\r
-\r
- X0 = p -> opta[2] * x0;\r
- X1 = (Input[0] == 0xFFFFU ? 0 : p->opta[2]);\r
-\r
- Y0 = p -> opta[1] * y0;\r
- Y1 = (Input[1] == 0xFFFFU ? 0 : p->opta[1]);\r
-\r
- Z0 = p -> opta[0] * z0;\r
- Z1 = (Input[2] == 0xFFFFU ? 0 : p->opta[0]);\r
-\r
- LutTable = &LutTable[X0+Y0+Z0];\r
-\r
- // Output should be computed as x = ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest))\r
- // which expands as: x = (Rest + ((Rest+0x7fff)/0xFFFF) + 0x8000)>>16\r
- // This can be replaced by: t = Rest+0x8001, x = (t + (t>>16))>>16\r
- // at the cost of being off by one at 7fff and 17ffe.\r
-\r
- if (rx >= ry) {\r
- if (ry >= rz) {\r
- Y1 += X1;\r
- Z1 += Y1;\r
- for (; TotalOut; TotalOut--) {\r
- c1 = LutTable[X1];\r
- c2 = LutTable[Y1];\r
- c3 = LutTable[Z1];\r
- c0 = *LutTable++;\r
- c3 -= c2;\r
- c2 -= c1;\r
- c1 -= c0;\r
- Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;\r
- *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);\r
- }\r
- } else if (rz >= rx) {\r
- X1 += Z1;\r
- Y1 += X1;\r
- for (; TotalOut; TotalOut--) {\r
- c1 = LutTable[X1];\r
- c2 = LutTable[Y1];\r
- c3 = LutTable[Z1];\r
- c0 = *LutTable++;\r
- c2 -= c1;\r
- c1 -= c3;\r
- c3 -= c0;\r
- Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;\r
- *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);\r
- }\r
- } else {\r
- Z1 += X1;\r
- Y1 += Z1;\r
- for (; TotalOut; TotalOut--) {\r
- c1 = LutTable[X1];\r
- c2 = LutTable[Y1];\r
- c3 = LutTable[Z1];\r
- c0 = *LutTable++;\r
- c2 -= c3;\r
- c3 -= c1;\r
- c1 -= c0;\r
- Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;\r
- *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);\r
- }\r
- }\r
- } else {\r
- if (rx >= rz) {\r
- X1 += Y1;\r
- Z1 += X1;\r
- for (; TotalOut; TotalOut--) {\r
- c1 = LutTable[X1];\r
- c2 = LutTable[Y1];\r
- c3 = LutTable[Z1];\r
- c0 = *LutTable++;\r
- c3 -= c1;\r
- c1 -= c2;\r
- c2 -= c0;\r
- Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;\r
- *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);\r
- }\r
- } else if (ry >= rz) {\r
- Z1 += Y1;\r
- X1 += Z1;\r
- for (; TotalOut; TotalOut--) {\r
- c1 = LutTable[X1];\r
- c2 = LutTable[Y1];\r
- c3 = LutTable[Z1];\r
- c0 = *LutTable++;\r
- c1 -= c3;\r
- c3 -= c2;\r
- c2 -= c0;\r
- Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;\r
- *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);\r
- }\r
- } else {\r
- Y1 += Z1;\r
- X1 += Y1;\r
- for (; TotalOut; TotalOut--) {\r
- c1 = LutTable[X1];\r
- c2 = LutTable[Y1];\r
- c3 = LutTable[Z1];\r
- c0 = *LutTable++;\r
- c1 -= c2;\r
- c2 -= c3;\r
- c3 -= c0;\r
- Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;\r
- *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);\r
- }\r
- }\r
- }\r
-}\r
-\r
-\r
-#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])\r
-static\r
-void Eval4Inputs(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p16)\r
-{\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;\r
- cmsS15Fixed16Number fk;\r
- cmsS15Fixed16Number k0, rk;\r
- int K0, K1;\r
- cmsS15Fixed16Number fx, fy, fz;\r
- cmsS15Fixed16Number rx, ry, rz;\r
- int x0, y0, z0;\r
- cmsS15Fixed16Number X0, X1, Y0, Y1, Z0, Z1;\r
- cmsUInt32Number i;\r
- cmsS15Fixed16Number c0, c1, c2, c3, Rest;\r
- cmsUInt32Number OutChan;\r
- cmsUInt16Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
-\r
-\r
- fk = _cmsToFixedDomain((int) Input[0] * p16 -> Domain[0]);\r
- fx = _cmsToFixedDomain((int) Input[1] * p16 -> Domain[1]);\r
- fy = _cmsToFixedDomain((int) Input[2] * p16 -> Domain[2]);\r
- fz = _cmsToFixedDomain((int) Input[3] * p16 -> Domain[3]);\r
-\r
- k0 = FIXED_TO_INT(fk);\r
- x0 = FIXED_TO_INT(fx);\r
- y0 = FIXED_TO_INT(fy);\r
- z0 = FIXED_TO_INT(fz);\r
-\r
- rk = FIXED_REST_TO_INT(fk);\r
- rx = FIXED_REST_TO_INT(fx);\r
- ry = FIXED_REST_TO_INT(fy);\r
- rz = FIXED_REST_TO_INT(fz);\r
-\r
- K0 = p16 -> opta[3] * k0;\r
- K1 = K0 + (Input[0] == 0xFFFFU ? 0 : p16->opta[3]);\r
-\r
- X0 = p16 -> opta[2] * x0;\r
- X1 = X0 + (Input[1] == 0xFFFFU ? 0 : p16->opta[2]);\r
-\r
- Y0 = p16 -> opta[1] * y0;\r
- Y1 = Y0 + (Input[2] == 0xFFFFU ? 0 : p16->opta[1]);\r
-\r
- Z0 = p16 -> opta[0] * z0;\r
- Z1 = Z0 + (Input[3] == 0xFFFFU ? 0 : p16->opta[0]);\r
-\r
- LutTable = (cmsUInt16Number*) p16 -> Table;\r
- LutTable += K0;\r
-\r
- for (OutChan=0; OutChan < p16 -> nOutputs; OutChan++) {\r
-\r
- c0 = DENS(X0, Y0, Z0);\r
-\r
- if (rx >= ry && ry >= rz) {\r
-\r
- c1 = DENS(X1, Y0, Z0) - c0;\r
- c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);\r
- c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);\r
-\r
- }\r
- else\r
- if (rx >= rz && rz >= ry) {\r
-\r
- c1 = DENS(X1, Y0, Z0) - c0;\r
- c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);\r
- c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);\r
-\r
- }\r
- else\r
- if (rz >= rx && rx >= ry) {\r
-\r
- c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);\r
- c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);\r
- c3 = DENS(X0, Y0, Z1) - c0;\r
-\r
- }\r
- else\r
- if (ry >= rx && rx >= rz) {\r
-\r
- c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);\r
- c2 = DENS(X0, Y1, Z0) - c0;\r
- c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);\r
-\r
- }\r
- else\r
- if (ry >= rz && rz >= rx) {\r
-\r
- c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);\r
- c2 = DENS(X0, Y1, Z0) - c0;\r
- c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);\r
-\r
- }\r
- else\r
- if (rz >= ry && ry >= rx) {\r
-\r
- c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);\r
- c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);\r
- c3 = DENS(X0, Y0, Z1) - c0;\r
-\r
- }\r
- else {\r
- c1 = c2 = c3 = 0;\r
- }\r
-\r
- Rest = c1 * rx + c2 * ry + c3 * rz;\r
-\r
- Tmp1[OutChan] = (cmsUInt16Number) c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest));\r
- }\r
-\r
-\r
- LutTable = (cmsUInt16Number*) p16 -> Table;\r
- LutTable += K1;\r
-\r
- for (OutChan=0; OutChan < p16 -> nOutputs; OutChan++) {\r
-\r
- c0 = DENS(X0, Y0, Z0);\r
-\r
- if (rx >= ry && ry >= rz) {\r
-\r
- c1 = DENS(X1, Y0, Z0) - c0;\r
- c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);\r
- c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);\r
-\r
- }\r
- else\r
- if (rx >= rz && rz >= ry) {\r
-\r
- c1 = DENS(X1, Y0, Z0) - c0;\r
- c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);\r
- c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);\r
-\r
- }\r
- else\r
- if (rz >= rx && rx >= ry) {\r
-\r
- c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);\r
- c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);\r
- c3 = DENS(X0, Y0, Z1) - c0;\r
-\r
- }\r
- else\r
- if (ry >= rx && rx >= rz) {\r
-\r
- c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);\r
- c2 = DENS(X0, Y1, Z0) - c0;\r
- c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);\r
-\r
- }\r
- else\r
- if (ry >= rz && rz >= rx) {\r
-\r
- c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);\r
- c2 = DENS(X0, Y1, Z0) - c0;\r
- c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);\r
-\r
- }\r
- else\r
- if (rz >= ry && ry >= rx) {\r
-\r
- c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);\r
- c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);\r
- c3 = DENS(X0, Y0, Z1) - c0;\r
-\r
- }\r
- else {\r
- c1 = c2 = c3 = 0;\r
- }\r
-\r
- Rest = c1 * rx + c2 * ry + c3 * rz;\r
-\r
- Tmp2[OutChan] = (cmsUInt16Number) c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest));\r
- }\r
-\r
-\r
-\r
- for (i=0; i < p16 -> nOutputs; i++) {\r
- Output[i] = LinearInterp(rk, Tmp1[i], Tmp2[i]);\r
- }\r
-}\r
-#undef DENS\r
-\r
-\r
-// For more that 3 inputs (i.e., CMYK)\r
-// evaluate two 3-dimensional interpolations and then linearly interpolate between them.\r
-\r
-\r
-static\r
-void Eval4InputsFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;\r
- cmsFloat32Number rest;\r
- cmsFloat32Number pk;\r
- int k0, K0, K1;\r
- const cmsFloat32Number* T;\r
- cmsUInt32Number i;\r
- cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
-\r
- pk = Input[0] * p->Domain[0];\r
- k0 = _cmsQuickFloor(pk);\r
- rest = pk - (cmsFloat32Number) k0;\r
-\r
- K0 = p -> opta[3] * k0;\r
- K1 = K0 + (Input[0] >= 1.0 ? 0 : p->opta[3]);\r
-\r
- p1 = *p;\r
- memmove(&p1.Domain[0], &p ->Domain[1], 3*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- TetrahedralInterpFloat(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
- TetrahedralInterpFloat(Input + 1, Tmp2, &p1);\r
-\r
- for (i=0; i < p -> nOutputs; i++)\r
- {\r
- cmsFloat32Number y0 = Tmp1[i];\r
- cmsFloat32Number y1 = Tmp2[i];\r
-\r
- Output[i] = y0 + (y1 - y0) * rest;\r
- }\r
-}\r
-\r
-\r
-static\r
-void Eval5Inputs(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
-\r
- register const cmsInterpParams* p16)\r
-{\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;\r
- cmsS15Fixed16Number fk;\r
- cmsS15Fixed16Number k0, rk;\r
- int K0, K1;\r
- const cmsUInt16Number* T;\r
- cmsUInt32Number i;\r
- cmsUInt16Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
-\r
- fk = _cmsToFixedDomain((cmsS15Fixed16Number) Input[0] * p16 -> Domain[0]);\r
- k0 = FIXED_TO_INT(fk);\r
- rk = FIXED_REST_TO_INT(fk);\r
-\r
- K0 = p16 -> opta[4] * k0;\r
- K1 = p16 -> opta[4] * (k0 + (Input[0] != 0xFFFFU ? 1 : 0));\r
-\r
- p1 = *p16;\r
- memmove(&p1.Domain[0], &p16 ->Domain[1], 4*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval4Inputs(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
-\r
- Eval4Inputs(Input + 1, Tmp2, &p1);\r
-\r
- for (i=0; i < p16 -> nOutputs; i++) {\r
-\r
- Output[i] = LinearInterp(rk, Tmp1[i], Tmp2[i]);\r
- }\r
-\r
-}\r
-\r
-\r
-static\r
-void Eval5InputsFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;\r
- cmsFloat32Number rest;\r
- cmsFloat32Number pk;\r
- int k0, K0, K1;\r
- const cmsFloat32Number* T;\r
- cmsUInt32Number i;\r
- cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
- pk = Input[0] * p->Domain[0];\r
- k0 = _cmsQuickFloor(pk);\r
- rest = pk - (cmsFloat32Number) k0;\r
-\r
- K0 = p -> opta[4] * k0;\r
- K1 = K0 + (Input[0] >= 1.0 ? 0 : p->opta[4]);\r
-\r
- p1 = *p;\r
- memmove(&p1.Domain[0], &p ->Domain[1], 4*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval4InputsFloat(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
-\r
- Eval4InputsFloat(Input + 1, Tmp2, &p1);\r
-\r
- for (i=0; i < p -> nOutputs; i++) {\r
-\r
- cmsFloat32Number y0 = Tmp1[i];\r
- cmsFloat32Number y1 = Tmp2[i];\r
-\r
- Output[i] = y0 + (y1 - y0) * rest;\r
- }\r
-}\r
-\r
-\r
-\r
-static\r
-void Eval6Inputs(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p16)\r
-{\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;\r
- cmsS15Fixed16Number fk;\r
- cmsS15Fixed16Number k0, rk;\r
- int K0, K1;\r
- const cmsUInt16Number* T;\r
- cmsUInt32Number i;\r
- cmsUInt16Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
- fk = _cmsToFixedDomain((cmsS15Fixed16Number) Input[0] * p16 -> Domain[0]);\r
- k0 = FIXED_TO_INT(fk);\r
- rk = FIXED_REST_TO_INT(fk);\r
-\r
- K0 = p16 -> opta[5] * k0;\r
- K1 = p16 -> opta[5] * (k0 + (Input[0] != 0xFFFFU ? 1 : 0));\r
-\r
- p1 = *p16;\r
- memmove(&p1.Domain[0], &p16 ->Domain[1], 5*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval5Inputs(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
-\r
- Eval5Inputs(Input + 1, Tmp2, &p1);\r
-\r
- for (i=0; i < p16 -> nOutputs; i++) {\r
-\r
- Output[i] = LinearInterp(rk, Tmp1[i], Tmp2[i]);\r
- }\r
-\r
-}\r
-\r
-\r
-static\r
-void Eval6InputsFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;\r
- cmsFloat32Number rest;\r
- cmsFloat32Number pk;\r
- int k0, K0, K1;\r
- const cmsFloat32Number* T;\r
- cmsUInt32Number i;\r
- cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
- pk = Input[0] * p->Domain[0];\r
- k0 = _cmsQuickFloor(pk);\r
- rest = pk - (cmsFloat32Number) k0;\r
-\r
- K0 = p -> opta[5] * k0;\r
- K1 = K0 + (Input[0] >= 1.0 ? 0 : p->opta[5]);\r
-\r
- p1 = *p;\r
- memmove(&p1.Domain[0], &p ->Domain[1], 5*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval5InputsFloat(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
-\r
- Eval5InputsFloat(Input + 1, Tmp2, &p1);\r
-\r
- for (i=0; i < p -> nOutputs; i++) {\r
-\r
- cmsFloat32Number y0 = Tmp1[i];\r
- cmsFloat32Number y1 = Tmp2[i];\r
-\r
- Output[i] = y0 + (y1 - y0) * rest;\r
- }\r
-}\r
-\r
-\r
-static\r
-void Eval7Inputs(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p16)\r
-{\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;\r
- cmsS15Fixed16Number fk;\r
- cmsS15Fixed16Number k0, rk;\r
- int K0, K1;\r
- const cmsUInt16Number* T;\r
- cmsUInt32Number i;\r
- cmsUInt16Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
-\r
- fk = _cmsToFixedDomain((cmsS15Fixed16Number) Input[0] * p16 -> Domain[0]);\r
- k0 = FIXED_TO_INT(fk);\r
- rk = FIXED_REST_TO_INT(fk);\r
-\r
- K0 = p16 -> opta[6] * k0;\r
- K1 = p16 -> opta[6] * (k0 + (Input[0] != 0xFFFFU ? 1 : 0));\r
-\r
- p1 = *p16;\r
- memmove(&p1.Domain[0], &p16 ->Domain[1], 6*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval6Inputs(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
-\r
- Eval6Inputs(Input + 1, Tmp2, &p1);\r
-\r
- for (i=0; i < p16 -> nOutputs; i++) {\r
- Output[i] = LinearInterp(rk, Tmp1[i], Tmp2[i]);\r
- }\r
-}\r
-\r
-\r
-static\r
-void Eval7InputsFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;\r
- cmsFloat32Number rest;\r
- cmsFloat32Number pk;\r
- int k0, K0, K1;\r
- const cmsFloat32Number* T;\r
- cmsUInt32Number i;\r
- cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
- pk = Input[0] * p->Domain[0];\r
- k0 = _cmsQuickFloor(pk);\r
- rest = pk - (cmsFloat32Number) k0;\r
-\r
- K0 = p -> opta[6] * k0;\r
- K1 = K0 + (Input[0] >= 1.0 ? 0 : p->opta[6]);\r
-\r
- p1 = *p;\r
- memmove(&p1.Domain[0], &p ->Domain[1], 6*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval6InputsFloat(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
-\r
- Eval6InputsFloat(Input + 1, Tmp2, &p1);\r
-\r
-\r
- for (i=0; i < p -> nOutputs; i++) {\r
-\r
- cmsFloat32Number y0 = Tmp1[i];\r
- cmsFloat32Number y1 = Tmp2[i];\r
-\r
- Output[i] = y0 + (y1 - y0) * rest;\r
-\r
- }\r
-}\r
-\r
-static\r
-void Eval8Inputs(register const cmsUInt16Number Input[],\r
- register cmsUInt16Number Output[],\r
- register const cmsInterpParams* p16)\r
-{\r
- const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;\r
- cmsS15Fixed16Number fk;\r
- cmsS15Fixed16Number k0, rk;\r
- int K0, K1;\r
- const cmsUInt16Number* T;\r
- cmsUInt32Number i;\r
- cmsUInt16Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
- fk = _cmsToFixedDomain((cmsS15Fixed16Number) Input[0] * p16 -> Domain[0]);\r
- k0 = FIXED_TO_INT(fk);\r
- rk = FIXED_REST_TO_INT(fk);\r
-\r
- K0 = p16 -> opta[7] * k0;\r
- K1 = p16 -> opta[7] * (k0 + (Input[0] != 0xFFFFU ? 1 : 0));\r
-\r
- p1 = *p16;\r
- memmove(&p1.Domain[0], &p16 ->Domain[1], 7*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval7Inputs(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
- Eval7Inputs(Input + 1, Tmp2, &p1);\r
-\r
- for (i=0; i < p16 -> nOutputs; i++) {\r
- Output[i] = LinearInterp(rk, Tmp1[i], Tmp2[i]);\r
- }\r
-}\r
-\r
-\r
-\r
-static\r
-void Eval8InputsFloat(const cmsFloat32Number Input[],\r
- cmsFloat32Number Output[],\r
- const cmsInterpParams* p)\r
-{\r
- const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;\r
- cmsFloat32Number rest;\r
- cmsFloat32Number pk;\r
- int k0, K0, K1;\r
- const cmsFloat32Number* T;\r
- cmsUInt32Number i;\r
- cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\r
- cmsInterpParams p1;\r
-\r
- pk = Input[0] * p->Domain[0];\r
- k0 = _cmsQuickFloor(pk);\r
- rest = pk - (cmsFloat32Number) k0;\r
-\r
- K0 = p -> opta[7] * k0;\r
- K1 = K0 + (Input[0] >= 1.0 ? 0 : p->opta[7]);\r
-\r
- p1 = *p;\r
- memmove(&p1.Domain[0], &p ->Domain[1], 7*sizeof(cmsUInt32Number));\r
-\r
- T = LutTable + K0;\r
- p1.Table = T;\r
-\r
- Eval7InputsFloat(Input + 1, Tmp1, &p1);\r
-\r
- T = LutTable + K1;\r
- p1.Table = T;\r
-\r
- Eval7InputsFloat(Input + 1, Tmp2, &p1);\r
-\r
-\r
- for (i=0; i < p -> nOutputs; i++) {\r
-\r
- cmsFloat32Number y0 = Tmp1[i];\r
- cmsFloat32Number y1 = Tmp2[i];\r
-\r
- Output[i] = y0 + (y1 - y0) * rest;\r
- }\r
-}\r
-\r
-// The default factory\r
-static\r
-cmsInterpFunction DefaultInterpolatorsFactory(cmsUInt32Number nInputChannels, cmsUInt32Number nOutputChannels, cmsUInt32Number dwFlags)\r
-{\r
-\r
- cmsInterpFunction Interpolation;\r
- cmsBool IsFloat = (dwFlags & CMS_LERP_FLAGS_FLOAT);\r
- cmsBool IsTrilinear = (dwFlags & CMS_LERP_FLAGS_TRILINEAR);\r
-\r
- memset(&Interpolation, 0, sizeof(Interpolation));\r
-\r
- // Safety check\r
- if (nInputChannels >= 4 && nOutputChannels >= MAX_STAGE_CHANNELS)\r
- return Interpolation;\r
-\r
- switch (nInputChannels) {\r
-\r
- case 1: // Gray LUT / linear\r
-\r
- if (nOutputChannels == 1) {\r
-\r
- if (IsFloat)\r
- Interpolation.LerpFloat = LinLerp1Dfloat;\r
- else\r
- Interpolation.Lerp16 = LinLerp1D;\r
-\r
- }\r
- else {\r
-\r
- if (IsFloat)\r
- Interpolation.LerpFloat = Eval1InputFloat;\r
- else\r
- Interpolation.Lerp16 = Eval1Input;\r
- }\r
- break;\r
-\r
- case 2: // Duotone\r
- if (IsFloat)\r
- Interpolation.LerpFloat = BilinearInterpFloat;\r
- else\r
- Interpolation.Lerp16 = BilinearInterp16;\r
- break;\r
-\r
- case 3: // RGB et al\r
-\r
- if (IsTrilinear) {\r
-\r
- if (IsFloat)\r
- Interpolation.LerpFloat = TrilinearInterpFloat;\r
- else\r
- Interpolation.Lerp16 = TrilinearInterp16;\r
- }\r
- else {\r
-\r
- if (IsFloat)\r
- Interpolation.LerpFloat = TetrahedralInterpFloat;\r
- else {\r
-\r
- Interpolation.Lerp16 = TetrahedralInterp16;\r
- }\r
- }\r
- break;\r
-\r
- case 4: // CMYK lut\r
-\r
- if (IsFloat)\r
- Interpolation.LerpFloat = Eval4InputsFloat;\r
- else\r
- Interpolation.Lerp16 = Eval4Inputs;\r
- break;\r
-\r
- case 5: // 5 Inks\r
- if (IsFloat)\r
- Interpolation.LerpFloat = Eval5InputsFloat;\r
- else\r
- Interpolation.Lerp16 = Eval5Inputs;\r
- break;\r
-\r
- case 6: // 6 Inks\r
- if (IsFloat)\r
- Interpolation.LerpFloat = Eval6InputsFloat;\r
- else\r
- Interpolation.Lerp16 = Eval6Inputs;\r
- break;\r
-\r
- case 7: // 7 inks\r
- if (IsFloat)\r
- Interpolation.LerpFloat = Eval7InputsFloat;\r
- else\r
- Interpolation.Lerp16 = Eval7Inputs;\r
- break;\r
-\r
- case 8: // 8 inks\r
- if (IsFloat)\r
- Interpolation.LerpFloat = Eval8InputsFloat;\r
- else\r
- Interpolation.Lerp16 = Eval8Inputs;\r
- break;\r
-\r
- break;\r
-\r
- default:\r
- Interpolation.Lerp16 = NULL;\r
- }\r
-\r
- return Interpolation;\r
-}\r
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+
+#include "lcms2_internal.h"
+
+// This module incorporates several interpolation routines, for 1 to 8 channels on input and
+// up to 65535 channels on output. The user may change those by using the interpolation plug-in
+
+// Some people may want to compile as C++ with all warnings on, in this case make compiler silent
+#ifdef _MSC_VER
+# if (_MSC_VER >= 1400)
+# pragma warning( disable : 4365 )
+# endif
+#endif
+
+// Interpolation routines by default
+static cmsInterpFunction DefaultInterpolatorsFactory(cmsUInt32Number nInputChannels, cmsUInt32Number nOutputChannels, cmsUInt32Number dwFlags);
+
+// This is the default factory
+_cmsInterpPluginChunkType _cmsInterpPluginChunk = { NULL };
+
+// The interpolation plug-in memory chunk allocator/dup
+void _cmsAllocInterpPluginChunk(struct _cmsContext_struct* ctx, const struct _cmsContext_struct* src)
+{
+ void* from;
+
+ _cmsAssert(ctx != NULL);
+
+ if (src != NULL) {
+ from = src ->chunks[InterpPlugin];
+ }
+ else {
+ static _cmsInterpPluginChunkType InterpPluginChunk = { NULL };
+
+ from = &InterpPluginChunk;
+ }
+
+ _cmsAssert(from != NULL);
+ ctx ->chunks[InterpPlugin] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsInterpPluginChunkType));
+}
+
+
+// Main plug-in entry
+cmsBool _cmsRegisterInterpPlugin(cmsContext ContextID, cmsPluginBase* Data)
+{
+ cmsPluginInterpolation* Plugin = (cmsPluginInterpolation*) Data;
+ _cmsInterpPluginChunkType* ptr = (_cmsInterpPluginChunkType*) _cmsContextGetClientChunk(ContextID, InterpPlugin);
+
+ if (Data == NULL) {
+
+ ptr ->Interpolators = NULL;
+ return TRUE;
+ }
+
+ // Set replacement functions
+ ptr ->Interpolators = Plugin ->InterpolatorsFactory;
+ return TRUE;
+}
+
+
+// Set the interpolation method
+cmsBool _cmsSetInterpolationRoutine(cmsContext ContextID, cmsInterpParams* p)
+{
+ _cmsInterpPluginChunkType* ptr = (_cmsInterpPluginChunkType*) _cmsContextGetClientChunk(ContextID, InterpPlugin);
+
+ p ->Interpolation.Lerp16 = NULL;
+
+ // Invoke factory, possibly in the Plug-in
+ if (ptr ->Interpolators != NULL)
+ p ->Interpolation = ptr->Interpolators(p -> nInputs, p ->nOutputs, p ->dwFlags);
+
+ // If unsupported by the plug-in, go for the LittleCMS default.
+ // If happens only if an extern plug-in is being used
+ if (p ->Interpolation.Lerp16 == NULL)
+ p ->Interpolation = DefaultInterpolatorsFactory(p ->nInputs, p ->nOutputs, p ->dwFlags);
+
+ // Check for valid interpolator (we just check one member of the union)
+ if (p ->Interpolation.Lerp16 == NULL) {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+// This function precalculates as many parameters as possible to speed up the interpolation.
+cmsInterpParams* _cmsComputeInterpParamsEx(cmsContext ContextID,
+ const cmsUInt32Number nSamples[],
+ cmsUInt32Number InputChan, cmsUInt32Number OutputChan,
+ const void *Table,
+ cmsUInt32Number dwFlags)
+{
+ cmsInterpParams* p;
+ cmsUInt32Number i;
+
+ // Check for maximum inputs
+ if (InputChan > MAX_INPUT_DIMENSIONS) {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "Too many input channels (%d channels, max=%d)", InputChan, MAX_INPUT_DIMENSIONS);
+ return NULL;
+ }
+
+ // Creates an empty object
+ p = (cmsInterpParams*) _cmsMallocZero(ContextID, sizeof(cmsInterpParams));
+ if (p == NULL) return NULL;
+
+ // Keep original parameters
+ p -> dwFlags = dwFlags;
+ p -> nInputs = InputChan;
+ p -> nOutputs = OutputChan;
+ p ->Table = Table;
+ p ->ContextID = ContextID;
+
+ // Fill samples per input direction and domain (which is number of nodes minus one)
+ for (i=0; i < InputChan; i++) {
+
+ p -> nSamples[i] = nSamples[i];
+ p -> Domain[i] = nSamples[i] - 1;
+ }
+
+ // Compute factors to apply to each component to index the grid array
+ p -> opta[0] = p -> nOutputs;
+ for (i=1; i < InputChan; i++)
+ p ->opta[i] = p ->opta[i-1] * nSamples[InputChan-i];
+
+
+ if (!_cmsSetInterpolationRoutine(ContextID, p)) {
+ cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported interpolation (%d->%d channels)", InputChan, OutputChan);
+ _cmsFree(ContextID, p);
+ return NULL;
+ }
+
+ // All seems ok
+ return p;
+}
+
+
+// This one is a wrapper on the anterior, but assuming all directions have same number of nodes
+cmsInterpParams* CMSEXPORT _cmsComputeInterpParams(cmsContext ContextID, cmsUInt32Number nSamples,
+ cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags)
+{
+ int i;
+ cmsUInt32Number Samples[MAX_INPUT_DIMENSIONS];
+
+ // Fill the auxiliary array
+ for (i=0; i < MAX_INPUT_DIMENSIONS; i++)
+ Samples[i] = nSamples;
+
+ // Call the extended function
+ return _cmsComputeInterpParamsEx(ContextID, Samples, InputChan, OutputChan, Table, dwFlags);
+}
+
+
+// Free all associated memory
+void CMSEXPORT _cmsFreeInterpParams(cmsInterpParams* p)
+{
+ if (p != NULL) _cmsFree(p ->ContextID, p);
+}
+
+
+// Inline fixed point interpolation
+cmsINLINE CMS_NO_SANITIZE cmsUInt16Number LinearInterp(cmsS15Fixed16Number a, cmsS15Fixed16Number l, cmsS15Fixed16Number h)
+{
+ cmsUInt32Number dif = (cmsUInt32Number) (h - l) * a + 0x8000;
+ dif = (dif >> 16) + l;
+ return (cmsUInt16Number) (dif);
+}
+
+
+// Linear interpolation (Fixed-point optimized)
+static
+void LinLerp1D(CMSREGISTER const cmsUInt16Number Value[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const cmsInterpParams* p)
+{
+ cmsUInt16Number y1, y0;
+ int cell0, rest;
+ int val3;
+ const cmsUInt16Number* LutTable = (cmsUInt16Number*) p ->Table;
+
+ // if last value...
+ if (Value[0] == 0xffff) {
+
+ Output[0] = LutTable[p -> Domain[0]];
+ }
+ else
+ {
+ val3 = p->Domain[0] * Value[0];
+ val3 = _cmsToFixedDomain(val3); // To fixed 15.16
+
+ cell0 = FIXED_TO_INT(val3); // Cell is 16 MSB bits
+ rest = FIXED_REST_TO_INT(val3); // Rest is 16 LSB bits
+
+ y0 = LutTable[cell0];
+ y1 = LutTable[cell0 + 1];
+
+ Output[0] = LinearInterp(rest, y0, y1);
+ }
+}
+
+// To prevent out of bounds indexing
+cmsINLINE cmsFloat32Number fclamp(cmsFloat32Number v)
+{
+ return ((v < 1.0e-9f) || isnan(v)) ? 0.0f : (v > 1.0f ? 1.0f : v);
+}
+
+// Floating-point version of 1D interpolation
+static
+void LinLerp1Dfloat(const cmsFloat32Number Value[],
+ cmsFloat32Number Output[],
+ const cmsInterpParams* p)
+{
+ cmsFloat32Number y1, y0;
+ cmsFloat32Number val2, rest;
+ int cell0, cell1;
+ const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;
+
+ val2 = fclamp(Value[0]);
+
+ // if last value...
+ if (val2 == 1.0) {
+ Output[0] = LutTable[p -> Domain[0]];
+ }
+ else
+ {
+ val2 *= p->Domain[0];
+
+ cell0 = (int)floor(val2);
+ cell1 = (int)ceil(val2);
+
+ // Rest is 16 LSB bits
+ rest = val2 - cell0;
+
+ y0 = LutTable[cell0];
+ y1 = LutTable[cell1];
+
+ Output[0] = y0 + (y1 - y0) * rest;
+ }
+}
+
+
+
+// Eval gray LUT having only one input channel
+static CMS_NO_SANITIZE
+void Eval1Input(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const cmsInterpParams* p16)
+{
+ cmsS15Fixed16Number fk;
+ cmsS15Fixed16Number k0, k1, rk, K0, K1;
+ int v;
+ cmsUInt32Number OutChan;
+ const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;
+
+ v = Input[0] * p16 -> Domain[0];
+ fk = _cmsToFixedDomain(v);
+
+ k0 = FIXED_TO_INT(fk);
+ rk = (cmsUInt16Number) FIXED_REST_TO_INT(fk);
+
+ k1 = k0 + (Input[0] != 0xFFFFU ? 1 : 0);
+
+ K0 = p16 -> opta[0] * k0;
+ K1 = p16 -> opta[0] * k1;
+
+ for (OutChan=0; OutChan < p16->nOutputs; OutChan++) {
+
+ Output[OutChan] = LinearInterp(rk, LutTable[K0+OutChan], LutTable[K1+OutChan]);
+ }
+}
+
+
+
+// Eval gray LUT having only one input channel
+static
+void Eval1InputFloat(const cmsFloat32Number Value[],
+ cmsFloat32Number Output[],
+ const cmsInterpParams* p)
+{
+ cmsFloat32Number y1, y0;
+ cmsFloat32Number val2, rest;
+ int cell0, cell1;
+ cmsUInt32Number OutChan;
+ const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;
+
+ val2 = fclamp(Value[0]);
+
+ // if last value...
+ if (val2 == 1.0) {
+
+ y0 = LutTable[p->Domain[0]];
+
+ for (OutChan = 0; OutChan < p->nOutputs; OutChan++) {
+ Output[OutChan] = y0;
+ }
+ }
+ else
+ {
+ val2 *= p->Domain[0];
+
+ cell0 = (int)floor(val2);
+ cell1 = (int)ceil(val2);
+
+ // Rest is 16 LSB bits
+ rest = val2 - cell0;
+
+ cell0 *= p->opta[0];
+ cell1 *= p->opta[0];
+
+ for (OutChan = 0; OutChan < p->nOutputs; OutChan++) {
+
+ y0 = LutTable[cell0 + OutChan];
+ y1 = LutTable[cell1 + OutChan];
+
+ Output[OutChan] = y0 + (y1 - y0) * rest;
+ }
+ }
+}
+
+// Bilinear interpolation (16 bits) - cmsFloat32Number version
+static
+void BilinearInterpFloat(const cmsFloat32Number Input[],
+ cmsFloat32Number Output[],
+ const cmsInterpParams* p)
+
+{
+# define LERP(a,l,h) (cmsFloat32Number) ((l)+(((h)-(l))*(a)))
+# define DENS(i,j) (LutTable[(i)+(j)+OutChan])
+
+ const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;
+ cmsFloat32Number px, py;
+ int x0, y0,
+ X0, Y0, X1, Y1;
+ int TotalOut, OutChan;
+ cmsFloat32Number fx, fy,
+ d00, d01, d10, d11,
+ dx0, dx1,
+ dxy;
+
+ TotalOut = p -> nOutputs;
+ px = fclamp(Input[0]) * p->Domain[0];
+ py = fclamp(Input[1]) * p->Domain[1];
+
+ x0 = (int) _cmsQuickFloor(px); fx = px - (cmsFloat32Number) x0;
+ y0 = (int) _cmsQuickFloor(py); fy = py - (cmsFloat32Number) y0;
+
+ X0 = p -> opta[1] * x0;
+ X1 = X0 + (fclamp(Input[0]) >= 1.0 ? 0 : p->opta[1]);
+
+ Y0 = p -> opta[0] * y0;
+ Y1 = Y0 + (fclamp(Input[1]) >= 1.0 ? 0 : p->opta[0]);
+
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ d00 = DENS(X0, Y0);
+ d01 = DENS(X0, Y1);
+ d10 = DENS(X1, Y0);
+ d11 = DENS(X1, Y1);
+
+ dx0 = LERP(fx, d00, d10);
+ dx1 = LERP(fx, d01, d11);
+
+ dxy = LERP(fy, dx0, dx1);
+
+ Output[OutChan] = dxy;
+ }
+
+
+# undef LERP
+# undef DENS
+}
+
+// Bilinear interpolation (16 bits) - optimized version
+static CMS_NO_SANITIZE
+void BilinearInterp16(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const cmsInterpParams* p)
+
+{
+#define DENS(i,j) (LutTable[(i)+(j)+OutChan])
+#define LERP(a,l,h) (cmsUInt16Number) (l + ROUND_FIXED_TO_INT(((h-l)*a)))
+
+ const cmsUInt16Number* LutTable = (cmsUInt16Number*) p ->Table;
+ int OutChan, TotalOut;
+ cmsS15Fixed16Number fx, fy;
+ CMSREGISTER int rx, ry;
+ int x0, y0;
+ CMSREGISTER int X0, X1, Y0, Y1;
+
+ int d00, d01, d10, d11,
+ dx0, dx1,
+ dxy;
+
+ TotalOut = p -> nOutputs;
+
+ fx = _cmsToFixedDomain((int) Input[0] * p -> Domain[0]);
+ x0 = FIXED_TO_INT(fx);
+ rx = FIXED_REST_TO_INT(fx); // Rest in 0..1.0 domain
+
+
+ fy = _cmsToFixedDomain((int) Input[1] * p -> Domain[1]);
+ y0 = FIXED_TO_INT(fy);
+ ry = FIXED_REST_TO_INT(fy);
+
+
+ X0 = p -> opta[1] * x0;
+ X1 = X0 + (Input[0] == 0xFFFFU ? 0 : p->opta[1]);
+
+ Y0 = p -> opta[0] * y0;
+ Y1 = Y0 + (Input[1] == 0xFFFFU ? 0 : p->opta[0]);
+
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ d00 = DENS(X0, Y0);
+ d01 = DENS(X0, Y1);
+ d10 = DENS(X1, Y0);
+ d11 = DENS(X1, Y1);
+
+ dx0 = LERP(rx, d00, d10);
+ dx1 = LERP(rx, d01, d11);
+
+ dxy = LERP(ry, dx0, dx1);
+
+ Output[OutChan] = (cmsUInt16Number) dxy;
+ }
+
+
+# undef LERP
+# undef DENS
+}
+
+
+// Trilinear interpolation (16 bits) - cmsFloat32Number version
+static
+void TrilinearInterpFloat(const cmsFloat32Number Input[],
+ cmsFloat32Number Output[],
+ const cmsInterpParams* p)
+
+{
+# define LERP(a,l,h) (cmsFloat32Number) ((l)+(((h)-(l))*(a)))
+# define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+
+ const cmsFloat32Number* LutTable = (cmsFloat32Number*) p ->Table;
+ cmsFloat32Number px, py, pz;
+ int x0, y0, z0,
+ X0, Y0, Z0, X1, Y1, Z1;
+ int TotalOut, OutChan;
+
+ cmsFloat32Number fx, fy, fz,
+ d000, d001, d010, d011,
+ d100, d101, d110, d111,
+ dx00, dx01, dx10, dx11,
+ dxy0, dxy1, dxyz;
+
+ TotalOut = p -> nOutputs;
+
+ // We need some clipping here
+ px = fclamp(Input[0]) * p->Domain[0];
+ py = fclamp(Input[1]) * p->Domain[1];
+ pz = fclamp(Input[2]) * p->Domain[2];
+
+ x0 = (int) floor(px); fx = px - (cmsFloat32Number) x0; // We need full floor funcionality here
+ y0 = (int) floor(py); fy = py - (cmsFloat32Number) y0;
+ z0 = (int) floor(pz); fz = pz - (cmsFloat32Number) z0;
+
+ X0 = p -> opta[2] * x0;
+ X1 = X0 + (fclamp(Input[0]) >= 1.0 ? 0 : p->opta[2]);
+
+ Y0 = p -> opta[1] * y0;
+ Y1 = Y0 + (fclamp(Input[1]) >= 1.0 ? 0 : p->opta[1]);
+
+ Z0 = p -> opta[0] * z0;
+ Z1 = Z0 + (fclamp(Input[2]) >= 1.0 ? 0 : p->opta[0]);
+
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ d000 = DENS(X0, Y0, Z0);
+ d001 = DENS(X0, Y0, Z1);
+ d010 = DENS(X0, Y1, Z0);
+ d011 = DENS(X0, Y1, Z1);
+
+ d100 = DENS(X1, Y0, Z0);
+ d101 = DENS(X1, Y0, Z1);
+ d110 = DENS(X1, Y1, Z0);
+ d111 = DENS(X1, Y1, Z1);
+
+
+ dx00 = LERP(fx, d000, d100);
+ dx01 = LERP(fx, d001, d101);
+ dx10 = LERP(fx, d010, d110);
+ dx11 = LERP(fx, d011, d111);
+
+ dxy0 = LERP(fy, dx00, dx10);
+ dxy1 = LERP(fy, dx01, dx11);
+
+ dxyz = LERP(fz, dxy0, dxy1);
+
+ Output[OutChan] = dxyz;
+ }
+
+
+# undef LERP
+# undef DENS
+}
+
+// Trilinear interpolation (16 bits) - optimized version
+static CMS_NO_SANITIZE
+void TrilinearInterp16(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const cmsInterpParams* p)
+
+{
+#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+#define LERP(a,l,h) (cmsUInt16Number) (l + ROUND_FIXED_TO_INT(((h-l)*a)))
+
+ const cmsUInt16Number* LutTable = (cmsUInt16Number*) p ->Table;
+ int OutChan, TotalOut;
+ cmsS15Fixed16Number fx, fy, fz;
+ CMSREGISTER int rx, ry, rz;
+ int x0, y0, z0;
+ CMSREGISTER int X0, X1, Y0, Y1, Z0, Z1;
+ int d000, d001, d010, d011,
+ d100, d101, d110, d111,
+ dx00, dx01, dx10, dx11,
+ dxy0, dxy1, dxyz;
+
+ TotalOut = p -> nOutputs;
+
+ fx = _cmsToFixedDomain((int) Input[0] * p -> Domain[0]);
+ x0 = FIXED_TO_INT(fx);
+ rx = FIXED_REST_TO_INT(fx); // Rest in 0..1.0 domain
+
+
+ fy = _cmsToFixedDomain((int) Input[1] * p -> Domain[1]);
+ y0 = FIXED_TO_INT(fy);
+ ry = FIXED_REST_TO_INT(fy);
+
+ fz = _cmsToFixedDomain((int) Input[2] * p -> Domain[2]);
+ z0 = FIXED_TO_INT(fz);
+ rz = FIXED_REST_TO_INT(fz);
+
+
+ X0 = p -> opta[2] * x0;
+ X1 = X0 + (Input[0] == 0xFFFFU ? 0 : p->opta[2]);
+
+ Y0 = p -> opta[1] * y0;
+ Y1 = Y0 + (Input[1] == 0xFFFFU ? 0 : p->opta[1]);
+
+ Z0 = p -> opta[0] * z0;
+ Z1 = Z0 + (Input[2] == 0xFFFFU ? 0 : p->opta[0]);
+
+ for (OutChan = 0; OutChan < TotalOut; OutChan++) {
+
+ d000 = DENS(X0, Y0, Z0);
+ d001 = DENS(X0, Y0, Z1);
+ d010 = DENS(X0, Y1, Z0);
+ d011 = DENS(X0, Y1, Z1);
+
+ d100 = DENS(X1, Y0, Z0);
+ d101 = DENS(X1, Y0, Z1);
+ d110 = DENS(X1, Y1, Z0);
+ d111 = DENS(X1, Y1, Z1);
+
+
+ dx00 = LERP(rx, d000, d100);
+ dx01 = LERP(rx, d001, d101);
+ dx10 = LERP(rx, d010, d110);
+ dx11 = LERP(rx, d011, d111);
+
+ dxy0 = LERP(ry, dx00, dx10);
+ dxy1 = LERP(ry, dx01, dx11);
+
+ dxyz = LERP(rz, dxy0, dxy1);
+
+ Output[OutChan] = (cmsUInt16Number) dxyz;
+ }
+
+
+# undef LERP
+# undef DENS
+}
+
+
+// Tetrahedral interpolation, using Sakamoto algorithm.
+#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+static
+void TetrahedralInterpFloat(const cmsFloat32Number Input[],
+ cmsFloat32Number Output[],
+ const cmsInterpParams* p)
+{
+ const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;
+ cmsFloat32Number px, py, pz;
+ int x0, y0, z0,
+ X0, Y0, Z0, X1, Y1, Z1;
+ cmsFloat32Number rx, ry, rz;
+ cmsFloat32Number c0, c1=0, c2=0, c3=0;
+ int OutChan, TotalOut;
+
+ TotalOut = p -> nOutputs;
+
+ // We need some clipping here
+ px = fclamp(Input[0]) * p->Domain[0];
+ py = fclamp(Input[1]) * p->Domain[1];
+ pz = fclamp(Input[2]) * p->Domain[2];
+
+ x0 = (int) floor(px); rx = (px - (cmsFloat32Number) x0); // We need full floor functionality here
+ y0 = (int) floor(py); ry = (py - (cmsFloat32Number) y0);
+ z0 = (int) floor(pz); rz = (pz - (cmsFloat32Number) z0);
+
+
+ X0 = p -> opta[2] * x0;
+ X1 = X0 + (fclamp(Input[0]) >= 1.0 ? 0 : p->opta[2]);
+
+ Y0 = p -> opta[1] * y0;
+ Y1 = Y0 + (fclamp(Input[1]) >= 1.0 ? 0 : p->opta[1]);
+
+ Z0 = p -> opta[0] * z0;
+ Z1 = Z0 + (fclamp(Input[2]) >= 1.0 ? 0 : p->opta[0]);
+
+ for (OutChan=0; OutChan < TotalOut; OutChan++) {
+
+ // These are the 6 Tetrahedral
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (rx >= rz && rz >= ry) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+
+ }
+ else
+ if (rz >= rx && rx >= ry) {
+
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else
+ if (ry >= rx && rx >= rz) {
+
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (ry >= rz && rz >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+
+ }
+ else
+ if (rz >= ry && ry >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+ Output[OutChan] = c0 + c1 * rx + c2 * ry + c3 * rz;
+ }
+
+}
+
+#undef DENS
+
+static CMS_NO_SANITIZE
+void TetrahedralInterp16(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const cmsInterpParams* p)
+{
+ const cmsUInt16Number* LutTable = (cmsUInt16Number*) p -> Table;
+ cmsS15Fixed16Number fx, fy, fz;
+ cmsS15Fixed16Number rx, ry, rz;
+ int x0, y0, z0;
+ cmsS15Fixed16Number c0, c1, c2, c3, Rest;
+ cmsUInt32Number X0, X1, Y0, Y1, Z0, Z1;
+ cmsUInt32Number TotalOut = p -> nOutputs;
+
+ fx = _cmsToFixedDomain((int) Input[0] * p -> Domain[0]);
+ fy = _cmsToFixedDomain((int) Input[1] * p -> Domain[1]);
+ fz = _cmsToFixedDomain((int) Input[2] * p -> Domain[2]);
+
+ x0 = FIXED_TO_INT(fx);
+ y0 = FIXED_TO_INT(fy);
+ z0 = FIXED_TO_INT(fz);
+
+ rx = FIXED_REST_TO_INT(fx);
+ ry = FIXED_REST_TO_INT(fy);
+ rz = FIXED_REST_TO_INT(fz);
+
+ X0 = p -> opta[2] * x0;
+ X1 = (Input[0] == 0xFFFFU ? 0 : p->opta[2]);
+
+ Y0 = p -> opta[1] * y0;
+ Y1 = (Input[1] == 0xFFFFU ? 0 : p->opta[1]);
+
+ Z0 = p -> opta[0] * z0;
+ Z1 = (Input[2] == 0xFFFFU ? 0 : p->opta[0]);
+
+ LutTable += X0+Y0+Z0;
+
+ // Output should be computed as x = ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest))
+ // which expands as: x = (Rest + ((Rest+0x7fff)/0xFFFF) + 0x8000)>>16
+ // This can be replaced by: t = Rest+0x8001, x = (t + (t>>16))>>16
+ // at the cost of being off by one at 7fff and 17ffe.
+
+ if (rx >= ry) {
+ if (ry >= rz) {
+ Y1 += X1;
+ Z1 += Y1;
+ for (; TotalOut; TotalOut--) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c3 -= c2;
+ c2 -= c1;
+ c1 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);
+ }
+ } else if (rz >= rx) {
+ X1 += Z1;
+ Y1 += X1;
+ for (; TotalOut; TotalOut--) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c2 -= c1;
+ c1 -= c3;
+ c3 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);
+ }
+ } else {
+ Z1 += X1;
+ Y1 += Z1;
+ for (; TotalOut; TotalOut--) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c2 -= c3;
+ c3 -= c1;
+ c1 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);
+ }
+ }
+ } else {
+ if (rx >= rz) {
+ X1 += Y1;
+ Z1 += X1;
+ for (; TotalOut; TotalOut--) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c3 -= c1;
+ c1 -= c2;
+ c2 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);
+ }
+ } else if (ry >= rz) {
+ Z1 += Y1;
+ X1 += Z1;
+ for (; TotalOut; TotalOut--) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c1 -= c3;
+ c3 -= c2;
+ c2 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);
+ }
+ } else {
+ Y1 += Z1;
+ X1 += Y1;
+ for (; TotalOut; TotalOut--) {
+ c1 = LutTable[X1];
+ c2 = LutTable[Y1];
+ c3 = LutTable[Z1];
+ c0 = *LutTable++;
+ c1 -= c2;
+ c2 -= c3;
+ c3 -= c0;
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ *Output++ = (cmsUInt16Number) c0 + ((Rest + (Rest>>16))>>16);
+ }
+ }
+ }
+}
+
+
+#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
+static CMS_NO_SANITIZE
+void Eval4Inputs(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const cmsInterpParams* p16)
+{
+ const cmsUInt16Number* LutTable;
+ cmsS15Fixed16Number fk;
+ cmsS15Fixed16Number k0, rk;
+ int K0, K1;
+ cmsS15Fixed16Number fx, fy, fz;
+ cmsS15Fixed16Number rx, ry, rz;
+ int x0, y0, z0;
+ cmsS15Fixed16Number X0, X1, Y0, Y1, Z0, Z1;
+ cmsUInt32Number i;
+ cmsS15Fixed16Number c0, c1, c2, c3, Rest;
+ cmsUInt32Number OutChan;
+ cmsUInt16Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];
+
+
+ fk = _cmsToFixedDomain((int) Input[0] * p16 -> Domain[0]);
+ fx = _cmsToFixedDomain((int) Input[1] * p16 -> Domain[1]);
+ fy = _cmsToFixedDomain((int) Input[2] * p16 -> Domain[2]);
+ fz = _cmsToFixedDomain((int) Input[3] * p16 -> Domain[3]);
+
+ k0 = FIXED_TO_INT(fk);
+ x0 = FIXED_TO_INT(fx);
+ y0 = FIXED_TO_INT(fy);
+ z0 = FIXED_TO_INT(fz);
+
+ rk = FIXED_REST_TO_INT(fk);
+ rx = FIXED_REST_TO_INT(fx);
+ ry = FIXED_REST_TO_INT(fy);
+ rz = FIXED_REST_TO_INT(fz);
+
+ K0 = p16 -> opta[3] * k0;
+ K1 = K0 + (Input[0] == 0xFFFFU ? 0 : p16->opta[3]);
+
+ X0 = p16 -> opta[2] * x0;
+ X1 = X0 + (Input[1] == 0xFFFFU ? 0 : p16->opta[2]);
+
+ Y0 = p16 -> opta[1] * y0;
+ Y1 = Y0 + (Input[2] == 0xFFFFU ? 0 : p16->opta[1]);
+
+ Z0 = p16 -> opta[0] * z0;
+ Z1 = Z0 + (Input[3] == 0xFFFFU ? 0 : p16->opta[0]);
+
+ LutTable = (cmsUInt16Number*) p16 -> Table;
+ LutTable += K0;
+
+ for (OutChan=0; OutChan < p16 -> nOutputs; OutChan++) {
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (rx >= rz && rz >= ry) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+
+ }
+ else
+ if (rz >= rx && rx >= ry) {
+
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else
+ if (ry >= rx && rx >= rz) {
+
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (ry >= rz && rz >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+
+ }
+ else
+ if (rz >= ry && ry >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+ Rest = c1 * rx + c2 * ry + c3 * rz;
+
+ Tmp1[OutChan] = (cmsUInt16Number)(c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest)));
+ }
+
+
+ LutTable = (cmsUInt16Number*) p16 -> Table;
+ LutTable += K1;
+
+ for (OutChan=0; OutChan < p16 -> nOutputs; OutChan++) {
+
+ c0 = DENS(X0, Y0, Z0);
+
+ if (rx >= ry && ry >= rz) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z0) - DENS(X1, Y0, Z0);
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (rx >= rz && rz >= ry) {
+
+ c1 = DENS(X1, Y0, Z0) - c0;
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X1, Y0, Z1) - DENS(X1, Y0, Z0);
+
+ }
+ else
+ if (rz >= rx && rx >= ry) {
+
+ c1 = DENS(X1, Y0, Z1) - DENS(X0, Y0, Z1);
+ c2 = DENS(X1, Y1, Z1) - DENS(X1, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else
+ if (ry >= rx && rx >= rz) {
+
+ c1 = DENS(X1, Y1, Z0) - DENS(X0, Y1, Z0);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X1, Y1, Z1) - DENS(X1, Y1, Z0);
+
+ }
+ else
+ if (ry >= rz && rz >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z0) - c0;
+ c3 = DENS(X0, Y1, Z1) - DENS(X0, Y1, Z0);
+
+ }
+ else
+ if (rz >= ry && ry >= rx) {
+
+ c1 = DENS(X1, Y1, Z1) - DENS(X0, Y1, Z1);
+ c2 = DENS(X0, Y1, Z1) - DENS(X0, Y0, Z1);
+ c3 = DENS(X0, Y0, Z1) - c0;
+
+ }
+ else {
+ c1 = c2 = c3 = 0;
+ }
+
+ Rest = c1 * rx + c2 * ry + c3 * rz;
+
+ Tmp2[OutChan] = (cmsUInt16Number) (c0 + ROUND_FIXED_TO_INT(_cmsToFixedDomain(Rest)));
+ }
+
+
+
+ for (i=0; i < p16 -> nOutputs; i++) {
+ Output[i] = LinearInterp(rk, Tmp1[i], Tmp2[i]);
+ }
+}
+#undef DENS
+
+
+// For more that 3 inputs (i.e., CMYK)
+// evaluate two 3-dimensional interpolations and then linearly interpolate between them.
+static
+void Eval4InputsFloat(const cmsFloat32Number Input[],
+ cmsFloat32Number Output[],
+ const cmsInterpParams* p)
+{
+ const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;
+ cmsFloat32Number rest;
+ cmsFloat32Number pk;
+ int k0, K0, K1;
+ const cmsFloat32Number* T;
+ cmsUInt32Number i;
+ cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];
+ cmsInterpParams p1;
+
+ pk = fclamp(Input[0]) * p->Domain[0];
+ k0 = _cmsQuickFloor(pk);
+ rest = pk - (cmsFloat32Number) k0;
+
+ K0 = p -> opta[3] * k0;
+ K1 = K0 + (fclamp(Input[0]) >= 1.0 ? 0 : p->opta[3]);
+
+ p1 = *p;
+ memmove(&p1.Domain[0], &p ->Domain[1], 3*sizeof(cmsUInt32Number));
+
+ T = LutTable + K0;
+ p1.Table = T;
+
+ TetrahedralInterpFloat(Input + 1, Tmp1, &p1);
+
+ T = LutTable + K1;
+ p1.Table = T;
+ TetrahedralInterpFloat(Input + 1, Tmp2, &p1);
+
+ for (i=0; i < p -> nOutputs; i++)
+ {
+ cmsFloat32Number y0 = Tmp1[i];
+ cmsFloat32Number y1 = Tmp2[i];
+
+ Output[i] = y0 + (y1 - y0) * rest;
+ }
+}
+
+#define EVAL_FNS(N,NM) static CMS_NO_SANITIZE \
+void Eval##N##Inputs(CMSREGISTER const cmsUInt16Number Input[], CMSREGISTER cmsUInt16Number Output[], CMSREGISTER const cmsInterpParams* p16)\
+{\
+ const cmsUInt16Number* LutTable = (cmsUInt16Number*) p16 -> Table;\
+ cmsS15Fixed16Number fk;\
+ cmsS15Fixed16Number k0, rk;\
+ int K0, K1;\
+ const cmsUInt16Number* T;\
+ cmsUInt32Number i;\
+ cmsUInt16Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\
+ cmsInterpParams p1;\
+\
+ fk = _cmsToFixedDomain((cmsS15Fixed16Number) Input[0] * p16 -> Domain[0]);\
+ k0 = FIXED_TO_INT(fk);\
+ rk = FIXED_REST_TO_INT(fk);\
+\
+ K0 = p16 -> opta[NM] * k0;\
+ K1 = p16 -> opta[NM] * (k0 + (Input[0] != 0xFFFFU ? 1 : 0));\
+\
+ p1 = *p16;\
+ memmove(&p1.Domain[0], &p16 ->Domain[1], NM*sizeof(cmsUInt32Number));\
+\
+ T = LutTable + K0;\
+ p1.Table = T;\
+\
+ Eval##NM##Inputs(Input + 1, Tmp1, &p1);\
+\
+ T = LutTable + K1;\
+ p1.Table = T;\
+\
+ Eval##NM##Inputs(Input + 1, Tmp2, &p1);\
+\
+ for (i=0; i < p16 -> nOutputs; i++) {\
+\
+ Output[i] = LinearInterp(rk, Tmp1[i], Tmp2[i]);\
+ }\
+}\
+\
+static void Eval##N##InputsFloat(const cmsFloat32Number Input[], \
+ cmsFloat32Number Output[],\
+ const cmsInterpParams * p)\
+{\
+ const cmsFloat32Number* LutTable = (cmsFloat32Number*) p -> Table;\
+ cmsFloat32Number rest;\
+ cmsFloat32Number pk;\
+ int k0, K0, K1;\
+ const cmsFloat32Number* T;\
+ cmsUInt32Number i;\
+ cmsFloat32Number Tmp1[MAX_STAGE_CHANNELS], Tmp2[MAX_STAGE_CHANNELS];\
+ cmsInterpParams p1;\
+\
+ pk = fclamp(Input[0]) * p->Domain[0];\
+ k0 = _cmsQuickFloor(pk);\
+ rest = pk - (cmsFloat32Number) k0;\
+\
+ K0 = p -> opta[NM] * k0;\
+ K1 = K0 + (fclamp(Input[0]) >= 1.0 ? 0 : p->opta[NM]);\
+\
+ p1 = *p;\
+ memmove(&p1.Domain[0], &p ->Domain[1], NM*sizeof(cmsUInt32Number));\
+\
+ T = LutTable + K0;\
+ p1.Table = T;\
+\
+ Eval##NM##InputsFloat(Input + 1, Tmp1, &p1);\
+\
+ T = LutTable + K1;\
+ p1.Table = T;\
+\
+ Eval##NM##InputsFloat(Input + 1, Tmp2, &p1);\
+\
+ for (i=0; i < p -> nOutputs; i++) {\
+\
+ cmsFloat32Number y0 = Tmp1[i];\
+ cmsFloat32Number y1 = Tmp2[i];\
+\
+ Output[i] = y0 + (y1 - y0) * rest;\
+ }\
+}
+
+
+/**
+* Thanks to Carles Llopis for the templating idea
+*/
+EVAL_FNS(5, 4)
+EVAL_FNS(6, 5)
+EVAL_FNS(7, 6)
+EVAL_FNS(8, 7)
+EVAL_FNS(9, 8)
+EVAL_FNS(10, 9)
+EVAL_FNS(11, 10)
+EVAL_FNS(12, 11)
+EVAL_FNS(13, 12)
+EVAL_FNS(14, 13)
+EVAL_FNS(15, 14)
+
+
+// The default factory
+static
+cmsInterpFunction DefaultInterpolatorsFactory(cmsUInt32Number nInputChannels, cmsUInt32Number nOutputChannels, cmsUInt32Number dwFlags)
+{
+
+ cmsInterpFunction Interpolation;
+ cmsBool IsFloat = (dwFlags & CMS_LERP_FLAGS_FLOAT);
+ cmsBool IsTrilinear = (dwFlags & CMS_LERP_FLAGS_TRILINEAR);
+
+ memset(&Interpolation, 0, sizeof(Interpolation));
+
+ // Safety check
+ if (nInputChannels >= 4 && nOutputChannels >= MAX_STAGE_CHANNELS)
+ return Interpolation;
+
+ switch (nInputChannels) {
+
+ case 1: // Gray LUT / linear
+
+ if (nOutputChannels == 1) {
+
+ if (IsFloat)
+ Interpolation.LerpFloat = LinLerp1Dfloat;
+ else
+ Interpolation.Lerp16 = LinLerp1D;
+
+ }
+ else {
+
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval1InputFloat;
+ else
+ Interpolation.Lerp16 = Eval1Input;
+ }
+ break;
+
+ case 2: // Duotone
+ if (IsFloat)
+ Interpolation.LerpFloat = BilinearInterpFloat;
+ else
+ Interpolation.Lerp16 = BilinearInterp16;
+ break;
+
+ case 3: // RGB et al
+
+ if (IsTrilinear) {
+
+ if (IsFloat)
+ Interpolation.LerpFloat = TrilinearInterpFloat;
+ else
+ Interpolation.Lerp16 = TrilinearInterp16;
+ }
+ else {
+
+ if (IsFloat)
+ Interpolation.LerpFloat = TetrahedralInterpFloat;
+ else {
+
+ Interpolation.Lerp16 = TetrahedralInterp16;
+ }
+ }
+ break;
+
+ case 4: // CMYK lut
+
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval4InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval4Inputs;
+ break;
+
+ case 5: // 5 Inks
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval5InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval5Inputs;
+ break;
+
+ case 6: // 6 Inks
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval6InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval6Inputs;
+ break;
+
+ case 7: // 7 inks
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval7InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval7Inputs;
+ break;
+
+ case 8: // 8 inks
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval8InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval8Inputs;
+ break;
+
+ case 9:
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval9InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval9Inputs;
+ break;
+
+ case 10:
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval10InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval10Inputs;
+ break;
+
+ case 11:
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval11InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval11Inputs;
+ break;
+
+ case 12:
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval12InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval12Inputs;
+ break;
+
+ case 13:
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval13InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval13Inputs;
+ break;
+
+ case 14:
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval14InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval14Inputs;
+ break;
+
+ case 15:
+ if (IsFloat)
+ Interpolation.LerpFloat = Eval15InputsFloat;
+ else
+ Interpolation.Lerp16 = Eval15Inputs;
+ break;
+
+ default:
+ Interpolation.Lerp16 = NULL;
+ }
+
+ return Interpolation;
+}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
return iohandler;
-Error:
- if (fm) _cmsFree(ContextID, fm);
+Error:
if (iohandler) _cmsFree(ContextID, iohandler);
return NULL;
{
FILEMEM* ResData = (FILEMEM*) iohandler ->stream;
- if (ResData == NULL) return 0;
+ if (ResData == NULL) return 0;
return ResData -> Pointer;
}
// Writes data to memory, also keeps used space for further reference.
static
-cmsBool MemoryWrite(struct _cms_io_handler* iohandler, cmsUInt32Number size, const void *Ptr)
+cmsBool MemoryWrite(struct _cms_io_handler* iohandler, cmsUInt32Number size, const void *Ptr)
{
FILEMEM* ResData = (FILEMEM*) iohandler ->stream;
- if (ResData == NULL) return FALSE; // Housekeeping
+ if (ResData == NULL) return FALSE; // Housekeeping
+ // Check for available space. Clip.
+ if (ResData->Pointer + size > ResData->Size) {
+ size = ResData ->Size - ResData->Pointer;
+ }
+
if (size == 0) return TRUE; // Write zero bytes is ok, but does nothing
memmove(ResData ->Block + ResData ->Pointer, Ptr, size);
ResData ->Pointer += size;
- iohandler->UsedSpace += size;
if (ResData ->Pointer > iohandler->UsedSpace)
iohandler->UsedSpace = ResData ->Pointer;
// Create a iohandler for memory block. AccessMode=='r' assumes the iohandler is going to read, and makes
// a copy of the memory block for letting user to free the memory after invoking open profile. In write
-// mode ("w"), Buffere points to the begin of memory block to be written.
+// mode ("w"), Buffer points to the begin of memory block to be written.
cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromMem(cmsContext ContextID, void *Buffer, cmsUInt32Number size, const char* AccessMode)
{
cmsIOHANDLER* iohandler = NULL;
FILEMEM* fm = NULL;
- _cmsAssert(AccessMode != NULL);
+ _cmsAssert(AccessMode != NULL);
iohandler = (cmsIOHANDLER*) _cmsMallocZero(ContextID, sizeof(cmsIOHANDLER));
if (iohandler == NULL) return NULL;
_cmsFree(ContextID, fm);
_cmsFree(ContextID, iohandler);
- cmsSignalError(ContextID, cmsERROR_READ, "Couldn't allocate %ld bytes for profile", size);
+ cmsSignalError(ContextID, cmsERROR_READ, "Couldn't allocate %ld bytes for profile", (long) size);
return NULL;
}
return nReaded;
}
-// Postion file pointer in the file
+// Position file pointer in the file
static
cmsBool FileSeek(cmsIOHANDLER* iohandler, cmsUInt32Number offset)
{
return TRUE;
}
-// Returns file pointer position
+// Returns file pointer position or 0 on error, which is also a valid position.
static
cmsUInt32Number FileTell(cmsIOHANDLER* iohandler)
{
- return ftell((FILE*)iohandler ->stream);
+ long t = ftell((FILE*)iohandler ->stream);
+ if (t == -1L) {
+ cmsSignalError(iohandler->ContextID, cmsERROR_FILE, "Tell error; probably corrupted file");
+ return 0;
+ }
+
+ return (cmsUInt32Number)t;
}
// Writes data to stream, also keeps used space for further reference. Returns TRUE on success, FALSE on error
static
cmsBool FileWrite(cmsIOHANDLER* iohandler, cmsUInt32Number size, const void* Buffer)
{
- if (size == 0) return TRUE; // We allow to write 0 bytes, but nothing is written
+ if (size == 0) return TRUE; // We allow to write 0 bytes, but nothing is written
- iohandler->UsedSpace += size;
- return (fwrite(Buffer, size, 1, (FILE*) iohandler->stream) == 1);
+ iohandler->UsedSpace += size;
+ return (fwrite(Buffer, size, 1, (FILE*)iohandler->stream) == 1);
}
// Closes the file
return TRUE;
}
-// Create a iohandler for disk based files. if FileName is NULL, then 'stream' member is also set
-// to NULL and no real writting is performed. This only happens in writting access mode
+// Create a iohandler for disk based files.
cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromFile(cmsContext ContextID, const char* FileName, const char* AccessMode)
{
cmsIOHANDLER* iohandler = NULL;
FILE* fm = NULL;
+ cmsInt32Number fileLen;
+
+ _cmsAssert(FileName != NULL);
+ _cmsAssert(AccessMode != NULL);
iohandler = (cmsIOHANDLER*) _cmsMallocZero(ContextID, sizeof(cmsIOHANDLER));
if (iohandler == NULL) return NULL;
_cmsFree(ContextID, iohandler);
cmsSignalError(ContextID, cmsERROR_FILE, "File '%s' not found", FileName);
return NULL;
+ }
+ fileLen = cmsfilelength(fm);
+ if (fileLen < 0)
+ {
+ fclose(fm);
+ _cmsFree(ContextID, iohandler);
+ cmsSignalError(ContextID, cmsERROR_FILE, "Cannot get size of file '%s'", FileName);
+ return NULL;
}
- iohandler -> ReportedSize = cmsfilelength(fm);
+
+ iohandler -> ReportedSize = (cmsUInt32Number) fileLen;
break;
case 'w':
iohandler ->stream = (void*) fm;
iohandler ->UsedSpace = 0;
- // Keep track of the original file
- if (FileName != NULL) {
-
- strncpy(iohandler -> PhysicalFile, FileName, sizeof(iohandler -> PhysicalFile)-1);
- iohandler -> PhysicalFile[sizeof(iohandler -> PhysicalFile)-1] = 0;
- }
+ // Keep track of the original file
+ strncpy(iohandler -> PhysicalFile, FileName, sizeof(iohandler -> PhysicalFile)-1);
+ iohandler -> PhysicalFile[sizeof(iohandler -> PhysicalFile)-1] = 0;
iohandler ->Read = FileRead;
iohandler ->Seek = FileSeek;
cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromStream(cmsContext ContextID, FILE* Stream)
{
cmsIOHANDLER* iohandler = NULL;
+ cmsInt32Number fileSize;
+
+ fileSize = cmsfilelength(Stream);
+ if (fileSize < 0)
+ {
+ cmsSignalError(ContextID, cmsERROR_FILE, "Cannot get size of stream");
+ return NULL;
+ }
iohandler = (cmsIOHANDLER*) _cmsMallocZero(ContextID, sizeof(cmsIOHANDLER));
if (iohandler == NULL) return NULL;
iohandler -> ContextID = ContextID;
iohandler -> stream = (void*) Stream;
iohandler -> UsedSpace = 0;
- iohandler -> ReportedSize = cmsfilelength(Stream);
+ iohandler -> ReportedSize = (cmsUInt32Number) fileSize;
iohandler -> PhysicalFile[0] = 0;
iohandler ->Read = FileRead;
// -------------------------------------------------------------------------------------------------------
+cmsIOHANDLER* CMSEXPORT cmsGetProfileIOhandler(cmsHPROFILE hProfile)
+{
+ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*)hProfile;
+
+ if (Icc == NULL) return NULL;
+ return Icc->IOhandler;
+}
+
// Creates an empty structure holding all required parameters
cmsHPROFILE CMSEXPORT cmsCreateProfilePlaceholder(cmsContext ContextID)
{
// Set creation date/time
memmove(&Icc ->Created, gmtime(&now), sizeof(Icc ->Created));
+ // Create a mutex if the user provided proper plugin. NULL otherwise
+ Icc ->UsrMutex = _cmsCreateMutex(ContextID);
+
// Return the handle
return (cmsHPROFILE) Icc;
}
cmsInt32Number CMSEXPORT cmsGetTagCount(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
- if (Icc == NULL) return -1;
+ if (Icc == NULL) return -1;
- return Icc->TagCount;
+ return (cmsInt32Number) Icc->TagCount;
}
// Return the tag signature of a given tag number
static
int SearchOneTag(_cmsICCPROFILE* Profile, cmsTagSignature sig)
{
- cmsUInt32Number i;
+ int i;
- for (i=0; i < Profile -> TagCount; i++) {
+ for (i=0; i < (int) Profile -> TagCount; i++) {
- if (sig == Profile -> TagNames[i])
- return i;
- }
+ if (sig == Profile -> TagNames[i])
+ return i;
+ }
- return -1;
+ return -1;
}
// Search for a specific tag in tag dictionary. Returns position or -1 if tag not found.
// If followlinks is turned on, then the position of the linked tag is returned
int _cmsSearchTag(_cmsICCPROFILE* Icc, cmsTagSignature sig, cmsBool lFollowLinks)
{
- int n;
- cmsTagSignature LinkedSig;
+ int n;
+ cmsTagSignature LinkedSig;
- do {
+ do {
- // Search for given tag in ICC profile directory
- n = SearchOneTag(Icc, sig);
- if (n < 0)
- return -1; // Not found
+ // Search for given tag in ICC profile directory
+ n = SearchOneTag(Icc, sig);
+ if (n < 0)
+ return -1; // Not found
- if (!lFollowLinks)
- return n; // Found, don't follow links
+ if (!lFollowLinks)
+ return n; // Found, don't follow links
- // Is this a linked tag?
- LinkedSig = Icc ->TagLinked[n];
+ // Is this a linked tag?
+ LinkedSig = Icc ->TagLinked[n];
- // Yes, follow link
- if (LinkedSig != (cmsTagSignature) 0) {
- sig = LinkedSig;
- }
+ // Yes, follow link
+ if (LinkedSig != (cmsTagSignature) 0) {
+ sig = LinkedSig;
+ }
- } while (LinkedSig != (cmsTagSignature) 0);
+ } while (LinkedSig != (cmsTagSignature) 0);
- return n;
+ return n;
}
+// Deletes a tag entry
+
+static
+void _cmsDeleteTagByPos(_cmsICCPROFILE* Icc, int i)
+{
+ _cmsAssert(Icc != NULL);
+ _cmsAssert(i >= 0);
+
+
+ if (Icc -> TagPtrs[i] != NULL) {
-// Create a new tag entry
+ // Free previous version
+ if (Icc ->TagSaveAsRaw[i]) {
+ _cmsFree(Icc ->ContextID, Icc ->TagPtrs[i]);
+ }
+ else {
+ cmsTagTypeHandler* TypeHandler = Icc ->TagTypeHandlers[i];
+ if (TypeHandler != NULL) {
+
+ cmsTagTypeHandler LocalTypeHandler = *TypeHandler;
+ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameter
+ LocalTypeHandler.ICCVersion = Icc ->Version;
+ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]);
+ Icc ->TagPtrs[i] = NULL;
+ }
+ }
+
+ }
+}
+
+
+// Creates a new tag entry
static
cmsBool _cmsNewTag(_cmsICCPROFILE* Icc, cmsTagSignature sig, int* NewPos)
{
- int i;
+ int i;
- // Search for the tag
+ // Search for the tag
i = _cmsSearchTag(Icc, sig, FALSE);
-
- // Now let's do it easy. If the tag has been already written, that's an error
if (i >= 0) {
- cmsSignalError(Icc ->ContextID, cmsERROR_ALREADY_DEFINED, "Tag '%x' already exists", sig);
- return FALSE;
+
+ // Already exists? delete it
+ _cmsDeleteTagByPos(Icc, i);
+ *NewPos = i;
}
else {
- // New one
-
+ // No, make a new one
if (Icc -> TagCount >= MAX_TABLE_TAG) {
cmsSignalError(Icc ->ContextID, cmsERROR_RANGE, "Too many tags (%d)", MAX_TABLE_TAG);
return FALSE;
}
- *NewPos = Icc ->TagCount;
+ *NewPos = (int) Icc ->TagCount;
Icc -> TagCount++;
}
- return TRUE;
+ return TRUE;
}
-// Check existance
+// Check existence
cmsBool CMSEXPORT cmsIsTag(cmsHPROFILE hProfile, cmsTagSignature sig)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) (void*) hProfile;
return _cmsSearchTag(Icc, sig, FALSE) >= 0;
}
+// Enforces that the profile version is per. spec.
+// Operates on the big endian bytes from the profile.
+// Called before converting to platform endianness.
+// Byte 0 is BCD major version, so max 9.
+// Byte 1 is 2 BCD digits, one per nibble.
+// Reserved bytes 2 & 3 must be 0.
+static
+cmsUInt32Number _validatedVersion(cmsUInt32Number DWord)
+{
+ cmsUInt8Number* pByte = (cmsUInt8Number*) &DWord;
+ cmsUInt8Number temp1;
+ cmsUInt8Number temp2;
+
+ if (*pByte > 0x09) *pByte = (cmsUInt8Number) 0x09;
+ temp1 = (cmsUInt8Number) (*(pByte+1) & 0xf0);
+ temp2 = (cmsUInt8Number) (*(pByte+1) & 0x0f);
+ if (temp1 > 0x90U) temp1 = 0x90U;
+ if (temp2 > 0x09U) temp2 = 0x09U;
+ *(pByte+1) = (cmsUInt8Number)(temp1 | temp2);
+ *(pByte+2) = (cmsUInt8Number)0;
+ *(pByte+3) = (cmsUInt8Number)0;
+
+ return DWord;
+}
// Read profile header and validate it
cmsBool _cmsReadHeader(_cmsICCPROFILE* Icc)
return FALSE;
}
- // Adjust endianess of the used parameters
+ // Adjust endianness of the used parameters
Icc -> DeviceClass = (cmsProfileClassSignature) _cmsAdjustEndianess32(Header.deviceClass);
Icc -> ColorSpace = (cmsColorSpaceSignature) _cmsAdjustEndianess32(Header.colorSpace);
Icc -> PCS = (cmsColorSpaceSignature) _cmsAdjustEndianess32(Header.pcs);
+
Icc -> RenderingIntent = _cmsAdjustEndianess32(Header.renderingIntent);
Icc -> flags = _cmsAdjustEndianess32(Header.flags);
Icc -> manufacturer = _cmsAdjustEndianess32(Header.manufacturer);
Icc -> model = _cmsAdjustEndianess32(Header.model);
+ Icc -> creator = _cmsAdjustEndianess32(Header.creator);
+
_cmsAdjustEndianess64(&Icc -> attributes, &Header.attributes);
- Icc -> Version = _cmsAdjustEndianess32(Header.version);
+ Icc -> Version = _cmsAdjustEndianess32(_validatedVersion(Header.version));
// Get size as reported in header
HeaderSize = _cmsAdjustEndianess32(Header.size);
cmsICCHeader Header;
cmsUInt32Number i;
cmsTagEntry Tag;
- cmsInt32Number Count = 0;
+ cmsUInt32Number Count;
Header.size = _cmsAdjustEndianess32(UsedSpace);
Header.cmmId = _cmsAdjustEndianess32(lcmsSignature);
Header.renderingIntent = _cmsAdjustEndianess32(Icc -> RenderingIntent);
// Illuminant is always D50
- Header.illuminant.X = _cmsAdjustEndianess32(_cmsDoubleTo15Fixed16(cmsD50_XYZ()->X));
- Header.illuminant.Y = _cmsAdjustEndianess32(_cmsDoubleTo15Fixed16(cmsD50_XYZ()->Y));
- Header.illuminant.Z = _cmsAdjustEndianess32(_cmsDoubleTo15Fixed16(cmsD50_XYZ()->Z));
+ Header.illuminant.X = (cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) _cmsDoubleTo15Fixed16(cmsD50_XYZ()->X));
+ Header.illuminant.Y = (cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) _cmsDoubleTo15Fixed16(cmsD50_XYZ()->Y));
+ Header.illuminant.Z = (cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) _cmsDoubleTo15Fixed16(cmsD50_XYZ()->Z));
// Created by LittleCMS (that's me!)
Header.creator = _cmsAdjustEndianess32(lcmsSignature);
memset(&Header.reserved, 0, sizeof(Header.reserved));
- // Set profile ID. Endianess is always big endian
+ // Set profile ID. Endianness is always big endian
memmove(&Header.profileID, &Icc ->ProfileID, 16);
// Dump the header
// Saves Tag directory
// Get true count
+ Count = 0;
for (i=0; i < Icc -> TagCount; i++) {
- if (Icc ->TagNames[i] != 0)
+ if (Icc ->TagNames[i] != (cmsTagSignature) 0)
Count++;
}
for (i=0; i < Icc -> TagCount; i++) {
- if (Icc ->TagNames[i] == 0) continue; // It is just a placeholder
+ if (Icc ->TagNames[i] == (cmsTagSignature) 0) continue; // It is just a placeholder
- Tag.sig = (cmsTagSignature) _cmsAdjustEndianess32((cmsInt32Number) Icc -> TagNames[i]);
- Tag.offset = _cmsAdjustEndianess32((cmsInt32Number) Icc -> TagOffsets[i]);
- Tag.size = _cmsAdjustEndianess32((cmsInt32Number) Icc -> TagSizes[i]);
+ Tag.sig = (cmsTagSignature) _cmsAdjustEndianess32((cmsUInt32Number) Icc -> TagNames[i]);
+ Tag.offset = _cmsAdjustEndianess32((cmsUInt32Number) Icc -> TagOffsets[i]);
+ Tag.size = _cmsAdjustEndianess32((cmsUInt32Number) Icc -> TagSizes[i]);
if (!Icc ->IOhandler -> Write(Icc-> IOhandler, sizeof(cmsTagEntry), &Tag)) return FALSE;
}
cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
- return (cmsUInt32Number) Icc ->manufacturer;
+ return Icc ->manufacturer;
}
void CMSEXPORT cmsSetHeaderManufacturer(cmsHPROFILE hProfile, cmsUInt32Number manufacturer)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
- Icc -> manufacturer = (cmsUInt32Number) manufacturer;
+ Icc -> manufacturer = manufacturer;
+}
+
+cmsUInt32Number CMSEXPORT cmsGetHeaderCreator(cmsHPROFILE hProfile)
+{
+ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
+ return Icc ->creator;
}
cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
- return (cmsUInt32Number) Icc ->model;
+ return Icc ->model;
}
void CMSEXPORT cmsSetHeaderModel(cmsHPROFILE hProfile, cmsUInt32Number model)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
- Icc -> model = (cmsUInt32Number) model;
+ Icc -> model = model;
}
-
void CMSEXPORT cmsGetHeaderAttributes(cmsHPROFILE hProfile, cmsUInt64Number* Flags)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
// 4.2 -> 0x4200000
- Icc -> Version = BaseToBase((cmsUInt32Number) floor(Version * 100.0), 10, 16) << 16;
+ Icc -> Version = BaseToBase((cmsUInt32Number) floor(Version * 100.0 + 0.5), 10, 16) << 16;
}
cmsFloat64Number CMSEXPORT cmsGetProfileVersion(cmsHPROFILE hProfile)
return NULL;
}
+// Create profile from IOhandler
+cmsHPROFILE CMSEXPORT cmsOpenProfileFromIOhandler2THR(cmsContext ContextID, cmsIOHANDLER* io, cmsBool write)
+{
+ _cmsICCPROFILE* NewIcc;
+ cmsHPROFILE hEmpty = cmsCreateProfilePlaceholder(ContextID);
+
+ if (hEmpty == NULL) return NULL;
+
+ NewIcc = (_cmsICCPROFILE*) hEmpty;
+
+ NewIcc ->IOhandler = io;
+ if (write) {
+
+ NewIcc -> IsWrite = TRUE;
+ return hEmpty;
+ }
+
+ if (!_cmsReadHeader(NewIcc)) goto Error;
+ return hEmpty;
+
+Error:
+ cmsCloseProfile(hEmpty);
+ return NULL;
+}
+
+
// Create profile from disk file
cmsHPROFILE CMSEXPORT cmsOpenProfileFromFileTHR(cmsContext ContextID, const char *lpFileName, const char *sAccess)
{
NewIcc = (_cmsICCPROFILE*) hEmpty;
- // Ok, in this case const void* is casted to void* just because open IO handler
- // shares read and writting modes. Don't abuse this feature!
+ // Ok, in this case const void* is casted to void* just because open IO handler
+ // shares read and writing modes. Don't abuse this feature!
NewIcc ->IOhandler = cmsOpenIOhandlerFromMem(ContextID, (void*) MemPtr, dwSize, "r");
if (NewIcc ->IOhandler == NULL) goto Error;
cmsIOHANDLER* io = Icc ->IOhandler;
cmsTagDescriptor* TagDescriptor;
cmsTagTypeSignature TypeBase;
+ cmsTagTypeSignature Type;
cmsTagTypeHandler* TypeHandler;
-
+ cmsFloat64Number Version = cmsGetProfileVersion((cmsHPROFILE) Icc);
+ cmsTagTypeHandler LocalTypeHandler;
for (i=0; i < Icc -> TagCount; i++) {
-
- if (Icc ->TagNames[i] == 0) continue;
+ if (Icc ->TagNames[i] == (cmsTagSignature) 0) continue;
// Linked tags are not written
if (Icc ->TagLinked[i] != (cmsTagSignature) 0) continue;
// In this case a blind copy of the block data is performed
if (FileOrig != NULL && Icc -> TagOffsets[i]) {
- cmsUInt32Number TagSize = FileOrig -> TagSizes[i];
- cmsUInt32Number TagOffset = FileOrig -> TagOffsets[i];
- void* Mem;
+ if (FileOrig->IOhandler != NULL)
+ {
+ cmsUInt32Number TagSize = FileOrig->TagSizes[i];
+ cmsUInt32Number TagOffset = FileOrig->TagOffsets[i];
+ void* Mem;
- if (!FileOrig ->IOhandler->Seek(FileOrig ->IOhandler, TagOffset)) return FALSE;
+ if (!FileOrig->IOhandler->Seek(FileOrig->IOhandler, TagOffset)) return FALSE;
- Mem = _cmsMalloc(Icc ->ContextID, TagSize);
- if (Mem == NULL) return FALSE;
+ Mem = _cmsMalloc(Icc->ContextID, TagSize);
+ if (Mem == NULL) return FALSE;
- if (FileOrig ->IOhandler->Read(FileOrig->IOhandler, Mem, TagSize, 1) != 1) return FALSE;
- if (!io ->Write(io, TagSize, Mem)) return FALSE;
- _cmsFree(Icc ->ContextID, Mem);
+ if (FileOrig->IOhandler->Read(FileOrig->IOhandler, Mem, TagSize, 1) != 1) return FALSE;
+ if (!io->Write(io, TagSize, Mem)) return FALSE;
+ _cmsFree(Icc->ContextID, Mem);
- Icc -> TagSizes[i] = (io ->UsedSpace - Begin);
+ Icc->TagSizes[i] = (io->UsedSpace - Begin);
- // Align to 32 bit boundary.
- if (! _cmsWriteAlignment(io))
- return FALSE;
+ // Align to 32 bit boundary.
+ if (!_cmsWriteAlignment(io))
+ return FALSE;
+ }
}
continue;
else {
// Search for support on this tag
- TagDescriptor = _cmsGetTagDescriptor(Icc -> TagNames[i]);
+ TagDescriptor = _cmsGetTagDescriptor(Icc-> ContextID, Icc -> TagNames[i]);
if (TagDescriptor == NULL) continue; // Unsupported, ignore it
+
+ if (TagDescriptor ->DecideType != NULL) {
- TypeHandler = Icc ->TagTypeHandlers[i];
+ Type = TagDescriptor ->DecideType(Version, Data);
+ }
+ else {
+
+ Type = TagDescriptor ->SupportedTypes[0];
+ }
+
+ TypeHandler = _cmsGetTagTypeHandler(Icc->ContextID, Type);
if (TypeHandler == NULL) {
cmsSignalError(Icc ->ContextID, cmsERROR_INTERNAL, "(Internal) no handler for tag %x", Icc -> TagNames[i]);
if (!_cmsWriteTypeBase(io, TypeBase))
return FALSE;
- TypeHandler ->ContextID = Icc ->ContextID;
- TypeHandler ->ICCVersion = Icc ->Version;
- if (!TypeHandler ->WritePtr(TypeHandler, io, Data, TagDescriptor ->ElemCount)) {
+ LocalTypeHandler = *TypeHandler;
+ LocalTypeHandler.ContextID = Icc ->ContextID;
+ LocalTypeHandler.ICCVersion = Icc ->Version;
+ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, io, Data, TagDescriptor ->ElemCount)) {
- char String[5];
+ char String[5];
- _cmsTagSignature2String(String, (cmsTagSignature) TypeBase);
+ _cmsTagSignature2String(String, (cmsTagSignature) TypeBase);
cmsSignalError(Icc ->ContextID, cmsERROR_WRITE, "Couldn't write type '%s'", String);
return FALSE;
}
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
_cmsICCPROFILE Keep;
- cmsIOHANDLER* PrevIO;
+ cmsIOHANDLER* PrevIO = NULL;
cmsUInt32Number UsedSpace;
cmsContext ContextID;
+ _cmsAssert(hProfile != NULL);
+
+ if (!_cmsLockMutex(Icc->ContextID, Icc->UsrMutex)) return 0;
memmove(&Keep, Icc, sizeof(_cmsICCPROFILE));
ContextID = cmsGetProfileContextID(hProfile);
PrevIO = Icc ->IOhandler = cmsOpenIOhandlerFromNULL(ContextID);
- if (PrevIO == NULL) return 0;
+ if (PrevIO == NULL) {
+ _cmsUnlockMutex(Icc->ContextID, Icc->UsrMutex);
+ return 0;
+ }
// Pass #1 does compute offsets
- if (!_cmsWriteHeader(Icc, 0)) return 0;
- if (!SaveTags(Icc, &Keep)) return 0;
+ if (!_cmsWriteHeader(Icc, 0)) goto Error;
+ if (!SaveTags(Icc, &Keep)) goto Error;
UsedSpace = PrevIO ->UsedSpace;
// Pass #2 does save to iohandler
if (io != NULL) {
+
Icc ->IOhandler = io;
- if (!SetLinks(Icc)) goto CleanUp;
- if (!_cmsWriteHeader(Icc, UsedSpace)) goto CleanUp;
- if (!SaveTags(Icc, &Keep)) goto CleanUp;
+ if (!SetLinks(Icc)) goto Error;
+ if (!_cmsWriteHeader(Icc, UsedSpace)) goto Error;
+ if (!SaveTags(Icc, &Keep)) goto Error;
}
memmove(Icc, &Keep, sizeof(_cmsICCPROFILE));
- if (!cmsCloseIOhandler(PrevIO)) return 0;
+ if (!cmsCloseIOhandler(PrevIO))
+ UsedSpace = 0; // As a error marker
+
+ _cmsUnlockMutex(Icc->ContextID, Icc->UsrMutex);
return UsedSpace;
-CleanUp:
+Error:
cmsCloseIOhandler(PrevIO);
memmove(Icc, &Keep, sizeof(_cmsICCPROFILE));
+ _cmsUnlockMutex(Icc->ContextID, Icc->UsrMutex);
+
return 0;
}
cmsIOHANDLER* io;
cmsContext ContextID = cmsGetProfileContextID(hProfile);
+ _cmsAssert(BytesNeeded != NULL);
+
// Should we just calculate the needed space?
if (MemPtr == NULL) {
*BytesNeeded = cmsSaveProfileToIOhandler(hProfile, NULL);
- return TRUE;
+ return (*BytesNeeded == 0) ? FALSE : TRUE;
}
// That is a real write operation
// Was open in write mode?
if (Icc ->IsWrite) {
- Icc ->IsWrite = FALSE; // Assure no further writting
+ Icc ->IsWrite = FALSE; // Assure no further writing
rc &= cmsSaveProfileToFile(hProfile, Icc ->IOhandler->PhysicalFile);
}
cmsTagTypeHandler* TypeHandler = Icc ->TagTypeHandlers[i];
if (TypeHandler != NULL) {
+ cmsTagTypeHandler LocalTypeHandler = *TypeHandler;
- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameters
- TypeHandler ->ICCVersion = Icc ->Version;
- TypeHandler ->FreePtr(TypeHandler, Icc -> TagPtrs[i]);
+ LocalTypeHandler.ContextID = Icc ->ContextID; // As an additional parameters
+ LocalTypeHandler.ICCVersion = Icc ->Version;
+ LocalTypeHandler.FreePtr(&LocalTypeHandler, Icc -> TagPtrs[i]);
}
else
_cmsFree(Icc ->ContextID, Icc ->TagPtrs[i]);
rc &= cmsCloseIOhandler(Icc->IOhandler);
}
+ _cmsDestroyMutex(Icc->ContextID, Icc->UsrMutex);
+
_cmsFree(Icc ->ContextID, Icc); // Free placeholder memory
return rc;
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
cmsIOHANDLER* io = Icc ->IOhandler;
cmsTagTypeHandler* TypeHandler;
+ cmsTagTypeHandler LocalTypeHandler;
cmsTagDescriptor* TagDescriptor;
cmsTagTypeSignature BaseType;
cmsUInt32Number Offset, TagSize;
cmsUInt32Number ElemCount;
int n;
- n = _cmsSearchTag(Icc, sig, TRUE);
- if (n < 0) return NULL; // Not found, return NULL
+ if (!_cmsLockMutex(Icc->ContextID, Icc ->UsrMutex)) return NULL;
+
+ n = _cmsSearchTag(Icc, sig, TRUE);
+ if (n < 0) goto Error; // Not found, return NULL
+
+
+ // If the element is already in memory, return the pointer
+ if (Icc -> TagPtrs[n]) {
+
+ if (Icc->TagTypeHandlers[n] == NULL) goto Error;
+
+ // Sanity check
+ BaseType = Icc->TagTypeHandlers[n]->Signature;
+ if (BaseType == 0) goto Error;
+ TagDescriptor = _cmsGetTagDescriptor(Icc->ContextID, sig);
+ if (TagDescriptor == NULL) goto Error;
- // If the element is already in memory, return the pointer
- if (Icc -> TagPtrs[n]) {
+ if (!IsTypeSupported(TagDescriptor, BaseType)) goto Error;
- if (Icc ->TagSaveAsRaw[n]) return NULL; // We don't support read raw tags as cooked
- return Icc -> TagPtrs[n];
- }
+ if (Icc ->TagSaveAsRaw[n]) goto Error; // We don't support read raw tags as cooked
- // We need to read it. Get the offset and size to the file
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return Icc -> TagPtrs[n];
+ }
+
+ // We need to read it. Get the offset and size to the file
Offset = Icc -> TagOffsets[n];
TagSize = Icc -> TagSizes[n];
+ if (TagSize < 8) goto Error;
+
// Seek to its location
if (!io -> Seek(io, Offset))
- return NULL;
+ goto Error;
// Search for support on this tag
- TagDescriptor = _cmsGetTagDescriptor(sig);
- if (TagDescriptor == NULL) return NULL; // Unsupported.
+ TagDescriptor = _cmsGetTagDescriptor(Icc-> ContextID, sig);
+ if (TagDescriptor == NULL) {
+
+ char String[5];
+
+ _cmsTagSignature2String(String, sig);
+
+ // An unknown element was found.
+ cmsSignalError(Icc ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown tag type '%s' found.", String);
+ goto Error; // Unsupported.
+ }
// if supported, get type and check if in list
BaseType = _cmsReadTypeBase(io);
- if (BaseType == 0) return NULL;
+ if (BaseType == 0) goto Error;
- if (!IsTypeSupported(TagDescriptor, BaseType)) return NULL;
-
- TagSize -= 8; // Alredy read by the type base logic
+ if (!IsTypeSupported(TagDescriptor, BaseType)) goto Error;
+
+ TagSize -= 8; // Already read by the type base logic
// Get type handler
- TypeHandler = _cmsGetTagTypeHandler(BaseType);
- if (TypeHandler == NULL) return NULL;
+ TypeHandler = _cmsGetTagTypeHandler(Icc ->ContextID, BaseType);
+ if (TypeHandler == NULL) goto Error;
+ LocalTypeHandler = *TypeHandler;
// Read the tag
Icc -> TagTypeHandlers[n] = TypeHandler;
- TypeHandler ->ContextID = Icc ->ContextID;
- TypeHandler ->ICCVersion = Icc ->Version;
- Icc -> TagPtrs[n] = TypeHandler ->ReadPtr(TypeHandler, io, &ElemCount, TagSize);
+ LocalTypeHandler.ContextID = Icc ->ContextID;
+ LocalTypeHandler.ICCVersion = Icc ->Version;
+ Icc -> TagPtrs[n] = LocalTypeHandler.ReadPtr(&LocalTypeHandler, io, &ElemCount, TagSize);
- // The tag type is supported, but something wrong happend and we cannot read the tag.
+ // The tag type is supported, but something wrong happened and we cannot read the tag.
// let know the user about this (although it is just a warning)
if (Icc -> TagPtrs[n] == NULL) {
_cmsTagSignature2String(String, sig);
cmsSignalError(Icc ->ContextID, cmsERROR_CORRUPTION_DETECTED, "Corrupted tag '%s'", String);
- return NULL;
+ goto Error;
}
// This is a weird error that may be a symptom of something more serious, the number of
_cmsTagSignature2String(String, sig);
cmsSignalError(Icc ->ContextID, cmsERROR_CORRUPTION_DETECTED, "'%s' Inconsistent number of items: expected %d, got %d",
- String, TagDescriptor ->ElemCount, ElemCount);
+ String, TagDescriptor ->ElemCount, ElemCount);
+ goto Error;
}
// Return the data
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
return Icc -> TagPtrs[n];
+
+
+ // Return error and unlock tha data
+Error:
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return NULL;
}
// Get true type of data
cmsTagTypeSignature _cmsGetTagTrueType(cmsHPROFILE hProfile, cmsTagSignature sig)
{
- _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
- cmsTagTypeHandler* TypeHandler;
- int n;
+ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
+ cmsTagTypeHandler* TypeHandler;
+ int n;
- // Search for given tag in ICC profile directory
- n = _cmsSearchTag(Icc, sig, TRUE);
- if (n < 0) return (cmsTagTypeSignature) 0; // Not found, return NULL
+ // Search for given tag in ICC profile directory
+ n = _cmsSearchTag(Icc, sig, TRUE);
+ if (n < 0) return (cmsTagTypeSignature) 0; // Not found, return NULL
- // Get the handler. The true type is there
- TypeHandler = Icc -> TagTypeHandlers[n];
- return TypeHandler ->Signature;
+ // Get the handler. The true type is there
+ TypeHandler = Icc -> TagTypeHandlers[n];
+ return TypeHandler ->Signature;
}
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
cmsTagTypeHandler* TypeHandler = NULL;
+ cmsTagTypeHandler LocalTypeHandler;
cmsTagDescriptor* TagDescriptor = NULL;
cmsTagTypeSignature Type;
int i;
cmsFloat64Number Version;
char TypeString[5], SigString[5];
+ if (!_cmsLockMutex(Icc->ContextID, Icc ->UsrMutex)) return FALSE;
+ // To delete tags.
if (data == NULL) {
+ // Delete the tag
i = _cmsSearchTag(Icc, sig, FALSE);
- if (i >= 0)
+ if (i >= 0) {
+
+ // Use zero as a mark of deleted
+ _cmsDeleteTagByPos(Icc, i);
Icc ->TagNames[i] = (cmsTagSignature) 0;
- // Unsupported by now, reserved for future ampliations (delete)
- return FALSE;
- }
-
- i = _cmsSearchTag(Icc, sig, FALSE);
- if (i >=0) {
-
- if (Icc -> TagPtrs[i] != NULL) {
-
- // Already exists. Free previous version
- if (Icc ->TagSaveAsRaw[i]) {
- _cmsFree(Icc ->ContextID, Icc ->TagPtrs[i]);
- }
- else {
- TypeHandler = Icc ->TagTypeHandlers[i];
-
- if (TypeHandler != NULL) {
-
- TypeHandler ->ContextID = Icc ->ContextID; // As an additional parameter
- TypeHandler ->ICCVersion = Icc ->Version;
- TypeHandler->FreePtr(TypeHandler, Icc -> TagPtrs[i]);
- }
- }
- }
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return TRUE;
+ }
+ // Didn't find the tag
+ goto Error;
}
- else {
- // New one
- i = Icc -> TagCount;
-
- if (i >= MAX_TABLE_TAG) {
- cmsSignalError(Icc ->ContextID, cmsERROR_RANGE, "Too many tags (%d)", MAX_TABLE_TAG);
- return FALSE;
- }
- Icc -> TagCount++;
- }
+ if (!_cmsNewTag(Icc, sig, &i)) goto Error;
// This is not raw
Icc ->TagSaveAsRaw[i] = FALSE;
Icc ->TagLinked[i] = (cmsTagSignature) 0;
// Get information about the TAG.
- TagDescriptor = _cmsGetTagDescriptor(sig);
+ TagDescriptor = _cmsGetTagDescriptor(Icc-> ContextID, sig);
if (TagDescriptor == NULL){
cmsSignalError(Icc ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported tag '%x'", sig);
- return FALSE;
+ goto Error;
}
// Let the tag descriptor to decide the type base on depending on
// the data. This is useful for example on parametric curves, where
// curves specified by a table cannot be saved as parametric and needs
- // to be revented to single v2-curves, even on v4 profiles.
+ // to be casted to single v2-curves, even on v4 profiles.
Type = TagDescriptor ->DecideType(Version, data);
}
else {
-
Type = TagDescriptor ->SupportedTypes[0];
}
_cmsTagSignature2String(SigString, sig);
cmsSignalError(Icc ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported type '%s' for tag '%s'", TypeString, SigString);
- return FALSE;
+ goto Error;
}
// Does we have a handler for this type?
- TypeHandler = _cmsGetTagTypeHandler(Type);
+ TypeHandler = _cmsGetTagTypeHandler(Icc->ContextID, Type);
if (TypeHandler == NULL) {
_cmsTagSignature2String(TypeString, (cmsTagSignature) Type);
_cmsTagSignature2String(SigString, sig);
cmsSignalError(Icc ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported type '%s' for tag '%s'", TypeString, SigString);
- return FALSE; // Should never happen
+ goto Error; // Should never happen
}
Icc ->TagSizes[i] = 0;
Icc ->TagOffsets[i] = 0;
- TypeHandler ->ContextID = Icc ->ContextID;
- TypeHandler ->ICCVersion = Icc ->Version;
- Icc ->TagPtrs[i] = TypeHandler ->DupPtr(TypeHandler, data, TagDescriptor ->ElemCount);
+ LocalTypeHandler = *TypeHandler;
+ LocalTypeHandler.ContextID = Icc ->ContextID;
+ LocalTypeHandler.ICCVersion = Icc ->Version;
+ Icc ->TagPtrs[i] = LocalTypeHandler.DupPtr(&LocalTypeHandler, data, TagDescriptor ->ElemCount);
if (Icc ->TagPtrs[i] == NULL) {
_cmsTagSignature2String(SigString, sig);
cmsSignalError(Icc ->ContextID, cmsERROR_CORRUPTION_DETECTED, "Malformed struct in type '%s' for tag '%s'", TypeString, SigString);
- return FALSE;
+ goto Error;
}
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
return TRUE;
+
+Error:
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return FALSE;
+
}
// Read and write raw data. The only way those function would work and keep consistence with normal read and write
// raw data written does not exactly correspond with the raw data proposed to cmsWriteRaw data, but this approach allows
// to write a tag as raw data and the read it as handled.
-cmsInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, void* data, cmsUInt32Number BufferSize)
+cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, void* data, cmsUInt32Number BufferSize)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
void *Object;
int i;
cmsIOHANDLER* MemIO;
cmsTagTypeHandler* TypeHandler = NULL;
+ cmsTagTypeHandler LocalTypeHandler;
cmsTagDescriptor* TagDescriptor = NULL;
cmsUInt32Number rc;
cmsUInt32Number Offset, TagSize;
- // Search for given tag in ICC profile directory
- i = _cmsSearchTag(Icc, sig, TRUE);
- if (i < 0) return 0; // Not found, return 0
+ if (!_cmsLockMutex(Icc->ContextID, Icc ->UsrMutex)) return 0;
- // It is already read?
+ // Search for given tag in ICC profile directory
+ i = _cmsSearchTag(Icc, sig, TRUE);
+ if (i < 0) goto Error; // Not found,
+
+ // It is already read?
if (Icc -> TagPtrs[i] == NULL) {
// No yet, get original position
Offset = Icc ->TagOffsets[i];
TagSize = Icc ->TagSizes[i];
-
// read the data directly, don't keep copy
- if (data != NULL) {
+ if (data != NULL) {
- if (BufferSize < TagSize)
- TagSize = BufferSize;
+ if (BufferSize < TagSize)
+ TagSize = BufferSize;
- if (!Icc ->IOhandler ->Seek(Icc ->IOhandler, Offset)) return 0;
- if (!Icc ->IOhandler ->Read(Icc ->IOhandler, data, 1, TagSize)) return 0;
- }
+ if (!Icc ->IOhandler ->Seek(Icc ->IOhandler, Offset)) goto Error;
+ if (!Icc ->IOhandler ->Read(Icc ->IOhandler, data, 1, TagSize)) goto Error;
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return TagSize;
+ }
+
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
return Icc ->TagSizes[i];
}
- // The data has been already read, or written. But wait!, maybe the user choosed to save as
+ // The data has been already read, or written. But wait!, maybe the user chose to save as
// raw data. In this case, return the raw data directly
if (Icc ->TagSaveAsRaw[i]) {
- if (data != NULL) {
+ if (data != NULL) {
- TagSize = Icc ->TagSizes[i];
- if (BufferSize < TagSize)
- TagSize = BufferSize;
+ TagSize = Icc ->TagSizes[i];
+ if (BufferSize < TagSize)
+ TagSize = BufferSize;
memmove(data, Icc ->TagPtrs[i], TagSize);
- }
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return TagSize;
+ }
+
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
return Icc ->TagSizes[i];
}
- // Already readed, or previously set by cmsWriteTag(). We need to serialize that
+ // Already read, or previously set by cmsWriteTag(). We need to serialize that
// data to raw in order to maintain consistency.
+
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
Object = cmsReadTag(hProfile, sig);
- if (Object == NULL) return 0;
+ if (!_cmsLockMutex(Icc->ContextID, Icc ->UsrMutex)) return 0;
+
+ if (Object == NULL) goto Error;
// Now we need to serialize to a memory block: just use a memory iohandler
- if (data == NULL) {
- MemIO = cmsOpenIOhandlerFromNULL(cmsGetProfileContextID(hProfile));
- } else{
- MemIO = cmsOpenIOhandlerFromMem(cmsGetProfileContextID(hProfile), data, BufferSize, "w");
- }
- if (MemIO == NULL) return 0;
+ if (data == NULL) {
+ MemIO = cmsOpenIOhandlerFromNULL(cmsGetProfileContextID(hProfile));
+ } else{
+ MemIO = cmsOpenIOhandlerFromMem(cmsGetProfileContextID(hProfile), data, BufferSize, "w");
+ }
+ if (MemIO == NULL) goto Error;
// Obtain type handling for the tag
TypeHandler = Icc ->TagTypeHandlers[i];
- TagDescriptor = _cmsGetTagDescriptor(sig);
+ TagDescriptor = _cmsGetTagDescriptor(Icc-> ContextID, sig);
if (TagDescriptor == NULL) {
- cmsCloseIOhandler(MemIO);
- return 0;
+ cmsCloseIOhandler(MemIO);
+ goto Error;
}
+
+ if (TypeHandler == NULL) goto Error;
// Serialize
- TypeHandler ->ContextID = Icc ->ContextID;
- TypeHandler ->ICCVersion = Icc ->Version;
+ LocalTypeHandler = *TypeHandler;
+ LocalTypeHandler.ContextID = Icc ->ContextID;
+ LocalTypeHandler.ICCVersion = Icc ->Version;
if (!_cmsWriteTypeBase(MemIO, TypeHandler ->Signature)) {
cmsCloseIOhandler(MemIO);
- return 0;
+ goto Error;
}
- if (!TypeHandler ->WritePtr(TypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) {
+ if (!LocalTypeHandler.WritePtr(&LocalTypeHandler, MemIO, Object, TagDescriptor ->ElemCount)) {
cmsCloseIOhandler(MemIO);
- return 0;
+ goto Error;
}
// Get Size and close
rc = MemIO ->Tell(MemIO);
cmsCloseIOhandler(MemIO); // Ignore return code this time
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
return rc;
+
+Error:
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return 0;
}
// Similar to the anterior. This function allows to write directly to the ICC profile any data, without
-// checking anything. As a rule, mixing Raw with cooked doesn't work, so writting a tag as raw and then reading
-// it as cooked without serializing does result into an error. If that is wha you want, you will need to dump
+// checking anything. As a rule, mixing Raw with cooked doesn't work, so writing a tag as raw and then reading
+// it as cooked without serializing does result into an error. If that is what you want, you will need to dump
// the profile to memry or disk and then reopen it.
cmsBool CMSEXPORT cmsWriteRawTag(cmsHPROFILE hProfile, cmsTagSignature sig, const void* data, cmsUInt32Number Size)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
int i;
- if (!_cmsNewTag(Icc, sig, &i)) return FALSE;
+ if (!_cmsLockMutex(Icc->ContextID, Icc ->UsrMutex)) return 0;
+
+ if (!_cmsNewTag(Icc, sig, &i)) {
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return FALSE;
+ }
// Mark the tag as being written as RAW
Icc ->TagSaveAsRaw[i] = TRUE;
Icc ->TagPtrs[i] = _cmsDupMem(Icc ->ContextID, data, Size);
Icc ->TagSizes[i] = Size;
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+
+ if (Icc->TagPtrs[i] == NULL) {
+ Icc->TagNames[i] = (cmsTagSignature) 0;
+ return FALSE;
+ }
return TRUE;
}
// Using this function you can collapse several tag entries to the same block in the profile
cmsBool CMSEXPORT cmsLinkTag(cmsHPROFILE hProfile, cmsTagSignature sig, cmsTagSignature dest)
{
- _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
+ _cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
int i;
- if (!_cmsNewTag(Icc, sig, &i)) return FALSE;
+ if (!_cmsLockMutex(Icc->ContextID, Icc ->UsrMutex)) return FALSE;
+
+ if (!_cmsNewTag(Icc, sig, &i)) {
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
+ return FALSE;
+ }
// Keep necessary information
Icc ->TagSaveAsRaw[i] = FALSE;
Icc ->TagSizes[i] = 0;
Icc ->TagOffsets[i] = 0;
+ _cmsUnlockMutex(Icc->ContextID, Icc ->UsrMutex);
return TRUE;
}
int i;
// Search for given tag in ICC profile directory
- i = _cmsSearchTag(Icc, sig, FALSE);
- if (i < 0) return (cmsTagSignature) 0; // Not found, return 0
+ i = _cmsSearchTag(Icc, sig, FALSE);
+ if (i < 0) return (cmsTagSignature) 0; // Not found, return 0
return Icc -> TagLinked[i];
}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
Tag = (cmsMAT3*) cmsReadTag(hProfile, cmsSigChromaticAdaptationTag);
if (Tag != NULL) {
-
*Dest = *Tag;
return TRUE;
}
}
-// Auxiliar, read colorants as a MAT3 structure. Used by any function that needs a matrix-shaper
+// Auxiliary, read colorants as a MAT3 structure. Used by any function that needs a matrix-shaper
static
cmsBool ReadICCMatrixRGB2XYZ(cmsMAT3* r, cmsHPROFILE hProfile)
{
if (GrayTRC == NULL) return NULL;
Lut = cmsPipelineAlloc(ContextID, 1, 3);
- if (Lut == NULL) return NULL;
+ if (Lut == NULL)
+ goto Error;
if (cmsGetPCS(hProfile) == cmsSigLabData) {
EmptyTab = cmsBuildTabulatedToneCurve16(ContextID, 2, Zero);
- if (EmptyTab == NULL) {
-
- cmsPipelineFree(Lut);
- return NULL;
- }
+ if (EmptyTab == NULL)
+ goto Error;
LabCurves[0] = GrayTRC;
LabCurves[1] = EmptyTab;
LabCurves[2] = EmptyTab;
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, OneToThreeInputMatrix, NULL));
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, LabCurves));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, OneToThreeInputMatrix, NULL)) ||
+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, LabCurves))) {
+ cmsFreeToneCurve(EmptyTab);
+ goto Error;
+ }
cmsFreeToneCurve(EmptyTab);
}
else {
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &GrayTRC));
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, GrayInputMatrix, NULL));
+
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &GrayTRC)) ||
+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 1, GrayInputMatrix, NULL)))
+ goto Error;
}
return Lut;
+
+Error:
+ cmsPipelineFree(Lut);
+ return NULL;
}
// RGB Matrix shaper
Lut = cmsPipelineAlloc(ContextID, 3, 3);
if (Lut != NULL) {
-
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, Shapes));
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Mat, NULL));
-
+
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, Shapes)) ||
+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Mat, NULL)))
+ goto Error;
+
// Note that it is certainly possible a single profile would have a LUT based
// tag for output working in lab and a matrix-shaper for the fallback cases.
// This is not allowed by the spec, but this code is tolerant to those cases
if (cmsGetPCS(hProfile) == cmsSigLabData) {
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocXYZ2Lab(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocXYZ2Lab(ContextID)))
+ goto Error;
}
}
return Lut;
+
+Error:
+ cmsPipelineFree(Lut);
+ return NULL;
}
// Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded
-/*static
-cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
-{
- cmsContext ContextID = cmsGetProfileContextID(hProfile);
- cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
- cmsColorSpaceSignature spc = cmsGetColorSpace(hProfile);
-
- if (Lut == NULL) return NULL;
-
- // If PCS is Lab or XYZ, the floating point tag is accepting data in the space encoding,
- // and since the formatter has already accomodated to 0..1.0, we should undo this change
- if ( spc == cmsSigLabData)
- {
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID));
- }
- else
- if (spc == cmsSigXYZData)
- {
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID));
- }
-
- return Lut;
-}
-*/
static
cmsPipeline* _cmsReadFloatInputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
{
// these need to be normalized into the appropriate ranges (Lab = 100,0,0, XYZ=1.0,1.0,1.0)
if ( spc == cmsSigLabData)
{
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)))
+ goto Error;
}
else if (spc == cmsSigXYZData)
{
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)))
+ goto Error;
}
if ( PCS == cmsSigLabData)
{
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)))
+ goto Error;
}
else if( PCS == cmsSigXYZData)
{
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)))
+ goto Error;
}
return Lut;
+
+Error:
+ cmsPipelineFree(Lut);
+ return NULL;
}
// Read and create a BRAND NEW MPE LUT from a given profile. All stuff dependent of version, etc
-// is adjusted here in order to create a LUT that takes care of all those details
-cmsPipeline* _cmsReadInputLUT(cmsHPROFILE hProfile, int Intent)
+// is adjusted here in order to create a LUT that takes care of all those details.
+// We add intent = 0xffffffff as a way to read matrix shaper always, no matter of other LUT
+cmsPipeline* CMSEXPORT _cmsReadInputLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent)
{
cmsTagTypeSignature OriginalType;
- cmsTagSignature tag16 = Device2PCS16[Intent];
- cmsTagSignature tagFloat = Device2PCSFloat[Intent];
+ cmsTagSignature tag16;
+ cmsTagSignature tagFloat;
cmsContext ContextID = cmsGetProfileContextID(hProfile);
- // On named color, take the appropiate tag
+ // On named color, take the appropriate tag
if (cmsGetDeviceClass(hProfile) == cmsSigNamedColorClass) {
cmsPipeline* Lut;
return NULL;
}
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, TRUE));
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, TRUE)) ||
+ !cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID))) {
+ cmsPipelineFree(Lut);
+ return NULL;
+ }
return Lut;
}
- if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
+ // This is an attempt to reuse this function to retrieve the matrix-shaper as pipeline no
+ // matter other LUT are present and have precedence. Intent = 0xffffffff can be used for that.
+ if (Intent <= INTENT_ABSOLUTE_COLORIMETRIC) {
- // Floating point LUT are always V4, but the encoding range is no
- // longer 0..1.0, so we need to add an stage depending on the color space
- return _cmsReadFloatInputTag(hProfile, tagFloat);
- }
+ tag16 = Device2PCS16[Intent];
+ tagFloat = Device2PCSFloat[Intent];
- // Revert to perceptual if no tag is found
- if (!cmsIsTag(hProfile, tag16)) {
- tag16 = Device2PCS16[0];
- }
+ if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
- if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
+ // Floating point LUT are always V4, but the encoding range is no
+ // longer 0..1.0, so we need to add an stage depending on the color space
+ return _cmsReadFloatInputTag(hProfile, tagFloat);
+ }
- // Check profile version and LUT type. Do the necessary adjustments if needed
+ // Revert to perceptual if no tag is found
+ if (!cmsIsTag(hProfile, tag16)) {
+ tag16 = Device2PCS16[0];
+ }
- // First read the tag
- cmsPipeline* Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
- if (Lut == NULL) return NULL;
+ if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
- // After reading it, we have now info about the original type
- OriginalType = _cmsGetTagTrueType(hProfile, tag16);
+ // Check profile version and LUT type. Do the necessary adjustments if needed
- // The profile owns the Lut, so we need to copy it
- Lut = cmsPipelineDup(Lut);
+ // First read the tag
+ cmsPipeline* Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
+ if (Lut == NULL) return NULL;
- // We need to adjust data only for Lab16 on output
- if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData)
- return Lut;
+ // After reading it, we have now info about the original type
+ OriginalType = _cmsGetTagTrueType(hProfile, tag16);
- // If the input is Lab, add also a conversion at the begin
- if (cmsGetColorSpace(hProfile) == cmsSigLabData)
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID));
+ // The profile owns the Lut, so we need to copy it
+ Lut = cmsPipelineDup(Lut);
- // Add a matrix for conversion V2 to V4 Lab PCS
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID));
- return Lut;
+ // We need to adjust data only for Lab16 on output
+ if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData)
+ return Lut;
+
+ // If the input is Lab, add also a conversion at the begin
+ if (cmsGetColorSpace(hProfile) == cmsSigLabData &&
+ !cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)))
+ goto Error;
+
+ // Add a matrix for conversion V2 to V4 Lab PCS
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)))
+ goto Error;
+
+ return Lut;
+Error:
+ cmsPipelineFree(Lut);
+ return NULL;
+ }
}
// Lut was not found, try to create a matrix-shaper
// Check if this is a grayscale profile.
if (cmsGetColorSpace(hProfile) == cmsSigGrayData) {
- // if so, build appropiate conversion tables.
+ // if so, build appropriate conversion tables.
// The tables are the PCS iluminant, scaled across GrayTRC
return BuildGrayInputMatrixPipeline(hProfile);
}
if (cmsGetPCS(hProfile) == cmsSigLabData) {
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickLstarMatrix, NULL));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickLstarMatrix, NULL)))
+ goto Error;
}
else {
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickYMatrix, NULL));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickYMatrix, NULL)))
+ goto Error;
}
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &RevGrayTRC));
- cmsFreeToneCurve(RevGrayTRC);
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 1, &RevGrayTRC)))
+ goto Error;
+ cmsFreeToneCurve(RevGrayTRC);
return Lut;
-}
-
+Error:
+ cmsFreeToneCurve(RevGrayTRC);
+ cmsPipelineFree(Lut);
+ return NULL;
+}
static
// This is not allowed by the spec, but this code is tolerant to those cases
if (cmsGetPCS(hProfile) == cmsSigLabData) {
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLab2XYZ(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLab2XYZ(ContextID)))
+ goto Error;
}
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Inv, NULL));
- cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, InvShapes));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocMatrix(ContextID, 3, 3, (cmsFloat64Number*) &Inv, NULL)) ||
+ !cmsPipelineInsertStage(Lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, 3, InvShapes)))
+ goto Error;
}
cmsFreeToneCurveTriple(InvShapes);
return Lut;
+Error:
+ cmsFreeToneCurveTriple(InvShapes);
+ cmsPipelineFree(Lut);
+ return NULL;
}
_cmsStageCLutData* CLUT = (_cmsStageCLutData*) Stage ->Data;
CLUT ->Params->dwFlags |= CMS_LERP_FLAGS_TRILINEAR;
- _cmsSetInterpolationRoutine(CLUT ->Params);
+ _cmsSetInterpolationRoutine(Lut->ContextID, CLUT ->Params);
}
}
}
// Read the DToAX tag, adjusting the encoding of Lab or XYZ if neded
-/*static
-cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
-{
- cmsContext ContextID = cmsGetProfileContextID(hProfile);
- cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
- cmsColorSpaceSignature PCS = cmsGetPCS(hProfile);
-
- if (Lut == NULL) return NULL;
-
- // If PCS is Lab or XYZ, the floating point tag is accepting data in the space encoding,
- // and since the formatter has already accomodated to 0..1.0, we should undo this change
- if ( PCS == cmsSigLabData)
- {
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID));
- }
- else
- if (PCS == cmsSigXYZData)
- {
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID));
- }
-
- return Lut;
-}*/
-
static
cmsPipeline* _cmsReadFloatOutputTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
{
if (Lut == NULL) return NULL;
// If PCS is Lab or XYZ, the floating point tag is accepting data in the space encoding,
- // and since the formatter has already accomodated to 0..1.0, we should undo this change
+ // and since the formatter has already accommodated to 0..1.0, we should undo this change
if ( PCS == cmsSigLabData)
{
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)))
+ goto Error;
}
else
if (PCS == cmsSigXYZData)
{
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)))
+ goto Error;
}
// the output can be Lab or XYZ, in which case normalisation is needed on the end of the pipeline
if ( dataSpace == cmsSigLabData)
{
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)))
+ goto Error;
}
- else if ( dataSpace == cmsSigXYZData)
+ else if (dataSpace == cmsSigXYZData)
{
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)))
+ goto Error;
}
return Lut;
+
+Error:
+ cmsPipelineFree(Lut);
+ return NULL;
}
// Create an output MPE LUT from agiven profile. Version mismatches are handled here
-cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent)
+cmsPipeline* CMSEXPORT _cmsReadOutputLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent)
{
cmsTagTypeSignature OriginalType;
- cmsTagSignature tag16 = PCS2Device16[Intent];
- cmsTagSignature tagFloat = PCS2DeviceFloat[Intent];
- cmsContext ContextID = cmsGetProfileContextID(hProfile);
+ cmsTagSignature tag16;
+ cmsTagSignature tagFloat;
+ cmsContext ContextID = cmsGetProfileContextID(hProfile);
- if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
- // Floating point LUT are always V4
- return _cmsReadFloatOutputTag(hProfile, tagFloat);
- }
+ if (Intent <= INTENT_ABSOLUTE_COLORIMETRIC) {
- // Revert to perceptual if no tag is found
- if (!cmsIsTag(hProfile, tag16)) {
- tag16 = PCS2Device16[0];
- }
+ tag16 = PCS2Device16[Intent];
+ tagFloat = PCS2DeviceFloat[Intent];
- if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
+ if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
+
+ // Floating point LUT are always V4
+ return _cmsReadFloatOutputTag(hProfile, tagFloat);
+ }
- // Check profile version and LUT type. Do the necessary adjustments if needed
+ // Revert to perceptual if no tag is found
+ if (!cmsIsTag(hProfile, tag16)) {
+ tag16 = PCS2Device16[0];
+ }
- // First read the tag
- cmsPipeline* Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
- if (Lut == NULL) return NULL;
+ if (cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
- // After reading it, we have info about the original type
- OriginalType = _cmsGetTagTrueType(hProfile, tag16);
+ // Check profile version and LUT type. Do the necessary adjustments if needed
- // The profile owns the Lut, so we need to copy it
- Lut = cmsPipelineDup(Lut);
- if (Lut == NULL) return NULL;
+ // First read the tag
+ cmsPipeline* Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
+ if (Lut == NULL) return NULL;
- // Now it is time for a controversial stuff. I found that for 3D LUTS using
- // Lab used as indexer space, trilinear interpolation should be used
- if (cmsGetPCS(hProfile) == cmsSigLabData)
- ChangeInterpolationToTrilinear(Lut);
+ // After reading it, we have info about the original type
+ OriginalType = _cmsGetTagTrueType(hProfile, tag16);
- // We need to adjust data only for Lab and Lut16 type
- if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData)
- return Lut;
+ // The profile owns the Lut, so we need to copy it
+ Lut = cmsPipelineDup(Lut);
+ if (Lut == NULL) return NULL;
- // Add a matrix for conversion V4 to V2 Lab PCS
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID));
+ // Now it is time for a controversial stuff. I found that for 3D LUTS using
+ // Lab used as indexer space, trilinear interpolation should be used
+ if (cmsGetPCS(hProfile) == cmsSigLabData)
+ ChangeInterpolationToTrilinear(Lut);
- // If the output is Lab, add also a conversion at the end
- if (cmsGetColorSpace(hProfile) == cmsSigLabData)
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID));
+ // We need to adjust data only for Lab and Lut16 type
+ if (OriginalType != cmsSigLut16Type || cmsGetPCS(hProfile) != cmsSigLabData)
+ return Lut;
- return Lut;
+ // Add a matrix for conversion V4 to V2 Lab PCS
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)))
+ goto Error;
+
+ // If the output is Lab, add also a conversion at the end
+ if (cmsGetColorSpace(hProfile) == cmsSigLabData)
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)))
+ goto Error;
+
+ return Lut;
+Error:
+ cmsPipelineFree(Lut);
+ return NULL;
+ }
}
// Lut not found, try to create a matrix-shaper
// Check if this is a grayscale profile.
- if (cmsGetColorSpace(hProfile) == cmsSigGrayData) {
+ if (cmsGetColorSpace(hProfile) == cmsSigGrayData) {
- // if so, build appropiate conversion tables.
- // The tables are the PCS iluminant, scaled across GrayTRC
- return BuildGrayOutputPipeline(hProfile);
+ // if so, build appropriate conversion tables.
+ // The tables are the PCS iluminant, scaled across GrayTRC
+ return BuildGrayOutputPipeline(hProfile);
}
// Not gray, create a normal matrix-shaper, which only operates in XYZ space
static
cmsPipeline* _cmsReadFloatDevicelinkTag(cmsHPROFILE hProfile, cmsTagSignature tagFloat)
{
- cmsContext ContextID = cmsGetProfileContextID(hProfile);
- cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
+ cmsContext ContextID = cmsGetProfileContextID(hProfile);
+ cmsPipeline* Lut = cmsPipelineDup((cmsPipeline*)cmsReadTag(hProfile, tagFloat));
cmsColorSpaceSignature PCS = cmsGetPCS(hProfile);
cmsColorSpaceSignature spc = cmsGetColorSpace(hProfile);
if (spc == cmsSigLabData)
{
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToLabFloat(ContextID)))
+ goto Error;
}
else
if (spc == cmsSigXYZData)
{
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageNormalizeToXyzFloat(ContextID)))
+ goto Error;
}
- if (PCS == cmsSigLabData)
+ if (PCS == cmsSigLabData)
+ {
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID)))
+ goto Error;
+ }
+ else
+ if (PCS == cmsSigXYZData)
{
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromLabFloat(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID)))
+ goto Error;
}
- else
- if (PCS == cmsSigXYZData)
- {
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageNormalizeFromXyzFloat(ContextID));
- }
- return Lut;
+ return Lut;
+Error:
+ cmsPipelineFree(Lut);
+ return NULL;
}
// This one includes abstract profiles as well. Matrix-shaper cannot be obtained on that device class. The
// tag name here may default to AToB0
-cmsPipeline* _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, int Intent)
+cmsPipeline* CMSEXPORT _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent)
{
cmsPipeline* Lut;
cmsTagTypeSignature OriginalType;
- cmsTagSignature tag16 = Device2PCS16[Intent];
- cmsTagSignature tagFloat = Device2PCSFloat[Intent];
+ cmsTagSignature tag16;
+ cmsTagSignature tagFloat;
cmsContext ContextID = cmsGetProfileContextID(hProfile);
- // On named color, take the appropiate tag
+ if (Intent > INTENT_ABSOLUTE_COLORIMETRIC)
+ return NULL;
+
+ tag16 = Device2PCS16[Intent];
+ tagFloat = Device2PCSFloat[Intent];
+
+ // On named color, take the appropriate tag
if (cmsGetDeviceClass(hProfile) == cmsSigNamedColorClass) {
- cmsNAMEDCOLORLIST* nc = (cmsNAMEDCOLORLIST*) cmsReadTag(hProfile, cmsSigNamedColor2Tag);
+ cmsNAMEDCOLORLIST* nc = (cmsNAMEDCOLORLIST*)cmsReadTag(hProfile, cmsSigNamedColor2Tag);
if (nc == NULL) return NULL;
Lut = cmsPipelineAlloc(ContextID, 0, 0);
- if (Lut == NULL) {
- cmsFreeNamedColorList(nc);
- return NULL;
- }
+ if (Lut == NULL)
+ goto Error;
+
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, FALSE)))
+ goto Error;
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocNamedColor(nc, FALSE));
if (cmsGetColorSpace(hProfile) == cmsSigLabData)
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID));
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)))
+ goto Error;
+
return Lut;
+ Error:
+ cmsPipelineFree(Lut);
+ cmsFreeNamedColorList(nc);
+ return NULL;
}
+
if (cmsIsTag(hProfile, tagFloat)) { // Float tag takes precedence
// Floating point LUT are always V
tagFloat = Device2PCSFloat[0];
if (cmsIsTag(hProfile, tagFloat)) {
- return cmsPipelineDup((cmsPipeline*) cmsReadTag(hProfile, tagFloat));
+ return cmsPipelineDup((cmsPipeline*)cmsReadTag(hProfile, tagFloat));
}
if (!cmsIsTag(hProfile, tag16)) { // Is there any LUT-Based table?
- tag16 = Device2PCS16[0];
+ tag16 = Device2PCS16[0];
if (!cmsIsTag(hProfile, tag16)) return NULL;
}
// Check profile version and LUT type. Do the necessary adjustments if needed
// Read the tag
- Lut = (cmsPipeline*) cmsReadTag(hProfile, tag16);
+ Lut = (cmsPipeline*)cmsReadTag(hProfile, tag16);
if (Lut == NULL) return NULL;
// The profile owns the Lut, so we need to copy it
Lut = cmsPipelineDup(Lut);
if (Lut == NULL) return NULL;
- // Now it is time for a controversial stuff. I found that for 3D LUTS using
- // Lab used as indexer space, trilinear interpolation should be used
- if (cmsGetColorSpace(hProfile) == cmsSigLabData)
- ChangeInterpolationToTrilinear(Lut);
+ // Now it is time for a controversial stuff. I found that for 3D LUTS using
+ // Lab used as indexer space, trilinear interpolation should be used
+ if (cmsGetPCS(hProfile) == cmsSigLabData)
+ ChangeInterpolationToTrilinear(Lut);
// After reading it, we have info about the original type
- OriginalType = _cmsGetTagTrueType(hProfile, tag16);
+ OriginalType = _cmsGetTagTrueType(hProfile, tag16);
// We need to adjust data for Lab16 on output
if (OriginalType != cmsSigLut16Type) return Lut;
// Here it is possible to get Lab on both sides
- if (cmsGetPCS(hProfile) == cmsSigLabData) {
- cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID));
+ if (cmsGetColorSpace(hProfile) == cmsSigLabData) {
+ if (!cmsPipelineInsertStage(Lut, cmsAT_BEGIN, _cmsStageAllocLabV4ToV2(ContextID)))
+ goto Error2;
}
- if (cmsGetColorSpace(hProfile) == cmsSigLabData) {
- cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID));
+ if (cmsGetPCS(hProfile) == cmsSigLabData) {
+ if (!cmsPipelineInsertStage(Lut, cmsAT_END, _cmsStageAllocLabV2ToV4(ContextID)))
+ goto Error2;
}
return Lut;
-
+Error2:
+ cmsPipelineFree(Lut);
+ return NULL;
}
// ---------------------------------------------------------------------------------------------------------------
{
if (!cmsWriteTag(hProfile, cmsSigProfileSequenceDescTag, seq)) return FALSE;
- if (cmsGetProfileVersion(hProfile) >= 4.0) {
+ if (cmsGetEncodedICCversion(hProfile) >= 0x4000000) {
if (!cmsWriteTag(hProfile, cmsSigProfileSequenceIdTag, seq)) return FALSE;
}
}
-// Auxiliar, read and duplicate a MLU if found.
+// Auxiliary, read and duplicate a MLU if found.
static
cmsMLU* GetMLUFromProfile(cmsHPROFILE h, cmsTagSignature sig)
{
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
mpe = Lut ->Elements;
for (i=0; i < n; i++) {
- // Get asked type
- Type = (cmsStageSignature)va_arg(args, cmsStageSignature);
+ // Get asked type. cmsStageSignature is promoted to int by compiler
+ Type = (cmsStageSignature)va_arg(args, int);
if (mpe ->Type != Type) {
va_end(args); // Mismatch. We are done.
if (NewElem ->TheCurves != NULL) {
for (i=0; i < NewElem ->nCurves; i++) {
if (NewElem ->TheCurves[i])
- cmsFreeToneCurve(Data ->TheCurves[i]);
+ cmsFreeToneCurve(NewElem ->TheCurves[i]);
}
}
- _cmsFree(mpe ->ContextID, Data ->TheCurves);
+ _cmsFree(mpe ->ContextID, NewElem ->TheCurves);
_cmsFree(mpe ->ContextID, NewElem);
return NULL;
}
// Create a bunch of identity curves
-cmsStage* _cmsStageAllocIdentityCurves(cmsContext ContextID, int nChannels)
+cmsStage* CMSEXPORT _cmsStageAllocIdentityCurves(cmsContext ContextID, cmsUInt32Number nChannels)
{
cmsStage* mpe = cmsStageAllocToneCurves(ContextID, nChannels, NULL);
void MatrixElemTypeFree(cmsStage* mpe)
{
_cmsStageMatrixData* Data = (_cmsStageMatrixData*) mpe ->Data;
+ if (Data == NULL)
+ return;
if (Data ->Double)
_cmsFree(mpe ->ContextID, Data ->Double);
NewElem = (_cmsStageMatrixData*) _cmsMallocZero(ContextID, sizeof(_cmsStageMatrixData));
- if (NewElem == NULL) return NULL;
-
+ if (NewElem == NULL) goto Error;
+ NewMPE->Data = (void*)NewElem;
NewElem ->Double = (cmsFloat64Number*) _cmsCalloc(ContextID, n, sizeof(cmsFloat64Number));
-
- if (NewElem->Double == NULL) {
- MatrixElemTypeFree(NewMPE);
- return NULL;
- }
-
+ if (NewElem->Double == NULL) goto Error;
+
for (i=0; i < n; i++) {
NewElem ->Double[i] = Matrix[i];
}
-
if (Offset != NULL) {
- NewElem ->Offset = (cmsFloat64Number*) _cmsCalloc(ContextID, Cols, sizeof(cmsFloat64Number));
- if (NewElem->Offset == NULL) {
- MatrixElemTypeFree(NewMPE);
- return NULL;
- }
-
- for (i=0; i < Cols; i++) {
+ NewElem ->Offset = (cmsFloat64Number*) _cmsCalloc(ContextID, Rows, sizeof(cmsFloat64Number));
+ if (NewElem->Offset == NULL) goto Error;
+
+ for (i=0; i < Rows; i++) {
NewElem ->Offset[i] = Offset[i];
}
-
}
-
- NewMPE ->Data = (void*) NewElem;
+
return NewMPE;
+
+Error:
+ cmsStageFree(NewMPE);
+ return NULL;
}
if (Data ->Tab.T) {
- if (Data ->HasFloatValues)
+ if (Data ->HasFloatValues) {
NewElem ->Tab.TFloat = (cmsFloat32Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.TFloat, Data ->nEntries * sizeof (cmsFloat32Number));
- else
+ if (NewElem ->Tab.TFloat == NULL)
+ goto Error;
+ } else {
NewElem ->Tab.T = (cmsUInt16Number*) _cmsDupMem(mpe ->ContextID, Data ->Tab.T, Data ->nEntries * sizeof (cmsUInt16Number));
+ if (NewElem ->Tab.T == NULL)
+ goto Error;
+ }
}
NewElem ->Params = _cmsComputeInterpParamsEx(mpe ->ContextID,
Data ->Params ->nOutputs,
NewElem ->Tab.T,
Data ->Params ->dwFlags);
-
- return (void*) NewElem;
+ if (NewElem->Params != NULL)
+ return (void*) NewElem;
+ Error:
+ if (NewElem->Tab.T)
+ // This works for both types
+ _cmsFree(mpe ->ContextID, NewElem -> Tab.T);
+ _cmsFree(mpe ->ContextID, NewElem);
+ return NULL;
}
for (i=0; i < MAX_INPUT_DIMENSIONS; i++)
Dimensions[i] = nGridPoints;
-
return cmsStageAllocCLut16bitGranular(ContextID, Dimensions, inputChan, outputChan, Table);
}
}
}
-
NewElem ->Params = _cmsComputeInterpParamsEx(ContextID, clutPoints, inputChan, outputChan, NewElem ->Tab.TFloat, CMS_LERP_FLAGS_FLOAT);
if (NewElem ->Params == NULL) {
cmsStageFree(NewMPE);
return NULL;
}
-
-
return NewMPE;
}
static
-int IdentitySampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void * Cargo)
+int IdentitySampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void * Cargo)
{
int nChan = *(int*) Cargo;
int i;
}
// Creates an MPE that just copies input to output
-cmsStage* _cmsStageAllocIdentityCLut(cmsContext ContextID, int nChan)
+cmsStage* CMSEXPORT _cmsStageAllocIdentityCLut(cmsContext ContextID, cmsUInt32Number nChan)
{
cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS];
cmsStage* mpe ;
// Quantize a value 0 <= i < MaxSamples to 0..0xffff
-cmsUInt16Number _cmsQuantizeVal(cmsFloat64Number i, int MaxSamples)
+cmsUInt16Number CMSEXPORT _cmsQuantizeVal(cmsFloat64Number i, cmsUInt32Number MaxSamples)
{
cmsFloat64Number x;
// function on knots. returns TRUE if all ok, FALSE otherwise.
cmsBool CMSEXPORT cmsStageSampleCLut16bit(cmsStage* mpe, cmsSAMPLER16 Sampler, void * Cargo, cmsUInt32Number dwFlags)
{
- int i, t, nTotalPoints, index, rest;
- int nInputs, nOutputs;
+ int i, t, index, rest;
+ cmsUInt32Number nTotalPoints;
+ cmsUInt32Number nInputs, nOutputs;
cmsUInt32Number* nSamples;
- cmsUInt16Number In[cmsMAXCHANNELS], Out[MAX_STAGE_CHANNELS];
+ cmsUInt16Number In[MAX_INPUT_DIMENSIONS+1], Out[MAX_STAGE_CHANNELS];
_cmsStageCLutData* clut;
if (mpe == NULL) return FALSE;
nInputs = clut->Params ->nInputs;
nOutputs = clut->Params ->nOutputs;
- if (nInputs >= cmsMAXCHANNELS) return FALSE;
+ if (nInputs <= 0) return FALSE;
+ if (nOutputs <= 0) return FALSE;
+ if (nInputs > MAX_INPUT_DIMENSIONS) return FALSE;
if (nOutputs >= MAX_STAGE_CHANNELS) return FALSE;
+ memset(In, 0, sizeof(In));
+ memset(Out, 0, sizeof(Out));
+
nTotalPoints = CubeSize(nSamples, nInputs);
if (nTotalPoints == 0) return FALSE;
index = 0;
- for (i = 0; i < nTotalPoints; i++) {
+ for (i = 0; i < (int) nTotalPoints; i++) {
rest = i;
- for (t = nInputs-1; t >=0; --t) {
+ for (t = (int)nInputs - 1; t >= 0; --t) {
cmsUInt32Number Colorant = rest % nSamples[t];
}
if (clut ->Tab.T != NULL) {
- for (t=0; t < nOutputs; t++)
+ for (t = 0; t < (int)nOutputs; t++)
Out[t] = clut->Tab.T[index + t];
}
if (!(dwFlags & SAMPLER_INSPECT)) {
if (clut ->Tab.T != NULL) {
- for (t=0; t < nOutputs; t++)
+ for (t=0; t < (int) nOutputs; t++)
clut->Tab.T[index + t] = Out[t];
}
}
return TRUE;
}
-// Same as anterior, but for floting point
+// Same as anterior, but for floating point
cmsBool CMSEXPORT cmsStageSampleCLutFloat(cmsStage* mpe, cmsSAMPLERFLOAT Sampler, void * Cargo, cmsUInt32Number dwFlags)
{
- int i, t, nTotalPoints, index, rest;
- int nInputs, nOutputs;
+ int i, t, index, rest;
+ cmsUInt32Number nTotalPoints;
+ cmsUInt32Number nInputs, nOutputs;
cmsUInt32Number* nSamples;
- cmsFloat32Number In[cmsMAXCHANNELS], Out[MAX_STAGE_CHANNELS];
+ cmsFloat32Number In[MAX_INPUT_DIMENSIONS+1], Out[MAX_STAGE_CHANNELS];
_cmsStageCLutData* clut = (_cmsStageCLutData*) mpe->Data;
nSamples = clut->Params ->nSamples;
nInputs = clut->Params ->nInputs;
nOutputs = clut->Params ->nOutputs;
- if (nInputs >= cmsMAXCHANNELS) return FALSE;
+ if (nInputs <= 0) return FALSE;
+ if (nOutputs <= 0) return FALSE;
+ if (nInputs > MAX_INPUT_DIMENSIONS) return FALSE;
if (nOutputs >= MAX_STAGE_CHANNELS) return FALSE;
nTotalPoints = CubeSize(nSamples, nInputs);
if (nTotalPoints == 0) return FALSE;
index = 0;
- for (i = 0; i < nTotalPoints; i++) {
+ for (i = 0; i < (int)nTotalPoints; i++) {
rest = i;
- for (t = nInputs-1; t >=0; --t) {
+ for (t = (int) nInputs-1; t >=0; --t) {
cmsUInt32Number Colorant = rest % nSamples[t];
}
if (clut ->Tab.TFloat != NULL) {
- for (t=0; t < nOutputs; t++)
+ for (t=0; t < (int) nOutputs; t++)
Out[t] = clut->Tab.TFloat[index + t];
}
if (!(dwFlags & SAMPLER_INSPECT)) {
if (clut ->Tab.TFloat != NULL) {
- for (t=0; t < nOutputs; t++)
+ for (t=0; t < (int) nOutputs; t++)
clut->Tab.TFloat[index + t] = Out[t];
}
}
cmsBool CMSEXPORT cmsSliceSpace16(cmsUInt32Number nInputs, const cmsUInt32Number clutPoints[],
cmsSAMPLER16 Sampler, void * Cargo)
{
- int i, t, nTotalPoints, rest;
+ int i, t, rest;
+ cmsUInt32Number nTotalPoints;
cmsUInt16Number In[cmsMAXCHANNELS];
if (nInputs >= cmsMAXCHANNELS) return FALSE;
nTotalPoints = CubeSize(clutPoints, nInputs);
if (nTotalPoints == 0) return FALSE;
- for (i = 0; i < nTotalPoints; i++) {
+ for (i = 0; i < (int) nTotalPoints; i++) {
rest = i;
- for (t = nInputs-1; t >=0; --t) {
+ for (t = (int) nInputs-1; t >=0; --t) {
cmsUInt32Number Colorant = rest % clutPoints[t];
cmsInt32Number CMSEXPORT cmsSliceSpaceFloat(cmsUInt32Number nInputs, const cmsUInt32Number clutPoints[],
cmsSAMPLERFLOAT Sampler, void * Cargo)
{
- int i, t, nTotalPoints, rest;
+ int i, t, rest;
+ cmsUInt32Number nTotalPoints;
cmsFloat32Number In[cmsMAXCHANNELS];
if (nInputs >= cmsMAXCHANNELS) return FALSE;
nTotalPoints = CubeSize(clutPoints, nInputs);
if (nTotalPoints == 0) return FALSE;
- for (i = 0; i < nTotalPoints; i++) {
+ for (i = 0; i < (int) nTotalPoints; i++) {
rest = i;
- for (t = nInputs-1; t >=0; --t) {
+ for (t = (int) nInputs-1; t >=0; --t) {
cmsUInt32Number Colorant = rest % clutPoints[t];
// No dup or free routines needed, as the structure has no pointers in it.
-cmsStage* _cmsStageAllocLab2XYZ(cmsContext ContextID)
+cmsStage* CMSEXPORT _cmsStageAllocLab2XYZ(cmsContext ContextID)
{
return _cmsStageAllocPlaceholder(ContextID, cmsSigLab2XYZElemType, 3, 3, EvaluateLab2XYZ, NULL, NULL, NULL);
}
return NULL;
}
- // We need to map * (0xffff / 0xff00), thats same as (257 / 256)
+ // We need to map * (0xffff / 0xff00), that's same as (257 / 256)
// So we can use 258-entry tables to do the trick (i / 257) * (255 * 257) * (257 / 256);
for (i=0; i < 257; i++) {
mpe = cmsStageAllocToneCurves(ContextID, 3, LabTable);
cmsFreeToneCurveTriple(LabTable);
+ if (mpe == NULL) return NULL;
mpe ->Implements = cmsSigLabV2toV4;
return mpe;
}
// ********************************************************************************
// Matrix-based conversion, which is more accurate, but slower and cannot properly be saved in devicelink profiles
-cmsStage* _cmsStageAllocLabV2ToV4(cmsContext ContextID)
+cmsStage* CMSEXPORT _cmsStageAllocLabV2ToV4(cmsContext ContextID)
{
static const cmsFloat64Number V2ToV4[] = { 65535.0/65280.0, 0, 0,
0, 65535.0/65280.0, 0,
// Reverse direction
-cmsStage* _cmsStageAllocLabV4ToV2(cmsContext ContextID)
+cmsStage* CMSEXPORT _cmsStageAllocLabV4ToV2(cmsContext ContextID)
{
static const cmsFloat64Number V4ToV2[] = { 65280.0/65535.0, 0, 0,
0, 65280.0/65535.0, 0,
return mpe;
}
+// Clips values smaller than zero
+static
+void Clipper(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
+{
+ cmsUInt32Number i;
+ for (i = 0; i < mpe->InputChannels; i++) {
+
+ cmsFloat32Number n = In[i];
+ Out[i] = n < 0 ? 0 : n;
+ }
+}
+cmsStage* _cmsStageClipNegatives(cmsContext ContextID, cmsUInt32Number nChannels)
+{
+ return _cmsStageAllocPlaceholder(ContextID, cmsSigClipNegativesElemType,
+ nChannels, nChannels, Clipper, NULL, NULL, NULL);
+}
// ********************************************************************************
// Type cmsSigXYZ2LabElemType
cmsUNUSED_PARAMETER(mpe);
}
-cmsStage* _cmsStageAllocXYZ2Lab(cmsContext ContextID)
+cmsStage* CMSEXPORT _cmsStageAllocXYZ2Lab(cmsContext ContextID)
{
return _cmsStageAllocPlaceholder(ContextID, cmsSigXYZ2LabElemType, 3, 3, EvaluateXYZ2Lab, NULL, NULL, NULL);
NULL);
if (NewMPE == NULL) return NULL;
- NewMPE ->Implements = mpe ->Implements;
+ NewMPE ->Implements = mpe ->Implements;
+
+ if (mpe ->DupElemPtr) {
+
+ NewMPE ->Data = mpe ->DupElemPtr(mpe);
+
+ if (NewMPE->Data == NULL) {
+
+ cmsStageFree(NewMPE);
+ return NULL;
+ }
+
+ } else {
- if (mpe ->DupElemPtr)
- NewMPE ->Data = mpe ->DupElemPtr(mpe);
- else
NewMPE ->Data = NULL;
+ }
return NewMPE;
}
// ***********************************************************************************************************
// This function sets up the channel count
-
static
-void BlessLUT(cmsPipeline* lut)
+cmsBool BlessLUT(cmsPipeline* lut)
{
- // We can set the input/ouput channels only if we have elements.
+ // We can set the input/output channels only if we have elements.
if (lut ->Elements != NULL) {
- cmsStage *First, *Last;
+ cmsStage* prev;
+ cmsStage* next;
+ cmsStage* First;
+ cmsStage* Last;
First = cmsPipelineGetPtrToFirstStage(lut);
Last = cmsPipelineGetPtrToLastStage(lut);
- if (First != NULL)lut ->InputChannels = First ->InputChannels;
- if (Last != NULL) lut ->OutputChannels = Last ->OutputChannels;
+ if (First == NULL || Last == NULL) return FALSE;
+
+ lut->InputChannels = First->InputChannels;
+ lut->OutputChannels = Last->OutputChannels;
+
+ // Check chain consistency
+ prev = First;
+ next = prev->Next;
+
+ while (next != NULL)
+ {
+ if (next->InputChannels != prev->OutputChannels)
+ return FALSE;
+
+ next = next->Next;
+ prev = prev->Next;
}
}
+ return TRUE;
+}
+
// Default to evaluate the LUT on 16 bit-basis. Precision is retained.
static
-void _LUTeval16(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register const void* D)
+void _LUTeval16(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER const void* D)
{
cmsPipeline* lut = (cmsPipeline*) D;
cmsStage *mpe;
// Does evaluate the LUT on cmsFloat32Number-basis.
static
-void _LUTevalFloat(register const cmsFloat32Number In[], register cmsFloat32Number Out[], const void* D)
+void _LUTevalFloat(const cmsFloat32Number In[], cmsFloat32Number Out[], const void* D)
{
cmsPipeline* lut = (cmsPipeline*) D;
cmsStage *mpe;
}
-
-
// LUT Creation & Destruction
-
cmsPipeline* CMSEXPORT cmsPipelineAlloc(cmsContext ContextID, cmsUInt32Number InputChannels, cmsUInt32Number OutputChannels)
{
cmsPipeline* NewLUT;
+ // A value of zero in channels is allowed as placeholder
if (InputChannels >= cmsMAXCHANNELS ||
OutputChannels >= cmsMAXCHANNELS) return NULL;
NewLUT = (cmsPipeline*) _cmsMallocZero(ContextID, sizeof(cmsPipeline));
if (NewLUT == NULL) return NULL;
-
NewLUT -> InputChannels = InputChannels;
NewLUT -> OutputChannels = OutputChannels;
NewLUT ->Data = NewLUT;
NewLUT ->ContextID = ContextID;
- BlessLUT(NewLUT);
+ if (!BlessLUT(NewLUT))
+ {
+ _cmsFree(ContextID, NewLUT);
+ return NULL;
+ }
return NewLUT;
}
if (lut == NULL) return NULL;
NewLUT = cmsPipelineAlloc(lut ->ContextID, lut ->InputChannels, lut ->OutputChannels);
+ if (NewLUT == NULL) return NULL;
+
for (mpe = lut ->Elements;
mpe != NULL;
mpe = mpe ->Next) {
First = FALSE;
}
else {
- Anterior ->Next = NewMPE;
+ if (Anterior != NULL)
+ Anterior ->Next = NewMPE;
}
Anterior = NewMPE;
NewLUT ->SaveAs8Bits = lut ->SaveAs8Bits;
- BlessLUT(NewLUT);
+ if (!BlessLUT(NewLUT))
+ {
+ _cmsFree(lut->ContextID, NewLUT);
+ return NULL;
+ }
+
return NewLUT;
}
-void CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe)
+int CMSEXPORT cmsPipelineInsertStage(cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe)
{
cmsStage* Anterior = NULL, *pt;
- _cmsAssert(lut != NULL);
- _cmsAssert(mpe != NULL);
+ if (lut == NULL || mpe == NULL)
+ return FALSE;
switch (loc) {
for (pt = lut ->Elements;
pt != NULL;
pt = pt -> Next) Anterior = pt;
-
+
Anterior ->Next = mpe;
mpe ->Next = NULL;
}
break;
default:;
+ return FALSE;
}
- BlessLUT(lut);
+ return BlessLUT(lut);
}
// Unlink an element and return the pointer to it
else
cmsStageFree(Unlinked);
+ // May fail, but we ignore it
BlessLUT(lut);
}
// Concatenate two LUT into a new single one
cmsBool CMSEXPORT cmsPipelineCat(cmsPipeline* l1, const cmsPipeline* l2)
{
- cmsStage* mpe, *NewMPE;
+ cmsStage* mpe;
// If both LUTS does not have elements, we need to inherit
// the number of channels
mpe = mpe ->Next) {
// We have to dup each element
- NewMPE = cmsStageDup(mpe);
-
- if (NewMPE == NULL) {
- return FALSE;
- }
-
- cmsPipelineInsertStage(l1, cmsAT_END, NewMPE);
+ if (!cmsPipelineInsertStage(l1, cmsAT_END, cmsStageDup(mpe)))
+ return FALSE;
}
- BlessLUT(l1);
- return TRUE;
+ return BlessLUT(l1);
}
// This function may be used to set the optional evaluator and a block of private data. If private data is being used, an optional
// duplicator and free functions should also be specified in order to duplicate the LUT construct. Use NULL to inhibit such functionality.
void CMSEXPORT _cmsPipelineSetOptimizationParameters(cmsPipeline* Lut,
- _cmsOPTeval16Fn Eval16,
+ _cmsPipelineEval16Fn Eval16,
void* PrivateData,
_cmsFreeUserDataFn FreePrivateDataFn,
_cmsDupUserDataFn DupPrivateDataFn)
cmsFloat32Number fx[4], x[4], xd[4], fxd[4];
cmsVEC3 tmp, tmp2;
cmsMAT3 Jacobian;
- cmsFloat64Number LastResult[4];
-
-
+
// Only 3->3 and 4->3 are supported
if (lut ->InputChannels != 3 && lut ->InputChannels != 4) return FALSE;
if (lut ->OutputChannels != 3) return FALSE;
-
- // Mark result of -1
- LastResult[0] = LastResult[1] = LastResult[2] = -1.0f;
-
+
// Take the hint as starting point if specified
if (Hint == NULL) {
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
static
-void MD5_Transform(cmsUInt32Number buf[4], cmsUInt32Number in[16])
-
+void cmsMD5_Transform(cmsUInt32Number buf[4], cmsUInt32Number in[16])
{
- register cmsUInt32Number a, b, c, d;
+ CMSREGISTER cmsUInt32Number a, b, c, d;
a = buf[0];
b = buf[1];
// Create a MD5 object
-static
-cmsHANDLE MD5alloc(cmsContext ContextID)
+
+cmsHANDLE CMSEXPORT cmsMD5alloc(cmsContext ContextID)
{
_cmsMD5* ctx = (_cmsMD5*) _cmsMallocZero(ContextID, sizeof(_cmsMD5));
if (ctx == NULL) return NULL;
return (cmsHANDLE) ctx;
}
-
-static
-void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
+void CMSEXPORT cmsMD5add(cmsHANDLE Handle, const cmsUInt8Number* buf, cmsUInt32Number len)
{
_cmsMD5* ctx = (_cmsMD5*) Handle;
cmsUInt32Number t;
memmove(p, buf, t);
byteReverse(ctx->in, 16);
- MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
+ cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
buf += t;
len -= t;
}
while (len >= 64) {
memmove(ctx->in, buf, 64);
byteReverse(ctx->in, 16);
- MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
+ cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
buf += 64;
len -= 64;
}
}
// Destroy the object and return the checksum
-static
-void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
+void CMSEXPORT cmsMD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
{
_cmsMD5* ctx = (_cmsMD5*) Handle;
cmsUInt32Number count;
memset(p, 0, count);
byteReverse(ctx->in, 16);
- MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
+ cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
memset(ctx->in, 0, 56);
} else {
((cmsUInt32Number *) ctx->in)[14] = ctx->bits[0];
((cmsUInt32Number *) ctx->in)[15] = ctx->bits[1];
- MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
+ cmsMD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
byteReverse((cmsUInt8Number *) ctx->buf, 4);
memmove(ProfileID ->ID8, ctx->buf, 16);
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
_cmsICCPROFILE Keep;
- _cmsAssert(hProfile != NULL);
+ _cmsAssert(hProfile != NULL);
ContextID = cmsGetProfileContextID(hProfile);
if (!cmsSaveProfileToMem(hProfile, Mem, &BytesNeeded)) goto Error;
// Create MD5 object
- MD5 = MD5alloc(ContextID);
+ MD5 = cmsMD5alloc(ContextID);
if (MD5 == NULL) goto Error;
// Add all bytes
- MD5add(MD5, Mem, BytesNeeded);
+ cmsMD5add(MD5, Mem, BytesNeeded);
// Temp storage is no longer needed
_cmsFree(ContextID, Mem);
memmove(Icc, &Keep, sizeof(_cmsICCPROFILE));
// And store the ID
- MD5finish(&Icc ->ProfileID, MD5);
+ cmsMD5finish(&Icc ->ProfileID, MD5);
return TRUE;
Error:
// Free resources as something went wrong
- if (MD5 != NULL) _cmsFree(ContextID, MD5);
+ // "MD5" cannot be other than NULL here, so no need to free it
if (Mem != NULL) _cmsFree(ContextID, Mem);
memmove(Icc, &Keep, sizeof(_cmsICCPROFILE));
return FALSE;
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
r -> n[VZ] = z;
}
-// Vector substraction
+// Vector subtraction
void CMSEXPORT _cmsVEC3minus(cmsVEC3* r, const cmsVEC3* a, const cmsVEC3* b)
{
r -> n[VX] = a -> n[VX] - b -> n[VX];
cmsBool CMSEXPORT _cmsMAT3isIdentity(const cmsMAT3* a)
{
- cmsMAT3 Identity;
- int i, j;
+ cmsMAT3 Identity;
+ int i, j;
- _cmsMAT3identity(&Identity);
+ _cmsMAT3identity(&Identity);
- for (i=0; i < 3; i++)
- for (j=0; j < 3; j++)
- if (!CloseEnough(a ->v[i].n[j], Identity.v[i].n[j])) return FALSE;
+ for (i=0; i < 3; i++)
+ for (j=0; j < 3; j++)
+ if (!CloseEnough(a ->v[i].n[j], Identity.v[i].n[j])) return FALSE;
- return TRUE;
+ return TRUE;
}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2012 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
static
cmsBool GrowMLUtable(cmsMLU* mlu)
{
- int AllocatedEntries;
+ cmsUInt32Number AllocatedEntries;
_cmsMLUentry *NewPtr;
// Sanity check
static
int SearchMLUEntry(cmsMLU* mlu, cmsUInt16Number LanguageCode, cmsUInt16Number CountryCode)
{
- int i;
+ cmsUInt32Number i;
// Sanity check
if (mlu == NULL) return -1;
for (i=0; i < mlu ->UsedEntries; i++) {
if (mlu ->Entries[i].Country == CountryCode &&
- mlu ->Entries[i].Language == LanguageCode) return i;
+ mlu ->Entries[i].Language == LanguageCode) return (int) i;
}
// Not found
return TRUE;
}
+// Convert from a 3-char code to a cmsUInt16Number. It is done in this way because some
+// compilers don't properly align beginning of strings
+static
+cmsUInt16Number strTo16(const char str[3])
+{
+ const cmsUInt8Number* ptr8;
+ cmsUInt16Number n;
+
+ // For non-existent strings
+ if (str == NULL) return 0;
+ ptr8 = (const cmsUInt8Number*)str;
+ n = (cmsUInt16Number)(((cmsUInt16Number)ptr8[0] << 8) | ptr8[1]);
-// Add an ASCII entry.
+ return n;
+}
+
+static
+void strFrom16(char str[3], cmsUInt16Number n)
+{
+ str[0] = (char)(n >> 8);
+ str[1] = (char)n;
+ str[2] = (char)0;
+
+}
+
+// Add an ASCII entry. Do not add any \0 termination (ICC1v43_2010-12.pdf page 61)
+// In the case the user explicitely sets an empty string, we force a \0
cmsBool CMSEXPORT cmsMLUsetASCII(cmsMLU* mlu, const char LanguageCode[3], const char CountryCode[3], const char* ASCIIString)
{
- cmsUInt32Number i, len = (cmsUInt32Number) strlen(ASCIIString)+1;
+ cmsUInt32Number i, len = (cmsUInt32Number) strlen(ASCIIString);
wchar_t* WStr;
cmsBool rc;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
+ cmsUInt16Number Lang = strTo16(LanguageCode);
+ cmsUInt16Number Cntry = strTo16(CountryCode);
if (mlu == NULL) return FALSE;
+ // len == 0 would prevent operation, so we set a empty string pointing to zero
+ if (len == 0)
+ {
+ len = 1;
+ }
+
WStr = (wchar_t*) _cmsCalloc(mlu ->ContextID, len, sizeof(wchar_t));
if (WStr == NULL) return FALSE;
return (cmsUInt32Number)(p - s);
}
-
-// Add a wide entry
+// Add a wide entry. Do not add any \0 terminator (ICC1v43_2010-12.pdf page 61)
cmsBool CMSEXPORT cmsMLUsetWide(cmsMLU* mlu, const char Language[3], const char Country[3], const wchar_t* WideString)
{
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) Language);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) Country);
+ cmsUInt16Number Lang = strTo16(Language);
+ cmsUInt16Number Cntry = strTo16(Country);
cmsUInt32Number len;
if (mlu == NULL) return FALSE;
if (WideString == NULL) return FALSE;
- len = (cmsUInt32Number) (mywcslen(WideString) + 1) * sizeof(wchar_t);
+ len = (cmsUInt32Number) (mywcslen(WideString)) * sizeof(wchar_t);
+ if (len == 0)
+ len = sizeof(wchar_t);
+
return AddMLUBlock(mlu, len, WideString, Lang, Cntry);
}
cmsUInt16Number LanguageCode, cmsUInt16Number CountryCode,
cmsUInt16Number* UsedLanguageCode, cmsUInt16Number* UsedCountryCode)
{
- int i;
+ cmsUInt32Number i;
int Best = -1;
_cmsMLUentry* v;
if (v -> Language == LanguageCode) {
- if (Best == -1) Best = i;
+ if (Best == -1) Best = (int) i;
if (v -> Country == CountryCode) {
if (Best == -1)
Best = 0;
- v = mlu ->Entries + Best;
+ v = mlu ->Entries + Best;
- if (UsedLanguageCode != NULL) *UsedLanguageCode = v ->Language;
+ if (UsedLanguageCode != NULL) *UsedLanguageCode = v ->Language;
if (UsedCountryCode != NULL) *UsedCountryCode = v ->Country;
if (len != NULL) *len = v ->Len;
cmsUInt32Number StrLen = 0;
cmsUInt32Number ASCIIlen, i;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
+ cmsUInt16Number Lang = strTo16(LanguageCode);
+ cmsUInt16Number Cntry = strTo16(CountryCode);
// Sanitize
if (mlu == NULL) return 0;
const wchar_t *Wide;
cmsUInt32Number StrLen = 0;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
+ cmsUInt16Number Lang = strTo16(LanguageCode);
+ cmsUInt16Number Cntry = strTo16(CountryCode);
// Sanitize
if (mlu == NULL) return 0;
{
const wchar_t *Wide;
- cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
- cmsUInt16Number Cntry = _cmsAdjustEndianess16(*(cmsUInt16Number*) CountryCode);
+ cmsUInt16Number Lang = strTo16(LanguageCode);
+ cmsUInt16Number Cntry = strTo16(CountryCode);
cmsUInt16Number ObtLang, ObtCode;
// Sanitize
if (Wide == NULL) return FALSE;
// Get used language and code
- *(cmsUInt16Number *)ObtainedLanguage = _cmsAdjustEndianess16(ObtLang);
- *(cmsUInt16Number *)ObtainedCountry = _cmsAdjustEndianess16(ObtCode);
+ strFrom16(ObtainedLanguage, ObtLang);
+ strFrom16(ObtainedCountry, ObtCode);
+
+ return TRUE;
+}
+
+
+
+// Get the number of translations in the MLU object
+cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu)
+{
+ if (mlu == NULL) return 0;
+ return mlu->UsedEntries;
+}
+
+// Get the language and country codes for a specific MLU index
+cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu,
+ cmsUInt32Number idx,
+ char LanguageCode[3],
+ char CountryCode[3])
+{
+ _cmsMLUentry *entry;
+
+ if (mlu == NULL) return FALSE;
+
+ if (idx >= mlu->UsedEntries) return FALSE;
+
+ entry = &mlu->Entries[idx];
+
+ strFrom16(LanguageCode, entry->Language);
+ strFrom16(CountryCode, entry->Country);
- ObtainedLanguage[2] = ObtainedCountry[2] = 0;
return TRUE;
}
size = v ->Allocated * 2;
// Keep a maximum color lists can grow, 100K entries seems reasonable
- if (size > 1024*100) return FALSE;
+ if (size > 1024 * 100) {
+ _cmsFree(v->ContextID, (void*) v->List);
+ v->List = NULL;
+ return FALSE;
+ }
NewPtr = (_cmsNAMEDCOLOR*) _cmsRealloc(v ->ContextID, v ->List, size * sizeof(_cmsNAMEDCOLOR));
if (NewPtr == NULL)
v ->nColors = 0;
v ->ContextID = ContextID;
- while (v -> Allocated < n)
- GrowNamedColorList(v);
+ while (v -> Allocated < n) {
+ if (!GrowNamedColorList(v)) {
+ cmsFreeNamedColorList(v);
+ return NULL;
+ }
+ }
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix)-1);
+ strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix)-1);
v->Prefix[32] = v->Suffix[32] = 0;
v -> ColorantCount = ColorantCount;
// Free a list
void CMSEXPORT cmsFreeNamedColorList(cmsNAMEDCOLORLIST* v)
{
+ if (v == NULL) return;
if (v ->List) _cmsFree(v ->ContextID, v ->List);
- if (v) _cmsFree(v ->ContextID, v);
+ _cmsFree(v ->ContextID, v);
}
cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(const cmsNAMEDCOLORLIST* v)
if (NewNC == NULL) return NULL;
// For really large tables we need this
- while (NewNC ->Allocated < v ->Allocated)
- GrowNamedColorList(NewNC);
+ while (NewNC ->Allocated < v ->Allocated){
+ if (!GrowNamedColorList(NewNC))
+ {
+ cmsFreeNamedColorList(NewNC);
+ return NULL;
+ }
+ }
memmove(NewNC ->Prefix, v ->Prefix, sizeof(v ->Prefix));
memmove(NewNC ->Suffix, v ->Suffix, sizeof(v ->Suffix));
}
for (i=0; i < NamedColorList ->ColorantCount; i++)
- NamedColorList ->List[NamedColorList ->nColors].DeviceColorant[i] = Colorant == NULL? 0 : Colorant[i];
+ NamedColorList ->List[NamedColorList ->nColors].DeviceColorant[i] = Colorant == NULL ? (cmsUInt16Number)0 : Colorant[i];
for (i=0; i < 3; i++)
- NamedColorList ->List[NamedColorList ->nColors].PCS[i] = PCS == NULL ? 0 : PCS[i];
+ NamedColorList ->List[NamedColorList ->nColors].PCS[i] = PCS == NULL ? (cmsUInt16Number) 0 : PCS[i];
if (Name != NULL) {
- strncpy(NamedColorList ->List[NamedColorList ->nColors].Name, Name,
- sizeof(NamedColorList ->List[NamedColorList ->nColors].Name));
-
+ strncpy(NamedColorList ->List[NamedColorList ->nColors].Name, Name, cmsMAX_PATH-1);
NamedColorList ->List[NamedColorList ->nColors].Name[cmsMAX_PATH-1] = 0;
}
if (nColor >= cmsNamedColorCount(NamedColorList)) return FALSE;
+ // strcpy instead of strncpy because many apps are using small buffers
if (Name) strcpy(Name, NamedColorList->List[nColor].Name);
if (Prefix) strcpy(Prefix, NamedColorList->Prefix);
if (Suffix) strcpy(Suffix, NamedColorList->Suffix);
// Search for a given color name (no prefix or suffix)
cmsInt32Number CMSEXPORT cmsNamedColorIndex(const cmsNAMEDCOLORLIST* NamedColorList, const char* Name)
{
- int i, n;
+ cmsUInt32Number i;
+ cmsUInt32Number n;
if (NamedColorList == NULL) return -1;
n = cmsNamedColorCount(NamedColorList);
for (i=0; i < n; i++) {
if (cmsstrcasecmp(Name, NamedColorList->List[i].Name) == 0)
- return i;
+ return (cmsInt32Number) i;
}
return -1;
cmsUInt16Number index = (cmsUInt16Number) _cmsQuickSaturateWord(In[0] * 65535.0);
if (index >= NamedColorList-> nColors) {
- cmsSignalError(NamedColorList ->ContextID, cmsERROR_RANGE, "Color %d out of range; ignored", index);
+ cmsSignalError(NamedColorList ->ContextID, cmsERROR_RANGE, "Color %d out of range", index);
+ Out[0] = Out[1] = Out[2] = 0.0f;
}
else {
cmsUInt32Number j;
if (index >= NamedColorList-> nColors) {
- cmsSignalError(NamedColorList ->ContextID, cmsERROR_RANGE, "Color %d out of range; ignored", index);
+ cmsSignalError(NamedColorList ->ContextID, cmsERROR_RANGE, "Color %d out of range", index);
+ for (j = 0; j < NamedColorList->ColorantCount; j++)
+ Out[j] = 0.0f;
+
}
else {
for (j=0; j < NamedColorList ->ColorantCount; j++)
// Named color lookup element
-cmsStage* _cmsStageAllocNamedColor(cmsNAMEDCOLORLIST* NamedColorList, cmsBool UsePCS)
+cmsStage* CMSEXPORT _cmsStageAllocNamedColor(cmsNAMEDCOLORLIST* NamedColorList, cmsBool UsePCS)
{
return _cmsStageAllocPlaceholder(NamedColorList ->ContextID,
cmsSigNamedColorElemType,
Seq -> seq = (cmsPSEQDESC*) _cmsCalloc(ContextID, n, sizeof(cmsPSEQDESC));
Seq -> n = n;
+ if (Seq -> seq == NULL) {
+ _cmsFree(ContextID, Seq);
+ return NULL;
+ }
for (i=0; i < n; i++) {
Seq -> seq[i].Manufacturer = NULL;
{
_cmsDICT* old_dict = (_cmsDICT*) hDict;
cmsHANDLE hNew;
- _cmsDICT* new_dict;
cmsDICTentry *entry;
_cmsAssert(old_dict != NULL);
hNew = cmsDictAlloc(old_dict ->ContextID);
if (hNew == NULL) return NULL;
- new_dict = (_cmsDICT*) hNew;
-
// Walk the list freeing all nodes
entry = old_dict ->head;
while (entry != NULL) {
-
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
cmsContext ContextID;
// Number of channels
- int nInputs;
- int nOutputs;
-
- // Since there is no limitation of the output number of channels, this buffer holding the connexion CLUT-shaper
- // has to be dynamically allocated. This is not the case of first step shaper-CLUT, which is limited to max inputs
- cmsUInt16Number* StageDEF;
+ cmsUInt32Number nInputs;
+ cmsUInt32Number nOutputs;
_cmsInterpFn16 EvalCurveIn16[MAX_INPUT_DIMENSIONS]; // The maximum number of input channels is known in advance
cmsInterpParams* ParamsCurveIn16[MAX_INPUT_DIMENSIONS];
cmsContext ContextID;
- int nCurves; // Number of curves
- int nElements; // Elements in curves
+ cmsUInt32Number nCurves; // Number of curves
+ cmsUInt32Number nElements; // Elements in curves
cmsUInt16Number** Curves; // Points to a dynamically allocated array
} Curves16Data;
return AnyOpt;
}
+
+static
+cmsBool CloseEnoughFloat(cmsFloat64Number a, cmsFloat64Number b)
+{
+ return fabs(b - a) < 0.00001f;
+}
+
+static
+cmsBool isFloatMatrixIdentity(const cmsMAT3* a)
+{
+ cmsMAT3 Identity;
+ int i, j;
+
+ _cmsMAT3identity(&Identity);
+
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++)
+ if (!CloseEnoughFloat(a->v[i].n[j], Identity.v[i].n[j])) return FALSE;
+
+ return TRUE;
+}
+// if two adjacent matrices are found, multiply them.
+static
+cmsBool _MultiplyMatrix(cmsPipeline* Lut)
+{
+ cmsStage** pt1;
+ cmsStage** pt2;
+ cmsStage* chain;
+ cmsBool AnyOpt = FALSE;
+
+ pt1 = &Lut->Elements;
+ if (*pt1 == NULL) return AnyOpt;
+
+ while (*pt1 != NULL) {
+
+ pt2 = &((*pt1)->Next);
+ if (*pt2 == NULL) return AnyOpt;
+
+ if ((*pt1)->Implements == cmsSigMatrixElemType && (*pt2)->Implements == cmsSigMatrixElemType) {
+
+ // Get both matrices
+ _cmsStageMatrixData* m1 = (_cmsStageMatrixData*) cmsStageData(*pt1);
+ _cmsStageMatrixData* m2 = (_cmsStageMatrixData*) cmsStageData(*pt2);
+ cmsMAT3 res;
+
+ // Input offset and output offset should be zero to use this optimization
+ if (m1->Offset != NULL || m2 ->Offset != NULL ||
+ cmsStageInputChannels(*pt1) != 3 || cmsStageOutputChannels(*pt1) != 3 ||
+ cmsStageInputChannels(*pt2) != 3 || cmsStageOutputChannels(*pt2) != 3)
+ return FALSE;
+
+ // Multiply both matrices to get the result
+ _cmsMAT3per(&res, (cmsMAT3*)m2->Double, (cmsMAT3*)m1->Double);
+
+ // Get the next in chain after the matrices
+ chain = (*pt2)->Next;
+
+ // Remove both matrices
+ _RemoveElement(pt2);
+ _RemoveElement(pt1);
+
+ // Now what if the result is a plain identity?
+ if (!isFloatMatrixIdentity(&res)) {
+
+ // We can not get rid of full matrix
+ cmsStage* Multmat = cmsStageAllocMatrix(Lut->ContextID, 3, 3, (const cmsFloat64Number*) &res, NULL);
+ if (Multmat == NULL) return FALSE; // Should never happen
+
+ // Recover the chain
+ Multmat->Next = chain;
+ *pt1 = Multmat;
+ }
+
+ AnyOpt = TRUE;
+ }
+ else
+ pt1 = &((*pt1)->Next);
+ }
+
+ return AnyOpt;
+}
+
+
// Preoptimize just gets rif of no-ops coming paired. Conversion from v2 to v4 followed
// by a v4 to v2 and vice-versa. The elements are then discarded.
static
{
cmsBool AnyOpt = FALSE, Opt;
- AnyOpt = FALSE;
-
do {
Opt = FALSE;
// Remove float pcs Lab conversions
Opt |= _Remove2Op(Lut, cmsSigXYZ2FloatPCS, cmsSigFloatPCS2XYZ);
+ // Simplify matrix.
+ Opt |= _MultiplyMatrix(Lut);
+
if (Opt) AnyOpt = TRUE;
} while (Opt);
}
static
-void Eval16nop1D(register const cmsUInt16Number Input[],
- register cmsUInt16Number Output[],
- register const struct _cms_interp_struc* p)
+void Eval16nop1D(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const struct _cms_interp_struc* p)
{
Output[0] = Input[0];
}
static
-void PrelinEval16(register const cmsUInt16Number Input[],
- register cmsUInt16Number Output[],
- register const void* D)
+void PrelinEval16(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const void* D)
{
Prelin16Data* p16 = (Prelin16Data*) D;
cmsUInt16Number StageABC[MAX_INPUT_DIMENSIONS];
- int i;
+ cmsUInt16Number StageDEF[cmsMAXCHANNELS];
+ cmsUInt32Number i;
for (i=0; i < p16 ->nInputs; i++) {
p16 ->EvalCurveIn16[i](&Input[i], &StageABC[i], p16 ->ParamsCurveIn16[i]);
}
- p16 ->EvalCLUT(StageABC, p16 ->StageDEF, p16 ->CLUTparams);
+ p16 ->EvalCLUT(StageABC, StageDEF, p16 ->CLUTparams);
for (i=0; i < p16 ->nOutputs; i++) {
- p16 ->EvalCurveOut16[i](&p16->StageDEF[i], &Output[i], p16 ->ParamsCurveOut16[i]);
+ p16 ->EvalCurveOut16[i](&StageDEF[i], &Output[i], p16 ->ParamsCurveOut16[i]);
}
}
{
Prelin16Data* p16 = (Prelin16Data*) ptr;
- _cmsFree(ContextID, p16 ->StageDEF);
_cmsFree(ContextID, p16 ->EvalCurveOut16);
_cmsFree(ContextID, p16 ->ParamsCurveOut16);
void* Prelin16dup(cmsContext ContextID, const void* ptr)
{
Prelin16Data* p16 = (Prelin16Data*) ptr;
- Prelin16Data* Duped = _cmsDupMem(ContextID, p16, sizeof(Prelin16Data));
+ Prelin16Data* Duped = (Prelin16Data*) _cmsDupMem(ContextID, p16, sizeof(Prelin16Data));
if (Duped == NULL) return NULL;
- Duped ->StageDEF = _cmsCalloc(ContextID, p16 ->nOutputs, sizeof(cmsUInt16Number));
- Duped ->EvalCurveOut16 = _cmsDupMem(ContextID, p16 ->EvalCurveOut16, p16 ->nOutputs * sizeof(_cmsInterpFn16));
- Duped ->ParamsCurveOut16 = _cmsDupMem(ContextID, p16 ->ParamsCurveOut16, p16 ->nOutputs * sizeof(cmsInterpParams* ));
+ Duped->EvalCurveOut16 = (_cmsInterpFn16*) _cmsDupMem(ContextID, p16->EvalCurveOut16, p16->nOutputs * sizeof(_cmsInterpFn16));
+ Duped->ParamsCurveOut16 = (cmsInterpParams**)_cmsDupMem(ContextID, p16->ParamsCurveOut16, p16->nOutputs * sizeof(cmsInterpParams*));
return Duped;
}
static
Prelin16Data* PrelinOpt16alloc(cmsContext ContextID,
const cmsInterpParams* ColorMap,
- int nInputs, cmsToneCurve** In,
- int nOutputs, cmsToneCurve** Out )
+ cmsUInt32Number nInputs, cmsToneCurve** In,
+ cmsUInt32Number nOutputs, cmsToneCurve** Out )
{
- int i;
- Prelin16Data* p16 = _cmsMallocZero(ContextID, sizeof(Prelin16Data));
+ cmsUInt32Number i;
+ Prelin16Data* p16 = (Prelin16Data*)_cmsMallocZero(ContextID, sizeof(Prelin16Data));
if (p16 == NULL) return NULL;
p16 ->nInputs = nInputs;
- p16 -> nOutputs = nOutputs;
+ p16 ->nOutputs = nOutputs;
for (i=0; i < nInputs; i++) {
p16 ->EvalCLUT = ColorMap ->Interpolation.Lerp16;
- p16 -> StageDEF = _cmsCalloc(ContextID, p16 ->nOutputs, sizeof(cmsUInt16Number));
p16 -> EvalCurveOut16 = (_cmsInterpFn16*) _cmsCalloc(ContextID, nOutputs, sizeof(_cmsInterpFn16));
+ if (p16->EvalCurveOut16 == NULL)
+ {
+ _cmsFree(ContextID, p16);
+ return NULL;
+ }
+
p16 -> ParamsCurveOut16 = (cmsInterpParams**) _cmsCalloc(ContextID, nOutputs, sizeof(cmsInterpParams* ));
+ if (p16->ParamsCurveOut16 == NULL)
+ {
+
+ _cmsFree(ContextID, p16->EvalCurveOut16);
+ _cmsFree(ContextID, p16);
+ return NULL;
+ }
for (i=0; i < nOutputs; i++) {
// Sampler implemented by another LUT. This is a clean way to precalculate the devicelink 3D CLUT for
// almost any transform. We use floating point precision and then convert from floating point to 16 bits.
static
-int XFormSampler16(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+cmsInt32Number XFormSampler16(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void* Cargo)
{
cmsPipeline* Lut = (cmsPipeline*) Cargo;
cmsFloat32Number InFloat[cmsMAXCHANNELS], OutFloat[cmsMAXCHANNELS];
// is to fix scum dot on broken profiles/transforms. Works on 1, 3 and 4 channels
static
cmsBool PatchLUT(cmsStage* CLUT, cmsUInt16Number At[], cmsUInt16Number Value[],
- int nChannelsOut, int nChannelsIn)
+ cmsUInt32Number nChannelsOut, cmsUInt32Number nChannelsIn)
{
_cmsStageCLutData* Grid = (_cmsStageCLutData*) CLUT ->Data;
cmsInterpParams* p16 = Grid ->Params;
int i, index;
if (CLUT -> Type != cmsSigCLutElemType) {
- cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) Attempt to PatchLUT on non-lut MPE");
+ cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) Attempt to PatchLUT on non-lut stage");
return FALSE;
}
((pz - z0) != 0) ||
((pw - w0) != 0)) return FALSE; // Not on exact node
- index = p16 -> opta[3] * x0 +
- p16 -> opta[2] * y0 +
- p16 -> opta[1] * z0 +
- p16 -> opta[0] * w0;
+ index = (int) p16 -> opta[3] * x0 +
+ (int) p16 -> opta[2] * y0 +
+ (int) p16 -> opta[1] * z0 +
+ (int) p16 -> opta[0] * w0;
}
else
if (nChannelsIn == 3) {
((py - y0) != 0) ||
((pz - z0) != 0)) return FALSE; // Not on exact node
- index = p16 -> opta[2] * x0 +
- p16 -> opta[1] * y0 +
- p16 -> opta[0] * z0;
+ index = (int) p16 -> opta[2] * x0 +
+ (int) p16 -> opta[1] * y0 +
+ (int) p16 -> opta[0] * z0;
}
else
if (nChannelsIn == 1) {
if (((px - x0) != 0)) return FALSE; // Not on exact node
- index = p16 -> opta[0] * x0;
+ index = (int) p16 -> opta[0] * x0;
}
else {
cmsSignalError(CLUT->ContextID, cmsERROR_INTERNAL, "(internal) %d Channels are not supported on PatchLUT", nChannelsIn);
return FALSE;
}
- for (i=0; i < nChannelsOut; i++)
- Grid -> Tab.T[index + i] = Value[i];
+ for (i = 0; i < (int) nChannelsOut; i++)
+ Grid->Tab.T[index + i] = Value[i];
- return TRUE;
+ return TRUE;
}
-// Auxiliar, to see if two values are equal or very different
+// Auxiliary, to see if two values are equal or very different
static
-cmsBool WhitesAreEqual(int n, cmsUInt16Number White1[], cmsUInt16Number White2[] )
+cmsBool WhitesAreEqual(cmsUInt32Number n, cmsUInt16Number White1[], cmsUInt16Number White2[] )
{
- int i;
+ cmsUInt32Number i;
for (i=0; i < n; i++) {
- if (abs(White1[i] - White2[i]) > 0xf000) return TRUE; // Values are so extremly different that the fixup should be avoided
+ if (abs(White1[i] - White2[i]) > 0xf000) return TRUE; // Values are so extremely different that the fixup should be avoided
if (White1[i] != White2[i]) return FALSE;
}
return TRUE;
for (i=0; i < nOuts; i++) {
cmsToneCurve* InversePostLin = cmsReverseToneCurve(Curves[i]);
- WhiteOut[i] = cmsEvalToneCurve16(InversePostLin, WhitePointOut[i]);
- cmsFreeToneCurve(InversePostLin);
+ if (InversePostLin == NULL) {
+ WhiteOut[i] = WhitePointOut[i];
+
+ } else {
+
+ WhiteOut[i] = cmsEvalToneCurve16(InversePostLin, WhitePointOut[i]);
+ cmsFreeToneCurve(InversePostLin);
+ }
}
}
else {
static
cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
- cmsPipeline* Src;
- cmsPipeline* Dest;
+ cmsPipeline* Src = NULL;
+ cmsPipeline* Dest = NULL;
cmsStage* mpe;
cmsStage* CLUT;
cmsStage *KeepPreLin = NULL, *KeepPostLin = NULL;
- int nGridPoints;
+ cmsUInt32Number nGridPoints;
cmsColorSpaceSignature ColorSpace, OutputColorSpace;
cmsStage *NewPreLin = NULL;
cmsStage *NewPostLin = NULL;
cmsToneCurve** DataSetOut;
Prelin16Data* p16;
-
- // This is a loosy optimization! does not apply in floating-point cases
+ // This is a lossy optimization! does not apply in floating-point cases
if (_cmsFormatterIsFloat(*InputFormat) || _cmsFormatterIsFloat(*OutputFormat)) return FALSE;
- ColorSpace = _cmsICCcolorSpace(T_COLORSPACE(*InputFormat));
- OutputColorSpace = _cmsICCcolorSpace(T_COLORSPACE(*OutputFormat));
+ ColorSpace = _cmsICCcolorSpace((int) T_COLORSPACE(*InputFormat));
+ OutputColorSpace = _cmsICCcolorSpace((int) T_COLORSPACE(*OutputFormat));
+
+ // Color space must be specified
+ if (ColorSpace == (cmsColorSpaceSignature)0 ||
+ OutputColorSpace == (cmsColorSpaceSignature)0) return FALSE;
+
nGridPoints = _cmsReasonableGridpointsByColorspace(ColorSpace, *dwFlags);
// For empty LUTs, 2 points are enough
Src = *Lut;
- // Named color pipelines cannot be optimized either
- for (mpe = cmsPipelineGetPtrToFirstStage(Src);
- mpe != NULL;
- mpe = cmsStageNext(mpe)) {
+ // Named color pipelines cannot be optimized either
+ for (mpe = cmsPipelineGetPtrToFirstStage(Src);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE;
}
cmsStage* PreLin = cmsPipelineGetPtrToFirstStage(Src);
// Check if suitable
- if (PreLin ->Type == cmsSigCurveSetElemType) {
+ if (PreLin && PreLin ->Type == cmsSigCurveSetElemType) {
// Maybe this is a linear tram, so we can avoid the whole stuff
if (!AllCurvesAreLinear(PreLin)) {
// All seems ok, proceed.
NewPreLin = cmsStageDup(PreLin);
- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, NewPreLin);
+ if(!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, NewPreLin))
+ goto Error;
// Remove prelinearization. Since we have duplicated the curve
- // in destination LUT, the sampling shoud be applied after this stage.
+ // in destination LUT, the sampling should be applied after this stage.
cmsPipelineUnlinkStage(Src, cmsAT_BEGIN, &KeepPreLin);
}
}
// Allocate the CLUT
CLUT = cmsStageAllocCLut16bit(Src ->ContextID, nGridPoints, Src ->InputChannels, Src->OutputChannels, NULL);
- if (CLUT == NULL) return FALSE;
+ if (CLUT == NULL) goto Error;
// Add the CLUT to the destination LUT
- cmsPipelineInsertStage(Dest, cmsAT_END, CLUT);
+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, CLUT)) {
+ goto Error;
+ }
// Postlinearization tables are kept unless indicated by flags
if (*dwFlags & cmsFLAGS_CLUT_POST_LINEARIZATION) {
cmsStage* PostLin = cmsPipelineGetPtrToLastStage(Src);
// Check if suitable
- if (cmsStageType(PostLin) == cmsSigCurveSetElemType) {
+ if (PostLin && cmsStageType(PostLin) == cmsSigCurveSetElemType) {
// Maybe this is a linear tram, so we can avoid the whole stuff
if (!AllCurvesAreLinear(PostLin)) {
// All seems ok, proceed.
NewPostLin = cmsStageDup(PostLin);
- cmsPipelineInsertStage(Dest, cmsAT_END, NewPostLin);
+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, NewPostLin))
+ goto Error;
- // In destination LUT, the sampling shoud be applied after this stage.
+ // In destination LUT, the sampling should be applied after this stage.
cmsPipelineUnlinkStage(Src, cmsAT_END, &KeepPostLin);
}
}
}
// Now its time to do the sampling. We have to ignore pre/post linearization
- // The source LUT whithout pre/post curves is passed as parameter.
+ // The source LUT without pre/post curves is passed as parameter.
if (!cmsStageSampleCLut16bit(CLUT, XFormSampler16, (void*) Src, 0)) {
-
+Error:
// Ops, something went wrong, Restore stages
- if (KeepPreLin != NULL) cmsPipelineInsertStage(Src, cmsAT_BEGIN, KeepPreLin);
- if (KeepPostLin != NULL) cmsPipelineInsertStage(Src, cmsAT_END, KeepPostLin);
+ if (KeepPreLin != NULL) {
+ if (!cmsPipelineInsertStage(Src, cmsAT_BEGIN, KeepPreLin)) {
+ _cmsAssert(0); // This never happens
+ }
+ }
+ if (KeepPostLin != NULL) {
+ if (!cmsPipelineInsertStage(Src, cmsAT_END, KeepPostLin)) {
+ _cmsAssert(0); // This never happens
+ }
+ }
cmsPipelineFree(Dest);
return FALSE;
}
if (DataSetIn == NULL && DataSetOut == NULL) {
- _cmsPipelineSetOptimizationParameters(Dest, (_cmsOPTeval16Fn) DataCLUT->Params->Interpolation.Lerp16, DataCLUT->Params, NULL, NULL);
+ _cmsPipelineSetOptimizationParameters(Dest, (_cmsPipelineEval16Fn) DataCLUT->Params->Interpolation.Lerp16, DataCLUT->Params, NULL, NULL);
}
else {
p16 = PrelinOpt16alloc(Dest ->ContextID,
- DataCLUT ->Params,
- Dest ->InputChannels,
- DataSetIn,
- Dest ->OutputChannels,
- DataSetOut);
-
+ DataCLUT ->Params,
+ Dest ->InputChannels,
+ DataSetIn,
+ Dest ->OutputChannels,
+ DataSetOut);
_cmsPipelineSetOptimizationParameters(Dest, PrelinEval16, (void*) p16, PrelinOpt16free, Prelin16dup);
}
{
int BeginVal, EndVal;
int AtBegin = (int) floor((cmsFloat64Number) g ->nEntries * 0.02 + 0.5); // Cutoff at 2%
- int AtEnd = g ->nEntries - AtBegin - 1; // And 98%
+ int AtEnd = (int) g ->nEntries - AtBegin - 1; // And 98%
cmsFloat64Number Val, Slope, beta;
int i;
cmsS15Fixed16Number v1, v2, v3;
Prelin8Data* p8;
- p8 = _cmsMallocZero(ContextID, sizeof(Prelin8Data));
+ p8 = (Prelin8Data*)_cmsMallocZero(ContextID, sizeof(Prelin8Data));
if (p8 == NULL) return NULL;
// Since this only works for 8 bit input, values comes always as x * 257,
// Move to 0..1.0 in fixed domain
- v1 = _cmsToFixedDomain(Input[0] * p -> Domain[0]);
- v2 = _cmsToFixedDomain(Input[1] * p -> Domain[1]);
- v3 = _cmsToFixedDomain(Input[2] * p -> Domain[2]);
+ v1 = _cmsToFixedDomain((int) (Input[0] * p -> Domain[0]));
+ v2 = _cmsToFixedDomain((int) (Input[1] * p -> Domain[1]));
+ v3 = _cmsToFixedDomain((int) (Input[2] * p -> Domain[2]));
// Store the precalculated table of nodes
p8 ->X0[i] = (p->opta[2] * FIXED_TO_INT(v1));
// A optimized interpolation for 8-bit input.
#define DENS(i,j,k) (LutTable[(i)+(j)+(k)+OutChan])
-static
-void PrelinEval8(register const cmsUInt16Number Input[],
- register cmsUInt16Number Output[],
- register const void* D)
+static CMS_NO_SANITIZE
+void PrelinEval8(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const void* D)
{
cmsUInt8Number r, g, b;
cmsS15Fixed16Number rx, ry, rz;
cmsS15Fixed16Number c0, c1, c2, c3, Rest;
int OutChan;
- register cmsS15Fixed16Number X0, X1, Y0, Y1, Z0, Z1;
+ CMSREGISTER cmsS15Fixed16Number X0, X1, Y0, Y1, Z0, Z1;
Prelin8Data* p8 = (Prelin8Data*) D;
- register const cmsInterpParams* p = p8 ->p;
- int TotalOut = p -> nOutputs;
- const cmsUInt16Number* LutTable = p -> Table;
+ CMSREGISTER const cmsInterpParams* p = p8 ->p;
+ int TotalOut = (int) p -> nOutputs;
+ const cmsUInt16Number* LutTable = (const cmsUInt16Number*) p->Table;
- r = Input[0] >> 8;
- g = Input[1] >> 8;
- b = Input[2] >> 8;
+ r = (cmsUInt8Number) (Input[0] >> 8);
+ g = (cmsUInt8Number) (Input[1] >> 8);
+ b = (cmsUInt8Number) (Input[2] >> 8);
- X0 = X1 = p8->X0[r];
- Y0 = Y1 = p8->Y0[g];
- Z0 = Z1 = p8->Z0[b];
+ X0 = (cmsS15Fixed16Number) p8->X0[r];
+ Y0 = (cmsS15Fixed16Number) p8->Y0[g];
+ Z0 = (cmsS15Fixed16Number) p8->Z0[b];
rx = p8 ->rx[r];
ry = p8 ->ry[g];
rz = p8 ->rz[b];
- X1 = X0 + ((rx == 0) ? 0 : p ->opta[2]);
- Y1 = Y0 + ((ry == 0) ? 0 : p ->opta[1]);
- Z1 = Z0 + ((rz == 0) ? 0 : p ->opta[0]);
+ X1 = X0 + (cmsS15Fixed16Number)((rx == 0) ? 0 : p ->opta[2]);
+ Y1 = Y0 + (cmsS15Fixed16Number)((ry == 0) ? 0 : p ->opta[1]);
+ Z1 = Z0 + (cmsS15Fixed16Number)((rz == 0) ? 0 : p ->opta[0]);
// These are the 6 Tetrahedral
c1 = c2 = c3 = 0;
}
-
- Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
- Output[OutChan] = (cmsUInt16Number)c0 + ((Rest + (Rest>>16))>>16);
+ Rest = c1 * rx + c2 * ry + c3 * rz + 0x8001;
+ Output[OutChan] = (cmsUInt16Number) (c0 + ((Rest + (Rest >> 16)) >> 16));
}
}
static
cmsBool IsDegenerated(const cmsToneCurve* g)
{
- int i, Zeros = 0, Poles = 0;
- int nEntries = g ->nEntries;
+ cmsUInt32Number i, Zeros = 0, Poles = 0;
+ cmsUInt32Number nEntries = g ->nEntries;
for (i=0; i < nEntries; i++) {
}
if (Zeros == 1 && Poles == 1) return FALSE; // For linear tables
- if (Zeros > (nEntries / 4)) return TRUE; // Degenerated, mostly zeros
- if (Poles > (nEntries / 4)) return TRUE; // Degenerated, mostly poles
+ if (Zeros > (nEntries / 20)) return TRUE; // Degenerated, many zeros
+ if (Poles > (nEntries / 20)) return TRUE; // Degenerated, many poles
return FALSE;
}
cmsBool OptimizeByComputingLinearization(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsPipeline* OriginalLut;
- int nGridPoints;
+ cmsUInt32Number nGridPoints;
cmsToneCurve *Trans[cmsMAXCHANNELS], *TransReverse[cmsMAXCHANNELS];
cmsUInt32Number t, i;
cmsFloat32Number v, In[cmsMAXCHANNELS], Out[cmsMAXCHANNELS];
cmsColorSpaceSignature ColorSpace, OutputColorSpace;
cmsStage* OptimizedPrelinMpe;
cmsStage* mpe;
- cmsToneCurve** OptimizedPrelinCurves;
- _cmsStageCLutData* OptimizedPrelinCLUT;
+ cmsToneCurve** OptimizedPrelinCurves;
+ _cmsStageCLutData* OptimizedPrelinCLUT;
- // This is a loosy optimization! does not apply in floating-point cases
+ // This is a lossy optimization! does not apply in floating-point cases
if (_cmsFormatterIsFloat(*InputFormat) || _cmsFormatterIsFloat(*OutputFormat)) return FALSE;
- // Only on RGB
+ // Only on chunky RGB
if (T_COLORSPACE(*InputFormat) != PT_RGB) return FALSE;
- if (T_COLORSPACE(*OutputFormat) != PT_RGB) return FALSE;
+ if (T_PLANAR(*InputFormat)) return FALSE;
+ if (T_COLORSPACE(*OutputFormat) != PT_RGB) return FALSE;
+ if (T_PLANAR(*OutputFormat)) return FALSE;
// On 16 bits, user has to specify the feature
if (!_cmsFormatterIs8bit(*InputFormat)) {
if (cmsStageType(mpe) == cmsSigNamedColorElemType) return FALSE;
}
- ColorSpace = _cmsICCcolorSpace(T_COLORSPACE(*InputFormat));
- OutputColorSpace = _cmsICCcolorSpace(T_COLORSPACE(*OutputFormat));
+ ColorSpace = _cmsICCcolorSpace((int) T_COLORSPACE(*InputFormat));
+ OutputColorSpace = _cmsICCcolorSpace((int) T_COLORSPACE(*OutputFormat));
+
+ // Color space must be specified
+ if (ColorSpace == (cmsColorSpaceSignature)0 ||
+ OutputColorSpace == (cmsColorSpaceSignature)0) return FALSE;
+
nGridPoints = _cmsReasonableGridpointsByColorspace(ColorSpace, *dwFlags);
// Empty gamma containers
memset(Trans, 0, sizeof(Trans));
memset(TransReverse, 0, sizeof(TransReverse));
+ // If the last stage of the original lut are curves, and those curves are
+ // degenerated, it is likely the transform is squeezing and clipping
+ // the output from previous CLUT. We cannot optimize this case
+ {
+ cmsStage* last = cmsPipelineGetPtrToLastStage(OriginalLut);
+
+ if (last == NULL) goto Error;
+ if (cmsStageType(last) == cmsSigCurveSetElemType) {
+
+ _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*)cmsStageData(last);
+ for (i = 0; i < Data->nCurves; i++) {
+ if (IsDegenerated(Data->TheCurves[i]))
+ goto Error;
+ }
+ }
+ }
+
for (t = 0; t < OriginalLut ->InputChannels; t++) {
Trans[t] = cmsBuildTabulatedToneCurve16(OriginalLut ->ContextID, PRELINEARIZATION_POINTS, NULL);
if (Trans[t] == NULL) goto Error;
LutPlusCurves = cmsPipelineDup(OriginalLut);
if (LutPlusCurves == NULL) goto Error;
- cmsPipelineInsertStage(LutPlusCurves, cmsAT_BEGIN, cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, TransReverse));
+ if (!cmsPipelineInsertStage(LutPlusCurves, cmsAT_BEGIN, cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, TransReverse)))
+ goto Error;
// Create the result LUT
OptimizedLUT = cmsPipelineAlloc(OriginalLut ->ContextID, OriginalLut ->InputChannels, OriginalLut ->OutputChannels);
OptimizedPrelinMpe = cmsStageAllocToneCurves(OriginalLut ->ContextID, OriginalLut ->InputChannels, Trans);
// Create and insert the curves at the beginning
- cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedPrelinMpe);
+ if (!cmsPipelineInsertStage(OptimizedLUT, cmsAT_BEGIN, OptimizedPrelinMpe))
+ goto Error;
// Allocate the CLUT for result
OptimizedCLUTmpe = cmsStageAllocCLut16bit(OriginalLut ->ContextID, nGridPoints, OriginalLut ->InputChannels, OriginalLut ->OutputChannels, NULL);
// Add the CLUT to the destination LUT
- cmsPipelineInsertStage(OptimizedLUT, cmsAT_END, OptimizedCLUTmpe);
+ if (!cmsPipelineInsertStage(OptimizedLUT, cmsAT_END, OptimizedCLUTmpe))
+ goto Error;
// Resample the LUT
if (!cmsStageSampleCLut16bit(OptimizedCLUTmpe, XFormSampler16, (void*) LutPlusCurves, 0)) goto Error;
return FALSE;
cmsUNUSED_PARAMETER(Intent);
+ cmsUNUSED_PARAMETER(lIsLinear);
}
void CurvesFree(cmsContext ContextID, void* ptr)
{
Curves16Data* Data = (Curves16Data*) ptr;
- int i;
+ cmsUInt32Number i;
for (i=0; i < Data -> nCurves; i++) {
static
void* CurvesDup(cmsContext ContextID, const void* ptr)
{
- Curves16Data* Data = _cmsDupMem(ContextID, ptr, sizeof(Curves16Data));
- int i;
+ Curves16Data* Data = (Curves16Data*)_cmsDupMem(ContextID, ptr, sizeof(Curves16Data));
+ cmsUInt32Number i;
if (Data == NULL) return NULL;
- Data ->Curves = _cmsDupMem(ContextID, Data ->Curves, Data ->nCurves * sizeof(cmsUInt16Number*));
+ Data->Curves = (cmsUInt16Number**) _cmsDupMem(ContextID, Data->Curves, Data->nCurves * sizeof(cmsUInt16Number*));
for (i=0; i < Data -> nCurves; i++) {
- Data ->Curves[i] = _cmsDupMem(ContextID, Data ->Curves[i], Data -> nElements * sizeof(cmsUInt16Number));
+ Data->Curves[i] = (cmsUInt16Number*) _cmsDupMem(ContextID, Data->Curves[i], Data->nElements * sizeof(cmsUInt16Number));
}
return (void*) Data;
// Precomputes tables for 8-bit on input devicelink.
static
-Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsToneCurve** G)
+Curves16Data* CurvesAlloc(cmsContext ContextID, cmsUInt32Number nCurves, cmsUInt32Number nElements, cmsToneCurve** G)
{
- int i, j;
+ cmsUInt32Number i, j;
Curves16Data* c16;
- c16 = _cmsMallocZero(ContextID, sizeof(Curves16Data));
+ c16 = (Curves16Data*)_cmsMallocZero(ContextID, sizeof(Curves16Data));
if (c16 == NULL) return NULL;
c16 ->nCurves = nCurves;
c16 ->nElements = nElements;
- c16 ->Curves = _cmsCalloc(ContextID, nCurves, sizeof(cmsUInt16Number*));
- if (c16 ->Curves == NULL) return NULL;
+ c16->Curves = (cmsUInt16Number**) _cmsCalloc(ContextID, nCurves, sizeof(cmsUInt16Number*));
+ if (c16->Curves == NULL) {
+ _cmsFree(ContextID, c16);
+ return NULL;
+ }
for (i=0; i < nCurves; i++) {
- c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ c16->Curves[i] = (cmsUInt16Number*) _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
- if (nElements == 256) {
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[j]);
+ }
+ _cmsFree(ContextID, c16->Curves);
+ _cmsFree(ContextID, c16);
+ return NULL;
+ }
+
+ if (nElements == 256U) {
for (j=0; j < nElements; j++) {
}
static
-void FastEvaluateCurves8(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register const void* D)
+void FastEvaluateCurves8(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER const void* D)
{
Curves16Data* Data = (Curves16Data*) D;
- cmsUInt8Number x;
- int i;
+ int x;
+ cmsUInt32Number i;
for (i=0; i < Data ->nCurves; i++) {
static
-void FastEvaluateCurves16(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register const void* D)
+void FastEvaluateCurves16(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER const void* D)
{
Curves16Data* Data = (Curves16Data*) D;
- int i;
+ cmsUInt32Number i;
for (i=0; i < Data ->nCurves; i++) {
Out[i] = Data -> Curves[i][In[i]];
static
-void FastIdentity16(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register const void* D)
+void FastIdentity16(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER const void* D)
{
cmsPipeline* Lut = (cmsPipeline*) D;
cmsUInt32Number i;
cmsStage* ObtainedCurves = NULL;
- // This is a loosy optimization! does not apply in floating-point cases
+ // This is a lossy optimization! does not apply in floating-point cases
if (_cmsFormatterIsFloat(*InputFormat) || _cmsFormatterIsFloat(*OutputFormat)) return FALSE;
// Only curves in this LUT?
GammaTables[i] = NULL;
}
- if (GammaTables != NULL) _cmsFree(Src ->ContextID, GammaTables);
+ if (GammaTables != NULL) {
+ _cmsFree(Src->ContextID, GammaTables);
+ GammaTables = NULL;
+ }
// Maybe the curves are linear at the end
if (!AllCurvesAreLinear(ObtainedCurves)) {
+ _cmsStageToneCurvesData* Data;
- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, ObtainedCurves);
+ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, ObtainedCurves))
+ goto Error;
+ Data = (_cmsStageToneCurvesData*) cmsStageData(ObtainedCurves);
+ ObtainedCurves = NULL;
// If the curves are to be applied in 8 bits, we can save memory
if (_cmsFormatterIs8bit(*InputFormat)) {
-
- _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) ObtainedCurves ->Data;
Curves16Data* c16 = CurvesAlloc(Dest ->ContextID, Data ->nCurves, 256, Data ->TheCurves);
+ if (c16 == NULL) goto Error;
*dwFlags |= cmsFLAGS_NOCACHE;
_cmsPipelineSetOptimizationParameters(Dest, FastEvaluateCurves8, c16, CurvesFree, CurvesDup);
}
else {
-
- _cmsStageToneCurvesData* Data = (_cmsStageToneCurvesData*) cmsStageData(ObtainedCurves);
Curves16Data* c16 = CurvesAlloc(Dest ->ContextID, Data ->nCurves, 65536, Data ->TheCurves);
+ if (c16 == NULL) goto Error;
*dwFlags |= cmsFLAGS_NOCACHE;
_cmsPipelineSetOptimizationParameters(Dest, FastEvaluateCurves16, c16, CurvesFree, CurvesDup);
}
// LUT optimizes to nothing. Set the identity LUT
cmsStageFree(ObtainedCurves);
+ ObtainedCurves = NULL;
- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageAllocIdentity(Dest ->ContextID, Src ->InputChannels));
+ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageAllocIdentity(Dest ->ContextID, Src ->InputChannels)))
+ goto Error;
*dwFlags |= cmsFLAGS_NOCACHE;
_cmsPipelineSetOptimizationParameters(Dest, FastIdentity16, (void*) Dest, NULL, NULL);
// to accomplish some performance. Actually it takes 256x3 16 bits tables and 16385 x 3 tables of 8 bits,
// in total about 50K, and the performance boost is huge!
static
-void MatShaperEval16(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register const void* D)
+void MatShaperEval16(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER const void* D)
{
MatShaper8Data* p = (MatShaper8Data*) D;
cmsS1Fixed14Number l1, l2, l3, r, g, b;
// In this case (and only in this case!) we can use this simplification since
// In[] is assured to come from a 8 bit number. (a << 8 | a)
- ri = In[0] & 0xFF;
- gi = In[1] & 0xFF;
- bi = In[2] & 0xFF;
+ ri = In[0] & 0xFFU;
+ gi = In[1] & 0xFFU;
+ bi = In[2] & 0xFFU;
// Across first shaper, which also converts to 1.14 fixed point
r = p->Shaper1R[ri];
l3 = (p->Mat[2][0] * r + p->Mat[2][1] * g + p->Mat[2][2] * b + p->Off[2] + 0x2000) >> 14;
// Now we have to clip to 0..1.0 range
- ri = (l1 < 0) ? 0 : ((l1 > 16384) ? 16384 : l1);
- gi = (l2 < 0) ? 0 : ((l2 > 16384) ? 16384 : l2);
- bi = (l3 < 0) ? 0 : ((l3 > 16384) ? 16384 : l3);
+ ri = (l1 < 0) ? 0 : ((l1 > 16384) ? 16384U : (cmsUInt32Number) l1);
+ gi = (l2 < 0) ? 0 : ((l2 > 16384) ? 16384U : (cmsUInt32Number) l2);
+ bi = (l3 < 0) ? 0 : ((l3 > 16384) ? 16384U : (cmsUInt32Number) l3);
// And across second shaper,
Out[0] = p->Shaper2R[ri];
R = (cmsFloat32Number) (i / 255.0);
y = cmsEvalToneCurveFloat(Curve, R);
- Table[i] = DOUBLE_TO_1FIXED14(y);
+ if (y < 131072.0)
+ Table[i] = DOUBLE_TO_1FIXED14(y);
+ else
+ Table[i] = 0x7fffffff;
}
}
R = (cmsFloat32Number) (i / 16384.0);
Val = cmsEvalToneCurveFloat(Curve, R); // Val comes 0..1.0
+ if (Val < 0)
+ Val = 0;
+
+ if (Val > 1.0)
+ Val = 1.0;
+
if (Is8BitsOutput) {
// If 8 bits output, we can optimize further by computing the / 257 part.
FillSecondShaper(p ->Shaper2G, Curve2[1], Is8Bits);
FillSecondShaper(p ->Shaper2B, Curve2[2], Is8Bits);
- // Convert matrix to nFixed14. Note that those values may take more than 16 bits as
+ // Convert matrix to nFixed14. Note that those values may take more than 16 bits
for (i=0; i < 3; i++) {
for (j=0; j < 3; j++) {
p ->Mat[i][j] = DOUBLE_TO_1FIXED14(Mat->v[i].n[j]);
}
// 8 bits on input allows matrix-shaper boot up to 25 Mpixels per second on RGB. That's fast!
-// TODO: Allow a third matrix for abs. colorimetric
static
cmsBool OptimizeMatrixShaper(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
- cmsStage* Curve1, *Curve2;
- cmsStage* Matrix1, *Matrix2;
- _cmsStageMatrixData* Data1;
- _cmsStageMatrixData* Data2;
- cmsMAT3 res;
- cmsBool IdentityMat;
- cmsPipeline* Dest, *Src;
+ cmsStage* Curve1, *Curve2;
+ cmsStage* Matrix1, *Matrix2;
+ cmsMAT3 res;
+ cmsBool IdentityMat;
+ cmsPipeline* Dest, *Src;
+ cmsFloat64Number* Offset;
- // Only works on RGB to RGB
- if (T_CHANNELS(*InputFormat) != 3 || T_CHANNELS(*OutputFormat) != 3) return FALSE;
+ // Only works on RGB to RGB
+ if (T_CHANNELS(*InputFormat) != 3 || T_CHANNELS(*OutputFormat) != 3) return FALSE;
- // Only works on 8 bit input
- if (!_cmsFormatterIs8bit(*InputFormat)) return FALSE;
+ // Only works on 8 bit input
+ if (!_cmsFormatterIs8bit(*InputFormat)) return FALSE;
- // Seems suitable, proceed
- Src = *Lut;
+ // Seems suitable, proceed
+ Src = *Lut;
- // Check for shaper-matrix-matrix-shaper structure, that is what this optimizer stands for
- if (!cmsPipelineCheckAndRetreiveStages(Src, 4,
- cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
- &Curve1, &Matrix1, &Matrix2, &Curve2)) return FALSE;
+ // Check for:
+ //
+ // shaper-matrix-matrix-shaper
+ // shaper-matrix-shaper
+ //
+ // Both of those constructs are possible (first because abs. colorimetric).
+ // additionally, In the first case, the input matrix offset should be zero.
- // Get both matrices
- Data1 = (_cmsStageMatrixData*) cmsStageData(Matrix1);
- Data2 = (_cmsStageMatrixData*) cmsStageData(Matrix2);
+ IdentityMat = FALSE;
+ if (cmsPipelineCheckAndRetreiveStages(Src, 4,
+ cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
+ &Curve1, &Matrix1, &Matrix2, &Curve2)) {
- // Input offset should be zero
- if (Data1 ->Offset != NULL) return FALSE;
+ // Get both matrices
+ _cmsStageMatrixData* Data1 = (_cmsStageMatrixData*)cmsStageData(Matrix1);
+ _cmsStageMatrixData* Data2 = (_cmsStageMatrixData*)cmsStageData(Matrix2);
- // Multiply both matrices to get the result
- _cmsMAT3per(&res, (cmsMAT3*) Data2 ->Double, (cmsMAT3*) Data1 ->Double);
+ // Input offset should be zero
+ if (Data1->Offset != NULL) return FALSE;
- // Now the result is in res + Data2 -> Offset. Maybe is a plain identity?
- IdentityMat = FALSE;
- if (_cmsMAT3isIdentity(&res) && Data2 ->Offset == NULL) {
+ // Multiply both matrices to get the result
+ _cmsMAT3per(&res, (cmsMAT3*)Data2->Double, (cmsMAT3*)Data1->Double);
- // We can get rid of full matrix
- IdentityMat = TRUE;
- }
+ // Only 2nd matrix has offset, or it is zero
+ Offset = Data2->Offset;
+
+ // Now the result is in res + Data2 -> Offset. Maybe is a plain identity?
+ if (_cmsMAT3isIdentity(&res) && Offset == NULL) {
+
+ // We can get rid of full matrix
+ IdentityMat = TRUE;
+ }
+
+ }
+ else {
+
+ if (cmsPipelineCheckAndRetreiveStages(Src, 3,
+ cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType,
+ &Curve1, &Matrix1, &Curve2)) {
+
+ _cmsStageMatrixData* Data = (_cmsStageMatrixData*)cmsStageData(Matrix1);
+
+ // Copy the matrix to our result
+ memcpy(&res, Data->Double, sizeof(res));
+
+ // Preserve the Odffset (may be NULL as a zero offset)
+ Offset = Data->Offset;
+
+ if (_cmsMAT3isIdentity(&res) && Offset == NULL) {
+
+ // We can get rid of full matrix
+ IdentityMat = TRUE;
+ }
+ }
+ else
+ return FALSE; // Not optimizeable this time
+
+ }
// Allocate an empty LUT
Dest = cmsPipelineAlloc(Src ->ContextID, Src ->InputChannels, Src ->OutputChannels);
if (!Dest) return FALSE;
// Assamble the new LUT
- cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1));
- if (!IdentityMat)
- cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageAllocMatrix(Dest ->ContextID, 3, 3, (const cmsFloat64Number*) &res, Data2 ->Offset));
- cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2));
+ if (!cmsPipelineInsertStage(Dest, cmsAT_BEGIN, cmsStageDup(Curve1)))
+ goto Error;
+
+ if (!IdentityMat) {
+
+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageAllocMatrix(Dest->ContextID, 3, 3, (const cmsFloat64Number*)&res, Offset)))
+ goto Error;
+ }
+
+ if (!cmsPipelineInsertStage(Dest, cmsAT_END, cmsStageDup(Curve2)))
+ goto Error;
// If identity on matrix, we can further optimize the curves, so call the join curves routine
if (IdentityMat) {
_cmsStageToneCurvesData* mpeC1 = (_cmsStageToneCurvesData*) cmsStageData(Curve1);
_cmsStageToneCurvesData* mpeC2 = (_cmsStageToneCurvesData*) cmsStageData(Curve2);
- // In this particular optimization, caché does not help as it takes more time to deal with
- // the caché that with the pixel handling
+ // In this particular optimization, cache does not help as it takes more time to deal with
+ // the cache that with the pixel handling
*dwFlags |= cmsFLAGS_NOCACHE;
// Setup the optimizarion routines
- SetMatShaper(Dest, mpeC1 ->TheCurves, &res, (cmsVEC3*) Data2 ->Offset, mpeC2->TheCurves, OutputFormat);
+ SetMatShaper(Dest, mpeC1 ->TheCurves, &res, (cmsVEC3*) Offset, mpeC2->TheCurves, OutputFormat);
}
cmsPipelineFree(Src);
*Lut = Dest;
return TRUE;
+Error:
+ // Leave Src unchanged
+ cmsPipelineFree(Dest);
+ return FALSE;
}
};
// The linked list head
-static _cmsOptimizationCollection* OptimizationCollection = DefaultOptimization;
+_cmsOptimizationPluginChunkType _cmsOptimizationPluginChunk = { NULL };
+
+
+// Duplicates the zone of memory used by the plug-in in the new context
+static
+void DupPluginOptimizationList(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ _cmsOptimizationPluginChunkType newHead = { NULL };
+ _cmsOptimizationCollection* entry;
+ _cmsOptimizationCollection* Anterior = NULL;
+ _cmsOptimizationPluginChunkType* head = (_cmsOptimizationPluginChunkType*) src->chunks[OptimizationPlugin];
+
+ _cmsAssert(ctx != NULL);
+ _cmsAssert(head != NULL);
+
+ // Walk the list copying all nodes
+ for (entry = head->OptimizationCollection;
+ entry != NULL;
+ entry = entry ->Next) {
+
+ _cmsOptimizationCollection *newEntry = ( _cmsOptimizationCollection *) _cmsSubAllocDup(ctx ->MemPool, entry, sizeof(_cmsOptimizationCollection));
+
+ if (newEntry == NULL)
+ return;
+
+ // We want to keep the linked list order, so this is a little bit tricky
+ newEntry -> Next = NULL;
+ if (Anterior)
+ Anterior -> Next = newEntry;
+
+ Anterior = newEntry;
+
+ if (newHead.OptimizationCollection == NULL)
+ newHead.OptimizationCollection = newEntry;
+ }
+
+ ctx ->chunks[OptimizationPlugin] = _cmsSubAllocDup(ctx->MemPool, &newHead, sizeof(_cmsOptimizationPluginChunkType));
+}
+
+void _cmsAllocOptimizationPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ if (src != NULL) {
+
+ // Copy all linked list
+ DupPluginOptimizationList(ctx, src);
+ }
+ else {
+ static _cmsOptimizationPluginChunkType OptimizationPluginChunkType = { NULL };
+ ctx ->chunks[OptimizationPlugin] = _cmsSubAllocDup(ctx ->MemPool, &OptimizationPluginChunkType, sizeof(_cmsOptimizationPluginChunkType));
+ }
+}
+
// Register new ways to optimize
-cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Data)
+cmsBool _cmsRegisterOptimizationPlugin(cmsContext ContextID, cmsPluginBase* Data)
{
cmsPluginOptimization* Plugin = (cmsPluginOptimization*) Data;
+ _cmsOptimizationPluginChunkType* ctx = ( _cmsOptimizationPluginChunkType*) _cmsContextGetClientChunk(ContextID, OptimizationPlugin);
_cmsOptimizationCollection* fl;
if (Data == NULL) {
- OptimizationCollection = DefaultOptimization;
+ ctx->OptimizationCollection = NULL;
return TRUE;
}
// Optimizer callback is required
if (Plugin ->OptimizePtr == NULL) return FALSE;
- fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(sizeof(_cmsOptimizationCollection));
+ fl = (_cmsOptimizationCollection*) _cmsPluginMalloc(ContextID, sizeof(_cmsOptimizationCollection));
if (fl == NULL) return FALSE;
// Copy the parameters
fl ->OptimizePtr = Plugin ->OptimizePtr;
// Keep linked list
- fl ->Next = OptimizationCollection;
- OptimizationCollection = fl;
+ fl ->Next = ctx->OptimizationCollection;
+
+ // Set the head
+ ctx ->OptimizationCollection = fl;
// All is ok
return TRUE;
}
// The entry point for LUT optimization
-cmsBool _cmsOptimizePipeline(cmsPipeline** PtrLut,
- int Intent,
+cmsBool CMSEXPORT _cmsOptimizePipeline(cmsContext ContextID,
+ cmsPipeline** PtrLut,
+ cmsUInt32Number Intent,
cmsUInt32Number* InputFormat,
cmsUInt32Number* OutputFormat,
cmsUInt32Number* dwFlags)
{
+ _cmsOptimizationPluginChunkType* ctx = ( _cmsOptimizationPluginChunkType*) _cmsContextGetClientChunk(ContextID, OptimizationPlugin);
_cmsOptimizationCollection* Opts;
cmsBool AnySuccess = FALSE;
if (*dwFlags & cmsFLAGS_NOOPTIMIZE)
return FALSE;
- // Try built-in optimizations and plug-in
- for (Opts = OptimizationCollection;
+ // Try plug-in optimizations
+ for (Opts = ctx->OptimizationCollection;
Opts != NULL;
Opts = Opts ->Next) {
}
}
+ // Try built-in optimizations
+ for (Opts = DefaultOptimization;
+ Opts != NULL;
+ Opts = Opts ->Next) {
+
+ if (Opts ->OptimizePtr(PtrLut, Intent, InputFormat, OutputFormat, dwFlags)) {
+
+ return TRUE;
+ }
+ }
+
// Only simple optimizations succeeded
return AnySuccess;
}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
#define ANYFLAVOR FLAVOR_SH(1)
-// Supress waning about info never being used
+// Suppress waning about info never being used
#ifdef _MSC_VER
#pragma warning(disable : 4100)
// Does almost everything but is slow
static
-cmsUInt8Number* UnrollChunkyBytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
-{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
+cmsUInt8Number* UnrollChunkyBytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
cmsUInt16Number v;
- int i;
+ cmsUInt32Number i;
if (ExtraFirst) {
accum += Extra;
}
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
v = FROM_8_TO_16(*accum);
v = Reverse ? REVERSE_FLAVOR_16(v) : v;
// Extra channels are just ignored because come in the next planes
static
-cmsUInt8Number* UnrollPlanarBytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollPlanarBytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int i;
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number i;
cmsUInt8Number* Init = accum;
if (DoSwap ^ SwapFirst) {
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
cmsUInt16Number v = FROM_8_TO_16(*accum);
wIn[index] = Reverse ? REVERSE_FLAVOR_16(v) : v;
// Special cases, provided for performance
static
-cmsUInt8Number* Unroll4Bytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4Bytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = FROM_8_TO_16(*accum); accum++; // C
wIn[1] = FROM_8_TO_16(*accum); accum++; // M
}
static
-cmsUInt8Number* Unroll4BytesReverse(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4BytesReverse(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = FROM_8_TO_16(REVERSE_FLAVOR_8(*accum)); accum++; // C
wIn[1] = FROM_8_TO_16(REVERSE_FLAVOR_8(*accum)); accum++; // M
}
static
-cmsUInt8Number* Unroll4BytesSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4BytesSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[3] = FROM_8_TO_16(*accum); accum++; // K
wIn[0] = FROM_8_TO_16(*accum); accum++; // C
// KYMC
static
-cmsUInt8Number* Unroll4BytesSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4BytesSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[3] = FROM_8_TO_16(*accum); accum++; // K
wIn[2] = FROM_8_TO_16(*accum); accum++; // Y
}
static
-cmsUInt8Number* Unroll4BytesSwapSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4BytesSwapSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[2] = FROM_8_TO_16(*accum); accum++; // K
wIn[1] = FROM_8_TO_16(*accum); accum++; // Y
}
static
-cmsUInt8Number* Unroll3Bytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3Bytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = FROM_8_TO_16(*accum); accum++; // R
wIn[1] = FROM_8_TO_16(*accum); accum++; // G
}
static
-cmsUInt8Number* Unroll3BytesSkip1Swap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3BytesSkip1Swap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
accum++; // A
wIn[2] = FROM_8_TO_16(*accum); accum++; // B
}
static
-cmsUInt8Number* Unroll3BytesSkip1SwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3BytesSkip1SwapSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ wIn[2] = FROM_8_TO_16(*accum); accum++; // B
+ wIn[1] = FROM_8_TO_16(*accum); accum++; // G
+ wIn[0] = FROM_8_TO_16(*accum); accum++; // R
+ accum++; // A
+
+ return accum;
+
+ cmsUNUSED_PARAMETER(info);
+ cmsUNUSED_PARAMETER(Stride);
+}
+
+static
+cmsUInt8Number* Unroll3BytesSkip1SwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
accum++; // A
wIn[0] = FROM_8_TO_16(*accum); accum++; // R
// BRG
static
-cmsUInt8Number* Unroll3BytesSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3BytesSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[2] = FROM_8_TO_16(*accum); accum++; // B
wIn[1] = FROM_8_TO_16(*accum); accum++; // G
}
static
-cmsUInt8Number* UnrollLabV2_8(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollLabV2_8(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = FomLabV2ToLabV4(FROM_8_TO_16(*accum)); accum++; // L
wIn[1] = FomLabV2ToLabV4(FROM_8_TO_16(*accum)); accum++; // a
}
static
-cmsUInt8Number* UnrollALabV2_8(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollALabV2_8(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
accum++; // A
wIn[0] = FomLabV2ToLabV4(FROM_8_TO_16(*accum)); accum++; // L
}
static
-cmsUInt8Number* UnrollLabV2_16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollLabV2_16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = FomLabV2ToLabV4(*(cmsUInt16Number*) accum); accum += 2; // L
wIn[1] = FomLabV2ToLabV4(*(cmsUInt16Number*) accum); accum += 2; // a
// for duplex
static
-cmsUInt8Number* Unroll2Bytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll2Bytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = FROM_8_TO_16(*accum); accum++; // ch1
wIn[1] = FROM_8_TO_16(*accum); accum++; // ch2
// Monochrome duplicates L into RGB for null-transforms
static
-cmsUInt8Number* Unroll1Byte(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll1Byte(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = wIn[1] = wIn[2] = FROM_8_TO_16(*accum); accum++; // L
static
-cmsUInt8Number* Unroll1ByteSkip1(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll1ByteSkip1(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = wIn[1] = wIn[2] = FROM_8_TO_16(*accum); accum++; // L
accum += 1;
}
static
-cmsUInt8Number* Unroll1ByteSkip2(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll1ByteSkip2(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = wIn[1] = wIn[2] = FROM_8_TO_16(*accum); accum++; // L
accum += 2;
}
static
-cmsUInt8Number* Unroll1ByteReversed(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll1ByteReversed(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = wIn[1] = wIn[2] = REVERSE_FLAVOR_16(FROM_8_TO_16(*accum)); accum++; // L
static
-cmsUInt8Number* UnrollAnyWords(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollAnyWords(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int SwapEndian = T_ENDIAN16(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- int i;
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number SwapEndian = T_ENDIAN16(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number i;
if (ExtraFirst) {
accum += Extra * sizeof(cmsUInt16Number);
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
cmsUInt16Number v = *(cmsUInt16Number*) accum;
if (SwapEndian)
}
static
-cmsUInt8Number* UnrollPlanarWords(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollPlanarWords(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap= T_DOSWAP(info ->InputFormat);
- int Reverse= T_FLAVOR(info ->InputFormat);
- int SwapEndian = T_ENDIAN16(info -> InputFormat);
- int i;
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap= T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse= T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapEndian = T_ENDIAN16(info -> InputFormat);
+ cmsUInt32Number i;
cmsUInt8Number* Init = accum;
if (DoSwap) {
- accum += T_EXTRA(info -> InputFormat) * Stride * sizeof(cmsUInt16Number);
+ accum += T_EXTRA(info -> InputFormat) * Stride;
}
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
cmsUInt16Number v = *(cmsUInt16Number*) accum;
if (SwapEndian)
wIn[index] = Reverse ? REVERSE_FLAVOR_16(v) : v;
- accum += Stride * sizeof(cmsUInt16Number);
+ accum += Stride;
}
return (Init + sizeof(cmsUInt16Number));
static
-cmsUInt8Number* Unroll4Words(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4Words(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = *(cmsUInt16Number*) accum; accum+= 2; // C
wIn[1] = *(cmsUInt16Number*) accum; accum+= 2; // M
}
static
-cmsUInt8Number* Unroll4WordsReverse(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4WordsReverse(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = REVERSE_FLAVOR_16(*(cmsUInt16Number*) accum); accum+= 2; // C
wIn[1] = REVERSE_FLAVOR_16(*(cmsUInt16Number*) accum); accum+= 2; // M
}
static
-cmsUInt8Number* Unroll4WordsSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4WordsSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[3] = *(cmsUInt16Number*) accum; accum+= 2; // K
wIn[0] = *(cmsUInt16Number*) accum; accum+= 2; // C
// KYMC
static
-cmsUInt8Number* Unroll4WordsSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4WordsSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[3] = *(cmsUInt16Number*) accum; accum+= 2; // K
wIn[2] = *(cmsUInt16Number*) accum; accum+= 2; // Y
}
static
-cmsUInt8Number* Unroll4WordsSwapSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll4WordsSwapSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[2] = *(cmsUInt16Number*) accum; accum+= 2; // K
wIn[1] = *(cmsUInt16Number*) accum; accum+= 2; // Y
}
static
-cmsUInt8Number* Unroll3Words(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3Words(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = *(cmsUInt16Number*) accum; accum+= 2; // C R
wIn[1] = *(cmsUInt16Number*) accum; accum+= 2; // M G
}
static
-cmsUInt8Number* Unroll3WordsSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3WordsSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[2] = *(cmsUInt16Number*) accum; accum+= 2; // C R
wIn[1] = *(cmsUInt16Number*) accum; accum+= 2; // M G
}
static
-cmsUInt8Number* Unroll3WordsSkip1Swap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3WordsSkip1Swap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
accum += 2; // A
wIn[2] = *(cmsUInt16Number*) accum; accum += 2; // R
}
static
-cmsUInt8Number* Unroll3WordsSkip1SwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll3WordsSkip1SwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
accum += 2; // A
wIn[0] = *(cmsUInt16Number*) accum; accum += 2; // R
}
static
-cmsUInt8Number* Unroll1Word(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll1Word(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = wIn[1] = wIn[2] = *(cmsUInt16Number*) accum; accum+= 2; // L
}
static
-cmsUInt8Number* Unroll1WordReversed(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll1WordReversed(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = wIn[1] = wIn[2] = REVERSE_FLAVOR_16(*(cmsUInt16Number*) accum); accum+= 2;
}
static
-cmsUInt8Number* Unroll1WordSkip3(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll1WordSkip3(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = wIn[1] = wIn[2] = *(cmsUInt16Number*) accum;
}
static
-cmsUInt8Number* Unroll2Words(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Unroll2Words(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
wIn[0] = *(cmsUInt16Number*) accum; accum += 2; // ch1
wIn[1] = *(cmsUInt16Number*) accum; accum += 2; // ch2
// This is a conversion of Lab double to 16 bits
static
-cmsUInt8Number* UnrollLabDoubleTo16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollLabDoubleTo16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
if (T_PLANAR(info -> InputFormat)) {
- cmsFloat64Number* Pt = (cmsFloat64Number*) accum;
-
cmsCIELab Lab;
-
- Lab.L = Pt[0];
- Lab.a = Pt[Stride];
- Lab.b = Pt[Stride*2];
+ cmsUInt8Number* pos_L;
+ cmsUInt8Number* pos_a;
+ cmsUInt8Number* pos_b;
+
+ pos_L = accum;
+ pos_a = accum + Stride;
+ pos_b = accum + Stride * 2;
+
+ Lab.L = *(cmsFloat64Number*) pos_L;
+ Lab.a = *(cmsFloat64Number*) pos_a;
+ Lab.b = *(cmsFloat64Number*) pos_b;
cmsFloat2LabEncoded(wIn, &Lab);
return accum + sizeof(cmsFloat64Number);
// This is a conversion of Lab float to 16 bits
static
-cmsUInt8Number* UnrollLabFloatTo16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollLabFloatTo16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
cmsCIELab Lab;
if (T_PLANAR(info -> InputFormat)) {
- cmsFloat32Number* Pt = (cmsFloat32Number*) accum;
+ cmsUInt8Number* pos_L;
+ cmsUInt8Number* pos_a;
+ cmsUInt8Number* pos_b;
-
- Lab.L = Pt[0];
- Lab.a = Pt[Stride];
- Lab.b = Pt[Stride*2];
+ pos_L = accum;
+ pos_a = accum + Stride;
+ pos_b = accum + Stride * 2;
+
+ Lab.L = *(cmsFloat32Number*)pos_L;
+ Lab.a = *(cmsFloat32Number*)pos_a;
+ Lab.b = *(cmsFloat32Number*)pos_b;
cmsFloat2LabEncoded(wIn, &Lab);
return accum + sizeof(cmsFloat32Number);
// This is a conversion of XYZ double to 16 bits
static
-cmsUInt8Number* UnrollXYZDoubleTo16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollXYZDoubleTo16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
if (T_PLANAR(info -> InputFormat)) {
- cmsFloat64Number* Pt = (cmsFloat64Number*) accum;
cmsCIEXYZ XYZ;
+ cmsUInt8Number* pos_X;
+ cmsUInt8Number* pos_Y;
+ cmsUInt8Number* pos_Z;
+
+ pos_X = accum;
+ pos_Y = accum + Stride;
+ pos_Z = accum + Stride * 2;
+
+ XYZ.X = *(cmsFloat64Number*)pos_X;
+ XYZ.Y = *(cmsFloat64Number*)pos_Y;
+ XYZ.Z = *(cmsFloat64Number*)pos_Z;
- XYZ.X = Pt[0];
- XYZ.Y = Pt[Stride];
- XYZ.Z = Pt[Stride*2];
cmsFloat2XYZEncoded(wIn, &XYZ);
return accum + sizeof(cmsFloat64Number);
}
}
+// This is a conversion of XYZ float to 16 bits
+static
+cmsUInt8Number* UnrollXYZFloatTo16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ if (T_PLANAR(info -> InputFormat)) {
+
+ cmsCIEXYZ XYZ;
+ cmsUInt8Number* pos_X;
+ cmsUInt8Number* pos_Y;
+ cmsUInt8Number* pos_Z;
+
+ pos_X = accum;
+ pos_Y = accum + Stride;
+ pos_Z = accum + Stride * 2;
+
+ XYZ.X = *(cmsFloat32Number*)pos_X;
+ XYZ.Y = *(cmsFloat32Number*)pos_Y;
+ XYZ.Z = *(cmsFloat32Number*)pos_Z;
+
+ cmsFloat2XYZEncoded(wIn, &XYZ);
+
+ return accum + sizeof(cmsFloat32Number);
+
+ }
+
+ else {
+ cmsFloat32Number* Pt = (cmsFloat32Number*) accum;
+ cmsCIEXYZ XYZ;
+
+ XYZ.X = Pt[0];
+ XYZ.Y = Pt[1];
+ XYZ.Z = Pt[2];
+ cmsFloat2XYZEncoded(wIn, &XYZ);
+
+ accum += 3 * sizeof(cmsFloat32Number) + T_EXTRA(info ->InputFormat) * sizeof(cmsFloat32Number);
+
+ return accum;
+ }
+}
+
// Check if space is marked as ink
cmsINLINE cmsBool IsInkSpace(cmsUInt32Number Type)
{
}
}
+// Return the size in bytes of a given formatter
+static
+cmsUInt32Number PixelSize(cmsUInt32Number Format)
+{
+ cmsUInt32Number fmt_bytes = T_BYTES(Format);
+
+ // For double, the T_BYTES field is zero
+ if (fmt_bytes == 0)
+ return sizeof(cmsUInt64Number);
+
+ // Otherwise, it is already correct for all formats
+ return fmt_bytes;
+}
+
// Inks does come in percentage, remaining cases are between 0..1.0, again to 16 bits
static
-cmsUInt8Number* UnrollDoubleTo16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollDoubleTo16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- int Planar = T_PLANAR(info -> InputFormat);
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number Planar = T_PLANAR(info -> InputFormat);
cmsFloat64Number v;
cmsUInt16Number vi;
- int i, start = 0;
- cmsFloat64Number maximum = IsInkSpace(info ->InputFormat) ? 655.35 : 65535.0;
+ cmsUInt32Number i, start = 0;
+ cmsFloat64Number maximum = IsInkSpace(info ->InputFormat) ? 655.35 : 65535.0;
+ Stride /= PixelSize(info->InputFormat);
+
if (ExtraFirst)
start = Extra;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
if (Planar)
v = (cmsFloat32Number) ((cmsFloat64Number*) accum)[(i + start) * Stride];
static
-cmsUInt8Number* UnrollFloatTo16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollFloatTo16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- int Planar = T_PLANAR(info -> InputFormat);
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number Planar = T_PLANAR(info -> InputFormat);
cmsFloat32Number v;
cmsUInt16Number vi;
- int i, start = 0;
- cmsFloat64Number maximum = IsInkSpace(info ->InputFormat) ? 655.35 : 65535.0;
+ cmsUInt32Number i, start = 0;
+ cmsFloat64Number maximum = IsInkSpace(info ->InputFormat) ? 655.35 : 65535.0;
+ Stride /= PixelSize(info->InputFormat);
if (ExtraFirst)
start = Extra;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
if (Planar)
v = (cmsFloat32Number) ((cmsFloat32Number*) accum)[(i + start) * Stride];
// For 1 channel, we need to duplicate data (it comes in 0..1.0 range)
static
-cmsUInt8Number* UnrollDouble1Chan(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollDouble1Chan(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
cmsFloat64Number* Inks = (cmsFloat64Number*) accum;
cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- int Planar = T_PLANAR(info -> InputFormat);
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number Planar = T_PLANAR(info -> InputFormat);
cmsFloat32Number v;
- int i, start = 0;
+ cmsUInt32Number i, start = 0;
cmsFloat32Number maximum = IsInkSpace(info ->InputFormat) ? 100.0F : 1.0F;
+ Stride /= PixelSize(info->InputFormat);
if (ExtraFirst)
start = Extra;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
if (Planar)
v = (cmsFloat32Number) ((cmsFloat32Number*) accum)[(i + start) * Stride];
cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- int Planar = T_PLANAR(info -> InputFormat);
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number Planar = T_PLANAR(info -> InputFormat);
cmsFloat64Number v;
- int i, start = 0;
+ cmsUInt32Number i, start = 0;
cmsFloat64Number maximum = IsInkSpace(info ->InputFormat) ? 100.0 : 1.0;
+ Stride /= PixelSize(info->InputFormat);
if (ExtraFirst)
start = Extra;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
if (Planar)
v = (cmsFloat64Number) ((cmsFloat64Number*) accum)[(i + start) * Stride];
if (T_PLANAR(info -> InputFormat)) {
- wIn[0] = (cmsFloat32Number) (Pt[0] / 100.0); // from 0..100 to 0..1
+ Stride /= PixelSize(info->InputFormat);
+
+ wIn[0] = (cmsFloat32Number) (Pt[0] / 100.0); // from 0..100 to 0..1
wIn[1] = (cmsFloat32Number) ((Pt[Stride] + 128) / 255.0); // form -128..+127 to 0..1
wIn[2] = (cmsFloat32Number) ((Pt[Stride*2] + 128) / 255.0);
if (T_PLANAR(info -> InputFormat)) {
+ Stride /= PixelSize(info->InputFormat);
+
wIn[0] = (cmsFloat32Number) (Pt[0] / 100.0); // from 0..100 to 0..1
wIn[1] = (cmsFloat32Number) ((Pt[Stride] + 128) / 255.0); // form -128..+127 to 0..1
wIn[2] = (cmsFloat32Number) ((Pt[Stride*2] + 128) / 255.0);
if (T_PLANAR(info -> InputFormat)) {
+ Stride /= PixelSize(info->InputFormat);
+
wIn[0] = (cmsFloat32Number) (Pt[0] / MAX_ENCODEABLE_XYZ);
wIn[1] = (cmsFloat32Number) (Pt[Stride] / MAX_ENCODEABLE_XYZ);
wIn[2] = (cmsFloat32Number) (Pt[Stride*2] / MAX_ENCODEABLE_XYZ);
if (T_PLANAR(info -> InputFormat)) {
+ Stride /= PixelSize(info->InputFormat);
+
wIn[0] = (cmsFloat32Number) (Pt[0] / MAX_ENCODEABLE_XYZ);
wIn[1] = (cmsFloat32Number) (Pt[Stride] / MAX_ENCODEABLE_XYZ);
wIn[2] = (cmsFloat32Number) (Pt[Stride*2] / MAX_ENCODEABLE_XYZ);
// Generic chunky for byte
static
-cmsUInt8Number* PackAnyBytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackAnyBytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number nChan = T_CHANNELS(info -> OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
cmsUInt8Number* swap1;
cmsUInt8Number v = 0;
- int i;
+ cmsUInt32Number i;
swap1 = output;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
v = FROM_16_TO_8(wOut[index]);
static
-cmsUInt8Number* PackAnyWords(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackAnyWords(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int SwapEndian = T_ENDIAN16(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number nChan = T_CHANNELS(info -> OutputFormat);
+ cmsUInt32Number SwapEndian = T_ENDIAN16(info -> OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
cmsUInt16Number* swap1;
cmsUInt16Number v = 0;
- int i;
+ cmsUInt32Number i;
swap1 = (cmsUInt16Number*) output;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
v = wOut[index];
static
-cmsUInt8Number* PackPlanarBytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackPlanarBytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int SwapFirst = T_SWAPFIRST(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int i;
+ cmsUInt32Number nChan = T_CHANNELS(info -> OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info ->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->OutputFormat);
+ cmsUInt32Number i;
cmsUInt8Number* Init = output;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
cmsUInt8Number v = FROM_16_TO_8(wOut[index]);
*(cmsUInt8Number*) output = (cmsUInt8Number) (Reverse ? REVERSE_FLAVOR_8(v) : v);
static
-cmsUInt8Number* PackPlanarWords(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackPlanarWords(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse= T_FLAVOR(info ->OutputFormat);
- int SwapEndian = T_ENDIAN16(info -> OutputFormat);
- int i;
+ cmsUInt32Number nChan = T_CHANNELS(info -> OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->OutputFormat);
+ cmsUInt32Number SwapEndian = T_ENDIAN16(info -> OutputFormat);
+ cmsUInt32Number i;
cmsUInt8Number* Init = output;
cmsUInt16Number v;
if (DoSwap) {
- output += T_EXTRA(info -> OutputFormat) * Stride * sizeof(cmsUInt16Number);
+ output += T_EXTRA(info -> OutputFormat) * Stride;
}
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
v = wOut[index];
v = REVERSE_FLAVOR_16(v);
*(cmsUInt16Number*) output = v;
- output += (Stride * sizeof(cmsUInt16Number));
+ output += Stride;
}
return (Init + sizeof(cmsUInt16Number));
// CMYKcm (unrolled for speed)
static
-cmsUInt8Number* Pack6Bytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack6Bytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[0]);
*output++ = FROM_16_TO_8(wOut[1]);
// KCMYcm
static
-cmsUInt8Number* Pack6BytesSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack6BytesSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[5]);
*output++ = FROM_16_TO_8(wOut[4]);
// CMYKcm
static
-cmsUInt8Number* Pack6Words(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack6Words(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[0];
output+= 2;
// KCMYcm
static
-cmsUInt8Number* Pack6WordsSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack6WordsSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[5];
output+= 2;
static
-cmsUInt8Number* Pack4Bytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4Bytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[0]);
*output++ = FROM_16_TO_8(wOut[1]);
}
static
-cmsUInt8Number* Pack4BytesReverse(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4BytesReverse(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = REVERSE_FLAVOR_8(FROM_16_TO_8(wOut[0]));
*output++ = REVERSE_FLAVOR_8(FROM_16_TO_8(wOut[1]));
static
-cmsUInt8Number* Pack4BytesSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4BytesSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[3]);
*output++ = FROM_16_TO_8(wOut[0]);
// ABGR
static
-cmsUInt8Number* Pack4BytesSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4BytesSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[3]);
*output++ = FROM_16_TO_8(wOut[2]);
}
static
-cmsUInt8Number* Pack4BytesSwapSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4BytesSwapSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[2]);
*output++ = FROM_16_TO_8(wOut[1]);
}
static
-cmsUInt8Number* Pack4Words(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4Words(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[0];
output+= 2;
}
static
-cmsUInt8Number* Pack4WordsReverse(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4WordsReverse(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = REVERSE_FLAVOR_16(wOut[0]);
output+= 2;
// ABGR
static
-cmsUInt8Number* Pack4WordsSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4WordsSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[3];
output+= 2;
// CMYK
static
-cmsUInt8Number* Pack4WordsBigEndian(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack4WordsBigEndian(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = CHANGE_ENDIAN(wOut[0]);
output+= 2;
static
-cmsUInt8Number* PackLabV2_8(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackLabV2_8(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(FomLabV4ToLabV2(wOut[0]));
*output++ = FROM_16_TO_8(FomLabV4ToLabV2(wOut[1]));
}
static
-cmsUInt8Number* PackALabV2_8(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackALabV2_8(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output++;
*output++ = FROM_16_TO_8(FomLabV4ToLabV2(wOut[0]));
}
static
-cmsUInt8Number* PackLabV2_16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackLabV2_16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = FomLabV4ToLabV2(wOut[0]);
output += 2;
}
static
-cmsUInt8Number* Pack3Bytes(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3Bytes(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[0]);
*output++ = FROM_16_TO_8(wOut[1]);
}
static
-cmsUInt8Number* Pack3BytesOptimized(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesOptimized(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- *output++ = (wOut[0] & 0xFF);
- *output++ = (wOut[1] & 0xFF);
- *output++ = (wOut[2] & 0xFF);
+ *output++ = (wOut[0] & 0xFFU);
+ *output++ = (wOut[1] & 0xFFU);
+ *output++ = (wOut[2] & 0xFFU);
return output;
}
static
-cmsUInt8Number* Pack3BytesSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[2]);
*output++ = FROM_16_TO_8(wOut[1]);
}
static
-cmsUInt8Number* Pack3BytesSwapOptimized(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesSwapOptimized(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- *output++ = (wOut[2] & 0xFF);
- *output++ = (wOut[1] & 0xFF);
- *output++ = (wOut[0] & 0xFF);
+ *output++ = (wOut[2] & 0xFFU);
+ *output++ = (wOut[1] & 0xFFU);
+ *output++ = (wOut[0] & 0xFFU);
return output;
static
-cmsUInt8Number* Pack3Words(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3Words(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[0];
output+= 2;
}
static
-cmsUInt8Number* Pack3WordsSwap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3WordsSwap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[2];
output+= 2;
}
static
-cmsUInt8Number* Pack3WordsBigEndian(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3WordsBigEndian(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = CHANGE_ENDIAN(wOut[0]);
output+= 2;
}
static
-cmsUInt8Number* Pack3BytesAndSkip1(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[0]);
*output++ = FROM_16_TO_8(wOut[1]);
}
static
-cmsUInt8Number* Pack3BytesAndSkip1Optimized(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1Optimized(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- *output++ = (wOut[0] & 0xFF);
- *output++ = (wOut[1] & 0xFF);
- *output++ = (wOut[2] & 0xFF);
+ *output++ = (wOut[0] & 0xFFU);
+ *output++ = (wOut[1] & 0xFFU);
+ *output++ = (wOut[2] & 0xFFU);
output++;
return output;
static
-cmsUInt8Number* Pack3BytesAndSkip1SwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1SwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output++;
*output++ = FROM_16_TO_8(wOut[0]);
}
static
-cmsUInt8Number* Pack3BytesAndSkip1SwapFirstOptimized(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1SwapFirstOptimized(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output++;
- *output++ = (wOut[0] & 0xFF);
- *output++ = (wOut[1] & 0xFF);
- *output++ = (wOut[2] & 0xFF);
+ *output++ = (wOut[0] & 0xFFU);
+ *output++ = (wOut[1] & 0xFFU);
+ *output++ = (wOut[2] & 0xFFU);
return output;
}
static
-cmsUInt8Number* Pack3BytesAndSkip1Swap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1Swap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output++;
*output++ = FROM_16_TO_8(wOut[2]);
}
static
-cmsUInt8Number* Pack3BytesAndSkip1SwapOptimized(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1SwapOptimized(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output++;
- *output++ = (wOut[2] & 0xFF);
- *output++ = (wOut[1] & 0xFF);
- *output++ = (wOut[0] & 0xFF);
+ *output++ = (wOut[2] & 0xFFU);
+ *output++ = (wOut[1] & 0xFFU);
+ *output++ = (wOut[0] & 0xFFU);
return output;
static
-cmsUInt8Number* Pack3BytesAndSkip1SwapSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1SwapSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[2]);
*output++ = FROM_16_TO_8(wOut[1]);
}
static
-cmsUInt8Number* Pack3BytesAndSkip1SwapSwapFirstOptimized(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3BytesAndSkip1SwapSwapFirstOptimized(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- *output++ = (wOut[2] & 0xFF);
- *output++ = (wOut[1] & 0xFF);
- *output++ = (wOut[0] & 0xFF);
+ *output++ = (wOut[2] & 0xFFU);
+ *output++ = (wOut[1] & 0xFFU);
+ *output++ = (wOut[0] & 0xFFU);
output++;
return output;
}
static
-cmsUInt8Number* Pack3WordsAndSkip1(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3WordsAndSkip1(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[0];
output+= 2;
}
static
-cmsUInt8Number* Pack3WordsAndSkip1Swap(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3WordsAndSkip1Swap(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output+= 2;
*(cmsUInt16Number*) output = wOut[2];
static
-cmsUInt8Number* Pack3WordsAndSkip1SwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3WordsAndSkip1SwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output+= 2;
*(cmsUInt16Number*) output = wOut[0];
static
-cmsUInt8Number* Pack3WordsAndSkip1SwapSwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack3WordsAndSkip1SwapSwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[2];
output+= 2;
static
-cmsUInt8Number* Pack1Byte(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1Byte(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[0]);
static
-cmsUInt8Number* Pack1ByteReversed(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1ByteReversed(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(REVERSE_FLAVOR_16(wOut[0]));
static
-cmsUInt8Number* Pack1ByteSkip1(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1ByteSkip1(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*output++ = FROM_16_TO_8(wOut[0]);
output++;
static
-cmsUInt8Number* Pack1ByteSkip1SwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1ByteSkip1SwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output++;
*output++ = FROM_16_TO_8(wOut[0]);
}
static
-cmsUInt8Number* Pack1Word(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1Word(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[0];
output+= 2;
static
-cmsUInt8Number* Pack1WordReversed(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1WordReversed(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = REVERSE_FLAVOR_16(wOut[0]);
output+= 2;
}
static
-cmsUInt8Number* Pack1WordBigEndian(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1WordBigEndian(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = CHANGE_ENDIAN(wOut[0]);
output+= 2;
static
-cmsUInt8Number* Pack1WordSkip1(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1WordSkip1(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
*(cmsUInt16Number*) output = wOut[0];
output+= 4;
}
static
-cmsUInt8Number* Pack1WordSkip1SwapFirst(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* Pack1WordSkip1SwapFirst(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
output += 2;
*(cmsUInt16Number*) output = wOut[0];
// Unencoded Float values -- don't try optimize speed
static
-cmsUInt8Number* PackLabDoubleFrom16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackLabDoubleFrom16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
if (T_PLANAR(info -> OutputFormat)) {
static
-cmsUInt8Number* PackLabFloatFrom16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackLabFloatFrom16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
cmsCIELab Lab;
cmsLabEncoded2Float(&Lab, wOut);
cmsFloat32Number* Out = (cmsFloat32Number*) output;
+ Stride /= PixelSize(info->OutputFormat);
+
Out[0] = (cmsFloat32Number)Lab.L;
Out[Stride] = (cmsFloat32Number)Lab.a;
Out[Stride*2] = (cmsFloat32Number)Lab.b;
}
static
-cmsUInt8Number* PackXYZDoubleFrom16(register _cmsTRANSFORM* Info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackXYZDoubleFrom16(CMSREGISTER _cmsTRANSFORM* Info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
if (T_PLANAR(Info -> OutputFormat)) {
cmsFloat64Number* Out = (cmsFloat64Number*) output;
cmsXYZEncoded2Float(&XYZ, wOut);
+ Stride /= PixelSize(Info->OutputFormat);
+
Out[0] = XYZ.X;
Out[Stride] = XYZ.Y;
Out[Stride*2] = XYZ.Z;
}
static
-cmsUInt8Number* PackDoubleFrom16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackXYZFloatFrom16(CMSREGISTER _cmsTRANSFORM* Info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int Planar = T_PLANAR(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
+ if (T_PLANAR(Info -> OutputFormat)) {
+
+ cmsCIEXYZ XYZ;
+ cmsFloat32Number* Out = (cmsFloat32Number*) output;
+ cmsXYZEncoded2Float(&XYZ, wOut);
+
+ Stride /= PixelSize(Info->OutputFormat);
+
+ Out[0] = (cmsFloat32Number) XYZ.X;
+ Out[Stride] = (cmsFloat32Number) XYZ.Y;
+ Out[Stride*2] = (cmsFloat32Number) XYZ.Z;
+
+ return output + sizeof(cmsFloat32Number);
+
+ }
+ else {
+
+ cmsCIEXYZ XYZ;
+ cmsFloat32Number* Out = (cmsFloat32Number*) output;
+ cmsXYZEncoded2Float(&XYZ, wOut);
+
+ Out[0] = (cmsFloat32Number) XYZ.X;
+ Out[1] = (cmsFloat32Number) XYZ.Y;
+ Out[2] = (cmsFloat32Number) XYZ.Z;
+
+ return output + (3 * sizeof(cmsFloat32Number) + T_EXTRA(Info ->OutputFormat) * sizeof(cmsFloat32Number));
+ }
+}
+
+static
+cmsUInt8Number* PackDoubleFrom16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ cmsUInt32Number nChan = T_CHANNELS(info -> OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> OutputFormat);
+ cmsUInt32Number Planar = T_PLANAR(info -> OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
cmsFloat64Number maximum = IsInkSpace(info ->OutputFormat) ? 655.35 : 65535.0;
cmsFloat64Number v = 0;
cmsFloat64Number* swap1 = (cmsFloat64Number*) output;
- int i, start = 0;
+ cmsUInt32Number i, start = 0;
+
+ Stride /= PixelSize(info->OutputFormat);
if (ExtraFirst)
start = Extra;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
v = (cmsFloat64Number) wOut[index] / maximum;
((cmsFloat64Number*) output)[i + start] = v;
}
- if (!ExtraFirst) {
- output += Extra * sizeof(cmsFloat64Number);
- }
if (Extra == 0 && SwapFirst) {
if (T_PLANAR(info -> OutputFormat))
return output + sizeof(cmsFloat64Number);
else
- return output + nChan * sizeof(cmsFloat64Number);
+ return output + (nChan + Extra) * sizeof(cmsFloat64Number);
}
static
-cmsUInt8Number* PackFloatFrom16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackFloatFrom16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int Planar = T_PLANAR(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- cmsFloat64Number maximum = IsInkSpace(info ->OutputFormat) ? 655.35 : 65535.0;
- cmsFloat64Number v = 0;
- cmsFloat32Number* swap1 = (cmsFloat32Number*) output;
- int i, start = 0;
+ cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
+ cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsFloat64Number maximum = IsInkSpace(info->OutputFormat) ? 655.35 : 65535.0;
+ cmsFloat64Number v = 0;
+ cmsFloat32Number* swap1 = (cmsFloat32Number*)output;
+ cmsUInt32Number i, start = 0;
- if (ExtraFirst)
- start = Extra;
+ Stride /= PixelSize(info->OutputFormat);
- for (i=0; i < nChan; i++) {
+ if (ExtraFirst)
+ start = Extra;
- int index = DoSwap ? (nChan - i - 1) : i;
+ for (i = 0; i < nChan; i++) {
- v = (cmsFloat64Number) wOut[index] / maximum;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
- if (Reverse)
- v = maximum - v;
+ v = (cmsFloat64Number)wOut[index] / maximum;
- if (Planar)
- ((cmsFloat32Number*) output)[(i + start ) * Stride]= (cmsFloat32Number) v;
- else
- ((cmsFloat32Number*) output)[i + start] = (cmsFloat32Number) v;
- }
+ if (Reverse)
+ v = maximum - v;
- if (!ExtraFirst) {
- output += Extra * sizeof(cmsFloat32Number);
- }
+ if (Planar)
+ ((cmsFloat32Number*)output)[(i + start) * Stride] = (cmsFloat32Number)v;
+ else
+ ((cmsFloat32Number*)output)[i + start] = (cmsFloat32Number)v;
+ }
- if (Extra == 0 && SwapFirst) {
+
+ if (Extra == 0 && SwapFirst) {
- memmove(swap1 + 1, swap1, (nChan-1)* sizeof(cmsFloat32Number));
- *swap1 = (cmsFloat32Number) v;
- }
+ memmove(swap1 + 1, swap1, (nChan - 1)* sizeof(cmsFloat32Number));
+ *swap1 = (cmsFloat32Number)v;
+ }
- if (T_PLANAR(info -> OutputFormat))
- return output + sizeof(cmsFloat32Number);
- else
- return output + nChan * sizeof(cmsFloat32Number);
+ if (T_PLANAR(info->OutputFormat))
+ return output + sizeof(cmsFloat32Number);
+ else
+ return output + (nChan + Extra) * sizeof(cmsFloat32Number);
}
cmsUInt8Number* output,
cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int Planar = T_PLANAR(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- cmsFloat64Number maximum = IsInkSpace(info ->OutputFormat) ? 100.0 : 1.0;
- cmsFloat32Number* swap1 = (cmsFloat32Number*) output;
- cmsFloat64Number v = 0;
- int i, start = 0;
+ cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
+ cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsFloat64Number maximum = IsInkSpace(info->OutputFormat) ? 100.0 : 1.0;
+ cmsFloat32Number* swap1 = (cmsFloat32Number*)output;
+ cmsFloat64Number v = 0;
+ cmsUInt32Number i, start = 0;
- if (ExtraFirst)
- start = Extra;
+ Stride /= PixelSize(info->OutputFormat);
- for (i=0; i < nChan; i++) {
+ if (ExtraFirst)
+ start = Extra;
- int index = DoSwap ? (nChan - i - 1) : i;
+ for (i = 0; i < nChan; i++) {
- v = wOut[index] * maximum;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
- if (Reverse)
- v = maximum - v;
+ v = wOut[index] * maximum;
- if (Planar)
- ((cmsFloat32Number*) output)[(i + start)* Stride]= (cmsFloat32Number) v;
- else
- ((cmsFloat32Number*) output)[i + start] = (cmsFloat32Number) v;
- }
+ if (Reverse)
+ v = maximum - v;
- if (!ExtraFirst) {
- output += Extra * sizeof(cmsFloat32Number);
- }
+ if (Planar)
+ ((cmsFloat32Number*)output)[(i + start)* Stride] = (cmsFloat32Number)v;
+ else
+ ((cmsFloat32Number*)output)[i + start] = (cmsFloat32Number)v;
+ }
- if (Extra == 0 && SwapFirst) {
- memmove(swap1 + 1, swap1, (nChan-1)* sizeof(cmsFloat32Number));
- *swap1 = (cmsFloat32Number) v;
- }
+ if (Extra == 0 && SwapFirst) {
- if (T_PLANAR(info -> OutputFormat))
- return output + sizeof(cmsFloat32Number);
- else
- return output + nChan * sizeof(cmsFloat32Number);
+ memmove(swap1 + 1, swap1, (nChan - 1)* sizeof(cmsFloat32Number));
+ *swap1 = (cmsFloat32Number)v;
+ }
+
+ if (T_PLANAR(info->OutputFormat))
+ return output + sizeof(cmsFloat32Number);
+ else
+ return output + (nChan + Extra) * sizeof(cmsFloat32Number);
}
static
cmsUInt8Number* output,
cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int Planar = T_PLANAR(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- cmsFloat64Number maximum = IsInkSpace(info ->OutputFormat) ? 100.0 : 1.0;
- cmsFloat64Number v = 0;
- cmsFloat64Number* swap1 = (cmsFloat64Number*) output;
- int i, start = 0;
+ cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
+ cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsFloat64Number maximum = IsInkSpace(info->OutputFormat) ? 100.0 : 1.0;
+ cmsFloat64Number v = 0;
+ cmsFloat64Number* swap1 = (cmsFloat64Number*)output;
+ cmsUInt32Number i, start = 0;
- if (ExtraFirst)
- start = Extra;
+ Stride /= PixelSize(info->OutputFormat);
- for (i=0; i < nChan; i++) {
+ if (ExtraFirst)
+ start = Extra;
- int index = DoSwap ? (nChan - i - 1) : i;
+ for (i = 0; i < nChan; i++) {
- v = wOut[index] * maximum;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
- if (Reverse)
- v = maximum - v;
+ v = wOut[index] * maximum;
- if (Planar)
- ((cmsFloat64Number*) output)[(i + start) * Stride] = v;
- else
- ((cmsFloat64Number*) output)[i + start] = v;
- }
+ if (Reverse)
+ v = maximum - v;
- if (!ExtraFirst) {
- output += Extra * sizeof(cmsFloat64Number);
- }
+ if (Planar)
+ ((cmsFloat64Number*)output)[(i + start) * Stride] = v;
+ else
+ ((cmsFloat64Number*)output)[i + start] = v;
+ }
- if (Extra == 0 && SwapFirst) {
+ if (Extra == 0 && SwapFirst) {
- memmove(swap1 + 1, swap1, (nChan-1)* sizeof(cmsFloat64Number));
- *swap1 = v;
- }
+ memmove(swap1 + 1, swap1, (nChan - 1)* sizeof(cmsFloat64Number));
+ *swap1 = v;
+ }
- if (T_PLANAR(info -> OutputFormat))
- return output + sizeof(cmsFloat64Number);
- else
- return output + nChan * sizeof(cmsFloat64Number);
+ if (T_PLANAR(info->OutputFormat))
+ return output + sizeof(cmsFloat64Number);
+ else
+ return output + (nChan + Extra) * sizeof(cmsFloat64Number);
}
if (T_PLANAR(Info -> OutputFormat)) {
+ Stride /= PixelSize(Info->OutputFormat);
+
Out[0] = (cmsFloat32Number) (wOut[0] * 100.0);
Out[Stride] = (cmsFloat32Number) (wOut[1] * 255.0 - 128.0);
Out[Stride*2] = (cmsFloat32Number) (wOut[2] * 255.0 - 128.0);
if (T_PLANAR(Info -> OutputFormat)) {
+ Stride /= PixelSize(Info->OutputFormat);
+
Out[0] = (cmsFloat64Number) (wOut[0] * 100.0);
Out[Stride] = (cmsFloat64Number) (wOut[1] * 255.0 - 128.0);
Out[Stride*2] = (cmsFloat64Number) (wOut[2] * 255.0 - 128.0);
if (T_PLANAR(Info -> OutputFormat)) {
+ Stride /= PixelSize(Info->OutputFormat);
+
Out[0] = (cmsFloat32Number) (wOut[0] * MAX_ENCODEABLE_XYZ);
Out[Stride] = (cmsFloat32Number) (wOut[1] * MAX_ENCODEABLE_XYZ);
Out[Stride*2] = (cmsFloat32Number) (wOut[2] * MAX_ENCODEABLE_XYZ);
if (T_PLANAR(Info -> OutputFormat)) {
+ Stride /= PixelSize(Info->OutputFormat);
+
Out[0] = (cmsFloat64Number) (wOut[0] * MAX_ENCODEABLE_XYZ);
Out[Stride] = (cmsFloat64Number) (wOut[1] * MAX_ENCODEABLE_XYZ);
Out[Stride*2] = (cmsFloat64Number) (wOut[2] * MAX_ENCODEABLE_XYZ);
// Decodes an stream of half floats to wIn[] described by input format
static
-cmsUInt8Number* UnrollHalfTo16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wIn[],
- register cmsUInt8Number* accum,
- register cmsUInt32Number Stride)
+cmsUInt8Number* UnrollHalfTo16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- int Planar = T_PLANAR(info -> InputFormat);
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number Planar = T_PLANAR(info -> InputFormat);
cmsFloat32Number v;
- int i, start = 0;
+ cmsUInt32Number i, start = 0;
cmsFloat32Number maximum = IsInkSpace(info ->InputFormat) ? 655.35F : 65535.0F;
+ Stride /= PixelSize(info->OutputFormat);
+
if (ExtraFirst)
start = Extra;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
if (Planar)
v = _cmsHalf2Float ( ((cmsUInt16Number*) accum)[(i + start) * Stride] );
if (Reverse) v = maximum - v;
- wIn[index] = _cmsQuickSaturateWord(v * maximum);
+ wIn[index] = _cmsQuickSaturateWord((cmsFloat64Number) v * maximum);
}
cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> InputFormat);
- int DoSwap = T_DOSWAP(info ->InputFormat);
- int Reverse = T_FLAVOR(info ->InputFormat);
- int SwapFirst = T_SWAPFIRST(info -> InputFormat);
- int Extra = T_EXTRA(info -> InputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- int Planar = T_PLANAR(info -> InputFormat);
+ cmsUInt32Number nChan = T_CHANNELS(info -> InputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info ->InputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info ->InputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info -> InputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info -> InputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsUInt32Number Planar = T_PLANAR(info -> InputFormat);
cmsFloat32Number v;
- int i, start = 0;
+ cmsUInt32Number i, start = 0;
cmsFloat32Number maximum = IsInkSpace(info ->InputFormat) ? 100.0F : 1.0F;
+ Stride /= PixelSize(info->OutputFormat);
if (ExtraFirst)
start = Extra;
for (i=0; i < nChan; i++) {
- int index = DoSwap ? (nChan - i - 1) : i;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
if (Planar)
v = _cmsHalf2Float ( ((cmsUInt16Number*) accum)[(i + start) * Stride] );
static
-cmsUInt8Number* PackHalfFrom16(register _cmsTRANSFORM* info,
- register cmsUInt16Number wOut[],
- register cmsUInt8Number* output,
- register cmsUInt32Number Stride)
+cmsUInt8Number* PackHalfFrom16(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int Planar = T_PLANAR(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- cmsFloat32Number maximum = IsInkSpace(info ->OutputFormat) ? 655.35F : 65535.0F;
- cmsFloat32Number v = 0;
- cmsUInt16Number* swap1 = (cmsUInt16Number*) output;
- int i, start = 0;
+ cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
+ cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsFloat32Number maximum = IsInkSpace(info->OutputFormat) ? 655.35F : 65535.0F;
+ cmsFloat32Number v = 0;
+ cmsUInt16Number* swap1 = (cmsUInt16Number*)output;
+ cmsUInt32Number i, start = 0;
- if (ExtraFirst)
- start = Extra;
+ Stride /= PixelSize(info->OutputFormat);
- for (i=0; i < nChan; i++) {
+ if (ExtraFirst)
+ start = Extra;
- int index = DoSwap ? (nChan - i - 1) : i;
+ for (i = 0; i < nChan; i++) {
- v = (cmsFloat32Number) wOut[index] / maximum;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
- if (Reverse)
- v = maximum - v;
+ v = (cmsFloat32Number)wOut[index] / maximum;
- if (Planar)
- ((cmsUInt16Number*) output)[(i + start ) * Stride]= _cmsFloat2Half(v);
- else
- ((cmsUInt16Number*) output)[i + start] = _cmsFloat2Half(v);
- }
+ if (Reverse)
+ v = maximum - v;
- if (!ExtraFirst) {
- output += Extra * sizeof(cmsUInt16Number);
- }
+ if (Planar)
+ ((cmsUInt16Number*)output)[(i + start) * Stride] = _cmsFloat2Half(v);
+ else
+ ((cmsUInt16Number*)output)[i + start] = _cmsFloat2Half(v);
+ }
- if (Extra == 0 && SwapFirst) {
- memmove(swap1 + 1, swap1, (nChan-1)* sizeof(cmsUInt16Number));
- *swap1 = _cmsFloat2Half(v);
- }
+ if (Extra == 0 && SwapFirst) {
- if (T_PLANAR(info -> OutputFormat))
- return output + sizeof(cmsUInt16Number);
- else
- return output + nChan * sizeof(cmsUInt16Number);
+ memmove(swap1 + 1, swap1, (nChan - 1)* sizeof(cmsUInt16Number));
+ *swap1 = _cmsFloat2Half(v);
+ }
+
+ if (T_PLANAR(info->OutputFormat))
+ return output + sizeof(cmsUInt16Number);
+ else
+ return output + (nChan + Extra) * sizeof(cmsUInt16Number);
}
cmsUInt8Number* output,
cmsUInt32Number Stride)
{
- int nChan = T_CHANNELS(info -> OutputFormat);
- int DoSwap = T_DOSWAP(info ->OutputFormat);
- int Reverse = T_FLAVOR(info ->OutputFormat);
- int Extra = T_EXTRA(info -> OutputFormat);
- int SwapFirst = T_SWAPFIRST(info -> OutputFormat);
- int Planar = T_PLANAR(info -> OutputFormat);
- int ExtraFirst = DoSwap ^ SwapFirst;
- cmsFloat32Number maximum = IsInkSpace(info ->OutputFormat) ? 100.0F : 1.0F;
- cmsUInt16Number* swap1 = (cmsUInt16Number*) output;
- cmsFloat32Number v = 0;
- int i, start = 0;
+ cmsUInt32Number nChan = T_CHANNELS(info->OutputFormat);
+ cmsUInt32Number DoSwap = T_DOSWAP(info->OutputFormat);
+ cmsUInt32Number Reverse = T_FLAVOR(info->OutputFormat);
+ cmsUInt32Number Extra = T_EXTRA(info->OutputFormat);
+ cmsUInt32Number SwapFirst = T_SWAPFIRST(info->OutputFormat);
+ cmsUInt32Number Planar = T_PLANAR(info->OutputFormat);
+ cmsUInt32Number ExtraFirst = DoSwap ^ SwapFirst;
+ cmsFloat32Number maximum = IsInkSpace(info->OutputFormat) ? 100.0F : 1.0F;
+ cmsUInt16Number* swap1 = (cmsUInt16Number*)output;
+ cmsFloat32Number v = 0;
+ cmsUInt32Number i, start = 0;
- if (ExtraFirst)
- start = Extra;
+ Stride /= PixelSize(info->OutputFormat);
- for (i=0; i < nChan; i++) {
+ if (ExtraFirst)
+ start = Extra;
- int index = DoSwap ? (nChan - i - 1) : i;
+ for (i = 0; i < nChan; i++) {
- v = wOut[index] * maximum;
+ cmsUInt32Number index = DoSwap ? (nChan - i - 1) : i;
- if (Reverse)
- v = maximum - v;
+ v = wOut[index] * maximum;
- if (Planar)
- ((cmsUInt16Number*) output)[(i + start)* Stride]= _cmsFloat2Half( v );
- else
- ((cmsUInt16Number*) output)[i + start] = _cmsFloat2Half( v );
- }
+ if (Reverse)
+ v = maximum - v;
- if (!ExtraFirst) {
- output += Extra * sizeof(cmsUInt16Number);
- }
+ if (Planar)
+ ((cmsUInt16Number*)output)[(i + start)* Stride] = _cmsFloat2Half(v);
+ else
+ ((cmsUInt16Number*)output)[i + start] = _cmsFloat2Half(v);
+ }
- if (Extra == 0 && SwapFirst) {
- memmove(swap1 + 1, swap1, (nChan-1)* sizeof(cmsUInt16Number));
- *swap1 = (cmsUInt16Number) _cmsFloat2Half( v );
- }
+ if (Extra == 0 && SwapFirst) {
- if (T_PLANAR(info -> OutputFormat))
- return output + sizeof(cmsUInt16Number);
- else
- return output + nChan * sizeof(cmsUInt16Number);
+ memmove(swap1 + 1, swap1, (nChan - 1)* sizeof(cmsUInt16Number));
+ *swap1 = (cmsUInt16Number)_cmsFloat2Half(v);
+ }
+
+ if (T_PLANAR(info->OutputFormat))
+ return output + sizeof(cmsUInt16Number);
+ else
+ return output + (nChan + Extra)* sizeof(cmsUInt16Number);
}
#endif
// ----------------------------------------------------------------------------------------------------------------
-static cmsFormatters16 InputFormatters16[] = {
+static const cmsFormatters16 InputFormatters16[] = {
// Type Mask Function
// ---------------------------- ------------------------------------ ----------------------------
{ TYPE_Lab_DBL, ANYPLANAR|ANYEXTRA, UnrollLabDoubleTo16},
{ TYPE_XYZ_DBL, ANYPLANAR|ANYEXTRA, UnrollXYZDoubleTo16},
{ TYPE_Lab_FLT, ANYPLANAR|ANYEXTRA, UnrollLabFloatTo16},
+ { TYPE_XYZ_FLT, ANYPLANAR|ANYEXTRA, UnrollXYZFloatTo16},
{ TYPE_GRAY_DBL, 0, UnrollDouble1Chan},
{ FLOAT_SH(1)|BYTES_SH(0), ANYCHANNELS|ANYPLANAR|ANYSWAPFIRST|ANYFLAVOR|
ANYSWAP|ANYEXTRA|ANYSPACE, UnrollDoubleTo16},
{ CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1), ANYSPACE, Unroll3BytesSkip1Swap},
{ CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|SWAPFIRST_SH(1), ANYSPACE, Unroll3BytesSkip1SwapFirst},
+ { CHANNELS_SH(3)|EXTRA_SH(1)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1),
+ ANYSPACE, Unroll3BytesSkip1SwapSwapFirst},
+
{ CHANNELS_SH(4)|BYTES_SH(1), ANYSPACE, Unroll4Bytes},
{ CHANNELS_SH(4)|BYTES_SH(1)|FLAVOR_SH(1), ANYSPACE, Unroll4BytesReverse},
{ CHANNELS_SH(4)|BYTES_SH(1)|SWAPFIRST_SH(1), ANYSPACE, Unroll4BytesSwapFirst},
-static cmsFormattersFloat InputFormattersFloat[] = {
+static const cmsFormattersFloat InputFormattersFloat[] = {
// Type Mask Function
// ---------------------------- ------------------------------------ ----------------------------
case CMS_PACK_FLAGS_16BITS: {
for (i=0; i < sizeof(InputFormatters16) / sizeof(cmsFormatters16); i++) {
- cmsFormatters16* f = InputFormatters16 + i;
+ const cmsFormatters16* f = InputFormatters16 + i;
if ((dwInput & ~f ->Mask) == f ->Type) {
fr.Fmt16 = f ->Frm;
case CMS_PACK_FLAGS_FLOAT: {
for (i=0; i < sizeof(InputFormattersFloat) / sizeof(cmsFormattersFloat); i++) {
- cmsFormattersFloat* f = InputFormattersFloat + i;
+ const cmsFormattersFloat* f = InputFormattersFloat + i;
if ((dwInput & ~f ->Mask) == f ->Type) {
fr.FmtFloat = f ->Frm;
return fr;
}
-static cmsFormatters16 OutputFormatters16[] = {
+static const cmsFormatters16 OutputFormatters16[] = {
// Type Mask Function
// ---------------------------- ------------------------------------ ----------------------------
{ TYPE_XYZ_DBL, ANYPLANAR|ANYEXTRA, PackXYZDoubleFrom16},
{ TYPE_Lab_FLT, ANYPLANAR|ANYEXTRA, PackLabFloatFrom16},
+ { TYPE_XYZ_FLT, ANYPLANAR|ANYEXTRA, PackXYZFloatFrom16},
{ FLOAT_SH(1)|BYTES_SH(0), ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|
ANYCHANNELS|ANYPLANAR|ANYEXTRA|ANYSPACE, PackDoubleFrom16},
};
-static cmsFormattersFloat OutputFormattersFloat[] = {
+static const cmsFormattersFloat OutputFormattersFloat[] = {
// Type Mask Function
// ---------------------------- --------------------------------------------------- ----------------------------
{ TYPE_Lab_FLT, ANYPLANAR|ANYEXTRA, PackLabFloatFromFloat},
ANYFLAVOR|ANYSWAPFIRST|ANYSWAP|ANYEXTRA|ANYCHANNELS|ANYSPACE, PackHalfFromFloat },
#endif
-
-
};
cmsUInt32Number i;
cmsFormatter fr;
+ // Optimization is only a hint
+ dwInput &= ~OPTIMIZED_SH(1);
switch (dwFlags)
{
case CMS_PACK_FLAGS_16BITS: {
for (i=0; i < sizeof(OutputFormatters16) / sizeof(cmsFormatters16); i++) {
- cmsFormatters16* f = OutputFormatters16 + i;
+ const cmsFormatters16* f = OutputFormatters16 + i;
if ((dwInput & ~f ->Mask) == f ->Type) {
fr.Fmt16 = f ->Frm;
case CMS_PACK_FLAGS_FLOAT: {
for (i=0; i < sizeof(OutputFormattersFloat) / sizeof(cmsFormattersFloat); i++) {
- cmsFormattersFloat* f = OutputFormattersFloat + i;
+ const cmsFormattersFloat* f = OutputFormattersFloat + i;
if ((dwInput & ~f ->Mask) == f ->Type) {
fr.FmtFloat = f ->Frm;
} cmsFormattersFactoryList;
-static cmsFormattersFactoryList* FactoryList = NULL;
+_cmsFormattersPluginChunkType _cmsFormattersPluginChunk = { NULL };
+
+
+// Duplicates the zone of memory used by the plug-in in the new context
+static
+void DupFormatterFactoryList(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ _cmsFormattersPluginChunkType newHead = { NULL };
+ cmsFormattersFactoryList* entry;
+ cmsFormattersFactoryList* Anterior = NULL;
+ _cmsFormattersPluginChunkType* head = (_cmsFormattersPluginChunkType*) src->chunks[FormattersPlugin];
+
+ _cmsAssert(head != NULL);
+
+ // Walk the list copying all nodes
+ for (entry = head->FactoryList;
+ entry != NULL;
+ entry = entry ->Next) {
+
+ cmsFormattersFactoryList *newEntry = ( cmsFormattersFactoryList *) _cmsSubAllocDup(ctx ->MemPool, entry, sizeof(cmsFormattersFactoryList));
+
+ if (newEntry == NULL)
+ return;
+
+ // We want to keep the linked list order, so this is a little bit tricky
+ newEntry -> Next = NULL;
+ if (Anterior)
+ Anterior -> Next = newEntry;
+
+ Anterior = newEntry;
+
+ if (newHead.FactoryList == NULL)
+ newHead.FactoryList = newEntry;
+ }
+
+ ctx ->chunks[FormattersPlugin] = _cmsSubAllocDup(ctx->MemPool, &newHead, sizeof(_cmsFormattersPluginChunkType));
+}
+
+// The interpolation plug-in memory chunk allocator/dup
+void _cmsAllocFormattersPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ _cmsAssert(ctx != NULL);
+
+ if (src != NULL) {
+
+ // Duplicate the LIST
+ DupFormatterFactoryList(ctx, src);
+ }
+ else {
+ static _cmsFormattersPluginChunkType FormattersPluginChunk = { NULL };
+ ctx ->chunks[FormattersPlugin] = _cmsSubAllocDup(ctx ->MemPool, &FormattersPluginChunk, sizeof(_cmsFormattersPluginChunkType));
+ }
+}
+
// Formatters management
-cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Data)
+cmsBool _cmsRegisterFormattersPlugin(cmsContext ContextID, cmsPluginBase* Data)
{
+ _cmsFormattersPluginChunkType* ctx = ( _cmsFormattersPluginChunkType*) _cmsContextGetClientChunk(ContextID, FormattersPlugin);
cmsPluginFormatters* Plugin = (cmsPluginFormatters*) Data;
cmsFormattersFactoryList* fl ;
- // Reset
+ // Reset to built-in defaults
if (Data == NULL) {
- FactoryList = NULL;
+ ctx ->FactoryList = NULL;
return TRUE;
}
- fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(sizeof(cmsFormattersFactoryList));
+ fl = (cmsFormattersFactoryList*) _cmsPluginMalloc(ContextID, sizeof(cmsFormattersFactoryList));
if (fl == NULL) return FALSE;
fl ->Factory = Plugin ->FormattersFactory;
- fl ->Next = FactoryList;
- FactoryList = fl;
+ fl ->Next = ctx -> FactoryList;
+ ctx ->FactoryList = fl;
return TRUE;
}
-cmsFormatter _cmsGetFormatter(cmsUInt32Number Type, // Specific type, i.e. TYPE_RGB_8
- cmsFormatterDirection Dir,
- cmsUInt32Number dwFlags)
+cmsFormatter CMSEXPORT _cmsGetFormatter(cmsContext ContextID,
+ cmsUInt32Number Type, // Specific type, i.e. TYPE_RGB_8
+ cmsFormatterDirection Dir,
+ cmsUInt32Number dwFlags)
{
+ _cmsFormattersPluginChunkType* ctx = ( _cmsFormattersPluginChunkType*) _cmsContextGetClientChunk(ContextID, FormattersPlugin);
cmsFormattersFactoryList* f;
- for (f = FactoryList; f != NULL; f = f ->Next) {
+ for (f =ctx->FactoryList; f != NULL; f = f ->Next) {
cmsFormatter fn = f ->Factory(Type, Dir, dwFlags);
if (fn.Fmt16 != NULL) return fn;
// Return whatever given formatter refers to 8 bits
cmsBool _cmsFormatterIs8bit(cmsUInt32Number Type)
{
- int Bytes = T_BYTES(Type);
+ cmsUInt32Number Bytes = T_BYTES(Type);
return (Bytes == 1);
}
{
cmsColorSpaceSignature ColorSpace = cmsGetColorSpace(hProfile);
- cmsUInt32Number ColorSpaceBits = _cmsLCMScolorSpace(ColorSpace);
+ cmsUInt32Number ColorSpaceBits = (cmsUInt32Number) _cmsLCMScolorSpace(ColorSpace);
cmsUInt32Number nOutputChans = cmsChannelsOf(ColorSpace);
- cmsUInt32Number Float = lIsFloat ? 1 : 0;
+ cmsUInt32Number Float = lIsFloat ? 1U : 0;
// Create a fake formatter for result
return FLOAT_SH(Float) | COLORSPACE_SH(ColorSpaceBits) | BYTES_SH(nBytes) | CHANNELS_SH(nOutputChans);
cmsUInt32Number CMSEXPORT cmsFormatterForPCSOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat)
{
- cmsColorSpaceSignature ColorSpace = cmsGetPCS(hProfile);
- int ColorSpaceBits = _cmsLCMScolorSpace(ColorSpace);
- cmsUInt32Number nOutputChans = cmsChannelsOf(ColorSpace);
- cmsUInt32Number Float = lIsFloat ? 1 : 0;
+ cmsColorSpaceSignature ColorSpace = cmsGetPCS(hProfile);
+
+ cmsUInt32Number ColorSpaceBits = (cmsUInt32Number) _cmsLCMScolorSpace(ColorSpace);
+ cmsUInt32Number nOutputChans = cmsChannelsOf(ColorSpace);
+ cmsUInt32Number Float = lIsFloat ? 1U : 0;
// Create a fake formatter for result
return FLOAT_SH(Float) | COLORSPACE_SH(ColorSpaceBits) | BYTES_SH(nBytes) | CHANNELS_SH(nOutputChans);
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
Dest -> Z = ((1 - Source -> x - Source -> y) / Source -> y) * Source -> Y;
}
+/*
+ The break point (24/116)^3 = (6/29)^3 is a very small amount of tristimulus
+ primary (0.008856). Generally, this only happens for
+ nearly ideal blacks and for some orange / amber colors in transmission mode.
+ For example, the Z value of the orange turn indicator lamp lens on an
+ automobile will often be below this value. But the Z does not
+ contribute to the perceived color directly.
+*/
+
static
cmsFloat64Number f(cmsFloat64Number t)
{
static
cmsFloat64Number L2float2(cmsUInt16Number v)
{
- return (cmsFloat64Number) v / 652.800;
+ return (cmsFloat64Number) v / 652.800;
}
// the a/b part
static
cmsFloat64Number ab2float2(cmsUInt16Number v)
{
- return ((cmsFloat64Number) v / 256.0) - 128.0;
+ return ((cmsFloat64Number) v / 256.0) - 128.0;
}
static
cmsUInt16Number L2Fix2(cmsFloat64Number L)
{
- return _cmsQuickSaturateWord(L * 652.8);
+ return _cmsQuickSaturateWord(L * 652.8);
}
static
cmsUInt16Number ab2Fix2(cmsFloat64Number ab)
{
- return _cmsQuickSaturateWord((ab + 128.0) * 256.0);
+ return _cmsQuickSaturateWord((ab + 128.0) * 256.0);
}
wLab[2] = ab2Fix4(Lab.b);
}
-// Auxiliar: convert to Radians
+// Auxiliary: convert to Radians
static
cmsFloat64Number RADIANS(cmsFloat64Number deg)
{
}
-// Auxiliar: atan2 but operating in degrees and returning 0 if a==b==0
+// Auxiliary: atan2 but operating in degrees and returning 0 if a==b==0
static
cmsFloat64Number atan2deg(cmsFloat64Number a, cmsFloat64Number b)
{
}
-// Auxiliar: Square
+// Auxiliary: Square
static
cmsFloat64Number Sqr(cmsFloat64Number v)
{
// This function returns a number of gridpoints to be used as LUT table. It assumes same number
// of gripdpoints in all dimensions. Flags may override the choice.
-int _cmsReasonableGridpointsByColorspace(cmsColorSpaceSignature Colorspace, cmsUInt32Number dwFlags)
+cmsUInt32Number CMSEXPORT _cmsReasonableGridpointsByColorspace(cmsColorSpaceSignature Colorspace, cmsUInt32Number dwFlags)
{
- int nChannels;
+ cmsUInt32Number nChannels;
// Already specified?
if (dwFlags & 0x00FF0000) {
case PT_MCH14: return cmsSigMCHEData;
case PT_MCH15: return cmsSigMCHFData;
- default: return (cmsColorSpaceSignature) (-1);
+ default: return (cmsColorSpaceSignature) 0;
}
}
case cmsSigMCHFData:
case cmsSig15colorData:return PT_MCH15;
- default: return (cmsColorSpaceSignature) (-1);
+ default: return (cmsColorSpaceSignature) 0;
}
}
{
switch (ColorSpace) {
+ case cmsSigMCH1Data:
case cmsSig1colorData:
case cmsSigGrayData: return 1;
+ case cmsSigMCH2Data:
case cmsSig2colorData: return 2;
case cmsSigXYZData:
case cmsSigHsvData:
case cmsSigHlsData:
case cmsSigCmyData:
+ case cmsSigMCH3Data:
case cmsSig3colorData: return 3;
case cmsSigLuvKData:
case cmsSigCmykData:
+ case cmsSigMCH4Data:
case cmsSig4colorData: return 4;
case cmsSigMCH5Data:
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// Little-Endian to Big-Endian
-// Adjust a word value after being readed/ before being written from/to an ICC profile
+// Adjust a word value after being read/ before being written from/to an ICC profile
cmsUInt16Number CMSEXPORT _cmsAdjustEndianess16(cmsUInt16Number Word)
{
#ifndef CMS_USE_BIG_ENDIAN
pOut[0] = pIn[7];
#else
-
_cmsAssert(Result != NULL);
+# ifdef CMS_DONT_USE_INT64
+ (*Result)[0] = (*QWord)[0];
+ (*Result)[1] = (*QWord)[1];
+# else
*Result = *QWord;
+# endif
#endif
}
-// Auxiliar -- read 8, 16 and 32-bit numbers
+// Auxiliary -- read 8, 16 and 32-bit numbers
cmsBool CMSEXPORT _cmsReadUInt8Number(cmsIOHANDLER* io, cmsUInt8Number* n)
{
cmsUInt8Number tmp;
_cmsAssert(io != NULL);
- if (io -> Read(io, &tmp, sizeof(cmsFloat32Number), 1) != 1)
- return FALSE;
+ if (io->Read(io, &tmp, sizeof(cmsUInt32Number), 1) != 1)
+ return FALSE;
if (n != NULL) {
tmp = _cmsAdjustEndianess32(tmp);
- *n = *(cmsFloat32Number*) &tmp;
+ *n = *(cmsFloat32Number*)(void*)&tmp;
+
+ // Safeguard which covers against absurd values
+ if (*n > 1E+20 || *n < -1E+20) return FALSE;
+
+ #if defined(_MSC_VER) && _MSC_VER < 1800
+ return TRUE;
+ #elif defined (__BORLANDC__)
+ return TRUE;
+ #elif !defined(_MSC_VER) && (defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L)
+ return TRUE;
+ #else
+
+ // fpclassify() required by C99 (only provided by MSVC >= 1800, VS2013 onwards)
+ return ((fpclassify(*n) == FP_ZERO) || (fpclassify(*n) == FP_NORMAL));
+ #endif
}
+
return TRUE;
}
if (io -> Read(io, &tmp, sizeof(cmsUInt64Number), 1) != 1)
return FALSE;
- if (n != NULL) _cmsAdjustEndianess64(n, &tmp);
+ if (n != NULL) {
+
+ _cmsAdjustEndianess64(n, &tmp);
+ }
+
return TRUE;
}
return FALSE;
if (n != NULL) {
- *n = _cms15Fixed16toDouble(_cmsAdjustEndianess32(tmp));
+ *n = _cms15Fixed16toDouble((cmsS15Fixed16Number) _cmsAdjustEndianess32(tmp));
}
return TRUE;
}
-// Jun-21-2000: Some profiles (those that comes with W2K) comes
-// with the media white (media black?) x 100. Add a sanity check
-
-static
-void NormalizeXYZ(cmsCIEXYZ* Dest)
-{
- while (Dest -> X > 2. &&
- Dest -> Y > 2. &&
- Dest -> Z > 2.) {
-
- Dest -> X /= 10.;
- Dest -> Y /= 10.;
- Dest -> Z /= 10.;
- }
-}
-
cmsBool CMSEXPORT _cmsReadXYZNumber(cmsIOHANDLER* io, cmsCIEXYZ* XYZ)
{
cmsEncodedXYZNumber xyz;
if (XYZ != NULL) {
- XYZ->X = _cms15Fixed16toDouble(_cmsAdjustEndianess32(xyz.X));
- XYZ->Y = _cms15Fixed16toDouble(_cmsAdjustEndianess32(xyz.Y));
- XYZ->Z = _cms15Fixed16toDouble(_cmsAdjustEndianess32(xyz.Z));
-
- NormalizeXYZ(XYZ);
+ XYZ->X = _cms15Fixed16toDouble((cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) xyz.X));
+ XYZ->Y = _cms15Fixed16toDouble((cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) xyz.Y));
+ XYZ->Z = _cms15Fixed16toDouble((cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) xyz.Z));
}
return TRUE;
}
_cmsAssert(io != NULL);
- tmp = *(cmsUInt32Number*) &n;
+ tmp = *(cmsUInt32Number*) (void*) &n;
tmp = _cmsAdjustEndianess32(tmp);
if (io -> Write(io, sizeof(cmsUInt32Number), &tmp) != 1)
return FALSE;
_cmsAssert(io != NULL);
- tmp = _cmsAdjustEndianess32(_cmsDoubleTo15Fixed16(n));
+ tmp = _cmsAdjustEndianess32((cmsUInt32Number) _cmsDoubleTo15Fixed16(n));
if (io -> Write(io, sizeof(cmsUInt32Number), &tmp) != 1)
return FALSE;
_cmsAssert(io != NULL);
_cmsAssert(XYZ != NULL);
- xyz.X = _cmsAdjustEndianess32(_cmsDoubleTo15Fixed16(XYZ->X));
- xyz.Y = _cmsAdjustEndianess32(_cmsDoubleTo15Fixed16(XYZ->Y));
- xyz.Z = _cmsAdjustEndianess32(_cmsDoubleTo15Fixed16(XYZ->Z));
+ xyz.X = (cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) _cmsDoubleTo15Fixed16(XYZ->X));
+ xyz.Y = (cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) _cmsDoubleTo15Fixed16(XYZ->Y));
+ xyz.Z = (cmsS15Fixed16Number) _cmsAdjustEndianess32((cmsUInt32Number) _cmsDoubleTo15Fixed16(XYZ->Z));
return io -> Write(io, sizeof(cmsEncodedXYZNumber), &xyz);
}
int len;
cmsUInt8Number Buffer[2048];
cmsBool rc;
+ cmsUInt8Number* ptr;
_cmsAssert(io != NULL);
_cmsAssert(frm != NULL);
va_start(args, frm);
len = vsnprintf((char*) Buffer, 2047, frm, args);
- if (len < 0) return FALSE; // Truncated, which is a fatal error for us
+ if (len < 0) {
+ va_end(args);
+ return FALSE; // Truncated, which is a fatal error for us
+ }
+
+ // setlocale may be active, no commas are needed in PS generator
+ // and PS generator is our only client
+ for (ptr = Buffer; *ptr; ptr++)
+ {
+ if (*ptr == ',') *ptr = '.';
+ }
- rc = io ->Write(io, len, Buffer);
+ rc = io ->Write(io, (cmsUInt32Number) len, Buffer);
va_end(args);
// Plugin memory management -------------------------------------------------------------------------------------------------
-static _cmsSubAllocator* PluginPool = NULL;
-
// Specialized malloc for plug-ins, that is freed upon exit.
-void* _cmsPluginMalloc(cmsUInt32Number size)
+void* _cmsPluginMalloc(cmsContext ContextID, cmsUInt32Number size)
{
- if (PluginPool == NULL)
- PluginPool = _cmsCreateSubAlloc(0, 4*1024);
+ struct _cmsContext_struct* ctx = _cmsGetContext(ContextID);
+
+ if (ctx ->MemPool == NULL) {
+
+ if (ContextID == NULL) {
+
+ ctx->MemPool = _cmsCreateSubAlloc(0, 2*1024);
+ if (ctx->MemPool == NULL) return NULL;
+ }
+ else {
+ cmsSignalError(ContextID, cmsERROR_CORRUPTION_DETECTED, "NULL memory pool on context");
+ return NULL;
+ }
+ }
- return _cmsSubAlloc(PluginPool, size);
+ return _cmsSubAlloc(ctx->MemPool, size);
}
// Main plug-in dispatcher
cmsBool CMSEXPORT cmsPlugin(void* Plug_in)
{
+ return cmsPluginTHR(NULL, Plug_in);
+}
+
+cmsBool CMSEXPORT cmsPluginTHR(cmsContext id, void* Plug_in)
+{
cmsPluginBase* Plugin;
for (Plugin = (cmsPluginBase*) Plug_in;
Plugin = Plugin -> Next) {
if (Plugin -> Magic != cmsPluginMagicNumber) {
- cmsSignalError(0, cmsERROR_UNKNOWN_EXTENSION, "Unrecognized plugin");
+ cmsSignalError(id, cmsERROR_UNKNOWN_EXTENSION, "Unrecognized plugin");
return FALSE;
}
if (Plugin ->ExpectedVersion > LCMS_VERSION) {
- cmsSignalError(0, cmsERROR_UNKNOWN_EXTENSION, "plugin needs Little CMS %d, current version is %d",
+ cmsSignalError(id, cmsERROR_UNKNOWN_EXTENSION, "plugin needs Little CMS %d, current version is %d",
Plugin ->ExpectedVersion, LCMS_VERSION);
return FALSE;
}
switch (Plugin -> Type) {
case cmsPluginMemHandlerSig:
- if (!_cmsRegisterMemHandlerPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterMemHandlerPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginInterpolationSig:
- if (!_cmsRegisterInterpPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterInterpPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginTagTypeSig:
- if (!_cmsRegisterTagTypePlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterTagTypePlugin(id, Plugin)) return FALSE;
break;
case cmsPluginTagSig:
- if (!_cmsRegisterTagPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterTagPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginFormattersSig:
- if (!_cmsRegisterFormattersPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterFormattersPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginRenderingIntentSig:
- if (!_cmsRegisterRenderingIntentPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterRenderingIntentPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginParametricCurveSig:
- if (!_cmsRegisterParametricCurvesPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterParametricCurvesPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginMultiProcessElementSig:
- if (!_cmsRegisterMultiProcessElementPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterMultiProcessElementPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginOptimizationSig:
- if (!_cmsRegisterOptimizationPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterOptimizationPlugin(id, Plugin)) return FALSE;
break;
case cmsPluginTransformSig:
- if (!_cmsRegisterTransformPlugin(Plugin)) return FALSE;
+ if (!_cmsRegisterTransformPlugin(id, Plugin)) return FALSE;
+ break;
+
+ case cmsPluginMutexSig:
+ if (!_cmsRegisterMutexPlugin(id, Plugin)) return FALSE;
break;
default:
- cmsSignalError(0, cmsERROR_UNKNOWN_EXTENSION, "Unrecognized plugin type '%X'", Plugin -> Type);
+ cmsSignalError(id, cmsERROR_UNKNOWN_EXTENSION, "Unrecognized plugin type '%X'", Plugin -> Type);
return FALSE;
}
}
// Revert all plug-ins to default
void CMSEXPORT cmsUnregisterPlugins(void)
{
- _cmsRegisterMemHandlerPlugin(NULL);
- _cmsRegisterInterpPlugin(NULL);
- _cmsRegisterTagTypePlugin(NULL);
- _cmsRegisterTagPlugin(NULL);
- _cmsRegisterFormattersPlugin(NULL);
- _cmsRegisterRenderingIntentPlugin(NULL);
- _cmsRegisterParametricCurvesPlugin(NULL);
- _cmsRegisterMultiProcessElementPlugin(NULL);
- _cmsRegisterOptimizationPlugin(NULL);
- _cmsRegisterTransformPlugin(NULL);
+ cmsUnregisterPluginsTHR(NULL);
+}
+
+
+// The Global storage for system context. This is the one and only global variable
+// pointers structure. All global vars are referenced here.
+static struct _cmsContext_struct globalContext = {
+
+ NULL, // Not in the linked list
+ NULL, // No suballocator
+ {
+ NULL, // UserPtr,
+ &_cmsLogErrorChunk, // Logger,
+ &_cmsAlarmCodesChunk, // AlarmCodes,
+ &_cmsAdaptationStateChunk, // AdaptationState,
+ &_cmsMemPluginChunk, // MemPlugin,
+ &_cmsInterpPluginChunk, // InterpPlugin,
+ &_cmsCurvesPluginChunk, // CurvesPlugin,
+ &_cmsFormattersPluginChunk, // FormattersPlugin,
+ &_cmsTagTypePluginChunk, // TagTypePlugin,
+ &_cmsTagPluginChunk, // TagPlugin,
+ &_cmsIntentsPluginChunk, // IntentPlugin,
+ &_cmsMPETypePluginChunk, // MPEPlugin,
+ &_cmsOptimizationPluginChunk, // OptimizationPlugin,
+ &_cmsTransformPluginChunk, // TransformPlugin,
+ &_cmsMutexPluginChunk // MutexPlugin
+ },
+
+ { NULL, NULL, NULL, NULL, NULL, NULL } // The default memory allocator is not used for context 0
+};
+
+
+// The context pool (linked list head)
+static _cmsMutex _cmsContextPoolHeadMutex = CMS_MUTEX_INITIALIZER;
+static struct _cmsContext_struct* _cmsContextPoolHead = NULL;
+
+// Internal, get associated pointer, with guessing. Never returns NULL.
+struct _cmsContext_struct* _cmsGetContext(cmsContext ContextID)
+{
+ struct _cmsContext_struct* id = (struct _cmsContext_struct*) ContextID;
+ struct _cmsContext_struct* ctx;
+
+
+ // On 0, use global settings
+ if (id == NULL)
+ return &globalContext;
+
+ // Search
+ _cmsEnterCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+
+ for (ctx = _cmsContextPoolHead;
+ ctx != NULL;
+ ctx = ctx ->Next) {
+
+ // Found it?
+ if (id == ctx)
+ {
+ _cmsLeaveCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+ return ctx; // New-style context
+ }
+ }
+
+ _cmsLeaveCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+ return &globalContext;
+}
+
+
+// Internal: get the memory area associanted with each context client
+// Returns the block assigned to the specific zone. Never return NULL.
+void* _cmsContextGetClientChunk(cmsContext ContextID, _cmsMemoryClient mc)
+{
+ struct _cmsContext_struct* ctx;
+ void *ptr;
+
+ if ((int) mc < 0 || mc >= MemoryClientMax) {
+
+ cmsSignalError(ContextID, cmsERROR_INTERNAL, "Bad context client -- possible corruption");
+
+ // This is catastrophic. Should never reach here
+ _cmsAssert(0);
+
+ // Reverts to global context
+ return globalContext.chunks[UserPtr];
+ }
+
+ ctx = _cmsGetContext(ContextID);
+ ptr = ctx ->chunks[mc];
+
+ if (ptr != NULL)
+ return ptr;
+
+ // A null ptr means no special settings for that context, and this
+ // reverts to Context0 globals
+ return globalContext.chunks[mc];
+}
+
+
+// This function returns the given context its default pristine state,
+// as no plug-ins were declared. There is no way to unregister a single
+// plug-in, as a single call to cmsPluginTHR() function may register
+// many different plug-ins simultaneously, then there is no way to
+// identify which plug-in to unregister.
+void CMSEXPORT cmsUnregisterPluginsTHR(cmsContext ContextID)
+{
+ _cmsRegisterMemHandlerPlugin(ContextID, NULL);
+ _cmsRegisterInterpPlugin(ContextID, NULL);
+ _cmsRegisterTagTypePlugin(ContextID, NULL);
+ _cmsRegisterTagPlugin(ContextID, NULL);
+ _cmsRegisterFormattersPlugin(ContextID, NULL);
+ _cmsRegisterRenderingIntentPlugin(ContextID, NULL);
+ _cmsRegisterParametricCurvesPlugin(ContextID, NULL);
+ _cmsRegisterMultiProcessElementPlugin(ContextID, NULL);
+ _cmsRegisterOptimizationPlugin(ContextID, NULL);
+ _cmsRegisterTransformPlugin(ContextID, NULL);
+ _cmsRegisterMutexPlugin(ContextID, NULL);
+}
+
+
+// Returns the memory manager plug-in, if any, from the Plug-in bundle
+static
+cmsPluginMemHandler* _cmsFindMemoryPlugin(void* PluginBundle)
+{
+ cmsPluginBase* Plugin;
+
+ for (Plugin = (cmsPluginBase*) PluginBundle;
+ Plugin != NULL;
+ Plugin = Plugin -> Next) {
+
+ if (Plugin -> Magic == cmsPluginMagicNumber &&
+ Plugin -> ExpectedVersion <= LCMS_VERSION &&
+ Plugin -> Type == cmsPluginMemHandlerSig) {
+
+ // Found!
+ return (cmsPluginMemHandler*) Plugin;
+ }
+ }
+
+ // Nope, revert to defaults
+ return NULL;
+}
+
+
+// Creates a new context with optional associated plug-ins. Caller may also specify an optional pointer to user-defined
+// data that will be forwarded to plug-ins and logger.
+cmsContext CMSEXPORT cmsCreateContext(void* Plugin, void* UserData)
+{
+ struct _cmsContext_struct* ctx;
+ struct _cmsContext_struct fakeContext;
+
+ // See the comments regarding locking in lcms2_internal.h
+ // for an explanation of why we need the following code.
+#ifndef CMS_NO_PTHREADS
+#ifdef CMS_IS_WINDOWS_
+#ifndef CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT
+ {
+ static HANDLE _cmsWindowsInitMutex = NULL;
+ static volatile HANDLE* mutex = &_cmsWindowsInitMutex;
+
+ if (*mutex == NULL)
+ {
+ HANDLE p = CreateMutex(NULL, FALSE, NULL);
+ if (p && InterlockedCompareExchangePointer((void **)mutex, (void*)p, NULL) != NULL)
+ CloseHandle(p);
+ }
+ if (*mutex == NULL || WaitForSingleObject(*mutex, INFINITE) == WAIT_FAILED)
+ return NULL;
+ if (((void **)&_cmsContextPoolHeadMutex)[0] == NULL)
+ InitializeCriticalSection(&_cmsContextPoolHeadMutex);
+ if (*mutex == NULL || !ReleaseMutex(*mutex))
+ return NULL;
+ }
+#endif
+#endif
+#endif
- if (PluginPool != NULL)
- _cmsSubAllocDestroy(PluginPool);
+ _cmsInstallAllocFunctions(_cmsFindMemoryPlugin(Plugin), &fakeContext.DefaultMemoryManager);
+
+ fakeContext.chunks[UserPtr] = UserData;
+ fakeContext.chunks[MemPlugin] = &fakeContext.DefaultMemoryManager;
+
+ // Create the context structure.
+ ctx = (struct _cmsContext_struct*) _cmsMalloc(&fakeContext, sizeof(struct _cmsContext_struct));
+ if (ctx == NULL)
+ return NULL; // Something very wrong happened!
+
+ // Init the structure and the memory manager
+ memset(ctx, 0, sizeof(struct _cmsContext_struct));
+
+ // Keep memory manager
+ memcpy(&ctx->DefaultMemoryManager, &fakeContext.DefaultMemoryManager, sizeof(_cmsMemPluginChunk));
+
+ // Maintain the linked list (with proper locking)
+ _cmsEnterCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+ ctx ->Next = _cmsContextPoolHead;
+ _cmsContextPoolHead = ctx;
+ _cmsLeaveCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+
+ ctx ->chunks[UserPtr] = UserData;
+ ctx ->chunks[MemPlugin] = &ctx->DefaultMemoryManager;
+
+ // Now we can allocate the pool by using default memory manager
+ ctx ->MemPool = _cmsCreateSubAlloc(ctx, 22 * sizeof(void*)); // default size about 22 pointers
+ if (ctx ->MemPool == NULL) {
+
+ cmsDeleteContext(ctx);
+ return NULL;
+ }
+
+ _cmsAllocLogErrorChunk(ctx, NULL);
+ _cmsAllocAlarmCodesChunk(ctx, NULL);
+ _cmsAllocAdaptationStateChunk(ctx, NULL);
+ _cmsAllocMemPluginChunk(ctx, NULL);
+ _cmsAllocInterpPluginChunk(ctx, NULL);
+ _cmsAllocCurvesPluginChunk(ctx, NULL);
+ _cmsAllocFormattersPluginChunk(ctx, NULL);
+ _cmsAllocTagTypePluginChunk(ctx, NULL);
+ _cmsAllocMPETypePluginChunk(ctx, NULL);
+ _cmsAllocTagPluginChunk(ctx, NULL);
+ _cmsAllocIntentsPluginChunk(ctx, NULL);
+ _cmsAllocOptimizationPluginChunk(ctx, NULL);
+ _cmsAllocTransformPluginChunk(ctx, NULL);
+ _cmsAllocMutexPluginChunk(ctx, NULL);
+
+ // Setup the plug-ins
+ if (!cmsPluginTHR(ctx, Plugin)) {
+
+ cmsDeleteContext(ctx);
+ return NULL;
+ }
- PluginPool = NULL;
+ return (cmsContext) ctx;
}
+
+// Duplicates a context with all associated plug-ins.
+// Caller may specify an optional pointer to user-defined
+// data that will be forwarded to plug-ins and logger.
+cmsContext CMSEXPORT cmsDupContext(cmsContext ContextID, void* NewUserData)
+{
+ int i;
+ struct _cmsContext_struct* ctx;
+ const struct _cmsContext_struct* src = _cmsGetContext(ContextID);
+
+ void* userData = (NewUserData != NULL) ? NewUserData : src -> chunks[UserPtr];
+
+
+ ctx = (struct _cmsContext_struct*) _cmsMalloc(ContextID, sizeof(struct _cmsContext_struct));
+ if (ctx == NULL)
+ return NULL; // Something very wrong happened
+
+ // Setup default memory allocators
+ memcpy(&ctx->DefaultMemoryManager, &src->DefaultMemoryManager, sizeof(ctx->DefaultMemoryManager));
+
+ // Maintain the linked list
+ _cmsEnterCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+ ctx ->Next = _cmsContextPoolHead;
+ _cmsContextPoolHead = ctx;
+ _cmsLeaveCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+
+ ctx ->chunks[UserPtr] = userData;
+ ctx ->chunks[MemPlugin] = &ctx->DefaultMemoryManager;
+
+ ctx ->MemPool = _cmsCreateSubAlloc(ctx, 22 * sizeof(void*));
+ if (ctx ->MemPool == NULL) {
+
+ cmsDeleteContext(ctx);
+ return NULL;
+ }
+
+ // Allocate all required chunks.
+ _cmsAllocLogErrorChunk(ctx, src);
+ _cmsAllocAlarmCodesChunk(ctx, src);
+ _cmsAllocAdaptationStateChunk(ctx, src);
+ _cmsAllocMemPluginChunk(ctx, src);
+ _cmsAllocInterpPluginChunk(ctx, src);
+ _cmsAllocCurvesPluginChunk(ctx, src);
+ _cmsAllocFormattersPluginChunk(ctx, src);
+ _cmsAllocTagTypePluginChunk(ctx, src);
+ _cmsAllocMPETypePluginChunk(ctx, src);
+ _cmsAllocTagPluginChunk(ctx, src);
+ _cmsAllocIntentsPluginChunk(ctx, src);
+ _cmsAllocOptimizationPluginChunk(ctx, src);
+ _cmsAllocTransformPluginChunk(ctx, src);
+ _cmsAllocMutexPluginChunk(ctx, src);
+
+ // Make sure no one failed
+ for (i=Logger; i < MemoryClientMax; i++) {
+
+ if (src ->chunks[i] == NULL) {
+ cmsDeleteContext((cmsContext) ctx);
+ return NULL;
+ }
+ }
+
+ return (cmsContext) ctx;
+}
+
+
+// Frees any resources associated with the given context,
+// and destroys the context placeholder.
+// The ContextID can no longer be used in any THR operation.
+void CMSEXPORT cmsDeleteContext(cmsContext ContextID)
+{
+ if (ContextID != NULL) {
+
+ struct _cmsContext_struct* ctx = (struct _cmsContext_struct*) ContextID;
+ struct _cmsContext_struct fakeContext;
+ struct _cmsContext_struct* prev;
+
+ memcpy(&fakeContext.DefaultMemoryManager, &ctx->DefaultMemoryManager, sizeof(ctx->DefaultMemoryManager));
+
+ fakeContext.chunks[UserPtr] = ctx ->chunks[UserPtr];
+ fakeContext.chunks[MemPlugin] = &fakeContext.DefaultMemoryManager;
+
+ // Get rid of plugins
+ cmsUnregisterPluginsTHR(ContextID);
+
+ // Since all memory is allocated in the private pool, all what we need to do is destroy the pool
+ if (ctx -> MemPool != NULL)
+ _cmsSubAllocDestroy(ctx ->MemPool);
+ ctx -> MemPool = NULL;
+
+ // Maintain list
+ _cmsEnterCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+ if (_cmsContextPoolHead == ctx) {
+
+ _cmsContextPoolHead = ctx->Next;
+ }
+ else {
+
+ // Search for previous
+ for (prev = _cmsContextPoolHead;
+ prev != NULL;
+ prev = prev ->Next)
+ {
+ if (prev -> Next == ctx) {
+ prev -> Next = ctx ->Next;
+ break;
+ }
+ }
+ }
+ _cmsLeaveCriticalSectionPrimitive(&_cmsContextPoolHeadMutex);
+
+ // free the memory block itself
+ _cmsFree(&fakeContext, ctx);
+ }
+}
+
+// Returns the user data associated to the given ContextID, or NULL if no user data was attached on context creation
+void* CMSEXPORT cmsGetContextUserData(cmsContext ContextID)
+{
+ return _cmsContextGetClientChunk(ContextID, UserPtr);
+}
+
+
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
Matrix-shaper based
-------------------
- This is implemented both with /CIEBasedABC or /CIEBasedDEF on dependig
- of profile implementation. Since here there are no interpolation tables, I do
+ This is implemented both with /CIEBasedABC or /CIEBasedDEF depending on the
+ profile implementation. Since here there are no interpolation tables, I do
the conversion directly to XYZ
}
-// Convert to byte (using ICC2 notation)
-/*
-static
-cmsUInt8Number L2Byte(cmsUInt16Number w)
-{
- int ww = w + 0x0080;
-
- if (ww > 0xFFFF) return 0xFF;
-
- return (cmsUInt8Number) ((cmsUInt16Number) (ww >> 8) & 0xFF);
-}
-*/
-
// Write a cooked byte
-
static
void WriteByte(cmsIOHANDLER* m, cmsUInt8Number b)
{
// ----------------------------------------------------------------- PostScript generation
-// Removes offending Carriage returns
+// Removes offending carriage returns
+
static
char* RemoveCR(const char* txt)
{
// Does write the intent
static
-void EmitIntent(cmsIOHANDLER* m, int RenderingIntent)
+void EmitIntent(cmsIOHANDLER* m, cmsUInt32Number RenderingIntent)
{
const char *intent;
// = Yn*( L* / 116) / 7.787 if (L*) < 6 / 29
//
-/*
-static
-void EmitL2Y(cmsIOHANDLER* m)
-{
- _cmsIOPrintf(m,
- "{ "
- "100 mul 16 add 116 div " // (L * 100 + 16) / 116
- "dup 6 29 div ge " // >= 6 / 29 ?
- "{ dup dup mul mul } " // yes, ^3 and done
- "{ 4 29 div sub 108 841 div mul } " // no, slope limiting
- "ifelse } bind ");
-}
-*/
-
-
// Lab -> XYZ, see the discussion above
static
_cmsIOPrintf(m, "]\n");
}
+static
+void EmitSafeGuardBegin(cmsIOHANDLER* m, const char* name)
+{
+ _cmsIOPrintf(m, "%%LCMS2: Save previous definition of %s on the operand stack\n", name);
+ _cmsIOPrintf(m, "currentdict /%s known { /%s load } { null } ifelse\n", name, name);
+}
+static
+void EmitSafeGuardEnd(cmsIOHANDLER* m, const char* name, int depth)
+{
+ _cmsIOPrintf(m, "%%LCMS2: Restore previous definition of %s\n", name);
+ if (depth > 1) {
+ // cycle topmost items on the stack to bring the previous definition to the front
+ _cmsIOPrintf(m, "%d -1 roll ", depth);
+ }
+ _cmsIOPrintf(m, "dup null eq { pop currentdict /%s undef } { /%s exch def } ifelse\n", name, name);
+}
// Outputs a table of words. It does use 16 bits
static
-void Emit1Gamma(cmsIOHANDLER* m, cmsToneCurve* Table)
+void Emit1Gamma(cmsIOHANDLER* m, cmsToneCurve* Table, const char* name)
{
cmsUInt32Number i;
cmsFloat64Number gamma;
// Check if is really an exponential. If so, emit "exp"
gamma = cmsEstimateGamma(Table, 0.001);
if (gamma > 0) {
- _cmsIOPrintf(m, "{ %g exp } bind ", gamma);
+ _cmsIOPrintf(m, "/%s { %g exp } bind def\n", name, gamma);
return;
}
- _cmsIOPrintf(m, "{ ");
-
- // Bounds check
- EmitRangeCheck(m);
-
- // Emit intepolation code
-
- // PostScript code Stack
- // =============== ========================
- // v
- _cmsIOPrintf(m, " [");
+ EmitSafeGuardBegin(m, "lcms2gammatable");
+ _cmsIOPrintf(m, "/lcms2gammatable [");
for (i=0; i < Table->nEntries; i++) {
+ if (i % 10 == 0)
+ _cmsIOPrintf(m, "\n ");
_cmsIOPrintf(m, "%d ", Table->Table16[i]);
}
- _cmsIOPrintf(m, "] "); // v tab
+ _cmsIOPrintf(m, "] def\n");
+
+
+ // Emit interpolation code
+
+ // PostScript code Stack
+ // =============== ========================
+ // v
+ _cmsIOPrintf(m, "/%s {\n ", name);
+
+ // Bounds check
+ EmitRangeCheck(m);
+ _cmsIOPrintf(m, "\n //lcms2gammatable "); // v tab
_cmsIOPrintf(m, "dup "); // v tab tab
_cmsIOPrintf(m, "length 1 sub "); // v tab dom
_cmsIOPrintf(m, "3 -1 roll "); // tab dom v
_cmsIOPrintf(m, "ceiling cvi "); // tab val2 cell0 cell1
_cmsIOPrintf(m, "3 index "); // tab val2 cell0 cell1 tab
_cmsIOPrintf(m, "exch "); // tab val2 cell0 tab cell1
- _cmsIOPrintf(m, "get "); // tab val2 cell0 y1
+ _cmsIOPrintf(m, "get\n "); // tab val2 cell0 y1
_cmsIOPrintf(m, "4 -1 roll "); // val2 cell0 y1 tab
_cmsIOPrintf(m, "3 -1 roll "); // val2 y1 tab cell0
_cmsIOPrintf(m, "get "); // val2 y1 y0
_cmsIOPrintf(m, "sub "); // y0 (y1-y0) rest
_cmsIOPrintf(m, "mul "); // y0 t1
_cmsIOPrintf(m, "add "); // y
- _cmsIOPrintf(m, "65535 div "); // result
+ _cmsIOPrintf(m, "65535 div\n"); // result
+
+ _cmsIOPrintf(m, "} bind def\n");
- _cmsIOPrintf(m, " } bind ");
+ EmitSafeGuardEnd(m, "lcms2gammatable", 1);
}
// Compare gamma table
static
-cmsBool GammaTableEquals(cmsUInt16Number* g1, cmsUInt16Number* g2, int nEntries)
+cmsBool GammaTableEquals(cmsUInt16Number* g1, cmsUInt16Number* g2, cmsUInt32Number nG1, cmsUInt32Number nG2)
{
- return memcmp(g1, g2, nEntries* sizeof(cmsUInt16Number)) == 0;
+ if (nG1 != nG2) return FALSE;
+ return memcmp(g1, g2, nG1 * sizeof(cmsUInt16Number)) == 0;
}
// Does write a set of gamma curves
static
-void EmitNGamma(cmsIOHANDLER* m, int n, cmsToneCurve* g[])
+void EmitNGamma(cmsIOHANDLER* m, cmsUInt32Number n, cmsToneCurve* g[], const char* nameprefix)
{
- int i;
+ cmsUInt32Number i;
+ static char buffer[2048];
for( i=0; i < n; i++ )
{
if (g[i] == NULL) return; // Error
- if (i > 0 && GammaTableEquals(g[i-1]->Table16, g[i]->Table16, g[i]->nEntries)) {
+ if (i > 0 && GammaTableEquals(g[i-1]->Table16, g[i]->Table16, g[i-1]->nEntries, g[i]->nEntries)) {
- _cmsIOPrintf(m, "dup ");
+ _cmsIOPrintf(m, "/%s%d /%s%d load def\n", nameprefix, i, nameprefix, i-1);
}
else {
- Emit1Gamma(m, g[i]);
+ snprintf(buffer, sizeof(buffer), "%s%d", nameprefix, (int) i);
+ buffer[sizeof(buffer)-1] = '\0';
+ Emit1Gamma(m, g[i], buffer);
}
}
}
-
-
-
// Following code dumps a LUT onto memory stream
//
// Each row contains Pipeline values for all but first component. So, I
// detect row changing by keeping a copy of last value of first
-// component. -1 is used to mark begining of whole block.
+// component. -1 is used to mark beginning of whole block.
static
-int OutputValueSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+int OutputValueSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)
{
cmsPsSamplerCargo* sc = (cmsPsSamplerCargo*) Cargo;
cmsUInt32Number i;
static
void WriteCLUT(cmsIOHANDLER* m, cmsStage* mpe, const char* PreMaj,
- const char* PostMaj,
- const char* PreMin,
- const char* PostMin,
- int FixWhite,
- cmsColorSpaceSignature ColorSpace)
+ const char* PostMaj,
+ const char* PreMin,
+ const char* PostMin,
+ int FixWhite,
+ cmsColorSpaceSignature ColorSpace)
{
cmsUInt32Number i;
cmsPsSamplerCargo sc;
_cmsIOPrintf(m, "[ /CIEBasedA\n");
_cmsIOPrintf(m, " <<\n");
- _cmsIOPrintf(m, "/DecodeA ");
+ EmitSafeGuardBegin(m, "lcms2gammaproc");
+ Emit1Gamma(m, Curve, "lcms2gammaproc");
- Emit1Gamma(m, Curve);
-
- _cmsIOPrintf(m, " \n");
+ _cmsIOPrintf(m, "/DecodeA /lcms2gammaproc load\n");
+ EmitSafeGuardEnd(m, "lcms2gammaproc", 3);
_cmsIOPrintf(m, "/MatrixA [ 0.9642 1.0000 0.8249 ]\n");
_cmsIOPrintf(m, "/RangeLMN [ 0.0 0.9642 0.0 1.0000 0.0 0.8249 ]\n");
_cmsIOPrintf(m, "[ /CIEBasedABC\n");
_cmsIOPrintf(m, "<<\n");
- _cmsIOPrintf(m, "/DecodeABC [ ");
-
- EmitNGamma(m, 3, CurveSet);
+ EmitSafeGuardBegin(m, "lcms2gammaproc0");
+ EmitSafeGuardBegin(m, "lcms2gammaproc1");
+ EmitSafeGuardBegin(m, "lcms2gammaproc2");
+ EmitNGamma(m, 3, CurveSet, "lcms2gammaproc");
+ _cmsIOPrintf(m, "/DecodeABC [\n");
+ _cmsIOPrintf(m, " /lcms2gammaproc0 load\n");
+ _cmsIOPrintf(m, " /lcms2gammaproc1 load\n");
+ _cmsIOPrintf(m, " /lcms2gammaproc2 load\n");
_cmsIOPrintf(m, "]\n");
+ EmitSafeGuardEnd(m, "lcms2gammaproc2", 3);
+ EmitSafeGuardEnd(m, "lcms2gammaproc1", 3);
+ EmitSafeGuardEnd(m, "lcms2gammaproc0", 3);
_cmsIOPrintf(m, "/MatrixABC [ " );
static
-int EmitCIEBasedDEF(cmsIOHANDLER* m, cmsPipeline* Pipeline, int Intent, cmsCIEXYZ* BlackPoint)
+int EmitCIEBasedDEF(cmsIOHANDLER* m, cmsPipeline* Pipeline, cmsUInt32Number Intent, cmsCIEXYZ* BlackPoint)
{
const char* PreMaj;
const char* PostMaj;
- const char* PreMin, *PostMin;
+ const char* PreMin, * PostMin;
cmsStage* mpe;
+ int i, numchans;
+ static char buffer[2048];
- mpe = Pipeline ->Elements;
-
+ mpe = Pipeline->Elements;
switch (cmsStageInputChannels(mpe)) {
case 3:
+ _cmsIOPrintf(m, "[ /CIEBasedDEF\n");
+ PreMaj = "<";
+ PostMaj = ">\n";
+ PreMin = PostMin = "";
+ break;
- _cmsIOPrintf(m, "[ /CIEBasedDEF\n");
- PreMaj ="<";
- PostMaj= ">\n";
- PreMin = PostMin = "";
- break;
case 4:
- _cmsIOPrintf(m, "[ /CIEBasedDEFG\n");
- PreMaj = "[";
- PostMaj = "]\n";
- PreMin = "<";
- PostMin = ">\n";
- break;
+ _cmsIOPrintf(m, "[ /CIEBasedDEFG\n");
+ PreMaj = "[";
+ PostMaj = "]\n";
+ PreMin = "<";
+ PostMin = ">\n";
+ break;
+
default:
- return 0;
+ return 0;
}
if (cmsStageType(mpe) == cmsSigCurveSetElemType) {
- _cmsIOPrintf(m, "/DecodeDEF [ ");
- EmitNGamma(m, cmsStageOutputChannels(mpe), _cmsStageGetPtrToCurveSet(mpe));
+ numchans = (int) cmsStageOutputChannels(mpe);
+ for (i = 0; i < numchans; ++i) {
+ snprintf(buffer, sizeof(buffer), "lcms2gammaproc%d", i);
+ buffer[sizeof(buffer) - 1] = '\0';
+ EmitSafeGuardBegin(m, buffer);
+ }
+ EmitNGamma(m, cmsStageOutputChannels(mpe), _cmsStageGetPtrToCurveSet(mpe), "lcms2gammaproc");
+ _cmsIOPrintf(m, "/DecodeDEF [\n");
+ for (i = 0; i < numchans; ++i) {
+ snprintf(buffer, sizeof(buffer), " /lcms2gammaproc%d load\n", i);
+ buffer[sizeof(buffer) - 1] = '\0';
+ _cmsIOPrintf(m, buffer);
+ }
_cmsIOPrintf(m, "]\n");
+ for (i = numchans - 1; i >= 0; --i) {
+ snprintf(buffer, sizeof(buffer), "lcms2gammaproc%d", i);
+ buffer[sizeof(buffer) - 1] = '\0';
+ EmitSafeGuardEnd(m, buffer, 3);
+ }
- mpe = mpe ->Next;
+ mpe = mpe->Next;
}
-
-
if (cmsStageType(mpe) == cmsSigCLutElemType) {
- _cmsIOPrintf(m, "/Table ");
- WriteCLUT(m, mpe, PreMaj, PostMaj, PreMin, PostMin, FALSE, (cmsColorSpaceSignature) 0);
- _cmsIOPrintf(m, "]\n");
+ _cmsIOPrintf(m, "/Table ");
+ WriteCLUT(m, mpe, PreMaj, PostMaj, PreMin, PostMin, FALSE, (cmsColorSpaceSignature)0);
+ _cmsIOPrintf(m, "]\n");
}
EmitLab2XYZ(m);
_cmsIOPrintf(m, " >>\n");
_cmsIOPrintf(m, "]\n");
-
return 1;
}
// Generates a curve from a gray profile
static
- cmsToneCurve* ExtractGray2Y(cmsContext ContextID, cmsHPROFILE hProfile, int Intent)
+cmsToneCurve* ExtractGray2Y(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent)
{
cmsToneCurve* Out = cmsBuildTabulatedToneCurve16(ContextID, 256, NULL);
cmsHPROFILE hXYZ = cmsCreateXYZProfile();
cmsHTRANSFORM xform = cmsCreateTransformTHR(ContextID, hProfile, TYPE_GRAY_8, hXYZ, TYPE_XYZ_DBL, Intent, cmsFLAGS_NOOPTIMIZE);
int i;
- if (Out != NULL) {
+ if (Out != NULL && xform != NULL) {
for (i=0; i < 256; i++) {
cmsUInt8Number Gray = (cmsUInt8Number) i;
}
}
- cmsDeleteTransform(xform);
- cmsCloseProfile(hXYZ);
+ if (xform) cmsDeleteTransform(xform);
+ if (hXYZ) cmsCloseProfile(hXYZ);
return Out;
}
// a more perceptually uniform space... I do choose Lab.
static
-int WriteInputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, int Intent, cmsUInt32Number dwFlags)
+int WriteInputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags)
{
cmsHPROFILE hLab;
cmsHTRANSFORM xform;
if (DeviceLink == NULL) return 0;
dwFlags |= cmsFLAGS_FORCE_CLUT;
- _cmsOptimizePipeline(&DeviceLink, Intent, &InputFormat, &OutFrm, &dwFlags);
+ _cmsOptimizePipeline(m->ContextID, &DeviceLink, Intent, &InputFormat, &OutFrm, &dwFlags);
rc = EmitCIEBasedDEF(m, DeviceLink, Intent, &BlackPointAdaptedToD50);
cmsPipelineFree(DeviceLink);
+ if (rc == 0) return 0;
}
break;
default:
- cmsSignalError(m ->ContextID, cmsERROR_COLORSPACE_CHECK, "Only 3, 4 channels supported for CSA. This profile has %d channels.", nChannels);
+ cmsSignalError(m ->ContextID, cmsERROR_COLORSPACE_CHECK, "Only 3, 4 channels are supported for CSA. This profile has %d channels.", nChannels);
return 0;
}
// Does create CSA based on matrix-shaper. Allowed types are gray and RGB based
-
static
int WriteInputMatrixShaper(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsStage* Matrix, cmsStage* Shaper)
{
memmove(&Mat, GetPtrToMatrix(Matrix), sizeof(Mat));
- for (i=0; i < 3; i++)
- for (j=0; j < 3; j++)
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 3; j++)
Mat.v[i].n[j] *= MAX_ENCODEABLE_XYZ;
- rc = EmitCIEBasedABC(m, (cmsFloat64Number *) &Mat,
- _cmsStageGetPtrToCurveSet(Shaper),
- &BlackPointAdaptedToD50);
+ rc = EmitCIEBasedABC(m, (cmsFloat64Number *)&Mat,
+ _cmsStageGetPtrToCurveSet(Shaper),
+ &BlackPointAdaptedToD50);
}
- else {
+ else {
- cmsSignalError(m ->ContextID, cmsERROR_COLORSPACE_CHECK, "Profile is not suitable for CSA. Unsupported colorspace.");
+ cmsSignalError(m->ContextID, cmsERROR_COLORSPACE_CHECK, "Profile is not suitable for CSA. Unsupported colorspace.");
return 0;
}
- return rc;
+ return rc;
}
// This is a HP extension, and it works in Lab instead of XYZ
static
-int WriteNamedColorCSA(cmsIOHANDLER* m, cmsHPROFILE hNamedColor, int Intent)
+int WriteNamedColorCSA(cmsIOHANDLER* m, cmsHPROFILE hNamedColor, cmsUInt32Number Intent)
{
cmsHTRANSFORM xform;
cmsHPROFILE hLab;
- int i, nColors;
- char ColorName[32];
+ cmsUInt32Number i, nColors;
+ char ColorName[cmsMAX_PATH];
cmsNAMEDCOLORLIST* NamedColorList;
hLab = cmsCreateLab4ProfileTHR(m ->ContextID, NULL);
"exch pop exch pop exch pop exch pop } bind\n]\n");
}
-
-
}
// Due to impedance mismatch between XYZ and almost all RGB and CMYK spaces
// I choose to dump LUTS in Lab instead of XYZ. There is still a lot of wasted
// space on 3D CLUT, but since space seems not to be a problem here, 33 points
-// would give a reasonable accurancy. Note also that CRD tables must operate in
+// would give a reasonable accuracy. Note also that CRD tables must operate in
// 8 bits.
static
-int WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, int Intent, cmsUInt32Number dwFlags)
+int WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags)
{
cmsHPROFILE hLab;
cmsHTRANSFORM xform;
- int i, nChannels;
+ cmsUInt32Number i, nChannels;
cmsUInt32Number OutputFormat;
_cmsTRANSFORM* v;
cmsPipeline* DeviceLink;
cmsHPROFILE Profiles[3];
cmsCIEXYZ BlackPointAdaptedToD50;
- cmsBool lDoBPC = (dwFlags & cmsFLAGS_BLACKPOINTCOMPENSATION);
- cmsBool lFixWhite = !(dwFlags & cmsFLAGS_NOWHITEONWHITEFIXUP);
+ cmsBool lDoBPC = (cmsBool) (dwFlags & cmsFLAGS_BLACKPOINTCOMPENSATION);
+ cmsBool lFixWhite = (cmsBool) !(dwFlags & cmsFLAGS_NOWHITEONWHITEFIXUP);
cmsUInt32Number InFrm = TYPE_Lab_16;
- int RelativeEncodingIntent;
+ cmsUInt32Number RelativeEncodingIntent;
cmsColorSpaceSignature ColorSpace;
// We need a CLUT
dwFlags |= cmsFLAGS_FORCE_CLUT;
- _cmsOptimizePipeline(&DeviceLink, RelativeEncodingIntent, &InFrm, &OutputFormat, &dwFlags);
+ _cmsOptimizePipeline(m->ContextID, &DeviceLink, RelativeEncodingIntent, &InFrm, &OutputFormat, &dwFlags);
_cmsIOPrintf(m, "<<\n");
_cmsIOPrintf(m, "/ColorRenderingType 1\n");
// Builds a ASCII string containing colorant list in 0..1.0 range
static
-void BuildColorantList(char *Colorant, int nColorant, cmsUInt16Number Out[])
+void BuildColorantList(char *Colorant, cmsUInt32Number nColorant, cmsUInt16Number Out[])
{
char Buff[32];
- int j;
+ cmsUInt32Number j;
Colorant[0] = 0;
if (nColorant > cmsMAXCHANNELS)
nColorant = cmsMAXCHANNELS;
- for (j=0; j < nColorant; j++) {
+ for (j = 0; j < nColorant; j++) {
- sprintf(Buff, "%.3f", Out[j] / 65535.0);
- strcat(Colorant, Buff);
- if (j < nColorant -1)
- strcat(Colorant, " ");
+ snprintf(Buff, 31, "%.3f", Out[j] / 65535.0);
+ Buff[31] = 0;
+ strcat(Colorant, Buff);
+ if (j < nColorant - 1)
+ strcat(Colorant, " ");
- }
+ }
}
// This is a HP extension.
static
-int WriteNamedColorCRD(cmsIOHANDLER* m, cmsHPROFILE hNamedColor, int Intent, cmsUInt32Number dwFlags)
+int WriteNamedColorCRD(cmsIOHANDLER* m, cmsHPROFILE hNamedColor, cmsUInt32Number Intent, cmsUInt32Number dwFlags)
{
cmsHTRANSFORM xform;
- int i, nColors, nColorant;
+ cmsUInt32Number i, nColors, nColorant;
cmsUInt32Number OutputFormat;
- char ColorName[32];
- char Colorant[128];
+ char ColorName[cmsMAX_PATH];
+ char Colorant[512];
cmsNAMEDCOLORLIST* NamedColorList;
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
#include "lcms2_internal.h"
+#define cmsmin(a, b) (((a) < (b)) ? (a) : (b))
+#define cmsmax(a, b) (((a) > (b)) ? (a) : (b))
// This file contains routines for resampling and LUT optimization, black point detection
// and black preservation.
static
cmsHTRANSFORM CreateRoundtripXForm(cmsHPROFILE hProfile, cmsUInt32Number nIntent)
{
- cmsHPROFILE hLab = cmsCreateLab4Profile(NULL);
+ cmsContext ContextID = cmsGetProfileContextID(hProfile);
+ cmsHPROFILE hLab = cmsCreateLab4ProfileTHR(ContextID, NULL);
cmsHTRANSFORM xform;
cmsBool BPC[4] = { FALSE, FALSE, FALSE, FALSE };
cmsFloat64Number States[4] = { 1.0, 1.0, 1.0, 1.0 };
cmsHPROFILE hProfiles[4];
cmsUInt32Number Intents[4];
- cmsContext ContextID = cmsGetProfileContextID(hProfile);
hProfiles[0] = hLab; hProfiles[1] = hProfile; hProfiles[2] = hProfile; hProfiles[3] = hLab;
Intents[0] = INTENT_RELATIVE_COLORIMETRIC; Intents[1] = nIntent; Intents[2] = INTENT_RELATIVE_COLORIMETRIC; Intents[3] = INTENT_RELATIVE_COLORIMETRIC;
return FALSE;
}
- // Create a formatter which has n channels and floating point
+ // Create a formatter which has n channels and no floating point
dwFormat = cmsFormatterForColorspaceOfProfile(hInput, 2, FALSE);
- // Try to get black by using black colorant
+ // Try to get black by using black colorant
Space = cmsGetColorSpace(hInput);
// This function returns darker colorant in 16 bits for several spaces
cmsCloseProfile(hLab);
if (xform == NULL) {
- // Something went wrong. Get rid of open resources and return zero as black
+ // Something went wrong. Get rid of open resources and return zero as black
BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
return FALSE;
}
// Lab (0, 0, 0) -> [Perceptual] Profile -> CMYK -> [Rel. colorimetric] Profile -> Lab
static
cmsBool BlackPointUsingPerceptualBlack(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile)
-
{
cmsHTRANSFORM hRoundTrip;
cmsCIELab LabIn, LabOut;
// involves to turn BP to neutral and to use only L component.
cmsBool CMSEXPORT cmsDetectBlackPoint(cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags)
{
+ cmsProfileClassSignature devClass;
+
+ // Make sure the device class is adequate
+ devClass = cmsGetDeviceClass(hProfile);
+ if (devClass == cmsSigLinkClass ||
+ devClass == cmsSigAbstractClass ||
+ devClass == cmsSigNamedColorClass) {
+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
+ return FALSE;
+ }
- // Zero for black point
- if (cmsGetDeviceClass(hProfile) == cmsSigLinkClass) {
-
- BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
- return FALSE;
+ // Make sure intent is adequate
+ if (Intent != INTENT_PERCEPTUAL &&
+ Intent != INTENT_RELATIVE_COLORIMETRIC &&
+ Intent != INTENT_SATURATION) {
+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
+ return FALSE;
}
// v4 + perceptual & saturation intents does have its own black point, and it is
// well specified enough to use it. Black point tag is deprecated in V4.
-
if ((cmsGetEncodedICCversion(hProfile) >= 0x4000000) &&
(Intent == INTENT_PERCEPTUAL || Intent == INTENT_SATURATION)) {
{
double sum_x = 0, sum_x2 = 0, sum_x3 = 0, sum_x4 = 0;
double sum_y = 0, sum_yx = 0, sum_yx2 = 0;
- double disc;
+ double d, a, b, c;
int i;
cmsMAT3 m;
cmsVEC3 v, res;
if (!_cmsMAT3solve(&res, &m, &v)) return 0;
- // y = t x2 + u x + c
- // x = ( - u + Sqrt( u^2 - 4 t c ) ) / ( 2 t )
- disc = res.n[1]*res.n[1] - 4.0 * res.n[0] * res.n[2];
- if (disc < 0) return -1;
+
+ a = res.n[2];
+ b = res.n[1];
+ c = res.n[0];
- return ( -1.0 * res.n[1] + sqrt( disc )) / (2.0 * res.n[0]);
-}
-
-static
-cmsBool IsMonotonic(int n, const cmsFloat64Number Table[])
-{
- int i;
- cmsFloat64Number last;
+ if (fabs(a) < 1.0E-10) {
+
+ return cmsmin(0, cmsmax(50, -c/b ));
+ }
+ else {
- last = Table[n-1];
+ d = b*b - 4.0 * a * c;
+ if (d <= 0) {
+ return 0;
+ }
+ else {
- for (i = n-2; i >= 0; --i) {
+ double rt = (-b + sqrt(d)) / (2.0 * a);
- if (Table[i] > last)
+ return cmsmax(0, cmsmin(50, rt));
+ }
+ }
- return FALSE;
- else
- last = Table[i];
+}
- }
- return TRUE;
-}
// Calculates the black point of a destination profile.
// This algorithm comes from the Adobe paper disclosing its black point compensation method.
cmsColorSpaceSignature ColorSpace;
cmsHTRANSFORM hRoundTrip = NULL;
cmsCIELab InitialLab, destLab, Lab;
-
+ cmsFloat64Number inRamp[256], outRamp[256];
cmsFloat64Number MinL, MaxL;
- cmsBool NearlyStraightMidRange = FALSE;
- cmsFloat64Number L;
- cmsFloat64Number x[101], y[101];
- cmsFloat64Number lo, hi, NonMonoMin;
- int n, l, i, NonMonoIndx;
-
+ cmsBool NearlyStraightMidrange = TRUE;
+ cmsFloat64Number yRamp[256];
+ cmsFloat64Number x[256], y[256];
+ cmsFloat64Number lo, hi;
+ int n, l;
+ cmsProfileClassSignature devClass;
+
+ // Make sure the device class is adequate
+ devClass = cmsGetDeviceClass(hProfile);
+ if (devClass == cmsSigLinkClass ||
+ devClass == cmsSigAbstractClass ||
+ devClass == cmsSigNamedColorClass) {
+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
+ return FALSE;
+ }
// Make sure intent is adequate
if (Intent != INTENT_PERCEPTUAL &&
Intent != INTENT_RELATIVE_COLORIMETRIC &&
- Intent != INTENT_SATURATION) {
- BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
- return FALSE;
- }
+ Intent != INTENT_SATURATION) {
+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
+ return FALSE;
+ }
// v4 + perceptual & saturation intents does have its own black point, and it is
return cmsDetectBlackPoint(BlackPoint, hProfile, Intent, dwFlags);
}
- // It is one of the valid cases!, presto chargo hocus pocus, go for the Adobe magic
-
- // Step 1
- // ======
+ // It is one of the valid cases!, use Adobe algorithm
+
// Set a first guess, that should work on good profiles.
if (Intent == INTENT_RELATIVE_COLORIMETRIC) {
hRoundTrip = CreateRoundtripXForm(hProfile, Intent);
if (hRoundTrip == NULL) return FALSE;
- // Calculate Min L*
- Lab = InitialLab;
- Lab.L = 0;
- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1);
- MinL = destLab.L;
+ // Compute ramps
- // Calculate Max L*
- Lab = InitialLab;
- Lab.L = 100;
- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1);
- MaxL = destLab.L;
+ for (l=0; l < 256; l++) {
- // Step 3
- // ======
+ Lab.L = (cmsFloat64Number) (l * 100.0) / 255.0;
+ Lab.a = cmsmin(50, cmsmax(-50, InitialLab.a));
+ Lab.b = cmsmin(50, cmsmax(-50, InitialLab.b));
- // check if quadratic estimation needs to be done.
- if (Intent == INTENT_RELATIVE_COLORIMETRIC) {
-
- // Conceptually, this code tests how close the source l and converted L are to one another in the mid-range
- // of the values. If the converted ramp of L values is close enough to a straight line y=x, then InitialLab
- // is good enough to be the DestinationBlackPoint,
- NearlyStraightMidRange = TRUE;
+ cmsDoTransform(hRoundTrip, &Lab, &destLab, 1);
- for (l=0; l <= 100; l++) {
+ inRamp[l] = Lab.L;
+ outRamp[l] = destLab.L;
+ }
- Lab.L = l;
- Lab.a = InitialLab.a;
- Lab.b = InitialLab.b;
+ // Make monotonic
+ for (l = 254; l > 0; --l) {
+ outRamp[l] = cmsmin(outRamp[l], outRamp[l+1]);
+ }
- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1);
+ // Check
+ if (! (outRamp[0] < outRamp[255])) {
- L = destLab.L;
+ cmsDeleteTransform(hRoundTrip);
+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
+ return FALSE;
+ }
- // Check the mid range in 20% after MinL
- if (L > (MinL + 0.2 * (MaxL - MinL))) {
- // Is close enough?
- if (fabs(L - l) > 4.0) {
+ // Test for mid range straight (only on relative colorimetric)
+ NearlyStraightMidrange = TRUE;
+ MinL = outRamp[0]; MaxL = outRamp[255];
+ if (Intent == INTENT_RELATIVE_COLORIMETRIC) {
+
+ for (l=0; l < 256; l++) {
- // Too far away, profile is buggy!
- NearlyStraightMidRange = FALSE;
- break;
- }
- }
+ if (! ((inRamp[l] <= MinL + 0.2 * (MaxL - MinL) ) ||
+ (fabs(inRamp[l] - outRamp[l]) < 4.0 )))
+ NearlyStraightMidrange = FALSE;
}
- }
- else {
- // Check is always performed for perceptual and saturation intents
- NearlyStraightMidRange = FALSE;
- }
+ // If the mid range is straight (as determined above) then the
+ // DestinationBlackPoint shall be the same as initialLab.
+ // Otherwise, the DestinationBlackPoint shall be determined
+ // using curve fitting.
+ if (NearlyStraightMidrange) {
- // If no furter checking is needed, we are done
- if (NearlyStraightMidRange) {
-
- cmsLab2XYZ(NULL, BlackPoint, &InitialLab);
- cmsDeleteTransform(hRoundTrip);
- return TRUE;
+ cmsLab2XYZ(NULL, BlackPoint, &InitialLab);
+ cmsDeleteTransform(hRoundTrip);
+ return TRUE;
+ }
}
- // The round-trip curve normally looks like a nearly constant section at the black point,
- // with a corner and a nearly straight line to the white point.
-
- // STEP 4
- // =======
+
+ // curve fitting: The round-trip curve normally looks like a nearly constant section at the black point,
+ // with a corner and a nearly straight line to the white point.
+ for (l=0; l < 256; l++) {
+
+ yRamp[l] = (outRamp[l] - MinL) / (MaxL - MinL);
+ }
// find the black point using the least squares error quadratic curve fitting
-
if (Intent == INTENT_RELATIVE_COLORIMETRIC) {
lo = 0.1;
hi = 0.5;
hi = 0.25;
}
- // Capture points for the fitting.
+ // Capture shadow points for the fitting.
n = 0;
- for (l=0; l <= 100; l++) {
-
- cmsFloat64Number ff;
-
- Lab.L = (cmsFloat64Number) l;
- Lab.a = InitialLab.a;
- Lab.b = InitialLab.b;
-
- cmsDoTransform(hRoundTrip, &Lab, &destLab, 1);
-
- ff = (destLab.L - MinL)/(MaxL - MinL);
+ for (l=0; l < 256; l++) {
+
+ cmsFloat64Number ff = yRamp[l];
if (ff >= lo && ff < hi) {
-
- x[n] = Lab.L;
- y[n] = ff;
+ x[n] = inRamp[l];
+ y[n] = yRamp[l];
n++;
- }
-
+ }
}
- // This part is not on the Adobe paper, but I found is necessary for getting any result.
-
- if (IsMonotonic(n, y)) {
-
- // Monotonic means lower point is stil valid
- cmsLab2XYZ(NULL, BlackPoint, &InitialLab);
+
+ // No suitable points
+ if (n < 3 ) {
cmsDeleteTransform(hRoundTrip);
- return TRUE;
- }
-
- // No suitable points, regret and use safer algorithm
- if (n == 0) {
- cmsDeleteTransform(hRoundTrip);
- return cmsDetectBlackPoint(BlackPoint, hProfile, Intent, dwFlags);
+ BlackPoint -> X = BlackPoint ->Y = BlackPoint -> Z = 0.0;
+ return FALSE;
}
-
- NonMonoMin = 100;
- NonMonoIndx = 0;
- for (i=0; i < n; i++) {
-
- if (y[i] < NonMonoMin) {
- NonMonoIndx = i;
- NonMonoMin = y[i];
- }
- }
-
- Lab.L = x[NonMonoIndx];
-
+
// fit and get the vertex of quadratic curve
Lab.L = RootOfLeastSquaresFitQuadraticCurve(n, x, y);
- if (Lab.L < 0.0 || Lab.L > 50.0) { // clip to zero L* if the vertex is negative
+ if (Lab.L < 0.0) { // clip to zero L* if the vertex is negative
Lab.L = 0;
}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
*alpha = (int) floor(((sp->alpha * (SECTORS)) / 360.0) );
*theta = (int) floor(((sp->theta * (SECTORS)) / 180.0) );
- if (*alpha >= SECTORS)
- *alpha = SECTORS-1;
- if (*theta >= SECTORS)
- *theta = SECTORS-1;
+ if (*alpha >= SECTORS)
+ *alpha = SECTORS-1;
+ if (*theta >= SECTORS)
+ *theta = SECTORS-1;
}
{
cmsFloat64Number a, b, c, d, e, D;
cmsFloat64Number sc, sN, sD;
- cmsFloat64Number tc, tN, tD;
+ //cmsFloat64Number tc; // left for future use
+ cmsFloat64Number tN, tD;
cmsVEC3 w0;
_cmsVEC3minus(&w0, &line1 ->a, &line2 ->a);
}
// finally do the division to get sc and tc
sc = (fabs(sN) < MATRIX_DET_TOLERANCE ? 0.0 : sN / sD);
- tc = (fabs(tN) < MATRIX_DET_TOLERANCE ? 0.0 : tN / tD);
+ //tc = (fabs(tN) < MATRIX_DET_TOLERANCE ? 0.0 : tN / tD); // left for future use.
GetPointOfLine(r, line1, sc);
return TRUE;
}
-// Auxiliar to retrieve a pointer to the segmentr containing the Lab value
+// Auxiliary to retrieve a pointer to the segmentr containing the Lab value
static
cmsGDBPoint* GetPoint(cmsGDB* gbd, const cmsCIELab* Lab, cmsSpherical* sp)
{
// Housekeeping
_cmsAssert(gbd != NULL);
- _cmsAssert(Lab != NULL);
- _cmsAssert(sp != NULL);
+ _cmsAssert(Lab != NULL);
+ _cmsAssert(sp != NULL);
- // Center L* by substracting half of its domain, that's 50
+ // Center L* by subtracting half of its domain, that's 50
_cmsVEC3init(&v, Lab ->L - 50.0, Lab ->a, Lab ->b);
// Convert to spherical coordinates
else
if (pt ->Type == GP_MODELED)
fprintf (fp, "\t\t\t\t\t%g %g %g", 1.0, .5, .5);
- else {
+ else {
fprintf (fp, "\t\t\t\t\t%g %g %g", 1.0, 1.0, 1.0);
- }
+ }
if ((j == SECTORS - 1) && (i == SECTORS - 1))
fprintf (fp, "]\n");
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// This file implements every single tag and tag type as described in the ICC spec. Some types
// have been deprecated, like ncl and Data. There is no implementation for those types as there
// are no profiles holding them. The programmer can also extend this list by defining his own types
-// by using the appropiate plug-in. There are three types of plug ins regarding that. First type
+// by using the appropriate plug-in. There are three types of plug ins regarding that. First type
// allows to define new tags using any existing type. Next plug-in type allows to define new types
-// and the third one is very specific: allows to extend the number of elements in the multiprofile
+// and the third one is very specific: allows to extend the number of elements in the multiprocessing
// elements special type.
//--------------------------------------------------------------------------------------------------
// Helper macro to define a MPE handler. Callbacks do have a fixed naming convention
#define TYPE_MPE_HANDLER(t, x) { (t), READ_FN(x), WRITE_FN(x), GenericMPEdup, GenericMPEfree, NULL, 0 }
-// Register a new type handler. This routine is shared between normal types and MPE
+// Infinites
+#define MINUS_INF (-1E22F)
+#define PLUS_INF (+1E22F)
+
+
+// Register a new type handler. This routine is shared between normal types and MPE. LinkedList points to the optional list head
static
-cmsBool RegisterTypesPlugin(cmsPluginBase* Data, _cmsTagTypeLinkedList* LinkedList, cmsUInt32Number DefaultListCount)
+cmsBool RegisterTypesPlugin(cmsContext id, cmsPluginBase* Data, _cmsMemoryClient pos)
{
cmsPluginTagType* Plugin = (cmsPluginTagType*) Data;
- _cmsTagTypeLinkedList *pt, *Anterior = NULL;
+ _cmsTagTypePluginChunkType* ctx = ( _cmsTagTypePluginChunkType*) _cmsContextGetClientChunk(id, pos);
+ _cmsTagTypeLinkedList *pt;
// Calling the function with NULL as plug-in would unregister the plug in.
if (Data == NULL) {
- LinkedList[DefaultListCount-1].Next = NULL;
+ // There is no need to set free the memory, as pool is destroyed as a whole.
+ ctx ->TagTypes = NULL;
return TRUE;
}
- pt = Anterior = LinkedList;
- while (pt != NULL) {
-
- if (Plugin->Handler.Signature == pt -> Handler.Signature) {
- pt ->Handler = Plugin ->Handler; // Replace old behaviour.
- // Note that since no memory is allocated, unregister does not
- // reset this action.
- return TRUE;
- }
-
- Anterior = pt;
- pt = pt ->Next;
- }
-
- // Registering happens in plug-in memory pool
- pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagTypeLinkedList));
+ // Registering happens in plug-in memory pool.
+ pt = (_cmsTagTypeLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagTypeLinkedList));
if (pt == NULL) return FALSE;
pt ->Handler = Plugin ->Handler;
- pt ->Next = NULL;
-
- if (Anterior)
- Anterior -> Next = pt;
+ pt ->Next = ctx ->TagTypes;
+ ctx ->TagTypes = pt;
+
return TRUE;
}
-// Return handler for a given type or NULL if not found. Shared between normal types and MPE
+// Return handler for a given type or NULL if not found. Shared between normal types and MPE. It first tries the additons
+// made by plug-ins and then the built-in defaults.
static
-cmsTagTypeHandler* GetHandler(cmsTagTypeSignature sig, _cmsTagTypeLinkedList* LinkedList)
+cmsTagTypeHandler* GetHandler(cmsTagTypeSignature sig, _cmsTagTypeLinkedList* PluginLinkedList, _cmsTagTypeLinkedList* DefaultLinkedList)
{
_cmsTagTypeLinkedList* pt;
- for (pt = LinkedList;
+ for (pt = PluginLinkedList;
+ pt != NULL;
+ pt = pt ->Next) {
+
+ if (sig == pt -> Handler.Signature) return &pt ->Handler;
+ }
+
+ for (pt = DefaultLinkedList;
pt != NULL;
pt = pt ->Next) {
}
-// Auxiliar to convert UTF-32 to UTF-16 in some cases
+// Auxiliary to convert UTF-32 to UTF-16 in some cases
static
cmsBool _cmsWriteWCharArray(cmsIOHANDLER* io, cmsUInt32Number n, const wchar_t* Array)
{
return TRUE;
}
+// Auxiliary to read an array of wchar_t
static
cmsBool _cmsReadWCharArray(cmsIOHANDLER* io, cmsUInt32Number n, wchar_t* Array)
{
cmsUInt32Number n,
cmsUInt32Number SizeOfTag);
-// Helper function to deal with position tables as decribed in ICC spec 4.3
-// A table of n elements is readed, where first comes n records containing offsets and sizes and
+// Helper function to deal with position tables as described in ICC spec 4.3
+// A table of n elements is read, where first comes n records containing offsets and sizes and
// then a block containing the data itself. This allows to reuse same data in more than one entry
static
cmsBool ReadPositionTable(struct _cms_typehandler_struct* self,
{
cmsUInt32Number i;
cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL;
+ cmsUInt32Number currentPosition;
+
+ currentPosition = io->Tell(io);
+
+ // Verify there is enough space left to read at least two cmsUInt32Number items for Count items.
+ if (((io->ReportedSize - currentPosition) / (2 * sizeof(cmsUInt32Number))) < Count)
+ return FALSE;
// Let's take the offsets to each element
- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *));
+ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
if (ElementOffsets == NULL) goto Error;
- ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *));
+ ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
if (ElementSizes == NULL) goto Error;
for (i=0; i < Count; i++) {
cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL;
// Create table
- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *));
+ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
if (ElementOffsets == NULL) goto Error;
- ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number *));
+ ElementSizes = (cmsUInt32Number *) _cmsCalloc(io ->ContextID, Count, sizeof(cmsUInt32Number));
if (ElementSizes == NULL) goto Error;
// Keep starting position of curve offsets
DirectoryPos = io ->Tell(io);
-
+
// Write a fake directory to be filled latter on
for (i=0; i < Count; i++) {
static
cmsBool SaveOneChromaticity(cmsFloat64Number x, cmsFloat64Number y, cmsIOHANDLER* io)
{
- if (!_cmsWriteUInt32Number(io, _cmsDoubleTo15Fixed16(x))) return FALSE;
- if (!_cmsWriteUInt32Number(io, _cmsDoubleTo15Fixed16(y))) return FALSE;
+ if (!_cmsWriteUInt32Number(io, (cmsUInt32Number) _cmsDoubleTo15Fixed16(x))) return FALSE;
+ if (!_cmsWriteUInt32Number(io, (cmsUInt32Number) _cmsDoubleTo15Fixed16(y))) return FALSE;
return TRUE;
}
void* Type_Chromaticity_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsCIExyYTRIPLE));
+
cmsUNUSED_PARAMETER(n);
}
// Create memory
Text = (char*) _cmsMalloc(self ->ContextID, size);
+ if (Text == NULL) return FALSE;
+
cmsMLUgetASCII(mlu, cmsNoLanguage, cmsNoCountry, Text, size);
// Write it, including separator
cmsMLU* mlu = (cmsMLU*) Ptr;
char *Text = NULL;
wchar_t *Wide = NULL;
- cmsUInt32Number len, len_aligned, len_filler_alignment;
+ cmsUInt32Number len, len_text, len_tag_requirement, len_aligned;
cmsBool rc = FALSE;
char Filler[68];
- // Used below for writting zeroes
+ // Used below for writing zeroes
memset(Filler, 0, sizeof(Filler));
// Get the len of string
len = cmsMLUgetASCII(mlu, cmsNoLanguage, cmsNoCountry, NULL, 0);
- // From ICC3.4: It has been found that textDescriptionType can contain misaligned data
- //(see clause 4.1 for the definition of \93aligned\94). Because the Unicode language
+ // Specification ICC.1:2001-04 (v2.4.0): It has been found that textDescriptionType can contain misaligned data
+ //(see clause 4.1 for the definition of 'aligned'). Because the Unicode language
// code and Unicode count immediately follow the ASCII description, their
// alignment is not correct if the ASCII count is not a multiple of four. The
// ScriptCode code is misaligned when the ASCII count is odd. Profile reading and
// writing software must be written carefully in order to handle these alignment
// problems.
-
- // Compute an aligned size
- len_aligned = _cmsALIGNLONG(len);
- len_filler_alignment = len_aligned - len;
+ //
+ // The above last sentence suggest to handle alignment issues in the
+ // parser. The provided example (Table 69 on Page 60) makes this clear.
+ // The padding only in the ASCII count is not sufficient for a aligned tag
+ // size, with the same text size in ASCII and Unicode.
// Null strings
if (len <= 0) {
cmsMLUgetWide(mlu, cmsNoLanguage, cmsNoCountry, Wide, len * sizeof(wchar_t));
}
+ // Tell the real text len including the null terminator and padding
+ len_text = (cmsUInt32Number) strlen(Text) + 1;
+ // Compute an total tag size requirement
+ len_tag_requirement = (8+4+len_text+4+4+2*len_text+2+1+67);
+ len_aligned = _cmsALIGNLONG(len_tag_requirement);
+
// * cmsUInt32Number count; * Description length
// * cmsInt8Number desc[count] * NULL terminated ascii string
// * cmsUInt32Number ucLangCode; * UniCode language code
// * cmsUInt8Number scCount; * ScriptCode count
// * cmsInt8Number scDesc[67]; * ScriptCode Description
- if (!_cmsWriteUInt32Number(io, len_aligned)) goto Error;
- if (!io ->Write(io, len, Text)) goto Error;
- if (!io ->Write(io, len_filler_alignment, Filler)) goto Error;
+ if (!_cmsWriteUInt32Number(io, len_text)) goto Error;
+ if (!io ->Write(io, len_text, Text)) goto Error;
if (!_cmsWriteUInt32Number(io, 0)) goto Error; // ucLanguageCode
- // This part is tricky: we need an aligned tag size, and the ScriptCode part
- // takes 70 bytes, so we need 2 extra bytes to do the alignment
-
- if (!_cmsWriteUInt32Number(io, len_aligned+1)) goto Error;
-
+ if (!_cmsWriteUInt32Number(io, len_text)) goto Error;
// Note that in some compilers sizeof(cmsUInt16Number) != sizeof(wchar_t)
- if (!_cmsWriteWCharArray(io, len, Wide)) goto Error;
- if (!_cmsWriteUInt16Array(io, len_filler_alignment+1, (cmsUInt16Number*) Filler)) goto Error;
+ if (!_cmsWriteWCharArray(io, len_text, Wide)) goto Error;
// ScriptCode Code & count (unused)
if (!_cmsWriteUInt16Number(io, 0)) goto Error;
if (!io ->Write(io, 67, Filler)) goto Error;
+ // possibly add pad at the end of tag
+ if(len_aligned - len_tag_requirement > 0)
+ if (!io ->Write(io, len_aligned - len_tag_requirement, Filler)) goto Error;
+
rc = TRUE;
Error:
{
cmsUInt32Number Count;
cmsToneCurve* NewGamma;
- cmsUInt16Number Linear[2] = { 0, 0xffff };
-
-
+
*nItems = 0;
if (!_cmsReadUInt32Number(io, &Count)) return NULL;
switch (Count) {
case 0: // Linear.
+ {
+ cmsFloat64Number SingleGamma = 1.0;
- NewGamma = cmsBuildTabulatedToneCurve16(self ->ContextID, 2, Linear);
- if (!NewGamma) return NULL;
- *nItems = 1;
- return NewGamma;
-
+ NewGamma = cmsBuildParametricToneCurve(self ->ContextID, 1, &SingleGamma);
+ if (!NewGamma) return NULL;
+ *nItems = 1;
+ return NewGamma;
+ }
+
case 1: // Specified as the exponent of gamma function
{
cmsUInt16Number SingleGammaFixed;
NewGamma = cmsBuildTabulatedToneCurve16(self ->ContextID, Count, NULL);
if (!NewGamma) return NULL;
- if (!_cmsReadUInt16Array(io, Count, NewGamma -> Table16)) return NULL;
+ if (!_cmsReadUInt16Array(io, Count, NewGamma -> Table16)) {
+ cmsFreeToneCurve(NewGamma);
+ return NULL;
+ }
*nItems = 1;
return NewGamma;
// ********************************************************************************
-// Decide which curve type to use on writting
+// Decide which curve type to use on writing
static
cmsTagTypeSignature DecideCurveType(cmsFloat64Number ICCVersion, const void *Data)
{
if (ICCVersion < 4.0) return cmsSigCurveType;
if (Curve ->nSegments != 1) return cmsSigCurveType; // Only 1-segment curves can be saved as parametric
if (Curve ->Segments[0].Type < 0) return cmsSigCurveType; // Only non-inverted curves
+ if (Curve ->Segments[0].Type > 5) return cmsSigCurveType; // Only ICC parametric curves
return cmsSigParametricCurveType;
}
{
cmsICCMeasurementConditions mc;
+
+ memset(&mc, 0, sizeof(mc));
+
if (!_cmsReadUInt32Number(io, &mc.Observer)) return NULL;
if (!_cmsReadXYZNumber(io, &mc.Backing)) return NULL;
if (!_cmsReadUInt32Number(io, &mc.Geometry)) return NULL;
if (!_cmsReadUInt32Number(io, &Offset)) goto Error;
// Check for overflow
- if (Offset < (SizeOfHeader + 8)) goto Error;
+ if (Offset < (SizeOfHeader + 8)) goto Error;
+ if (((Offset + Len) < Len) || ((Offset + Len) > SizeOfTag + 8)) goto Error;
// True begin of the string
BeginOfThisString = Offset - SizeOfHeader - 8;
- // Ajust to wchar_t elements
+ // Adjust to wchar_t elements
mlu ->Entries[i].Len = (Len * sizeof(wchar_t)) / sizeof(cmsUInt16Number);
mlu ->Entries[i].StrW = (BeginOfThisString * sizeof(wchar_t)) / sizeof(cmsUInt16Number);
LargestPosition = EndOfThisString;
}
- // Now read the remaining of tag and fill all strings. Substract the directory
+ // Now read the remaining of tag and fill all strings. Subtract the directory
SizeOfTag = (LargestPosition * sizeof(wchar_t)) / sizeof(cmsUInt16Number);
if (SizeOfTag == 0)
{
cmsMLU* mlu =(cmsMLU*) Ptr;
cmsUInt32Number HeaderSize;
cmsUInt32Number Len, Offset;
- int i;
+ cmsUInt32Number i;
if (Ptr == NULL) {
// Type cmsSigLut8Type
// ********************************************************************************
-// Decide which LUT type to use on writting
+// Decide which LUT type to use on writing
static
cmsTagTypeSignature DecideLUTtypeA2B(cmsFloat64Number ICCVersion, const void *Data)
{
// Read 8 bit tables as gamma functions
static
-cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels)
+cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, cmsUInt32Number nChannels)
{
- cmsStage* mpe;
cmsUInt8Number* Temp = NULL;
- int i, j;
+ cmsUInt32Number i, j;
cmsToneCurve* Tables[cmsMAXCHANNELS];
if (nChannels > cmsMAXCHANNELS) return FALSE;
_cmsFree(ContextID, Temp);
Temp = NULL;
-
- mpe = cmsStageAllocToneCurves(ContextID, nChannels, Tables);
- if (mpe == NULL) goto Error;
-
- cmsPipelineInsertStage(lut, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables)))
+ goto Error;
for (i=0; i < nChannels; i++)
cmsFreeToneCurve(Tables[i]);
if (Tables) {
- if (Tables ->TheCurves[i]->nEntries != 256) {
- cmsSignalError(ContextID, cmsERROR_RANGE, "LUT8 needs 256 entries on prelinearization");
- return FALSE;
- }
-
- }
+ // Usual case of identity curves
+ if ((Tables ->TheCurves[i]->nEntries == 2) &&
+ (Tables->TheCurves[i]->Table16[0] == 0) &&
+ (Tables->TheCurves[i]->Table16[1] == 65535)) {
- for (j=0; j < 256; j++) {
+ for (j=0; j < 256; j++) {
+ if (!_cmsWriteUInt8Number(io, (cmsUInt8Number) j)) return FALSE;
+ }
+ }
+ else
+ if (Tables ->TheCurves[i]->nEntries != 256) {
+ cmsSignalError(ContextID, cmsERROR_RANGE, "LUT8 needs 256 entries on prelinearization");
+ return FALSE;
+ }
+ else
+ for (j=0; j < 256; j++) {
- if (Tables != NULL)
- val = (cmsUInt8Number) FROM_16_TO_8(Tables->TheCurves[i]->Table16[j]);
- else
- val = (cmsUInt8Number) j;
+ val = (cmsUInt8Number) FROM_16_TO_8(Tables->TheCurves[i]->Table16[j]);
- if (!_cmsWriteUInt8Number(io, val)) return FALSE;
+ if (!_cmsWriteUInt8Number(io, val)) return FALSE;
+ }
}
}
return TRUE;
// Check overflow
static
-size_t uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b)
+cmsUInt32Number uipow(cmsUInt32Number n, cmsUInt32Number a, cmsUInt32Number b)
{
cmsUInt32Number rv = 1, rc;
rv *= a;
// Check for overflow
- if (rv > UINT_MAX / a) return (size_t) -1;
+ if (rv > UINT_MAX / a) return (cmsUInt32Number) -1;
}
rc = rv * n;
- if (rv != rc / n) return (size_t) -1;
+ if (rv != rc / n) return (cmsUInt32Number) -1;
return rc;
}
cmsUInt8Number InputChannels, OutputChannels, CLUTpoints;
cmsUInt8Number* Temp = NULL;
cmsPipeline* NewLUT = NULL;
- cmsStage *mpemat, *mpeclut;
cmsUInt32Number nTabSize, i;
cmsFloat64Number Matrix[3*3];
if (!_cmsReadUInt8Number(io, NULL)) goto Error;
// Do some checking
-
- if (InputChannels > cmsMAXCHANNELS) goto Error;
- if (OutputChannels > cmsMAXCHANNELS) goto Error;
+ if (InputChannels == 0 || InputChannels > cmsMAXCHANNELS) goto Error;
+ if (OutputChannels == 0 || OutputChannels > cmsMAXCHANNELS) goto Error;
// Allocates an empty Pipeline
NewLUT = cmsPipelineAlloc(self ->ContextID, InputChannels, OutputChannels);
// Only operates if not identity...
if ((InputChannels == 3) && !_cmsMAT3isIdentity((cmsMAT3*) Matrix)) {
- mpemat = cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL);
- if (mpemat == NULL) goto Error;
- cmsPipelineInsertStage(NewLUT, cmsAT_BEGIN, mpemat);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_BEGIN, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL)))
+ goto Error;
}
// Get input tables
// Get 3D CLUT. Check the overflow....
nTabSize = uipow(OutputChannels, CLUTpoints, InputChannels);
- if (nTabSize == (size_t) -1) goto Error;
+ if (nTabSize == (cmsUInt32Number) -1) goto Error;
if (nTabSize > 0) {
cmsUInt16Number *PtrW, *T;
- cmsUInt32Number Tsize;
-
- Tsize = (cmsUInt32Number) nTabSize * sizeof(cmsUInt16Number);
-
+
PtrW = T = (cmsUInt16Number*) _cmsCalloc(self ->ContextID, nTabSize, sizeof(cmsUInt16Number));
if (T == NULL) goto Error;
Temp = (cmsUInt8Number*) _cmsMalloc(self ->ContextID, nTabSize);
- if (Temp == NULL) goto Error;
+ if (Temp == NULL) {
+ _cmsFree(self ->ContextID, T);
+ goto Error;
+ }
- if (io ->Read(io, Temp, nTabSize, 1) != 1) goto Error;
+ if (io ->Read(io, Temp, nTabSize, 1) != 1) {
+ _cmsFree(self ->ContextID, T);
+ _cmsFree(self ->ContextID, Temp);
+ goto Error;
+ }
for (i = 0; i < nTabSize; i++) {
_cmsFree(self ->ContextID, Temp);
Temp = NULL;
-
- mpeclut = cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T);
- if (mpeclut == NULL) goto Error;
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpeclut);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) {
+ _cmsFree(self ->ContextID, T);
+ goto Error;
+ }
_cmsFree(self ->ContextID, T);
}
static
cmsBool Type_LUT8_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
- cmsUInt32Number j, nTabSize;
+ cmsUInt32Number j, nTabSize, i, n;
cmsUInt8Number val;
cmsPipeline* NewLUT = (cmsPipeline*) Ptr;
cmsStage* mpe;
_cmsStageToneCurvesData* PreMPE = NULL, *PostMPE = NULL;
_cmsStageMatrixData* MatMPE = NULL;
_cmsStageCLutData* clut = NULL;
- int clutPoints;
+ cmsUInt32Number clutPoints;
// Disassemble the LUT into components.
mpe = NewLUT -> Elements;
if (mpe ->Type == cmsSigMatrixElemType) {
+ if (mpe->InputChannels != 3 || mpe->OutputChannels != 3) return FALSE;
MatMPE = (_cmsStageMatrixData*) mpe ->Data;
mpe = mpe -> Next;
}
return FALSE;
}
-
if (clut == NULL)
clutPoints = 0;
else
if (!_cmsWriteUInt8Number(io, (cmsUInt8Number) clutPoints)) return FALSE;
if (!_cmsWriteUInt8Number(io, 0)) return FALSE; // Padding
+ n = NewLUT->InputChannels * NewLUT->OutputChannels;
if (MatMPE != NULL) {
-
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[0])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[1])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[2])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[3])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[4])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[5])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[6])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[7])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[8])) return FALSE;
-
+
+ for (i = 0; i < 9; i++)
+ {
+ if (!_cmsWrite15Fixed16Number(io, MatMPE->Double[i])) return FALSE;
+ }
}
else {
-
+
if (!_cmsWrite15Fixed16Number(io, 1)) return FALSE;
if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
if (!Write8bitTables(self ->ContextID, io, NewLUT ->InputChannels, PreMPE)) return FALSE;
nTabSize = uipow(NewLUT->OutputChannels, clutPoints, NewLUT ->InputChannels);
- if (nTabSize == (size_t) -1) return FALSE;
+ if (nTabSize == (cmsUInt32Number) -1) return FALSE;
if (nTabSize > 0) {
// The 3D CLUT.
// Read 16 bit tables as gamma functions
static
-cmsBool Read16bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels, int nEntries)
+cmsBool Read16bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut,
+ cmsUInt32Number nChannels, cmsUInt32Number nEntries)
{
- cmsStage* mpe;
- int i;
+ cmsUInt32Number i;
cmsToneCurve* Tables[cmsMAXCHANNELS];
// Maybe an empty table? (this is a lcms extension)
// Add the table (which may certainly be an identity, but this is up to the optimizer, not the reading code)
- mpe = cmsStageAllocToneCurves(ContextID, nChannels, Tables);
- if (mpe == NULL) goto Error;
-
- cmsPipelineInsertStage(lut, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables)))
+ goto Error;
for (i=0; i < nChannels; i++)
cmsFreeToneCurve(Tables[i]);
static
cmsBool Write16bitTables(cmsContext ContextID, cmsIOHANDLER* io, _cmsStageToneCurvesData* Tables)
{
- int j;
+ cmsUInt32Number j;
cmsUInt32Number i;
cmsUInt16Number val;
- int nEntries = 256;
+ cmsUInt32Number nEntries;
+
+ _cmsAssert(Tables != NULL);
nEntries = Tables->TheCurves[0]->nEntries;
for (j=0; j < nEntries; j++) {
- if (Tables != NULL)
- val = Tables->TheCurves[i]->Table16[j];
- else
- val = _cmsQuantizeVal(j, nEntries);
-
+ val = Tables->TheCurves[i]->Table16[j];
if (!_cmsWriteUInt16Number(io, val)) return FALSE;
}
}
{
cmsUInt8Number InputChannels, OutputChannels, CLUTpoints;
cmsPipeline* NewLUT = NULL;
- cmsStage *mpemat, *mpeclut;
cmsUInt32Number nTabSize;
cmsFloat64Number Matrix[3*3];
cmsUInt16Number InputEntries, OutputEntries;
if (!_cmsReadUInt8Number(io, NULL)) return NULL;
// Do some checking
- if (InputChannels > cmsMAXCHANNELS) goto Error;
- if (OutputChannels > cmsMAXCHANNELS) goto Error;
+ if (InputChannels == 0 || InputChannels > cmsMAXCHANNELS) goto Error;
+ if (OutputChannels == 0 || OutputChannels > cmsMAXCHANNELS) goto Error;
// Allocates an empty LUT
NewLUT = cmsPipelineAlloc(self ->ContextID, InputChannels, OutputChannels);
// Only operates on 3 channels
if ((InputChannels == 3) && !_cmsMAT3isIdentity((cmsMAT3*) Matrix)) {
- mpemat = cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL);
- if (mpemat == NULL) goto Error;
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpemat);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocMatrix(self ->ContextID, 3, 3, Matrix, NULL)))
+ goto Error;
}
if (!_cmsReadUInt16Number(io, &InputEntries)) goto Error;
// Get 3D CLUT
nTabSize = uipow(OutputChannels, CLUTpoints, InputChannels);
- if (nTabSize == (size_t) -1) goto Error;
+ if (nTabSize == (cmsUInt32Number) -1) goto Error;
if (nTabSize > 0) {
cmsUInt16Number *T;
goto Error;
}
- mpeclut = cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T);
- if (mpeclut == NULL) {
- _cmsFree(self ->ContextID, T);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, cmsStageAllocCLut16bit(self ->ContextID, CLUTpoints, InputChannels, OutputChannels, T))) {
+ _cmsFree(self ->ContextID, T);
goto Error;
}
-
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpeclut);
_cmsFree(self ->ContextID, T);
}
// Some empty defaults are created for missing parts
static
-cmsBool Type_LUT16_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
+cmsBool Type_LUT16_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number nTabSize;
cmsPipeline* NewLUT = (cmsPipeline*) Ptr;
_cmsStageToneCurvesData* PreMPE = NULL, *PostMPE = NULL;
_cmsStageMatrixData* MatMPE = NULL;
_cmsStageCLutData* clut = NULL;
- int InputChannels, OutputChannels, clutPoints;
+ cmsUInt32Number i, InputChannels, OutputChannels, clutPoints;
// Disassemble the LUT into components.
mpe = NewLUT -> Elements;
if (mpe != NULL && mpe ->Type == cmsSigMatrixElemType) {
MatMPE = (_cmsStageMatrixData*) mpe ->Data;
+ if (mpe->InputChannels != 3 || mpe->OutputChannels != 3) return FALSE;
mpe = mpe -> Next;
}
if (!_cmsWriteUInt8Number(io, (cmsUInt8Number) OutputChannels)) return FALSE;
if (!_cmsWriteUInt8Number(io, (cmsUInt8Number) clutPoints)) return FALSE;
if (!_cmsWriteUInt8Number(io, 0)) return FALSE; // Padding
-
-
+
if (MatMPE != NULL) {
-
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[0])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[1])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[2])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[3])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[4])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[5])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[6])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[7])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, MatMPE -> Double[8])) return FALSE;
+
+ for (i = 0; i < 9; i++)
+ {
+ if (!_cmsWrite15Fixed16Number(io, MatMPE->Double[i])) return FALSE;
+ }
+
}
else {
-
+
if (!_cmsWrite15Fixed16Number(io, 1)) return FALSE;
if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
if (PreMPE != NULL) {
if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) PreMPE ->TheCurves[0]->nEntries)) return FALSE;
} else {
- if (!_cmsWriteUInt16Number(io, 0)) return FALSE;
+ if (!_cmsWriteUInt16Number(io, 2)) return FALSE;
}
if (PostMPE != NULL) {
if (!_cmsWriteUInt16Number(io, (cmsUInt16Number) PostMPE ->TheCurves[0]->nEntries)) return FALSE;
} else {
- if (!_cmsWriteUInt16Number(io, 0)) return FALSE;
+ if (!_cmsWriteUInt16Number(io, 2)) return FALSE;
}
if (PreMPE != NULL) {
if (!Write16bitTables(self ->ContextID, io, PreMPE)) return FALSE;
}
+ else {
+ for (i=0; i < InputChannels; i++) {
+
+ if (!_cmsWriteUInt16Number(io, 0)) return FALSE;
+ if (!_cmsWriteUInt16Number(io, 0xffff)) return FALSE;
+ }
+ }
nTabSize = uipow(OutputChannels, clutPoints, InputChannels);
- if (nTabSize == (size_t) -1) return FALSE;
+ if (nTabSize == (cmsUInt32Number) -1) return FALSE;
if (nTabSize > 0) {
// The 3D CLUT.
if (clut != NULL) {
if (PostMPE != NULL) {
if (!Write16bitTables(self ->ContextID, io, PostMPE)) return FALSE;
}
+ else {
+ for (i=0; i < OutputChannels; i++) {
+ if (!_cmsWriteUInt16Number(io, 0)) return FALSE;
+ if (!_cmsWriteUInt16Number(io, 0xffff)) return FALSE;
+ }
+ }
return TRUE;
// V4 stuff. Read CLUT part for LutAtoB and LutBtoA
static
-cmsStage* ReadCLUT(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number Offset, int InputChannels, int OutputChannels)
+cmsStage* ReadCLUT(struct _cms_typehandler_struct* self, cmsIOHANDLER* io,
+ cmsUInt32Number Offset, cmsUInt32Number InputChannels, cmsUInt32Number OutputChannels)
{
cmsUInt8Number gridPoints8[cmsMAXCHANNELS]; // Number of grid points in each dimension.
cmsUInt32Number GridPoints[cmsMAXCHANNELS], i;
// Precision can be 1 or 2 bytes
if (Precision == 1) {
- cmsUInt8Number v;
+ cmsUInt8Number v;
for (i=0; i < Data ->nEntries; i++) {
- if (io ->Read(io, &v, sizeof(cmsUInt8Number), 1) != 1) return NULL;
- Data ->Tab.T[i] = FROM_8_TO_16(v);
+ if (io ->Read(io, &v, sizeof(cmsUInt8Number), 1) != 1) {
+ cmsStageFree(CLUT);
+ return NULL;
+ }
+ Data ->Tab.T[i] = FROM_8_TO_16(v);
}
}
else
if (Precision == 2) {
- if (!_cmsReadUInt16Array(io, Data->nEntries, Data ->Tab.T)) return NULL;
- }
- else {
- cmsSignalError(self ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown precision of '%d'", Precision);
- return NULL;
- }
-
+ if (!_cmsReadUInt16Array(io, Data->nEntries, Data ->Tab.T)) {
+ cmsStageFree(CLUT);
+ return NULL;
+ }
+ }
+ else {
+ cmsStageFree(CLUT);
+ cmsSignalError(self ->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown precision of '%d'", Precision);
+ return NULL;
+ }
return CLUT;
}
cmsUInt32Number offsetM; // Offset to first "M" curve
cmsUInt32Number offsetC; // Offset to CLUT
cmsUInt32Number offsetA; // Offset to first "A" curve
- cmsStage* mpe;
cmsPipeline* NewLUT = NULL;
if (!_cmsReadUInt32Number(io, &offsetC)) return NULL;
if (!_cmsReadUInt32Number(io, &offsetA)) return NULL;
- // Allocates an empty LUT
+ if (inputChan == 0 || inputChan >= cmsMAXCHANNELS) return NULL;
+ if (outputChan == 0 || outputChan >= cmsMAXCHANNELS) return NULL;
+
+ // Allocates an empty LUT
NewLUT = cmsPipelineAlloc(self ->ContextID, inputChan, outputChan);
if (NewLUT == NULL) return NULL;
if (offsetA!= 0) {
- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetA, inputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetA, inputChan)))
+ goto Error;
}
if (offsetC != 0) {
- mpe = ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan)))
+ goto Error;
}
if (offsetM != 0) {
- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetM, outputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetM, outputChan)))
+ goto Error;
}
if (offsetMat != 0) {
- mpe = ReadMatrix(self, io, BaseOffset + offsetMat);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadMatrix(self, io, BaseOffset + offsetMat)))
+ goto Error;
}
if (offsetB != 0) {
- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetB, outputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetB, outputChan)))
+ goto Error;
}
*nItems = 1;
return NewLUT;
+Error:
+ cmsPipelineFree(NewLUT);
+ return NULL;
cmsUNUSED_PARAMETER(SizeOfTag);
}
static
cmsBool WriteMatrix(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsStage* mpe)
{
+ cmsUInt32Number i, n;
+
_cmsStageMatrixData* m = (_cmsStageMatrixData*) mpe -> Data;
- // Write the Matrix
- if (!_cmsWrite15Fixed16Number(io, m -> Double[0])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[1])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[2])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[3])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[4])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[5])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[6])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[7])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Double[8])) return FALSE;
+ n = mpe->InputChannels * mpe->OutputChannels;
- if (m ->Offset != NULL) {
+ // Write the Matrix
+ for (i = 0; i < n; i++)
+ {
+ if (!_cmsWrite15Fixed16Number(io, m->Double[i])) return FALSE;
+ }
- if (!_cmsWrite15Fixed16Number(io, m -> Offset[0])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Offset[1])) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, m -> Offset[2])) return FALSE;
- }
- else {
- if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
- if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
+ if (m->Offset != NULL) {
- }
+ for (i = 0; i < mpe->OutputChannels; i++)
+ {
+ if (!_cmsWrite15Fixed16Number(io, m->Offset[i])) return FALSE;
+ }
+ }
+ else {
+ for (i = 0; i < mpe->OutputChannels; i++)
+ {
+ if (!_cmsWrite15Fixed16Number(io, 0)) return FALSE;
+ }
+ }
return TRUE;
return FALSE;
}
- if (!_cmsWriteAlignment(io)) return FALSE;
+ if (!_cmsWriteAlignment(io)) return FALSE;
- return TRUE;
+ return TRUE;
}
cmsBool Type_LUTA2B_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsPipeline* Lut = (cmsPipeline*) Ptr;
- int inputChan, outputChan;
+ cmsUInt32Number inputChan, outputChan;
cmsStage *A = NULL, *B = NULL, *M = NULL;
cmsStage * Matrix = NULL;
cmsStage * CLUT = NULL;
if (CLUT != NULL) {
offsetC = io ->Tell(io) - BaseOffset;
- if (!WriteCLUT(self, io, Lut ->SaveAs8Bits ? 1 : 2, CLUT)) return FALSE;
+ if (!WriteCLUT(self, io, (Lut ->SaveAs8Bits ? 1U : 2U), CLUT)) return FALSE;
}
if (M != NULL) {
cmsUInt32Number offsetM; // Offset to first "M" curve
cmsUInt32Number offsetC; // Offset to CLUT
cmsUInt32Number offsetA; // Offset to first "A" curve
- cmsStage* mpe;
cmsPipeline* NewLUT = NULL;
if (!_cmsReadUInt8Number(io, &inputChan)) return NULL;
if (!_cmsReadUInt8Number(io, &outputChan)) return NULL;
+ if (inputChan == 0 || inputChan >= cmsMAXCHANNELS) return NULL;
+ if (outputChan == 0 || outputChan >= cmsMAXCHANNELS) return NULL;
+
// Padding
if (!_cmsReadUInt16Number(io, NULL)) return NULL;
if (NewLUT == NULL) return NULL;
if (offsetB != 0) {
- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetB, inputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetB, inputChan)))
+ goto Error;
}
if (offsetMat != 0) {
- mpe = ReadMatrix(self, io, BaseOffset + offsetMat);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadMatrix(self, io, BaseOffset + offsetMat)))
+ goto Error;
}
if (offsetM != 0) {
- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetM, inputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetM, inputChan)))
+ goto Error;
}
if (offsetC != 0) {
- mpe = ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadCLUT(self, io, BaseOffset + offsetC, inputChan, outputChan)))
+ goto Error;
}
if (offsetA!= 0) {
- mpe = ReadSetOfCurves(self, io, BaseOffset + offsetA, outputChan);
- if (mpe == NULL) { cmsPipelineFree(NewLUT); return NULL; }
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, ReadSetOfCurves(self, io, BaseOffset + offsetA, outputChan)))
+ goto Error;
}
*nItems = 1;
return NewLUT;
+Error:
+ cmsPipelineFree(NewLUT);
+ return NULL;
cmsUNUSED_PARAMETER(SizeOfTag);
}
cmsBool Type_LUTB2A_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsPipeline* Lut = (cmsPipeline*) Ptr;
- int inputChan, outputChan;
+ cmsUInt32Number inputChan, outputChan;
cmsStage *A = NULL, *B = NULL, *M = NULL;
cmsStage *Matrix = NULL;
cmsStage *CLUT = NULL;
if (CLUT != NULL) {
offsetC = io ->Tell(io) - BaseOffset;
- if (!WriteCLUT(self, io, Lut ->SaveAs8Bits ? 1 : 2, CLUT)) return FALSE;
+ if (!WriteCLUT(self, io, (Lut ->SaveAs8Bits ? 1U : 2U), CLUT)) return FALSE;
}
if (M != NULL) {
}
List = cmsAllocNamedColorList(self ->ContextID, Count, 0, "", "");
+ if (List == NULL)
+ return NULL;
+
for (i=0; i < Count; i++) {
if (io ->Read(io, Name, 32, 1) != 1) goto Error;
- Name[33] = 0;
+ Name[32] = 0;
if (!_cmsReadUInt16Array(io, 3, PCS)) goto Error;
cmsBool Type_ColorantTable_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) Ptr;
- int i, nColors;
+ cmsUInt32Number i, nColors;
nColors = cmsNamedColorCount(NamedColorList);
for (i=0; i < nColors; i++) {
- char root[33];
+ char root[cmsMAX_PATH];
cmsUInt16Number PCS[3];
+ memset(root, 0, sizeof(root));
+
if (!cmsNamedColorInfo(NamedColorList, i, root, NULL, NULL, PCS, NULL)) return 0;
root[32] = 0;
//The namedColor2Type is a count value and array of structures that provide color
//coordinates for 7-bit ASCII color names. For each named color, a PCS and optional
//device representation of the color are given. Both representations are 16-bit values.
-//The device representation corresponds to the header\92s \93color space of data\94 field.
-//This representation should be consistent with the \93number of device components\94
+//The device representation corresponds to the header's 'color space of data' field.
+//This representation should be consistent with the 'number of device components'
//field in the namedColor2Type. If this field is 0, device coordinates are not provided.
-//The PCS representation corresponds to the header\92s PCS field. The PCS representation
+//The PCS representation corresponds to the header's PCS field. The PCS representation
//is always provided. Color names are fixed-length, 32-byte fields including null
//termination. In order to maintain maximum portability, it is strongly recommended
//that special characters of the 7-bit ASCII set not be used.
cmsUInt32Number nDeviceCoords; // Num of device coordinates
char prefix[32]; // Prefix for each color name
char suffix[32]; // Suffix for each color name
- cmsNAMEDCOLORLIST* v;
- cmsUInt32Number i;
+ cmsNAMEDCOLORLIST* v;
+ cmsUInt32Number i;
*nItems = 0;
if (nDeviceCoords > cmsMAXCHANNELS) {
cmsSignalError(self->ContextID, cmsERROR_RANGE, "Too many device coordinates '%d'", nDeviceCoords);
- return 0;
+ goto Error;
}
for (i=0; i < count; i++) {
char Root[33];
memset(Colorant, 0, sizeof(Colorant));
- if (io -> Read(io, Root, 32, 1) != 1) return NULL;
+ if (io -> Read(io, Root, 32, 1) != 1) goto Error;
+ Root[32] = 0; // To prevent exploits
+
if (!_cmsReadUInt16Array(io, 3, PCS)) goto Error;
if (!_cmsReadUInt16Array(io, nDeviceCoords, Colorant)) goto Error;
cmsBool Type_NamedColor_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) Ptr;
- char prefix[32]; // Prefix for each color name
- char suffix[32]; // Suffix for each color name
- int i, nColors;
+ char prefix[33]; // Prefix for each color name
+ char suffix[33]; // Suffix for each color name
+ cmsUInt32Number i, nColors;
nColors = cmsNamedColorCount(NamedColorList);
strncpy(prefix, (const char*) NamedColorList->Prefix, 32);
strncpy(suffix, (const char*) NamedColorList->Suffix, 32);
- suffix[31] = prefix[31] = 0;
+ suffix[32] = prefix[32] = 0;
if (!io ->Write(io, 32, prefix)) return FALSE;
if (!io ->Write(io, 32, suffix)) return FALSE;
cmsUInt16Number PCS[3];
cmsUInt16Number Colorant[cmsMAXCHANNELS];
- char Root[33];
+ char Root[cmsMAX_PATH];
if (!cmsNamedColorInfo(NamedColorList, i, Root, NULL, NULL, PCS, Colorant)) return 0;
+ Root[32] = 0;
if (!io ->Write(io, 32 , Root)) return FALSE;
if (!_cmsWriteUInt16Array(io, 3, PCS)) return FALSE;
if (!_cmsWriteUInt16Array(io, NamedColorList ->ColorantCount, Colorant)) return FALSE;
SizeOfTag -= sizeof(cmsUInt32Number);
if (!_cmsReadUInt64Number(io, &sec ->attributes)) goto Error;
- if (SizeOfTag < sizeof(cmsUInt32Number)) goto Error;
+ if (SizeOfTag < sizeof(cmsUInt64Number)) goto Error;
SizeOfTag -= sizeof(cmsUInt64Number);
if (!_cmsReadUInt32Number(io, (cmsUInt32Number *)&sec ->technology)) goto Error;
-// Auxiliar, read an string specified as count + string
+// Auxiliary, read an string specified as count + string
static
cmsBool ReadCountAndSting(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsMLU* mlu, cmsUInt32Number* SizeOfTag, const char* Section)
{
// ********************************************************************************
//
//This type represents a set of viewing condition parameters including:
-//CIE \92absolute\92 illuminant white point tristimulus values and CIE \92absolute\92
+//CIE 'absolute' illuminant white point tristimulus values and CIE 'absolute'
//surround tristimulus values.
static
static
void* Type_ViewingConditions_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
- return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsScreening));
+ return _cmsDupMem(self->ContextID, Ptr, sizeof(cmsICCViewingConditions));
cmsUNUSED_PARAMETER(n);
}
}
// Each curve is stored in one or more curve segments, with break-points specified between curve segments.
-// The first curve segment always starts at \96Infinity, and the last curve segment always ends at +Infinity. The
+// The first curve segment always starts at -Infinity, and the last curve segment always ends at +Infinity. The
// first and last curve segments shall be specified in terms of a formula, whereas the other segments shall be
// specified either in terms of a formula, or by a sampled curve.
cmsUInt16Number nSegments;
cmsCurveSegment* Segments;
cmsToneCurve* Curve;
- cmsFloat32Number PrevBreak = -1E22F; // - infinite
+ cmsFloat32Number PrevBreak = MINUS_INF; // - infinite
// Take signature and channels for each element.
if (!_cmsReadUInt32Number(io, (cmsUInt32Number*) &ElementSig)) return NULL;
}
Segments[nSegments-1].x0 = PrevBreak;
- Segments[nSegments-1].x1 = 1E22F; // A big cmsFloat32Number number
+ Segments[nSegments-1].x1 = PLUS_INF; // A big cmsFloat32Number number
// Read segments
for (i=0; i < nSegments; i++) {
case cmsSigSampledCurveSeg: {
cmsUInt32Number Count;
- if (!_cmsReadUInt32Number(io, &Count)) return NULL;
+ if (!_cmsReadUInt32Number(io, &Count)) goto Error;
Segments[i].nGridPoints = Count;
Segments[i].SampledPoints = (cmsFloat32Number*) _cmsCalloc(self ->ContextID, Count, sizeof(cmsFloat32Number));
_cmsTagSignature2String(String, (cmsTagSignature) ElementSig);
cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unknown curve element type '%s' found.", String);
}
- return NULL;
+ goto Error;
}
}
return Curve;
Error:
- if (Segments) _cmsFree(self ->ContextID, Segments);
+ if (Segments) {
+ for (i=0; i < nSegments; i++) {
+ if (Segments[i].SampledPoints) _cmsFree(self ->ContextID, Segments[i].SampledPoints);
+ }
+ _cmsFree(self ->ContextID, Segments);
+ }
return NULL;
}
}
_cmsFree(self ->ContextID, GammaTables);
- *nItems = (mpe != NULL) ? 1 : 0;
+ *nItems = (mpe != NULL) ? 1U : 0;
return mpe;
cmsUNUSED_PARAMETER(SizeOfTag);
// The matrix is organized as an array of PxQ+Q elements, where P is the number of input channels to the
// matrix, and Q is the number of output channels. The matrix elements are each float32Numbers. The array
// is organized as follows:
-// array = [e11, e12, \85, e1P, e21, e22, \85, e2P, \85, eQ1, eQ2, \85, eQP, e1, e2, \85, eQ]
+// array = [e11, e12, ..., e1P, e21, e22, ..., e2P, ..., eQ1, eQ2, ..., eQP, e1, e2, ..., eQ]
static
void *Type_MPEmatrix_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
if (!_cmsReadUInt16Number(io, &OutputChans)) return NULL;
- nElems = InputChans * OutputChans;
+ // Input and output chans may be ANY (up to 0xffff),
+ // but we choose to limit to 16 channels for now
+ if (InputChans >= cmsMAXCHANNELS) return NULL;
+ if (OutputChans >= cmsMAXCHANNELS) return NULL;
+
+ nElems = (cmsUInt32Number) InputChans * OutputChans;
- // Input and output chans may be ANY (up to 0xffff)
Matrix = (cmsFloat64Number*) _cmsCalloc(self ->ContextID, nElems, sizeof(cmsFloat64Number));
if (Matrix == NULL) return NULL;
cmsFloat32Number v;
- if (!_cmsReadFloat32Number(io, &v)) return NULL;
+ if (!_cmsReadFloat32Number(io, &v)) {
+ _cmsFree(self ->ContextID, Matrix);
+ _cmsFree(self ->ContextID, Offsets);
+ return NULL;
+ }
Matrix[i] = v;
}
cmsFloat32Number v;
- if (!_cmsReadFloat32Number(io, &v)) return NULL;
+ if (!_cmsReadFloat32Number(io, &v)) {
+ _cmsFree(self ->ContextID, Matrix);
+ _cmsFree(self ->ContextID, Offsets);
+ return NULL;
+ }
Offsets[i] = v;
}
if (!_cmsReadUInt16Number(io, &InputChans)) return NULL;
if (!_cmsReadUInt16Number(io, &OutputChans)) return NULL;
+ if (InputChans == 0) goto Error;
+ if (OutputChans == 0) goto Error;
+
if (io ->Read(io, Dimensions8, sizeof(cmsUInt8Number), 16) != 16)
goto Error;
// Copy MAX_INPUT_DIMENSIONS at most. Expand to cmsUInt32Number
- nMaxGrids = InputChans > MAX_INPUT_DIMENSIONS ? MAX_INPUT_DIMENSIONS : InputChans;
- for (i=0; i < nMaxGrids; i++) GridPoints[i] = (cmsUInt32Number) Dimensions8[i];
+ nMaxGrids = InputChans > MAX_INPUT_DIMENSIONS ? (cmsUInt32Number) MAX_INPUT_DIMENSIONS : InputChans;
+ for (i = 0; i < nMaxGrids; i++) {
+ if (Dimensions8[i] == 1) goto Error; // Impossible value, 0 for no CLUT and then 2 at least
+ GridPoints[i] = (cmsUInt32Number)Dimensions8[i];
+ }
+
// Allocate the true CLUT
mpe = cmsStageAllocCLutFloatGranular(self ->ContextID, GridPoints, InputChans, OutputChans, NULL);
if (mpe == NULL) goto Error;
- // Read the data
+ // Read and sanitize the data
clut = (_cmsStageCLutData*) mpe ->Data;
for (i=0; i < clut ->nEntries; i++) {
- if (!_cmsReadFloat32Number(io, &clut ->Tab.TFloat[i])) goto Error;
+ if (!_cmsReadFloat32Number(io, &clut->Tab.TFloat[i])) goto Error;
}
*nItems = 1;
static
cmsBool Type_MPEclut_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
- cmsUInt8Number Dimensions8[16];
+ cmsUInt8Number Dimensions8[16]; // 16 because the spec says 16 and not max number of channels
cmsUInt32Number i;
cmsStage* mpe = (cmsStage*) Ptr;
_cmsStageCLutData* clut = (_cmsStageCLutData*) mpe ->Data;
- // Check for maximum number of channels
- if (mpe -> InputChannels > 15) return FALSE;
+ // Check for maximum number of channels supported by lcms
+ if (mpe -> InputChannels > MAX_INPUT_DIMENSIONS) return FALSE;
// Only floats are supported in MPE
if (clut ->HasFloatValues == FALSE) return FALSE;
{TYPE_MPE_HANDLER((cmsTagTypeSignature) cmsSigCLutElemType, MPEclut), NULL },
};
-#define DEFAULT_MPE_TYPE_COUNT (sizeof(SupportedMPEtypes) / sizeof(_cmsTagTypeLinkedList))
+_cmsTagTypePluginChunkType _cmsMPETypePluginChunk = { NULL };
static
cmsBool ReadMPEElem(struct _cms_typehandler_struct* self,
{
cmsStageSignature ElementSig;
cmsTagTypeHandler* TypeHandler;
- cmsStage *mpe = NULL;
cmsUInt32Number nItems;
cmsPipeline *NewLUT = (cmsPipeline *) Cargo;
+ _cmsTagTypePluginChunkType* MPETypePluginChunk = ( _cmsTagTypePluginChunkType*) _cmsContextGetClientChunk(self->ContextID, MPEPlugin);
+
// Take signature and channels for each element.
if (!_cmsReadUInt32Number(io, (cmsUInt32Number*) &ElementSig)) return FALSE;
if (!_cmsReadUInt32Number(io, NULL)) return FALSE;
// Read diverse MPE types
- TypeHandler = GetHandler((cmsTagTypeSignature) ElementSig, SupportedMPEtypes);
+ TypeHandler = GetHandler((cmsTagTypeSignature) ElementSig, MPETypePluginChunk ->TagTypes, SupportedMPEtypes);
if (TypeHandler == NULL) {
char String[5];
if (TypeHandler ->ReadPtr != NULL) {
// This is a real element which should be read and processed
- mpe = (cmsStage*) TypeHandler ->ReadPtr(self, io, &nItems, SizeOfTag);
- if (mpe == NULL) return FALSE;
-
- // All seems ok, insert element
- cmsPipelineInsertStage(NewLUT, cmsAT_END, mpe);
+ if (!cmsPipelineInsertStage(NewLUT, cmsAT_END, (cmsStage*) TypeHandler ->ReadPtr(self, io, &nItems, SizeOfTag)))
+ return FALSE;
}
return TRUE;
if (!_cmsReadUInt16Number(io, &InputChans)) return NULL;
if (!_cmsReadUInt16Number(io, &OutputChans)) return NULL;
+ if (InputChans == 0 || InputChans >= cmsMAXCHANNELS) return NULL;
+ if (OutputChans == 0 || OutputChans >= cmsMAXCHANNELS) return NULL;
+
// Allocates an empty LUT
NewLUT = cmsPipelineAlloc(self ->ContextID, InputChans, OutputChans);
if (NewLUT == NULL) return NULL;
- if (!_cmsReadUInt32Number(io, &ElementCount)) return NULL;
+ if (!_cmsReadUInt32Number(io, &ElementCount)) goto Error;
+ if (!ReadPositionTable(self, io, ElementCount, BaseOffset, NewLUT, ReadMPEElem)) goto Error;
- if (!ReadPositionTable(self, io, ElementCount, BaseOffset, NewLUT, ReadMPEElem)) {
- if (NewLUT != NULL) cmsPipelineFree(NewLUT);
- *nItems = 0;
- return NULL;
- }
+ // Check channel count
+ if (InputChans != NewLUT->InputChannels ||
+ OutputChans != NewLUT->OutputChannels) goto Error;
// Success
*nItems = 1;
return NewLUT;
+ // Error
+Error:
+ if (NewLUT != NULL) cmsPipelineFree(NewLUT);
+ *nItems = 0;
+ return NULL;
+
cmsUNUSED_PARAMETER(SizeOfTag);
}
cmsBool Type_MPE_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsUInt32Number i, BaseOffset, DirectoryPos, CurrentPos;
- int inputChan, outputChan;
+ cmsUInt32Number inputChan, outputChan;
cmsUInt32Number ElemCount;
cmsUInt32Number *ElementOffsets = NULL, *ElementSizes = NULL, Before;
cmsStageSignature ElementSig;
cmsPipeline* Lut = (cmsPipeline*) Ptr;
cmsStage* Elem = Lut ->Elements;
cmsTagTypeHandler* TypeHandler;
+ _cmsTagTypePluginChunkType* MPETypePluginChunk = ( _cmsTagTypePluginChunkType*) _cmsContextGetClientChunk(self->ContextID, MPEPlugin);
BaseOffset = io ->Tell(io) - sizeof(_cmsTagBase);
outputChan = cmsPipelineOutputChannels(Lut);
ElemCount = cmsPipelineStageCount(Lut);
- ElementOffsets = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number *));
+ ElementOffsets = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number));
if (ElementOffsets == NULL) goto Error;
- ElementSizes = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number *));
+ ElementSizes = (cmsUInt32Number *) _cmsCalloc(self ->ContextID, ElemCount, sizeof(cmsUInt32Number));
if (ElementSizes == NULL) goto Error;
// Write the head
ElementSig = Elem ->Type;
- TypeHandler = GetHandler((cmsTagTypeSignature) ElementSig, SupportedMPEtypes);
+ TypeHandler = GetHandler((cmsTagTypeSignature) ElementSig, MPETypePluginChunk->TagTypes, SupportedMPEtypes);
if (TypeHandler == NULL) {
char String[5];
_cmsTagSignature2String(String, (cmsTagSignature) ElementSig);
- // An unknow element was found.
+ // An unknown element was found.
cmsSignalError(self->ContextID, cmsERROR_UNKNOWN_EXTENSION, "Found unknown MPE type '%s'", String);
goto Error;
}
// Y = cX + f | X < d
// vcgt formula is:
- // Y = (Max \96 Min) * (X ^ Gamma) + Min
+ // Y = (Max - Min) * (X ^ Gamma) + Min
// So, the translation is
- // a = (Max \96 Min) ^ ( 1 / Gamma)
+ // a = (Max - Min) ^ ( 1 / Gamma)
// e = Min
// b=c=d=f=0
static
cmsBool AllocElem(cmsContext ContextID, _cmsDICelem* e, cmsUInt32Number Count)
{
- e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *));
+ e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number));
if (e->Offsets == NULL) return FALSE;
- e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *));
+ e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number));
if (e->Sizes == NULL) {
_cmsFree(ContextID, e -> Offsets);
void FreeElem(_cmsDICelem* e)
{
if (e ->Offsets != NULL) _cmsFree(e -> ContextID, e -> Offsets);
- if (e ->Sizes != NULL) _cmsFree(e -> ContextID, e ->Sizes);
+ if (e ->Sizes != NULL) _cmsFree(e -> ContextID, e -> Sizes);
e->Offsets = e ->Sizes = NULL;
}
if (!_cmsReadUInt32Number(io, &Count)) return NULL;
SizeOfTag -= sizeof(cmsUInt32Number);
- // Get rec lenghth
+ // Get rec length
if (!_cmsReadUInt32Number(io, &Length)) return NULL;
SizeOfTag -= sizeof(cmsUInt32Number);
if (!ReadOneMLUC(self, io, &a.DisplayValue, i, &DisplayValueMLU)) goto Error;
}
- rc = cmsDictAddEntry(hDict, NameWCS, ValueWCS, DisplayNameMLU, DisplayValueMLU);
+ if (NameWCS == NULL || ValueWCS == NULL) {
+
+ cmsSignalError(self->ContextID, cmsERROR_CORRUPTION_DETECTED, "Bad dictionary Name/Value");
+ rc = FALSE;
+ }
+ else {
+
+ rc = cmsDictAddEntry(hDict, NameWCS, ValueWCS, DisplayNameMLU, DisplayValueMLU);
+ }
if (NameWCS != NULL) _cmsFree(self ->ContextID, NameWCS);
if (ValueWCS != NULL) _cmsFree(self ->ContextID, ValueWCS);
if (DisplayNameMLU != NULL) cmsMLUfree(DisplayNameMLU);
if (DisplayValueMLU != NULL) cmsMLUfree(DisplayValueMLU);
- if (!rc) return FALSE;
+ if (!rc) goto Error;
}
FreeArray(&a);
// This is the list of built-in types
-static _cmsTagTypeLinkedList SupportedTagTypes[] = {
-
-{TYPE_HANDLER(cmsSigChromaticityType, Chromaticity), &SupportedTagTypes[1] },
-{TYPE_HANDLER(cmsSigColorantOrderType, ColorantOrderType), &SupportedTagTypes[2] },
-{TYPE_HANDLER(cmsSigS15Fixed16ArrayType, S15Fixed16), &SupportedTagTypes[3] },
-{TYPE_HANDLER(cmsSigU16Fixed16ArrayType, U16Fixed16), &SupportedTagTypes[4] },
-{TYPE_HANDLER(cmsSigTextType, Text), &SupportedTagTypes[5] },
-{TYPE_HANDLER(cmsSigTextDescriptionType, Text_Description), &SupportedTagTypes[6] },
-{TYPE_HANDLER(cmsSigCurveType, Curve), &SupportedTagTypes[7] },
-{TYPE_HANDLER(cmsSigParametricCurveType, ParametricCurve), &SupportedTagTypes[8] },
-{TYPE_HANDLER(cmsSigDateTimeType, DateTime), &SupportedTagTypes[9] },
-{TYPE_HANDLER(cmsSigLut8Type, LUT8), &SupportedTagTypes[10] },
-{TYPE_HANDLER(cmsSigLut16Type, LUT16), &SupportedTagTypes[11] },
-{TYPE_HANDLER(cmsSigColorantTableType, ColorantTable), &SupportedTagTypes[12] },
-{TYPE_HANDLER(cmsSigNamedColor2Type, NamedColor), &SupportedTagTypes[13] },
-{TYPE_HANDLER(cmsSigMultiLocalizedUnicodeType, MLU), &SupportedTagTypes[14] },
-{TYPE_HANDLER(cmsSigProfileSequenceDescType, ProfileSequenceDesc), &SupportedTagTypes[15] },
-{TYPE_HANDLER(cmsSigSignatureType, Signature), &SupportedTagTypes[16] },
-{TYPE_HANDLER(cmsSigMeasurementType, Measurement), &SupportedTagTypes[17] },
-{TYPE_HANDLER(cmsSigDataType, Data), &SupportedTagTypes[18] },
-{TYPE_HANDLER(cmsSigLutAtoBType, LUTA2B), &SupportedTagTypes[19] },
-{TYPE_HANDLER(cmsSigLutBtoAType, LUTB2A), &SupportedTagTypes[20] },
-{TYPE_HANDLER(cmsSigUcrBgType, UcrBg), &SupportedTagTypes[21] },
-{TYPE_HANDLER(cmsSigCrdInfoType, CrdInfo), &SupportedTagTypes[22] },
-{TYPE_HANDLER(cmsSigMultiProcessElementType, MPE), &SupportedTagTypes[23] },
-{TYPE_HANDLER(cmsSigScreeningType, Screening), &SupportedTagTypes[24] },
-{TYPE_HANDLER(cmsSigViewingConditionsType, ViewingConditions), &SupportedTagTypes[25] },
-{TYPE_HANDLER(cmsSigXYZType, XYZ), &SupportedTagTypes[26] },
-{TYPE_HANDLER(cmsCorbisBrokenXYZtype, XYZ), &SupportedTagTypes[27] },
-{TYPE_HANDLER(cmsMonacoBrokenCurveType, Curve), &SupportedTagTypes[28] },
-{TYPE_HANDLER(cmsSigProfileSequenceIdType, ProfileSequenceId), &SupportedTagTypes[29] },
-{TYPE_HANDLER(cmsSigDictType, Dictionary), &SupportedTagTypes[30] },
+static const _cmsTagTypeLinkedList SupportedTagTypes[] = {
+
+{TYPE_HANDLER(cmsSigChromaticityType, Chromaticity), (_cmsTagTypeLinkedList*) &SupportedTagTypes[1] },
+{TYPE_HANDLER(cmsSigColorantOrderType, ColorantOrderType), (_cmsTagTypeLinkedList*) &SupportedTagTypes[2] },
+{TYPE_HANDLER(cmsSigS15Fixed16ArrayType, S15Fixed16), (_cmsTagTypeLinkedList*) &SupportedTagTypes[3] },
+{TYPE_HANDLER(cmsSigU16Fixed16ArrayType, U16Fixed16), (_cmsTagTypeLinkedList*) &SupportedTagTypes[4] },
+{TYPE_HANDLER(cmsSigTextType, Text), (_cmsTagTypeLinkedList*) &SupportedTagTypes[5] },
+{TYPE_HANDLER(cmsSigTextDescriptionType, Text_Description), (_cmsTagTypeLinkedList*) &SupportedTagTypes[6] },
+{TYPE_HANDLER(cmsSigCurveType, Curve), (_cmsTagTypeLinkedList*) &SupportedTagTypes[7] },
+{TYPE_HANDLER(cmsSigParametricCurveType, ParametricCurve), (_cmsTagTypeLinkedList*) &SupportedTagTypes[8] },
+{TYPE_HANDLER(cmsSigDateTimeType, DateTime), (_cmsTagTypeLinkedList*) &SupportedTagTypes[9] },
+{TYPE_HANDLER(cmsSigLut8Type, LUT8), (_cmsTagTypeLinkedList*) &SupportedTagTypes[10] },
+{TYPE_HANDLER(cmsSigLut16Type, LUT16), (_cmsTagTypeLinkedList*) &SupportedTagTypes[11] },
+{TYPE_HANDLER(cmsSigColorantTableType, ColorantTable), (_cmsTagTypeLinkedList*) &SupportedTagTypes[12] },
+{TYPE_HANDLER(cmsSigNamedColor2Type, NamedColor), (_cmsTagTypeLinkedList*) &SupportedTagTypes[13] },
+{TYPE_HANDLER(cmsSigMultiLocalizedUnicodeType, MLU), (_cmsTagTypeLinkedList*) &SupportedTagTypes[14] },
+{TYPE_HANDLER(cmsSigProfileSequenceDescType, ProfileSequenceDesc),(_cmsTagTypeLinkedList*) &SupportedTagTypes[15] },
+{TYPE_HANDLER(cmsSigSignatureType, Signature), (_cmsTagTypeLinkedList*) &SupportedTagTypes[16] },
+{TYPE_HANDLER(cmsSigMeasurementType, Measurement), (_cmsTagTypeLinkedList*) &SupportedTagTypes[17] },
+{TYPE_HANDLER(cmsSigDataType, Data), (_cmsTagTypeLinkedList*) &SupportedTagTypes[18] },
+{TYPE_HANDLER(cmsSigLutAtoBType, LUTA2B), (_cmsTagTypeLinkedList*) &SupportedTagTypes[19] },
+{TYPE_HANDLER(cmsSigLutBtoAType, LUTB2A), (_cmsTagTypeLinkedList*) &SupportedTagTypes[20] },
+{TYPE_HANDLER(cmsSigUcrBgType, UcrBg), (_cmsTagTypeLinkedList*) &SupportedTagTypes[21] },
+{TYPE_HANDLER(cmsSigCrdInfoType, CrdInfo), (_cmsTagTypeLinkedList*) &SupportedTagTypes[22] },
+{TYPE_HANDLER(cmsSigMultiProcessElementType, MPE), (_cmsTagTypeLinkedList*) &SupportedTagTypes[23] },
+{TYPE_HANDLER(cmsSigScreeningType, Screening), (_cmsTagTypeLinkedList*) &SupportedTagTypes[24] },
+{TYPE_HANDLER(cmsSigViewingConditionsType, ViewingConditions), (_cmsTagTypeLinkedList*) &SupportedTagTypes[25] },
+{TYPE_HANDLER(cmsSigXYZType, XYZ), (_cmsTagTypeLinkedList*) &SupportedTagTypes[26] },
+{TYPE_HANDLER(cmsCorbisBrokenXYZtype, XYZ), (_cmsTagTypeLinkedList*) &SupportedTagTypes[27] },
+{TYPE_HANDLER(cmsMonacoBrokenCurveType, Curve), (_cmsTagTypeLinkedList*) &SupportedTagTypes[28] },
+{TYPE_HANDLER(cmsSigProfileSequenceIdType, ProfileSequenceId), (_cmsTagTypeLinkedList*) &SupportedTagTypes[29] },
+{TYPE_HANDLER(cmsSigDictType, Dictionary), (_cmsTagTypeLinkedList*) &SupportedTagTypes[30] },
{TYPE_HANDLER(cmsSigVcgtType, vcgt), NULL }
};
-#define DEFAULT_TAG_TYPE_COUNT (sizeof(SupportedTagTypes) / sizeof(_cmsTagTypeLinkedList))
+
+_cmsTagTypePluginChunkType _cmsTagTypePluginChunk = { NULL };
+
+
+
+// Duplicates the zone of memory used by the plug-in in the new context
+static
+void DupTagTypeList(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src,
+ int loc)
+{
+ _cmsTagTypePluginChunkType newHead = { NULL };
+ _cmsTagTypeLinkedList* entry;
+ _cmsTagTypeLinkedList* Anterior = NULL;
+ _cmsTagTypePluginChunkType* head = (_cmsTagTypePluginChunkType*) src->chunks[loc];
+
+ // Walk the list copying all nodes
+ for (entry = head->TagTypes;
+ entry != NULL;
+ entry = entry ->Next) {
+
+ _cmsTagTypeLinkedList *newEntry = ( _cmsTagTypeLinkedList *) _cmsSubAllocDup(ctx ->MemPool, entry, sizeof(_cmsTagTypeLinkedList));
+
+ if (newEntry == NULL)
+ return;
+
+ // We want to keep the linked list order, so this is a little bit tricky
+ newEntry -> Next = NULL;
+ if (Anterior)
+ Anterior -> Next = newEntry;
+
+ Anterior = newEntry;
+
+ if (newHead.TagTypes == NULL)
+ newHead.TagTypes = newEntry;
+ }
+
+ ctx ->chunks[loc] = _cmsSubAllocDup(ctx->MemPool, &newHead, sizeof(_cmsTagTypePluginChunkType));
+}
+
+
+void _cmsAllocTagTypePluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ if (src != NULL) {
+
+ // Duplicate the LIST
+ DupTagTypeList(ctx, src, TagTypePlugin);
+ }
+ else {
+ static _cmsTagTypePluginChunkType TagTypePluginChunk = { NULL };
+ ctx ->chunks[TagTypePlugin] = _cmsSubAllocDup(ctx ->MemPool, &TagTypePluginChunk, sizeof(_cmsTagTypePluginChunkType));
+ }
+}
+
+void _cmsAllocMPETypePluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ if (src != NULL) {
+
+ // Duplicate the LIST
+ DupTagTypeList(ctx, src, MPEPlugin);
+ }
+ else {
+ static _cmsTagTypePluginChunkType TagTypePluginChunk = { NULL };
+ ctx ->chunks[MPEPlugin] = _cmsSubAllocDup(ctx ->MemPool, &TagTypePluginChunk, sizeof(_cmsTagTypePluginChunkType));
+ }
+
+}
+
// Both kind of plug-ins share same structure
-cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Data)
+cmsBool _cmsRegisterTagTypePlugin(cmsContext id, cmsPluginBase* Data)
{
- return RegisterTypesPlugin(Data, SupportedTagTypes, DEFAULT_TAG_TYPE_COUNT);
+ return RegisterTypesPlugin(id, Data, TagTypePlugin);
}
-cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Data)
+cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext id, cmsPluginBase* Data)
{
- return RegisterTypesPlugin(Data, SupportedMPEtypes, DEFAULT_MPE_TYPE_COUNT);
+ return RegisterTypesPlugin(id, Data,MPEPlugin);
}
// Wrapper for tag types
-cmsTagTypeHandler* _cmsGetTagTypeHandler(cmsTagTypeSignature sig)
+cmsTagTypeHandler* _cmsGetTagTypeHandler(cmsContext ContextID, cmsTagTypeSignature sig)
{
- return GetHandler(sig, SupportedTagTypes);
+ _cmsTagTypePluginChunkType* ctx = ( _cmsTagTypePluginChunkType*) _cmsContextGetClientChunk(ContextID, TagTypePlugin);
+
+ return GetHandler(sig, ctx->TagTypes, (_cmsTagTypeLinkedList*) SupportedTagTypes);
}
// ********************************************************************************
} _cmsTagLinkedList;
-// This is the list of built-in tags
+// This is the list of built-in tags. The data of this list can be modified by plug-ins
static _cmsTagLinkedList SupportedTags[] = {
{ cmsSigAToB0Tag, { 1, 3, { cmsSigLut16Type, cmsSigLutAtoBType, cmsSigLut8Type}, DecideLUTtypeA2B}, &SupportedTags[1]},
{ cmsSigPreview2Tag, { 1, 3, { cmsSigLut16Type, cmsSigLutBtoAType, cmsSigLut8Type }, DecideLUTtypeB2A}, &SupportedTags[32]},
{ cmsSigProfileDescriptionTag, { 1, 3, { cmsSigTextDescriptionType, cmsSigMultiLocalizedUnicodeType, cmsSigTextType}, DecideTextDescType}, &SupportedTags[33]},
- { cmsSigProfileSequenceDescTag, { 1, 1, { cmsSigProfileSequenceDescType }, NULL}, &SupportedTags[34]},
+ { cmsSigProfileSequenceDescTag, { 1, 1, { cmsSigProfileSequenceDescType }, NULL}, &SupportedTags[34]},
{ cmsSigTechnologyTag, { 1, 1, { cmsSigSignatureType }, NULL}, &SupportedTags[35]},
{ cmsSigColorimetricIntentImageStateTag, { 1, 1, { cmsSigSignatureType }, NULL}, &SupportedTags[36]},
{ cmsSigScreeningTag, { 1, 1, { cmsSigScreeningType}, NULL }, &SupportedTags[59]},
{ cmsSigVcgtTag, { 1, 1, { cmsSigVcgtType}, NULL }, &SupportedTags[60]},
{ cmsSigMetaTag, { 1, 1, { cmsSigDictType}, NULL }, &SupportedTags[61]},
- { cmsSigProfileSequenceIdTag, { 1, 1, { cmsSigProfileSequenceIdType}, NULL}, NULL}
+ { cmsSigProfileSequenceIdTag, { 1, 1, { cmsSigProfileSequenceIdType}, NULL }, &SupportedTags[62]},
+
+ { cmsSigProfileDescriptionMLTag,{ 1, 1, { cmsSigMultiLocalizedUnicodeType}, NULL}, &SupportedTags[63]},
+ { cmsSigArgyllArtsTag, { 9, 1, { cmsSigS15Fixed16ArrayType}, NULL}, NULL}
};
cmsSigDeviceSettingsTag ==> Deprecated, useless
*/
-#define DEFAULT_TAG_COUNT (sizeof(SupportedTags) / sizeof(_cmsTagLinkedList))
-cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Data)
+_cmsTagPluginChunkType _cmsTagPluginChunk = { NULL };
+
+
+// Duplicates the zone of memory used by the plug-in in the new context
+static
+void DupTagList(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
{
- cmsPluginTag* Plugin = (cmsPluginTag*) Data;
- _cmsTagLinkedList *pt, *Anterior;
+ _cmsTagPluginChunkType newHead = { NULL };
+ _cmsTagLinkedList* entry;
+ _cmsTagLinkedList* Anterior = NULL;
+ _cmsTagPluginChunkType* head = (_cmsTagPluginChunkType*) src->chunks[TagPlugin];
+ // Walk the list copying all nodes
+ for (entry = head->Tag;
+ entry != NULL;
+ entry = entry ->Next) {
- if (Data == NULL) {
+ _cmsTagLinkedList *newEntry = ( _cmsTagLinkedList *) _cmsSubAllocDup(ctx ->MemPool, entry, sizeof(_cmsTagLinkedList));
- SupportedTags[DEFAULT_TAG_COUNT-1].Next = NULL;
- return TRUE;
+ if (newEntry == NULL)
+ return;
+
+ // We want to keep the linked list order, so this is a little bit tricky
+ newEntry -> Next = NULL;
+ if (Anterior)
+ Anterior -> Next = newEntry;
+
+ Anterior = newEntry;
+
+ if (newHead.Tag == NULL)
+ newHead.Tag = newEntry;
+ }
+
+ ctx ->chunks[TagPlugin] = _cmsSubAllocDup(ctx->MemPool, &newHead, sizeof(_cmsTagPluginChunkType));
+}
+
+void _cmsAllocTagPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ if (src != NULL) {
+
+ DupTagList(ctx, src);
+ }
+ else {
+ static _cmsTagPluginChunkType TagPluginChunk = { NULL };
+ ctx ->chunks[TagPlugin] = _cmsSubAllocDup(ctx ->MemPool, &TagPluginChunk, sizeof(_cmsTagPluginChunkType));
}
- pt = Anterior = SupportedTags;
- while (pt != NULL) {
+}
- if (Plugin->Signature == pt -> Signature) {
- pt ->Descriptor = Plugin ->Descriptor; // Replace old behaviour
- return TRUE;
- }
+cmsBool _cmsRegisterTagPlugin(cmsContext id, cmsPluginBase* Data)
+{
+ cmsPluginTag* Plugin = (cmsPluginTag*) Data;
+ _cmsTagLinkedList *pt;
+ _cmsTagPluginChunkType* TagPluginChunk = ( _cmsTagPluginChunkType*) _cmsContextGetClientChunk(id, TagPlugin);
+
+ if (Data == NULL) {
- Anterior = pt;
- pt = pt ->Next;
+ TagPluginChunk->Tag = NULL;
+ return TRUE;
}
- pt = (_cmsTagLinkedList*) _cmsPluginMalloc(sizeof(_cmsTagLinkedList));
+ pt = (_cmsTagLinkedList*) _cmsPluginMalloc(id, sizeof(_cmsTagLinkedList));
if (pt == NULL) return FALSE;
pt ->Signature = Plugin ->Signature;
pt ->Descriptor = Plugin ->Descriptor;
- pt ->Next = NULL;
-
- if (Anterior != NULL) Anterior -> Next = pt;
+ pt ->Next = TagPluginChunk ->Tag;
+ TagPluginChunk ->Tag = pt;
+
return TRUE;
}
// Return a descriptor for a given tag or NULL
-cmsTagDescriptor* _cmsGetTagDescriptor(cmsTagSignature sig)
+cmsTagDescriptor* _cmsGetTagDescriptor(cmsContext ContextID, cmsTagSignature sig)
{
_cmsTagLinkedList* pt;
+ _cmsTagPluginChunkType* TagPluginChunk = ( _cmsTagPluginChunkType*) _cmsContextGetClientChunk(ContextID, TagPlugin);
+
+ for (pt = TagPluginChunk->Tag;
+ pt != NULL;
+ pt = pt ->Next) {
+
+ if (sig == pt -> Signature) return &pt ->Descriptor;
+ }
for (pt = SupportedTags;
pt != NULL;
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
if (TransferFunction) {
+ // Tries to minimize space. Thanks to Richard Hughes for this nice idea
if (!cmsWriteTag(hICC, cmsSigRedTRCTag, (void*) TransferFunction[0])) goto Error;
- if (!cmsWriteTag(hICC, cmsSigGreenTRCTag, (void*) TransferFunction[1])) goto Error;
- if (!cmsWriteTag(hICC, cmsSigBlueTRCTag, (void*) TransferFunction[2])) goto Error;
+
+ if (TransferFunction[1] == TransferFunction[0]) {
+
+ if (!cmsLinkTag (hICC, cmsSigGreenTRCTag, cmsSigRedTRCTag)) goto Error;
+
+ } else {
+
+ if (!cmsWriteTag(hICC, cmsSigGreenTRCTag, (void*) TransferFunction[1])) goto Error;
+ }
+
+ if (TransferFunction[2] == TransferFunction[0]) {
+
+ if (!cmsLinkTag (hICC, cmsSigBlueTRCTag, cmsSigRedTRCTag)) goto Error;
+
+ } else {
+
+ if (!cmsWriteTag(hICC, cmsSigBlueTRCTag, (void*) TransferFunction[2])) goto Error;
+ }
}
if (Primaries) {
{
cmsHPROFILE hICC;
cmsPipeline* Pipeline;
- cmsStage* Lin;
- int nChannels;
+ cmsUInt32Number nChannels;
hICC = cmsCreateProfilePlaceholder(ContextID);
if (!hICC)
// Copy tables to Pipeline
- Lin = cmsStageAllocToneCurves(ContextID, nChannels, TransferFunctions);
- if (Lin == NULL) goto Error;
-
- cmsPipelineInsertStage(Pipeline, cmsAT_BEGIN, Lin);
+ if (!cmsPipelineInsertStage(Pipeline, cmsAT_BEGIN, cmsStageAllocToneCurves(ContextID, nChannels, TransferFunctions)))
+ goto Error;
// Create tags
if (!SetTextTags(hICC, L"Linearization built-in")) goto Error;
return hICC;
Error:
+ cmsPipelineFree(Pipeline);
if (hICC)
cmsCloseProfile(hICC);
// K: Does not change
static
-int InkLimitingSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+int InkLimitingSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)
{
cmsFloat64Number InkLimit = *(cmsFloat64Number *) Cargo;
cmsFloat64Number SumCMY, SumCMYK, Ratio;
cmsHPROFILE hICC;
cmsPipeline* LUT;
cmsStage* CLUT;
- int nChannels;
+ cmsUInt32Number nChannels;
if (ColorSpace != cmsSigCmykData) {
cmsSignalError(ContextID, cmsERROR_COLORSPACE_CHECK, "InkLimiting: Only CMYK currently supported");
if (!cmsStageSampleCLut16bit(CLUT, InkLimitingSampler, (void*) &Limit, 0)) goto Error;
- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, nChannels));
- cmsPipelineInsertStage(LUT, cmsAT_END, CLUT);
- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, nChannels));
+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, nChannels)) ||
+ !cmsPipelineInsertStage(LUT, cmsAT_END, CLUT) ||
+ !cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, nChannels)))
+ goto Error;
// Create tags
if (!SetTextTags(hICC, L"ink-limiting built-in")) goto Error;
LUT = cmsPipelineAlloc(ContextID, 3, 3);
if (LUT == NULL) goto Error;
- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCLut(ContextID, 3));
+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCLut(ContextID, 3)))
+ goto Error;
if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error;
cmsPipelineFree(LUT);
LUT = cmsPipelineAlloc(ContextID, 3, 3);
if (LUT == NULL) goto Error;
- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3));
+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3)))
+ goto Error;
if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error;
cmsPipelineFree(LUT);
LUT = cmsPipelineAlloc(ContextID, 3, 3);
if (LUT == NULL) goto Error;
- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3));
+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, 3)))
+ goto Error;
if (!cmsWriteTag(hProfile, cmsSigAToB0Tag, LUT)) goto Error;
cmsPipelineFree(LUT);
//sRGB Curves are defined by:
//
-//If R\92sRGB,G\92sRGB, B\92sRGB < 0.04045
+//If R'sRGB,G'sRGB, B'sRGB < 0.04045
//
-// R = R\92sRGB / 12.92
-// G = G\92sRGB / 12.92
-// B = B\92sRGB / 12.92
+// R = R'sRGB / 12.92
+// G = G'sRGB / 12.92
+// B = B'sRGB / 12.92
//
//
-//else if R\92sRGB,G\92sRGB, B\92sRGB >= 0.04045
+//else if R'sRGB,G'sRGB, B'sRGB >= 0.04045
//
-// R = ((R\92sRGB + 0.055) / 1.055)^2.4
-// G = ((G\92sRGB + 0.055) / 1.055)^2.4
-// B = ((B\92sRGB + 0.055) / 1.055)^2.4
+// R = ((R'sRGB + 0.055) / 1.055)^2.4
+// G = ((G'sRGB + 0.055) / 1.055)^2.4
+// B = ((B'sRGB + 0.055) / 1.055)^2.4
static
cmsToneCurve* Build_sRGBGamma(cmsContext ContextID)
// Create the ICC virtual profile for sRGB space
cmsHPROFILE CMSEXPORT cmsCreate_sRGBProfileTHR(cmsContext ContextID)
{
- cmsCIExyY D65;
+ cmsCIExyY D65 = { 0.3127, 0.3290, 1.0 };
cmsCIExyYTRIPLE Rec709Primaries = {
{0.6400, 0.3300, 1.0},
{0.3000, 0.6000, 1.0},
cmsToneCurve* Gamma22[3];
cmsHPROFILE hsRGB;
- cmsWhitePointFromTemp(&D65, 6504);
+ // cmsWhitePointFromTemp(&D65, 6504);
Gamma22[0] = Gamma22[1] = Gamma22[2] = Build_sRGBGamma(ContextID);
if (Gamma22[0] == NULL) return NULL;
cmsFloat64Number Contrast;
cmsFloat64Number Hue;
cmsFloat64Number Saturation;
+ cmsBool lAdjustWP;
cmsCIEXYZ WPsrc, WPdest;
} BCHSWADJUSTS, *LPBCHSWADJUSTS;
static
-int bchswSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+int bchswSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)
{
cmsCIELab LabIn, LabOut;
cmsCIELCh LChIn, LChOut;
cmsLCh2Lab(&LabOut, &LChOut);
// Move white point in Lab
-
- cmsLab2XYZ(&bchsw ->WPsrc, &XYZ, &LabOut);
- cmsXYZ2Lab(&bchsw ->WPdest, &LabOut, &XYZ);
+ if (bchsw->lAdjustWP) {
+ cmsLab2XYZ(&bchsw->WPsrc, &XYZ, &LabOut);
+ cmsXYZ2Lab(&bchsw->WPdest, &LabOut, &XYZ);
+ }
// Back to encoded
// contrast, Saturation and white point displacement
cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfileTHR(cmsContext ContextID,
- int nLUTPoints,
- cmsFloat64Number Bright,
- cmsFloat64Number Contrast,
- cmsFloat64Number Hue,
- cmsFloat64Number Saturation,
- int TempSrc,
- int TempDest)
+ cmsUInt32Number nLUTPoints,
+ cmsFloat64Number Bright,
+ cmsFloat64Number Contrast,
+ cmsFloat64Number Hue,
+ cmsFloat64Number Saturation,
+ cmsUInt32Number TempSrc,
+ cmsUInt32Number TempDest)
{
- cmsHPROFILE hICC;
- cmsPipeline* Pipeline;
- BCHSWADJUSTS bchsw;
- cmsCIExyY WhitePnt;
- cmsStage* CLUT;
- cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS];
- int i;
-
-
- bchsw.Brightness = Bright;
- bchsw.Contrast = Contrast;
- bchsw.Hue = Hue;
- bchsw.Saturation = Saturation;
-
- cmsWhitePointFromTemp(&WhitePnt, TempSrc );
- cmsxyY2XYZ(&bchsw.WPsrc, &WhitePnt);
-
- cmsWhitePointFromTemp(&WhitePnt, TempDest);
- cmsxyY2XYZ(&bchsw.WPdest, &WhitePnt);
+ cmsHPROFILE hICC;
+ cmsPipeline* Pipeline;
+ BCHSWADJUSTS bchsw;
+ cmsCIExyY WhitePnt;
+ cmsStage* CLUT;
+ cmsUInt32Number Dimensions[MAX_INPUT_DIMENSIONS];
+ cmsUInt32Number i;
- hICC = cmsCreateProfilePlaceholder(ContextID);
- if (!hICC) // can't allocate
- return NULL;
+ bchsw.Brightness = Bright;
+ bchsw.Contrast = Contrast;
+ bchsw.Hue = Hue;
+ bchsw.Saturation = Saturation;
+ if (TempSrc == TempDest) {
+ bchsw.lAdjustWP = FALSE;
+ }
+ else {
+ bchsw.lAdjustWP = TRUE;
+ cmsWhitePointFromTemp(&WhitePnt, TempSrc);
+ cmsxyY2XYZ(&bchsw.WPsrc, &WhitePnt);
+ cmsWhitePointFromTemp(&WhitePnt, TempDest);
+ cmsxyY2XYZ(&bchsw.WPdest, &WhitePnt);
+
+ }
- cmsSetDeviceClass(hICC, cmsSigAbstractClass);
- cmsSetColorSpace(hICC, cmsSigLabData);
- cmsSetPCS(hICC, cmsSigLabData);
+ hICC = cmsCreateProfilePlaceholder(ContextID);
+ if (!hICC) // can't allocate
+ return NULL;
- cmsSetHeaderRenderingIntent(hICC, INTENT_PERCEPTUAL);
+ cmsSetDeviceClass(hICC, cmsSigAbstractClass);
+ cmsSetColorSpace(hICC, cmsSigLabData);
+ cmsSetPCS(hICC, cmsSigLabData);
+ cmsSetHeaderRenderingIntent(hICC, INTENT_PERCEPTUAL);
- // Creates a Pipeline with 3D grid only
- Pipeline = cmsPipelineAlloc(ContextID, 3, 3);
- if (Pipeline == NULL) {
- cmsCloseProfile(hICC);
- return NULL;
- }
+ // Creates a Pipeline with 3D grid only
+ Pipeline = cmsPipelineAlloc(ContextID, 3, 3);
+ if (Pipeline == NULL) {
+ cmsCloseProfile(hICC);
+ return NULL;
+ }
- for (i=0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = nLUTPoints;
- CLUT = cmsStageAllocCLut16bitGranular(ContextID, Dimensions, 3, 3, NULL);
- if (CLUT == NULL) return NULL;
+ for (i=0; i < MAX_INPUT_DIMENSIONS; i++) Dimensions[i] = nLUTPoints;
+ CLUT = cmsStageAllocCLut16bitGranular(ContextID, Dimensions, 3, 3, NULL);
+ if (CLUT == NULL) goto Error;
- if (!cmsStageSampleCLut16bit(CLUT, bchswSampler, (void*) &bchsw, 0)) {
+ if (!cmsStageSampleCLut16bit(CLUT, bchswSampler, (void*) &bchsw, 0)) {
- // Shouldn't reach here
- cmsPipelineFree(Pipeline);
- cmsCloseProfile(hICC);
- return NULL;
- }
+ // Shouldn't reach here
+ goto Error;
+ }
- cmsPipelineInsertStage(Pipeline, cmsAT_END, CLUT);
+ if (!cmsPipelineInsertStage(Pipeline, cmsAT_END, CLUT)) {
+ goto Error;
+ }
- // Create tags
+ // Create tags
+ if (!SetTextTags(hICC, L"BCHS built-in")) return NULL;
- if (!SetTextTags(hICC, L"BCHS built-in")) return NULL;
+ cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void*) cmsD50_XYZ());
- cmsWriteTag(hICC, cmsSigMediaWhitePointTag, (void*) cmsD50_XYZ());
+ cmsWriteTag(hICC, cmsSigAToB0Tag, (void*) Pipeline);
- cmsWriteTag(hICC, cmsSigAToB0Tag, (void*) Pipeline);
+ // Pipeline is already on virtual profile
+ cmsPipelineFree(Pipeline);
- // Pipeline is already on virtual profile
- cmsPipelineFree(Pipeline);
+ // Ok, done
+ return hICC;
- // Ok, done
- return hICC;
+Error:
+ cmsPipelineFree(Pipeline);
+ cmsCloseProfile(hICC);
+ return NULL;
}
-CMSAPI cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfile(int nLUTPoints,
+CMSAPI cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfile(cmsUInt32Number nLUTPoints,
cmsFloat64Number Bright,
cmsFloat64Number Contrast,
cmsFloat64Number Hue,
cmsFloat64Number Saturation,
- int TempSrc,
- int TempDest)
+ cmsUInt32Number TempSrc,
+ cmsUInt32Number TempDest)
{
return cmsCreateBCHSWabstractProfileTHR(NULL, nLUTPoints, Bright, Contrast, Hue, Saturation, TempSrc, TempDest);
}
cmsHPROFILE hProfile;
cmsPipeline* LUT = NULL;
cmsStage* PostLin;
- cmsToneCurve* EmptyTab;
+ cmsStage* OutLin;
+ cmsToneCurve* EmptyTab[3];
cmsUInt16Number Zero[2] = { 0, 0 };
+ const cmsFloat64Number PickLstarMatrix[] = { 1, 0, 0 };
hProfile = cmsCreateProfilePlaceholder(ContextID);
if (!hProfile) // can't allocate
if (!SetTextTags(hProfile, L"NULL profile built-in")) goto Error;
-
cmsSetDeviceClass(hProfile, cmsSigOutputClass);
cmsSetColorSpace(hProfile, cmsSigGrayData);
cmsSetPCS(hProfile, cmsSigLabData);
- // An empty LUTs is all we need
- LUT = cmsPipelineAlloc(ContextID, 1, 1);
+ // Create a valid ICC 4 structure
+ LUT = cmsPipelineAlloc(ContextID, 3, 1);
if (LUT == NULL) goto Error;
+
+ EmptyTab[0] = EmptyTab[1] = EmptyTab[2] = cmsBuildTabulatedToneCurve16(ContextID, 2, Zero);
+ PostLin = cmsStageAllocToneCurves(ContextID, 3, EmptyTab);
+ OutLin = cmsStageAllocToneCurves(ContextID, 1, EmptyTab);
+ cmsFreeToneCurve(EmptyTab[0]);
- EmptyTab = cmsBuildTabulatedToneCurve16(ContextID, 2, Zero);
- PostLin = cmsStageAllocToneCurves(ContextID, 1, &EmptyTab);
- cmsFreeToneCurve(EmptyTab);
+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, PostLin))
+ goto Error;
- cmsPipelineInsertStage(LUT, cmsAT_END, PostLin);
+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, cmsStageAllocMatrix(ContextID, 1, 3, PickLstarMatrix, NULL)))
+ goto Error;
+
+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, OutLin))
+ goto Error;
if (!cmsWriteTag(hProfile, cmsSigBToA0Tag, (void*) LUT)) goto Error;
if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, cmsD50_XYZ())) goto Error;
{
_cmsTRANSFORM* v = (_cmsTRANSFORM*) xform;
cmsHPROFILE hICC = NULL;
- int i, nColors;
+ cmsUInt32Number i, nColors;
cmsNAMEDCOLORLIST *nc2 = NULL, *Original = NULL;
// Create an empty placeholder
} cmsAllowedLUT;
+#define cmsSig0 ((cmsTagSignature) 0)
+
static const cmsAllowedLUT AllowedLUTTypes[] = {
- { FALSE, 0, cmsSigLut16Type, 4, { cmsSigMatrixElemType, cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType}},
- { FALSE, 0, cmsSigLut16Type, 3, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType}},
- { TRUE , 0, cmsSigLutAtoBType, 1, { cmsSigCurveSetElemType }},
+ { FALSE, cmsSig0, cmsSigLut16Type, 4, { cmsSigMatrixElemType, cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType } },
+ { FALSE, cmsSig0, cmsSigLut16Type, 3, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType } },
+ { FALSE, cmsSig0, cmsSigLut16Type, 2, { cmsSigCurveSetElemType, cmsSigCLutElemType } },
+ { TRUE, cmsSig0, cmsSigLutAtoBType, 1, { cmsSigCurveSetElemType } },
{ TRUE , cmsSigAToB0Tag, cmsSigLutAtoBType, 3, { cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType } },
{ TRUE , cmsSigAToB0Tag, cmsSigLutAtoBType, 3, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType } },
{ TRUE , cmsSigAToB0Tag, cmsSigLutAtoBType, 5, { cmsSigCurveSetElemType, cmsSigCLutElemType, cmsSigCurveSetElemType, cmsSigMatrixElemType, cmsSigCurveSetElemType }},
{
cmsHPROFILE hProfile = NULL;
cmsUInt32Number FrmIn, FrmOut, ChansIn, ChansOut;
- cmsUInt32Number ColorSpaceBitsIn, ColorSpaceBitsOut;
+ int ColorSpaceBitsIn, ColorSpaceBitsOut;
_cmsTRANSFORM* xform = (_cmsTRANSFORM*) hTransform;
cmsPipeline* LUT = NULL;
cmsStage* mpe;
cmsContext ContextID = cmsGetTransformContextID(hTransform);
const cmsAllowedLUT* AllowedLUT;
cmsTagSignature DestinationTag;
+ cmsProfileClassSignature deviceClass;
_cmsAssert(hTransform != NULL);
// Time to fix the Lab2/Lab4 issue.
if ((xform ->EntryColorSpace == cmsSigLabData) && (Version < 4.0)) {
- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID));
+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocLabV2ToV4curves(ContextID)))
+ goto Error;
}
- // On the output side too
+ // On the output side too. Note that due to V2/V4 PCS encoding on lab we cannot fix white misalignments
if ((xform ->ExitColorSpace) == cmsSigLabData && (Version < 4.0)) {
- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID));
+ dwFlags |= cmsFLAGS_NOWHITEONWHITEFIXUP;
+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocLabV4ToV2(ContextID)))
+ goto Error;
}
FrmIn = COLORSPACE_SH(ColorSpaceBitsIn) | CHANNELS_SH(ChansIn)|BYTES_SH(2);
FrmOut = COLORSPACE_SH(ColorSpaceBitsOut) | CHANNELS_SH(ChansOut)|BYTES_SH(2);
+ deviceClass = cmsGetDeviceClass(hProfile);
- if (cmsGetDeviceClass(hProfile) == cmsSigOutputClass)
+ if (deviceClass == cmsSigOutputClass)
DestinationTag = cmsSigBToA0Tag;
else
DestinationTag = cmsSigAToB0Tag;
if (AllowedLUT == NULL) {
// Try to optimize
- _cmsOptimizePipeline(&LUT, xform ->RenderingIntent, &FrmIn, &FrmOut, &dwFlags);
+ _cmsOptimizePipeline(ContextID, &LUT, xform ->RenderingIntent, &FrmIn, &FrmOut, &dwFlags);
AllowedLUT = FindCombination(LUT, Version >= 4.0, DestinationTag);
}
// If no way, then force CLUT that for sure can be written
if (AllowedLUT == NULL) {
+ cmsStage* FirstStage;
+ cmsStage* LastStage;
+
dwFlags |= cmsFLAGS_FORCE_CLUT;
- _cmsOptimizePipeline(&LUT, xform ->RenderingIntent, &FrmIn, &FrmOut, &dwFlags);
+ _cmsOptimizePipeline(ContextID, &LUT, xform ->RenderingIntent, &FrmIn, &FrmOut, &dwFlags);
// Put identity curves if needed
- if (cmsPipelineGetPtrToFirstStage(LUT) ->Type != cmsSigCurveSetElemType)
- cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn));
+ FirstStage = cmsPipelineGetPtrToFirstStage(LUT);
+ if (FirstStage != NULL && FirstStage ->Type != cmsSigCurveSetElemType)
+ if (!cmsPipelineInsertStage(LUT, cmsAT_BEGIN, _cmsStageAllocIdentityCurves(ContextID, ChansIn)))
+ goto Error;
- if (cmsPipelineGetPtrToLastStage(LUT) ->Type != cmsSigCurveSetElemType)
- cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut));
+ LastStage = cmsPipelineGetPtrToLastStage(LUT);
+ if (LastStage != NULL && LastStage ->Type != cmsSigCurveSetElemType)
+ if (!cmsPipelineInsertStage(LUT, cmsAT_END, _cmsStageAllocIdentityCurves(ContextID, ChansOut)))
+ goto Error;
AllowedLUT = FindCombination(LUT, Version >= 4.0, DestinationTag);
}
if (!cmsWriteTag(hProfile, cmsSigColorantTableOutTag, xform->OutputColorant)) goto Error;
}
- if (xform ->Sequence != NULL) {
+ if ((deviceClass == cmsSigLinkClass) && (xform ->Sequence != NULL)) {
if (!_cmsWriteProfileSequence(hProfile, xform ->Sequence)) goto Error;
}
+ // Set the white point
+ if (deviceClass == cmsSigInputClass) {
+ if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->EntryWhitePoint)) goto Error;
+ }
+ else {
+ if (!cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, &xform ->ExitWhitePoint)) goto Error;
+ }
+
+
+ // Per 7.2.15 in spec 4.3
+ cmsSetHeaderRenderingIntent(hProfile, xform ->RenderingIntent);
+
cmsPipelineFree(LUT);
return hProfile;
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// Obtains WhitePoint from Temperature
cmsBool CMSEXPORT cmsWhitePointFromTemp(cmsCIExyY* WhitePoint, cmsFloat64Number TempK)
{
- cmsFloat64Number x, y;
- cmsFloat64Number T, T2, T3;
- // cmsFloat64Number M1, M2;
+ cmsFloat64Number x, y;
+ cmsFloat64Number T, T2, T3;
+ // cmsFloat64Number M1, M2;
- _cmsAssert(WhitePoint != NULL);
+ _cmsAssert(WhitePoint != NULL);
- T = TempK;
- T2 = T*T; // Square
- T3 = T2*T; // Cube
+ T = TempK;
+ T2 = T*T; // Square
+ T3 = T2*T; // Cube
- // For correlated color temperature (T) between 4000K and 7000K:
+ // For correlated color temperature (T) between 4000K and 7000K:
- if (T >= 4000. && T <= 7000.)
- {
- x = -4.6070*(1E9/T3) + 2.9678*(1E6/T2) + 0.09911*(1E3/T) + 0.244063;
- }
- else
- // or for correlated color temperature (T) between 7000K and 25000K:
+ if (T >= 4000. && T <= 7000.)
+ {
+ x = -4.6070*(1E9/T3) + 2.9678*(1E6/T2) + 0.09911*(1E3/T) + 0.244063;
+ }
+ else
+ // or for correlated color temperature (T) between 7000K and 25000K:
- if (T > 7000.0 && T <= 25000.0)
- {
- x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T) + 0.237040;
- }
- else {
- cmsSignalError(0, cmsERROR_RANGE, "cmsWhitePointFromTemp: invalid temp");
- return FALSE;
- }
+ if (T > 7000.0 && T <= 25000.0)
+ {
+ x = -2.0064*(1E9/T3) + 1.9018*(1E6/T2) + 0.24748*(1E3/T) + 0.237040;
+ }
+ else {
+ cmsSignalError(0, cmsERROR_RANGE, "cmsWhitePointFromTemp: invalid temp");
+ return FALSE;
+ }
- // Obtain y(x)
+ // Obtain y(x)
+ y = -3.000*(x*x) + 2.870*x - 0.275;
- y = -3.000*(x*x) + 2.870*x - 0.275;
+ // wave factors (not used, but here for futures extensions)
- // wave factors (not used, but here for futures extensions)
+ // M1 = (-1.3515 - 1.7703*x + 5.9114 *y)/(0.0241 + 0.2562*x - 0.7341*y);
+ // M2 = (0.0300 - 31.4424*x + 30.0717*y)/(0.0241 + 0.2562*x - 0.7341*y);
- // M1 = (-1.3515 - 1.7703*x + 5.9114 *y)/(0.0241 + 0.2562*x - 0.7341*y);
- // M2 = (0.0300 - 31.4424*x + 30.0717*y)/(0.0241 + 0.2562*x - 0.7341*y);
+ WhitePoint -> x = x;
+ WhitePoint -> y = y;
+ WhitePoint -> Y = 1.0;
- WhitePoint -> x = x;
- WhitePoint -> y = y;
- WhitePoint -> Y = 1.0;
-
- return TRUE;
+ return TRUE;
}
} ISOTEMPERATURE;
-static ISOTEMPERATURE isotempdata[] = {
+static const ISOTEMPERATURE isotempdata[] = {
// {Mirek, Ut, Vt, Tt }
{0, 0.18006, 0.26352, -0.24341},
{10, 0.18066, 0.26589, -0.25479},
// Robertson's method
cmsBool CMSEXPORT cmsTempFromWhitePoint(cmsFloat64Number* TempK, const cmsCIExyY* WhitePoint)
{
- cmsUInt32Number j;
- cmsFloat64Number us,vs;
- cmsFloat64Number uj,vj,tj,di,dj,mi,mj;
- cmsFloat64Number xs, ys;
+ cmsUInt32Number j;
+ cmsFloat64Number us,vs;
+ cmsFloat64Number uj,vj,tj,di,dj,mi,mj;
+ cmsFloat64Number xs, ys;
- _cmsAssert(WhitePoint != NULL);
+ _cmsAssert(WhitePoint != NULL);
_cmsAssert(TempK != NULL);
- di = mi = 0;
- xs = WhitePoint -> x;
- ys = WhitePoint -> y;
+ di = mi = 0;
+ xs = WhitePoint -> x;
+ ys = WhitePoint -> y;
- // convert (x,y) to CIE 1960 (u,WhitePoint)
+ // convert (x,y) to CIE 1960 (u,WhitePoint)
- us = (2*xs) / (-xs + 6*ys + 1.5);
- vs = (3*ys) / (-xs + 6*ys + 1.5);
+ us = (2*xs) / (-xs + 6*ys + 1.5);
+ vs = (3*ys) / (-xs + 6*ys + 1.5);
- for (j=0; j < NISO; j++) {
+ for (j=0; j < NISO; j++) {
- uj = isotempdata[j].ut;
- vj = isotempdata[j].vt;
- tj = isotempdata[j].tt;
- mj = isotempdata[j].mirek;
+ uj = isotempdata[j].ut;
+ vj = isotempdata[j].vt;
+ tj = isotempdata[j].tt;
+ mj = isotempdata[j].mirek;
- dj = ((vs - vj) - tj * (us - uj)) / sqrt(1.0 + tj * tj);
+ dj = ((vs - vj) - tj * (us - uj)) / sqrt(1.0 + tj * tj);
- if ((j != 0) && (di/dj < 0.0)) {
+ if ((j != 0) && (di/dj < 0.0)) {
- // Found a match
- *TempK = 1000000.0 / (mi + (di / (di - dj)) * (mj - mi));
- return TRUE;
- }
+ // Found a match
+ *TempK = 1000000.0 / (mi + (di / (di - dj)) * (mj - mi));
+ return TRUE;
+ }
- di = dj;
- mi = mj;
- }
+ di = dj;
+ mi = mj;
+ }
- // Not found
- return FALSE;
+ // Not found
+ return FALSE;
}
_cmsMAT3per(&Tmp, &Cone, Chad);
_cmsMAT3per(Conversion, &Chad_Inv, &Tmp);
- return TRUE;
+ return TRUE;
}
// Returns the final chrmatic adaptation from illuminant FromIll to Illuminant ToIll
// The cone matrix can be specified in ConeMatrix. If NULL, Bradford is assumed
cmsBool _cmsAdaptationMatrix(cmsMAT3* r, const cmsMAT3* ConeMatrix, const cmsCIEXYZ* FromIll, const cmsCIEXYZ* ToIll)
{
- cmsMAT3 LamRigg = {{ // Bradford matrix
- {{ 0.8951, 0.2664, -0.1614 }},
- {{ -0.7502, 1.7135, 0.0367 }},
- {{ 0.0389, -0.0685, 1.0296 }}
- }};
+ cmsMAT3 LamRigg = {{ // Bradford matrix
+ {{ 0.8951, 0.2664, -0.1614 }},
+ {{ -0.7502, 1.7135, 0.0367 }},
+ {{ 0.0389, -0.0685, 1.0296 }}
+ }};
- if (ConeMatrix == NULL)
- ConeMatrix = &LamRigg;
+ if (ConeMatrix == NULL)
+ ConeMatrix = &LamRigg;
- return ComputeChromaticAdaptation(r, FromIll, ToIll, ConeMatrix);
+ return ComputeChromaticAdaptation(r, FromIll, ToIll, ConeMatrix);
}
// Same as anterior, but assuming D50 destination. White point is given in xyY
static
cmsBool _cmsAdaptMatrixToD50(cmsMAT3* r, const cmsCIExyY* SourceWhitePt)
{
- cmsCIEXYZ Dn;
- cmsMAT3 Bradford;
- cmsMAT3 Tmp;
+ cmsCIEXYZ Dn;
+ cmsMAT3 Bradford;
+ cmsMAT3 Tmp;
- cmsxyY2XYZ(&Dn, SourceWhitePt);
+ cmsxyY2XYZ(&Dn, SourceWhitePt);
- if (!_cmsAdaptationMatrix(&Bradford, NULL, &Dn, cmsD50_XYZ())) return FALSE;
+ if (!_cmsAdaptationMatrix(&Bradford, NULL, &Dn, cmsD50_XYZ())) return FALSE;
- Tmp = *r;
- _cmsMAT3per(r, &Bradford, &Tmp);
+ Tmp = *r;
+ _cmsMAT3per(r, &Bradford, &Tmp);
- return TRUE;
+ return TRUE;
}
// Build a White point, primary chromas transfer matrix from RGB to CIE XYZ
// This is just an approximation, I am not handling all the non-linear
// aspects of the RGB to XYZ process, and assumming that the gamma correction
-// has transitive property in the tranformation chain.
+// has transitive property in the transformation chain.
//
// the alghoritm:
//
//
cmsBool _cmsBuildRGB2XYZtransferMatrix(cmsMAT3* r, const cmsCIExyY* WhitePt, const cmsCIExyYTRIPLE* Primrs)
{
- cmsVEC3 WhitePoint, Coef;
- cmsMAT3 Result, Primaries;
- cmsFloat64Number xn, yn;
- cmsFloat64Number xr, yr;
- cmsFloat64Number xg, yg;
- cmsFloat64Number xb, yb;
+ cmsVEC3 WhitePoint, Coef;
+ cmsMAT3 Result, Primaries;
+ cmsFloat64Number xn, yn;
+ cmsFloat64Number xr, yr;
+ cmsFloat64Number xg, yg;
+ cmsFloat64Number xb, yb;
- xn = WhitePt -> x;
- yn = WhitePt -> y;
- xr = Primrs -> Red.x;
- yr = Primrs -> Red.y;
- xg = Primrs -> Green.x;
- yg = Primrs -> Green.y;
- xb = Primrs -> Blue.x;
- yb = Primrs -> Blue.y;
+ xn = WhitePt -> x;
+ yn = WhitePt -> y;
+ xr = Primrs -> Red.x;
+ yr = Primrs -> Red.y;
+ xg = Primrs -> Green.x;
+ yg = Primrs -> Green.y;
+ xb = Primrs -> Blue.x;
+ yb = Primrs -> Blue.y;
- // Build Primaries matrix
- _cmsVEC3init(&Primaries.v[0], xr, xg, xb);
- _cmsVEC3init(&Primaries.v[1], yr, yg, yb);
- _cmsVEC3init(&Primaries.v[2], (1-xr-yr), (1-xg-yg), (1-xb-yb));
+ // Build Primaries matrix
+ _cmsVEC3init(&Primaries.v[0], xr, xg, xb);
+ _cmsVEC3init(&Primaries.v[1], yr, yg, yb);
+ _cmsVEC3init(&Primaries.v[2], (1-xr-yr), (1-xg-yg), (1-xb-yb));
- // Result = Primaries ^ (-1) inverse matrix
- if (!_cmsMAT3inverse(&Primaries, &Result))
- return FALSE;
+ // Result = Primaries ^ (-1) inverse matrix
+ if (!_cmsMAT3inverse(&Primaries, &Result))
+ return FALSE;
- _cmsVEC3init(&WhitePoint, xn/yn, 1.0, (1.0-xn-yn)/yn);
+ _cmsVEC3init(&WhitePoint, xn/yn, 1.0, (1.0-xn-yn)/yn);
- // Across inverse primaries ...
- _cmsMAT3eval(&Coef, &Result, &WhitePoint);
+ // Across inverse primaries ...
+ _cmsMAT3eval(&Coef, &Result, &WhitePoint);
- // Give us the Coefs, then I build transformation matrix
- _cmsVEC3init(&r -> v[0], Coef.n[VX]*xr, Coef.n[VY]*xg, Coef.n[VZ]*xb);
- _cmsVEC3init(&r -> v[1], Coef.n[VX]*yr, Coef.n[VY]*yg, Coef.n[VZ]*yb);
- _cmsVEC3init(&r -> v[2], Coef.n[VX]*(1.0-xr-yr), Coef.n[VY]*(1.0-xg-yg), Coef.n[VZ]*(1.0-xb-yb));
+ // Give us the Coefs, then I build transformation matrix
+ _cmsVEC3init(&r -> v[0], Coef.n[VX]*xr, Coef.n[VY]*xg, Coef.n[VZ]*xb);
+ _cmsVEC3init(&r -> v[1], Coef.n[VX]*yr, Coef.n[VY]*yg, Coef.n[VZ]*yb);
+ _cmsVEC3init(&r -> v[2], Coef.n[VX]*(1.0-xr-yr), Coef.n[VY]*(1.0-xg-yg), Coef.n[VZ]*(1.0-xb-yb));
- return _cmsAdaptMatrixToD50(r, WhitePt);
+ return _cmsAdaptMatrixToD50(r, WhitePt);
}
// Adapts a color to a given illuminant. Original color is expected to have
// a SourceWhitePt white point.
cmsBool CMSEXPORT cmsAdaptToIlluminant(cmsCIEXYZ* Result,
- const cmsCIEXYZ* SourceWhitePt,
- const cmsCIEXYZ* Illuminant,
- const cmsCIEXYZ* Value)
+ const cmsCIEXYZ* SourceWhitePt,
+ const cmsCIEXYZ* Illuminant,
+ const cmsCIEXYZ* Value)
{
- cmsMAT3 Bradford;
- cmsVEC3 In, Out;
+ cmsMAT3 Bradford;
+ cmsVEC3 In, Out;
- _cmsAssert(Result != NULL);
- _cmsAssert(SourceWhitePt != NULL);
- _cmsAssert(Illuminant != NULL);
- _cmsAssert(Value != NULL);
+ _cmsAssert(Result != NULL);
+ _cmsAssert(SourceWhitePt != NULL);
+ _cmsAssert(Illuminant != NULL);
+ _cmsAssert(Value != NULL);
- if (!_cmsAdaptationMatrix(&Bradford, NULL, SourceWhitePt, Illuminant)) return FALSE;
+ if (!_cmsAdaptationMatrix(&Bradford, NULL, SourceWhitePt, Illuminant)) return FALSE;
- _cmsVEC3init(&In, Value -> X, Value -> Y, Value -> Z);
- _cmsMAT3eval(&Out, &Bradford, &In);
+ _cmsVEC3init(&In, Value -> X, Value -> Y, Value -> Z);
+ _cmsMAT3eval(&Out, &Bradford, &In);
- Result -> X = Out.n[0];
- Result -> Y = Out.n[1];
- Result -> Z = Out.n[2];
+ Result -> X = Out.n[0];
+ Result -> Y = Out.n[1];
+ Result -> Z = Out.n[2];
- return TRUE;
+ return TRUE;
}
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// Transformations stuff
// -----------------------------------------------------------------------
-// Alarm codes for 16-bit transformations, because the fixed range of containers there are
-// no values left to mark out of gamut. volatile is C99 per 6.2.5
-static volatile cmsUInt16Number Alarm[cmsMAXCHANNELS] = { 0x7F00, 0x7F00, 0x7F00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-static volatile cmsFloat64Number GlobalAdaptationState = 1;
+#define DEFAULT_OBSERVER_ADAPTATION_STATE 1.0
+
+// The Context0 observer adaptation state.
+_cmsAdaptationStateChunkType _cmsAdaptationStateChunk = { DEFAULT_OBSERVER_ADAPTATION_STATE };
+
+// Init and duplicate observer adaptation state
+void _cmsAllocAdaptationStateChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ static _cmsAdaptationStateChunkType AdaptationStateChunk = { DEFAULT_OBSERVER_ADAPTATION_STATE };
+ void* from;
+
+ if (src != NULL) {
+ from = src ->chunks[AdaptationStateContext];
+ }
+ else {
+ from = &AdaptationStateChunk;
+ }
+
+ ctx ->chunks[AdaptationStateContext] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsAdaptationStateChunkType));
+}
+
+
+// Sets adaptation state for absolute colorimetric intent in the given context. Adaptation state applies on all
+// but cmsCreateExtendedTransformTHR(). Little CMS can handle incomplete adaptation states.
+cmsFloat64Number CMSEXPORT cmsSetAdaptationStateTHR(cmsContext ContextID, cmsFloat64Number d)
+{
+ cmsFloat64Number prev;
+ _cmsAdaptationStateChunkType* ptr = (_cmsAdaptationStateChunkType*) _cmsContextGetClientChunk(ContextID, AdaptationStateContext);
+
+ // Get previous value for return
+ prev = ptr ->AdaptationState;
+
+ // Set the value if d is positive or zero
+ if (d >= 0.0) {
+
+ ptr ->AdaptationState = d;
+ }
+
+ // Always return previous value
+ return prev;
+}
+
// The adaptation state may be defaulted by this function. If you don't like it, use the extended transform routine
cmsFloat64Number CMSEXPORT cmsSetAdaptationState(cmsFloat64Number d)
-{
- cmsFloat64Number OldVal = GlobalAdaptationState;
+{
+ return cmsSetAdaptationStateTHR(NULL, d);
+}
+
+// -----------------------------------------------------------------------
+
+// Alarm codes for 16-bit transformations, because the fixed range of containers there are
+// no values left to mark out of gamut.
+
+#define DEFAULT_ALARM_CODES_VALUE {0x7F00, 0x7F00, 0x7F00, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
- if (d >= 0)
- GlobalAdaptationState = d;
+_cmsAlarmCodesChunkType _cmsAlarmCodesChunk = { DEFAULT_ALARM_CODES_VALUE };
- return OldVal;
+// Sets the codes used to mark out-out-gamut on Proofing transforms for a given context. Values are meant to be
+// encoded in 16 bits.
+void CMSEXPORT cmsSetAlarmCodesTHR(cmsContext ContextID, const cmsUInt16Number AlarmCodesP[cmsMAXCHANNELS])
+{
+ _cmsAlarmCodesChunkType* ContextAlarmCodes = (_cmsAlarmCodesChunkType*) _cmsContextGetClientChunk(ContextID, AlarmCodesContext);
+
+ _cmsAssert(ContextAlarmCodes != NULL); // Can't happen
+
+ memcpy(ContextAlarmCodes->AlarmCodes, AlarmCodesP, sizeof(ContextAlarmCodes->AlarmCodes));
}
-// Alarm codes are always global
-void CMSEXPORT cmsSetAlarmCodes(cmsUInt16Number NewAlarm[cmsMAXCHANNELS])
+// Gets the current codes used to mark out-out-gamut on Proofing transforms for the given context.
+// Values are meant to be encoded in 16 bits.
+void CMSEXPORT cmsGetAlarmCodesTHR(cmsContext ContextID, cmsUInt16Number AlarmCodesP[cmsMAXCHANNELS])
{
- int i;
+ _cmsAlarmCodesChunkType* ContextAlarmCodes = (_cmsAlarmCodesChunkType*) _cmsContextGetClientChunk(ContextID, AlarmCodesContext);
- _cmsAssert(NewAlarm != NULL);
+ _cmsAssert(ContextAlarmCodes != NULL); // Can't happen
- for (i=0; i < cmsMAXCHANNELS; i++)
- Alarm[i] = NewAlarm[i];
+ memcpy(AlarmCodesP, ContextAlarmCodes->AlarmCodes, sizeof(ContextAlarmCodes->AlarmCodes));
}
-// You can get the codes cas well
-void CMSEXPORT cmsGetAlarmCodes(cmsUInt16Number OldAlarm[cmsMAXCHANNELS])
+void CMSEXPORT cmsSetAlarmCodes(const cmsUInt16Number NewAlarm[cmsMAXCHANNELS])
{
- int i;
+ _cmsAssert(NewAlarm != NULL);
+ cmsSetAlarmCodesTHR(NULL, NewAlarm);
+}
+
+void CMSEXPORT cmsGetAlarmCodes(cmsUInt16Number OldAlarm[cmsMAXCHANNELS])
+{
_cmsAssert(OldAlarm != NULL);
+ cmsGetAlarmCodesTHR(NULL, OldAlarm);
+}
+
- for (i=0; i < cmsMAXCHANNELS; i++)
- OldAlarm[i] = Alarm[i];
+// Init and duplicate alarm codes
+void _cmsAllocAlarmCodesChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ static _cmsAlarmCodesChunkType AlarmCodesChunk = { DEFAULT_ALARM_CODES_VALUE };
+ void* from;
+
+ if (src != NULL) {
+ from = src ->chunks[AlarmCodesContext];
+ }
+ else {
+ from = &AlarmCodesChunk;
+ }
+
+ ctx ->chunks[AlarmCodesContext] = _cmsSubAllocDup(ctx ->MemPool, from, sizeof(_cmsAlarmCodesChunkType));
}
+// -----------------------------------------------------------------------
+
// Get rid of transform resources
void CMSEXPORT cmsDeleteTransform(cmsHTRANSFORM hTransform)
{
_cmsFree(p ->ContextID, (void *) p);
}
+
+static
+cmsUInt32Number PixelSize(cmsUInt32Number Format)
+{
+ cmsUInt32Number fmt_bytes = T_BYTES(Format);
+
+ // For double, the T_BYTES field is zero
+ if (fmt_bytes == 0)
+ return sizeof(cmsUInt64Number);
+
+ // Otherwise, it is already correct for all formats
+ return fmt_bytes;
+}
+
+
+
+
// Apply transform.
void CMSEXPORT cmsDoTransform(cmsHTRANSFORM Transform,
const void* InputBuffer,
{
_cmsTRANSFORM* p = (_cmsTRANSFORM*) Transform;
-
- p -> xform(p, InputBuffer, OutputBuffer, Size, Size);
+ cmsStride stride;
+
+ stride.BytesPerLineIn = 0; // Not used
+ stride.BytesPerLineOut = 0;
+ stride.BytesPerPlaneIn = Size * PixelSize(p->InputFormat);
+ stride.BytesPerPlaneOut = Size * PixelSize(p->OutputFormat);
+
+ p -> xform(p, InputBuffer, OutputBuffer, Size, 1, &stride);
}
-// Apply transform.
+// This is a legacy stride for planar
void CMSEXPORT cmsDoTransformStride(cmsHTRANSFORM Transform,
const void* InputBuffer,
void* OutputBuffer,
{
_cmsTRANSFORM* p = (_cmsTRANSFORM*) Transform;
+ cmsStride stride;
- p -> xform(p, InputBuffer, OutputBuffer, Size, Stride);
+ stride.BytesPerLineIn = 0;
+ stride.BytesPerLineOut = 0;
+ stride.BytesPerPlaneIn = Stride;
+ stride.BytesPerPlaneOut = Stride;
+
+ p -> xform(p, InputBuffer, OutputBuffer, Size, 1, &stride);
}
+// This is the "fast" function for plugins
+void CMSEXPORT cmsDoTransformLineStride(cmsHTRANSFORM Transform,
+ const void* InputBuffer,
+ void* OutputBuffer,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ cmsUInt32Number BytesPerLineIn,
+ cmsUInt32Number BytesPerLineOut,
+ cmsUInt32Number BytesPerPlaneIn,
+ cmsUInt32Number BytesPerPlaneOut)
+
+{
+ _cmsTRANSFORM* p = (_cmsTRANSFORM*) Transform;
+ cmsStride stride;
+
+ stride.BytesPerLineIn = BytesPerLineIn;
+ stride.BytesPerLineOut = BytesPerLineOut;
+ stride.BytesPerPlaneIn = BytesPerPlaneIn;
+ stride.BytesPerPlaneOut = BytesPerPlaneOut;
+
+ p->xform(p, InputBuffer, OutputBuffer, PixelsPerLine, LineCount, &stride);
+}
+
+
// Transform routines ----------------------------------------------------------------------------------------------------------
static
void FloatXFORM(_cmsTRANSFORM* p,
const void* in,
- void* out, cmsUInt32Number Size, cmsUInt32Number Stride)
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
{
cmsUInt8Number* accum;
cmsUInt8Number* output;
cmsFloat32Number fIn[cmsMAXCHANNELS], fOut[cmsMAXCHANNELS];
cmsFloat32Number OutOfGamut;
- cmsUInt32Number i, j;
+ cmsUInt32Number i, j, c, strideIn, strideOut;
- accum = (cmsUInt8Number*) in;
- output = (cmsUInt8Number*) out;
+ _cmsHandleExtraChannels(p, in, out, PixelsPerLine, LineCount, Stride);
- for (i=0; i < Size; i++) {
+ strideIn = 0;
+ strideOut = 0;
+ memset(fIn, 0, sizeof(fIn));
+ memset(fOut, 0, sizeof(fOut));
- accum = p -> FromInputFloat(p, fIn, accum, Stride);
+ for (i = 0; i < LineCount; i++) {
- // Any gamut chack to do?
- if (p ->GamutCheck != NULL) {
+ accum = (cmsUInt8Number*)in + strideIn;
+ output = (cmsUInt8Number*)out + strideOut;
- // Evaluate gamut marker.
- cmsPipelineEvalFloat( fIn, &OutOfGamut, p ->GamutCheck);
+ for (j = 0; j < PixelsPerLine; j++) {
- // Is current color out of gamut?
- if (OutOfGamut > 0.0) {
+ accum = p->FromInputFloat(p, fIn, accum, Stride->BytesPerPlaneIn);
- // Certainly, out of gamut
- for (j=0; j < cmsMAXCHANNELS; j++)
- fOut[j] = -1.0;
+ // Any gamut chack to do?
+ if (p->GamutCheck != NULL) {
+ // Evaluate gamut marker.
+ cmsPipelineEvalFloat(fIn, &OutOfGamut, p->GamutCheck);
+
+ // Is current color out of gamut?
+ if (OutOfGamut > 0.0) {
+
+ // Certainly, out of gamut
+ for (c = 0; c < cmsMAXCHANNELS; c++)
+ fOut[c] = -1.0;
+
+ }
+ else {
+ // No, proceed normally
+ cmsPipelineEvalFloat(fIn, fOut, p->Lut);
+ }
}
else {
- // No, proceed normally
- cmsPipelineEvalFloat(fIn, fOut, p -> Lut);
+
+ // No gamut check at all
+ cmsPipelineEvalFloat(fIn, fOut, p->Lut);
}
- }
- else {
- // No gamut check at all
- cmsPipelineEvalFloat(fIn, fOut, p -> Lut);
+
+ output = p->ToOutputFloat(p, fOut, output, Stride->BytesPerPlaneOut);
}
- // Back to asked representation
- output = p -> ToOutputFloat(p, fOut, output, Stride);
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+
+}
+
+
+static
+void NullFloatXFORM(_cmsTRANSFORM* p,
+ const void* in,
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+
+{
+ cmsUInt8Number* accum;
+ cmsUInt8Number* output;
+ cmsFloat32Number fIn[cmsMAXCHANNELS];
+ cmsUInt32Number i, j, strideIn, strideOut;
+
+ _cmsHandleExtraChannels(p, in, out, PixelsPerLine, LineCount, Stride);
+
+ strideIn = 0;
+ strideOut = 0;
+ memset(fIn, 0, sizeof(fIn));
+
+ for (i = 0; i < LineCount; i++) {
+
+ accum = (cmsUInt8Number*) in + strideIn;
+ output = (cmsUInt8Number*) out + strideOut;
+
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ accum = p->FromInputFloat(p, fIn, accum, Stride ->BytesPerPlaneIn);
+ output = p->ToOutputFloat(p, fIn, output, Stride->BytesPerPlaneOut);
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
}
}
// 16 bit precision -----------------------------------------------------------------------------------------------------------
-// Null transformation, only applies formatters. No caché
+// Null transformation, only applies formatters. No cache
static
void NullXFORM(_cmsTRANSFORM* p,
const void* in,
- void* out, cmsUInt32Number Size,
- cmsUInt32Number Stride)
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
{
cmsUInt8Number* accum;
cmsUInt8Number* output;
cmsUInt16Number wIn[cmsMAXCHANNELS];
- cmsUInt32Number i, n;
+ cmsUInt32Number i, j, strideIn, strideOut;
- accum = (cmsUInt8Number*) in;
- output = (cmsUInt8Number*) out;
- n = Size; // Buffer len
+ _cmsHandleExtraChannels(p, in, out, PixelsPerLine, LineCount, Stride);
- for (i=0; i < n; i++) {
+ strideIn = 0;
+ strideOut = 0;
+ memset(wIn, 0, sizeof(wIn));
- accum = p -> FromInput(p, wIn, accum, Stride);
- output = p -> ToOutput(p, wIn, output, Stride);
+ for (i = 0; i < LineCount; i++) {
+
+ accum = (cmsUInt8Number*)in + strideIn;
+ output = (cmsUInt8Number*)out + strideOut;
+
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ accum = p->FromInput(p, wIn, accum, Stride->BytesPerPlaneIn);
+ output = p->ToOutput(p, wIn, output, Stride->BytesPerPlaneOut);
}
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+
}
static
void PrecalculatedXFORM(_cmsTRANSFORM* p,
const void* in,
- void* out, cmsUInt32Number Size, cmsUInt32Number Stride)
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
{
- register cmsUInt8Number* accum;
- register cmsUInt8Number* output;
+ CMSREGISTER cmsUInt8Number* accum;
+ CMSREGISTER cmsUInt8Number* output;
cmsUInt16Number wIn[cmsMAXCHANNELS], wOut[cmsMAXCHANNELS];
- cmsUInt32Number i, n;
+ cmsUInt32Number i, j, strideIn, strideOut;
- accum = (cmsUInt8Number*) in;
- output = (cmsUInt8Number*) out;
- n = Size;
+ _cmsHandleExtraChannels(p, in, out, PixelsPerLine, LineCount, Stride);
- for (i=0; i < n; i++) {
+ strideIn = 0;
+ strideOut = 0;
+ memset(wIn, 0, sizeof(wIn));
+ memset(wOut, 0, sizeof(wOut));
- accum = p -> FromInput(p, wIn, accum, Stride);
- p ->Lut ->Eval16Fn(wIn, wOut, p -> Lut->Data);
- output = p -> ToOutput(p, wOut, output, Stride);
+ for (i = 0; i < LineCount; i++) {
+
+ accum = (cmsUInt8Number*)in + strideIn;
+ output = (cmsUInt8Number*)out + strideOut;
+
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ accum = p->FromInput(p, wIn, accum, Stride->BytesPerPlaneIn);
+ p->Lut->Eval16Fn(wIn, wOut, p->Lut->Data);
+ output = p->ToOutput(p, wOut, output, Stride->BytesPerPlaneOut);
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
}
+
}
-// Auxiliar: Handle precalculated gamut check
+// Auxiliary: Handle precalculated gamut check. The retrieval of context may be alittle bit slow, but this function is not critical.
static
void TransformOnePixelWithGamutCheck(_cmsTRANSFORM* p,
const cmsUInt16Number wIn[],
p ->GamutCheck ->Eval16Fn(wIn, &wOutOfGamut, p ->GamutCheck ->Data);
if (wOutOfGamut >= 1) {
- cmsUInt16Number i;
+ cmsUInt32Number i;
+ _cmsAlarmCodesChunkType* ContextAlarmCodes = (_cmsAlarmCodesChunkType*) _cmsContextGetClientChunk(p->ContextID, AlarmCodesContext);
- for (i=0; i < p ->Lut->OutputChannels; i++)
- wOut[i] = Alarm[i];
+ for (i=0; i < p ->Lut->OutputChannels; i++) {
+
+ wOut[i] = ContextAlarmCodes ->AlarmCodes[i];
+ }
}
else
p ->Lut ->Eval16Fn(wIn, wOut, p -> Lut->Data);
}
-// Gamut check, No caché, 16 bits.
+// Gamut check, No cache, 16 bits.
static
void PrecalculatedXFORMGamutCheck(_cmsTRANSFORM* p,
const void* in,
- void* out, cmsUInt32Number Size, cmsUInt32Number Stride)
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
{
cmsUInt8Number* accum;
cmsUInt8Number* output;
cmsUInt16Number wIn[cmsMAXCHANNELS], wOut[cmsMAXCHANNELS];
- cmsUInt32Number i, n;
+ cmsUInt32Number i, j, strideIn, strideOut;
+
+ _cmsHandleExtraChannels(p, in, out, PixelsPerLine, LineCount, Stride);
+
+ strideIn = 0;
+ strideOut = 0;
+ memset(wIn, 0, sizeof(wIn));
+ memset(wOut, 0, sizeof(wOut));
- accum = (cmsUInt8Number*) in;
- output = (cmsUInt8Number*) out;
- n = Size; // Buffer len
+ for (i = 0; i < LineCount; i++) {
- for (i=0; i < n; i++) {
+ accum = (cmsUInt8Number*)in + strideIn;
+ output = (cmsUInt8Number*)out + strideOut;
- accum = p -> FromInput(p, wIn, accum, Stride);
- TransformOnePixelWithGamutCheck(p, wIn, wOut);
- output = p -> ToOutput(p, wOut, output, Stride);
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ accum = p->FromInput(p, wIn, accum, Stride->BytesPerPlaneIn);
+ TransformOnePixelWithGamutCheck(p, wIn, wOut);
+ output = p->ToOutput(p, wOut, output, Stride->BytesPerPlaneOut);
+ }
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
}
}
-// No gamut check, Caché, 16 bits,
+// No gamut check, Cache, 16 bits,
static
void CachedXFORM(_cmsTRANSFORM* p,
const void* in,
- void* out, cmsUInt32Number Size, cmsUInt32Number Stride)
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
{
cmsUInt8Number* accum;
cmsUInt8Number* output;
cmsUInt16Number wIn[cmsMAXCHANNELS], wOut[cmsMAXCHANNELS];
- cmsUInt32Number i, n;
_cmsCACHE Cache;
+ cmsUInt32Number i, j, strideIn, strideOut;
- accum = (cmsUInt8Number*) in;
- output = (cmsUInt8Number*) out;
- n = Size; // Buffer len
+ _cmsHandleExtraChannels(p, in, out, PixelsPerLine, LineCount, Stride);
// Empty buffers for quick memcmp
- memset(wIn, 0, sizeof(wIn));
+ memset(wIn, 0, sizeof(wIn));
memset(wOut, 0, sizeof(wOut));
// Get copy of zero cache
- memcpy(&Cache, &p ->Cache, sizeof(Cache));
+ memcpy(&Cache, &p->Cache, sizeof(Cache));
- for (i=0; i < n; i++) {
+ strideIn = 0;
+ strideOut = 0;
- accum = p -> FromInput(p, wIn, accum, Stride);
+ for (i = 0; i < LineCount; i++) {
- if (memcmp(wIn, Cache.CacheIn, sizeof(Cache.CacheIn)) == 0) {
+ accum = (cmsUInt8Number*)in + strideIn;
+ output = (cmsUInt8Number*)out + strideOut;
- memcpy(wOut, Cache.CacheOut, sizeof(Cache.CacheOut));
- }
- else {
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ accum = p->FromInput(p, wIn, accum, Stride->BytesPerPlaneIn);
- p ->Lut ->Eval16Fn(wIn, wOut, p -> Lut->Data);
+ if (memcmp(wIn, Cache.CacheIn, sizeof(Cache.CacheIn)) == 0) {
- memcpy(Cache.CacheIn, wIn, sizeof(Cache.CacheIn));
- memcpy(Cache.CacheOut, wOut, sizeof(Cache.CacheOut));
+ memcpy(wOut, Cache.CacheOut, sizeof(Cache.CacheOut));
+ }
+ else {
+ p->Lut->Eval16Fn(wIn, wOut, p->Lut->Data);
+
+ memcpy(Cache.CacheIn, wIn, sizeof(Cache.CacheIn));
+ memcpy(Cache.CacheOut, wOut, sizeof(Cache.CacheOut));
+ }
+
+ output = p->ToOutput(p, wOut, output, Stride->BytesPerPlaneOut);
}
- output = p -> ToOutput(p, wOut, output, Stride);
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
}
-
}
-
// All those nice features together
static
void CachedXFORMGamutCheck(_cmsTRANSFORM* p,
const void* in,
- void* out, cmsUInt32Number Size, cmsUInt32Number Stride)
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
{
- cmsUInt8Number* accum;
- cmsUInt8Number* output;
- cmsUInt16Number wIn[cmsMAXCHANNELS], wOut[cmsMAXCHANNELS];
- cmsUInt32Number i, n;
- _cmsCACHE Cache;
+ cmsUInt8Number* accum;
+ cmsUInt8Number* output;
+ cmsUInt16Number wIn[cmsMAXCHANNELS], wOut[cmsMAXCHANNELS];
+ _cmsCACHE Cache;
+ cmsUInt32Number i, j, strideIn, strideOut;
+
+ _cmsHandleExtraChannels(p, in, out, PixelsPerLine, LineCount, Stride);
- accum = (cmsUInt8Number*) in;
- output = (cmsUInt8Number*) out;
- n = Size; // Buffer len
+ // Empty buffers for quick memcmp
+ memset(wIn, 0, sizeof(wIn));
+ memset(wOut, 0, sizeof(wOut));
+
+ // Get copy of zero cache
+ memcpy(&Cache, &p->Cache, sizeof(Cache));
- // Empty buffers for quick memcmp
- memset(wIn, 0, sizeof(cmsUInt16Number) * cmsMAXCHANNELS);
- memset(wOut, 0, sizeof(cmsUInt16Number) * cmsMAXCHANNELS);
+ strideIn = 0;
+ strideOut = 0;
- // Get copy of zero cache
- memcpy(&Cache, &p ->Cache, sizeof(Cache));
+ for (i = 0; i < LineCount; i++) {
- for (i=0; i < n; i++) {
+ accum = (cmsUInt8Number*)in + strideIn;
+ output = (cmsUInt8Number*)out + strideOut;
- accum = p -> FromInput(p, wIn, accum, Stride);
+ for (j = 0; j < PixelsPerLine; j++) {
+
+ accum = p->FromInput(p, wIn, accum, Stride->BytesPerPlaneIn);
if (memcmp(wIn, Cache.CacheIn, sizeof(Cache.CacheIn)) == 0) {
- memcpy(wOut, Cache.CacheOut, sizeof(Cache.CacheOut));
+
+ memcpy(wOut, Cache.CacheOut, sizeof(Cache.CacheOut));
}
else {
- TransformOnePixelWithGamutCheck(p, wIn, wOut);
- memcpy(Cache.CacheIn, wIn, sizeof(Cache.CacheIn));
- memcpy(Cache.CacheOut, wOut, sizeof(Cache.CacheOut));
+ TransformOnePixelWithGamutCheck(p, wIn, wOut);
+
+ memcpy(Cache.CacheIn, wIn, sizeof(Cache.CacheIn));
+ memcpy(Cache.CacheOut, wOut, sizeof(Cache.CacheOut));
}
- output = p -> ToOutput(p, wOut, output, Stride);
- }
+ output = p->ToOutput(p, wOut, output, Stride->BytesPerPlaneOut);
+ }
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
}
-// -------------------------------------------------------------------------------------------------------------
+// Transform plug-ins ----------------------------------------------------------------------------------------------------
// List of used-defined transform factories
typedef struct _cmsTransformCollection_st {
- _cmsTransformFactory Factory;
+ _cmsTransform2Factory Factory;
+ cmsBool OldXform; // Factory returns xform function in the old style
+
struct _cmsTransformCollection_st *Next;
} _cmsTransformCollection;
// The linked list head
-static _cmsTransformCollection* TransformCollection = NULL;
+_cmsTransformPluginChunkType _cmsTransformPluginChunk = { NULL };
+
+
+// Duplicates the zone of memory used by the plug-in in the new context
+static
+void DupPluginTransformList(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ _cmsTransformPluginChunkType newHead = { NULL };
+ _cmsTransformCollection* entry;
+ _cmsTransformCollection* Anterior = NULL;
+ _cmsTransformPluginChunkType* head = (_cmsTransformPluginChunkType*) src->chunks[TransformPlugin];
+
+ // Walk the list copying all nodes
+ for (entry = head->TransformCollection;
+ entry != NULL;
+ entry = entry ->Next) {
+
+ _cmsTransformCollection *newEntry = ( _cmsTransformCollection *) _cmsSubAllocDup(ctx ->MemPool, entry, sizeof(_cmsTransformCollection));
+
+ if (newEntry == NULL)
+ return;
+
+ // We want to keep the linked list order, so this is a little bit tricky
+ newEntry -> Next = NULL;
+ if (Anterior)
+ Anterior -> Next = newEntry;
+
+ Anterior = newEntry;
+
+ if (newHead.TransformCollection == NULL)
+ newHead.TransformCollection = newEntry;
+ }
+
+ ctx ->chunks[TransformPlugin] = _cmsSubAllocDup(ctx->MemPool, &newHead, sizeof(_cmsTransformPluginChunkType));
+}
+
+// Allocates memory for transform plugin factory
+void _cmsAllocTransformPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src)
+{
+ if (src != NULL) {
+
+ // Copy all linked list
+ DupPluginTransformList(ctx, src);
+ }
+ else {
+ static _cmsTransformPluginChunkType TransformPluginChunkType = { NULL };
+ ctx ->chunks[TransformPlugin] = _cmsSubAllocDup(ctx ->MemPool, &TransformPluginChunkType, sizeof(_cmsTransformPluginChunkType));
+ }
+}
+
+// Adaptor for old versions of plug-in
+static
+void _cmsTransform2toTransformAdaptor(struct _cmstransform_struct *CMMcargo,
+ const void* InputBuffer,
+ void* OutputBuffer,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride)
+{
+
+ cmsUInt32Number i, strideIn, strideOut;
+
+ _cmsHandleExtraChannels(CMMcargo, InputBuffer, OutputBuffer, PixelsPerLine, LineCount, Stride);
+
+ strideIn = 0;
+ strideOut = 0;
+
+ for (i = 0; i < LineCount; i++) {
+
+ void *accum = (cmsUInt8Number*)InputBuffer + strideIn;
+ void *output = (cmsUInt8Number*)OutputBuffer + strideOut;
+
+ CMMcargo->OldXform(CMMcargo, accum, output, PixelsPerLine, Stride->BytesPerPlaneIn);
+
+ strideIn += Stride->BytesPerLineIn;
+ strideOut += Stride->BytesPerLineOut;
+ }
+}
+
+
// Register new ways to transform
-cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Data)
+cmsBool _cmsRegisterTransformPlugin(cmsContext ContextID, cmsPluginBase* Data)
{
cmsPluginTransform* Plugin = (cmsPluginTransform*) Data;
_cmsTransformCollection* fl;
+ _cmsTransformPluginChunkType* ctx = ( _cmsTransformPluginChunkType*) _cmsContextGetClientChunk(ContextID,TransformPlugin);
- if (Data == NULL) {
+ if (Data == NULL) {
// Free the chain. Memory is safely freed at exit
- TransformCollection = NULL;
+ ctx->TransformCollection = NULL;
return TRUE;
}
// Factory callback is required
- if (Plugin ->Factory == NULL) return FALSE;
+ if (Plugin->factories.xform == NULL) return FALSE;
- fl = (_cmsTransformCollection*) _cmsPluginMalloc(sizeof(_cmsTransformCollection));
+ fl = (_cmsTransformCollection*) _cmsPluginMalloc(ContextID, sizeof(_cmsTransformCollection));
if (fl == NULL) return FALSE;
- // Copy the parameters
- fl ->Factory = Plugin ->Factory;
+ // Check for full xform plug-ins previous to 2.8, we would need an adapter in that case
+ if (Plugin->base.ExpectedVersion < 2080) {
+
+ fl->OldXform = TRUE;
+ }
+ else
+ fl->OldXform = FALSE;
+
+ // Copy the parameters
+ fl->Factory = Plugin->factories.xform;
// Keep linked list
- fl ->Next = TransformCollection;
- TransformCollection = fl;
+ fl ->Next = ctx->TransformCollection;
+ ctx->TransformCollection = fl;
// All is ok
return TRUE;
if (ToOutput) *ToOutput = CMMcargo ->ToOutputFloat;
}
+// returns original flags
+cmsUInt32Number CMSEXPORT _cmsGetTransformFlags(struct _cmstransform_struct* CMMcargo)
+{
+ _cmsAssert(CMMcargo != NULL);
+ return CMMcargo->dwOriginalFlags;
+}
// Allocate transform struct and set it to defaults. Ask the optimization plug-in about if those formats are proper
// for separated transforms. If this is the case,
_cmsTRANSFORM* AllocEmptyTransform(cmsContext ContextID, cmsPipeline* lut,
cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
+ _cmsTransformPluginChunkType* ctx = ( _cmsTransformPluginChunkType*) _cmsContextGetClientChunk(ContextID, TransformPlugin);
_cmsTransformCollection* Plugin;
- // Allocate needed memory
- _cmsTRANSFORM* p = (_cmsTRANSFORM*) _cmsMallocZero(ContextID, sizeof(_cmsTRANSFORM));
- if (!p) return NULL;
-
- // Store the proposed pipeline
- p ->Lut = lut;
-
- // Let's see if any plug-in want to do the transform by itself
- for (Plugin = TransformCollection;
- Plugin != NULL;
- Plugin = Plugin ->Next) {
-
- if (Plugin ->Factory(&p->xform, &p->UserData, &p ->FreeUserData, &p ->Lut, InputFormat, OutputFormat, dwFlags)) {
-
- // Last plugin in the declaration order takes control. We just keep
- // the original parameters as a logging.
- // Note that cmsFLAGS_CAN_CHANGE_FORMATTER is not set, so by default
- // an optimized transform is not reusable. The plug-in can, however, change
- // the flags and make it suitable.
-
- p ->ContextID = ContextID;
- p ->InputFormat = *InputFormat;
- p ->OutputFormat = *OutputFormat;
- p ->dwOriginalFlags = *dwFlags;
-
- // Fill the formatters just in case the optimized routine is interested.
- // No error is thrown if the formatter doesn't exist. It is up to the optimization
- // factory to decide what to do in those cases.
- p ->FromInput = _cmsGetFormatter(*InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
- p ->ToOutput = _cmsGetFormatter(*OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
- p ->FromInputFloat = _cmsGetFormatter(*InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
- p ->ToOutputFloat = _cmsGetFormatter(*OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
-
- return p;
- }
- }
+ // Allocate needed memory
+ _cmsTRANSFORM* p = (_cmsTRANSFORM*)_cmsMallocZero(ContextID, sizeof(_cmsTRANSFORM));
+ if (!p) {
+ cmsPipelineFree(lut);
+ return NULL;
+ }
- // Not suitable for the transform plug-in, let's check the pipeline plug-in
- if (p ->Lut != NULL)
- _cmsOptimizePipeline(&p->Lut, Intent, InputFormat, OutputFormat, dwFlags);
+ // Store the proposed pipeline
+ p->Lut = lut;
+
+ // Let's see if any plug-in want to do the transform by itself
+ if (p->Lut != NULL) {
+
+ if (!(*dwFlags & cmsFLAGS_NOOPTIMIZE))
+ {
+ for (Plugin = ctx->TransformCollection;
+ Plugin != NULL;
+ Plugin = Plugin->Next) {
+
+ if (Plugin->Factory(&p->xform, &p->UserData, &p->FreeUserData, &p->Lut, InputFormat, OutputFormat, dwFlags)) {
+
+ // Last plugin in the declaration order takes control. We just keep
+ // the original parameters as a logging.
+ // Note that cmsFLAGS_CAN_CHANGE_FORMATTER is not set, so by default
+ // an optimized transform is not reusable. The plug-in can, however, change
+ // the flags and make it suitable.
+
+ p->ContextID = ContextID;
+ p->InputFormat = *InputFormat;
+ p->OutputFormat = *OutputFormat;
+ p->dwOriginalFlags = *dwFlags;
+
+ // Fill the formatters just in case the optimized routine is interested.
+ // No error is thrown if the formatter doesn't exist. It is up to the optimization
+ // factory to decide what to do in those cases.
+ p->FromInput = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
+ p->ToOutput = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
+ p->FromInputFloat = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
+ p->ToOutputFloat = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
+
+ // Save the day? (Ignore the warning)
+ if (Plugin->OldXform) {
+ p->OldXform = (_cmsTransformFn)(void*)p->xform;
+ p->xform = _cmsTransform2toTransformAdaptor;
+ }
+
+ return p;
+ }
+ }
+ }
+
+ // Not suitable for the transform plug-in, let's check the pipeline plug-in
+ _cmsOptimizePipeline(ContextID, &p->Lut, Intent, InputFormat, OutputFormat, dwFlags);
+ }
// Check whatever this is a true floating point transform
if (_cmsFormatterIsFloat(*InputFormat) && _cmsFormatterIsFloat(*OutputFormat)) {
// Get formatter function always return a valid union, but the contents of this union may be NULL.
- p ->FromInputFloat = _cmsGetFormatter(*InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
- p ->ToOutputFloat = _cmsGetFormatter(*OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
+ p ->FromInputFloat = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
+ p ->ToOutputFloat = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT).FmtFloat;
*dwFlags |= cmsFLAGS_CAN_CHANGE_FORMATTER;
if (p ->FromInputFloat == NULL || p ->ToOutputFloat == NULL) {
cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported raster format");
- _cmsFree(ContextID, p);
+ cmsDeleteTransform(p);
return NULL;
}
- // Float transforms don't use caché, always are non-NULL
- p ->xform = FloatXFORM;
+ if (*dwFlags & cmsFLAGS_NULLTRANSFORM) {
+
+ p ->xform = NullFloatXFORM;
+ }
+ else {
+ // Float transforms don't use cache, always are non-NULL
+ p ->xform = FloatXFORM;
+ }
+
}
else {
}
else {
- int BytesPerPixelInput;
+ cmsUInt32Number BytesPerPixelInput;
- p ->FromInput = _cmsGetFormatter(*InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
- p ->ToOutput = _cmsGetFormatter(*OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
+ p ->FromInput = _cmsGetFormatter(ContextID, *InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
+ p ->ToOutput = _cmsGetFormatter(ContextID, *OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
if (p ->FromInput == NULL || p ->ToOutput == NULL) {
cmsSignalError(ContextID, cmsERROR_UNKNOWN_EXTENSION, "Unsupported raster format");
- _cmsFree(ContextID, p);
+ cmsDeleteTransform(p);
return NULL;
}
if (*dwFlags & cmsFLAGS_NOCACHE) {
if (*dwFlags & cmsFLAGS_GAMUTCHECK)
- p ->xform = PrecalculatedXFORMGamutCheck; // Gamut check, no caché
+ p ->xform = PrecalculatedXFORMGamutCheck; // Gamut check, no cache
else
- p ->xform = PrecalculatedXFORM; // No caché, no gamut check
+ p ->xform = PrecalculatedXFORM; // No cache, no gamut check
}
else {
if (*dwFlags & cmsFLAGS_GAMUTCHECK)
- p ->xform = CachedXFORMGamutCheck; // Gamut check, caché
+ p ->xform = CachedXFORMGamutCheck; // Gamut check, cache
else
- p ->xform = CachedXFORM; // No gamut check, caché
+ p ->xform = CachedXFORM; // No gamut check, cache
}
}
}
static
-cmsBool GetXFormColorSpaces(int nProfiles, cmsHPROFILE hProfiles[], cmsColorSpaceSignature* Input, cmsColorSpaceSignature* Output)
+cmsBool GetXFormColorSpaces(cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[], cmsColorSpaceSignature* Input, cmsColorSpaceSignature* Output)
{
cmsColorSpaceSignature ColorSpaceIn, ColorSpaceOut;
cmsColorSpaceSignature PostColorSpace;
- int i;
+ cmsUInt32Number i;
- if (nProfiles <= 0) return FALSE;
+ if (nProfiles == 0) return FALSE;
if (hProfiles[0] == NULL) return FALSE;
*Input = PostColorSpace = cmsGetColorSpace(hProfiles[0]);
static
cmsBool IsProperColorSpace(cmsColorSpaceSignature Check, cmsUInt32Number dwFormat)
{
- int Space1 = T_COLORSPACE(dwFormat);
+ int Space1 = (int) T_COLORSPACE(dwFormat);
int Space2 = _cmsLCMScolorSpace(Check);
if (Space1 == PT_ANY) return TRUE;
// ----------------------------------------------------------------------------------------------------------------
+// Jun-21-2000: Some profiles (those that comes with W2K) comes
+// with the media white (media black?) x 100. Add a sanity check
+
+static
+void NormalizeXYZ(cmsCIEXYZ* Dest)
+{
+ while (Dest -> X > 2. &&
+ Dest -> Y > 2. &&
+ Dest -> Z > 2.) {
+
+ Dest -> X /= 10.;
+ Dest -> Y /= 10.;
+ Dest -> Z /= 10.;
+ }
+}
+
+static
+void SetWhitePoint(cmsCIEXYZ* wtPt, const cmsCIEXYZ* src)
+{
+ if (src == NULL) {
+ wtPt ->X = cmsD50X;
+ wtPt ->Y = cmsD50Y;
+ wtPt ->Z = cmsD50Z;
+ }
+ else {
+ wtPt ->X = src->X;
+ wtPt ->Y = src->Y;
+ wtPt ->Z = src->Z;
+
+ NormalizeXYZ(wtPt);
+ }
+
+}
+
// New to lcms 2.0 -- have all parameters available.
cmsHTRANSFORM CMSEXPORT cmsCreateExtendedTransform(cmsContext ContextID,
cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[],
cmsUInt32Number OutputFormat,
cmsUInt32Number dwFlags)
{
- _cmsTRANSFORM* xform;
- cmsBool FloatTransform;
+ _cmsTRANSFORM* xform;
cmsColorSpaceSignature EntryColorSpace;
cmsColorSpaceSignature ExitColorSpace;
cmsPipeline* Lut;
if (hGamutProfile == NULL) dwFlags &= ~cmsFLAGS_GAMUTCHECK;
}
- // On floating point transforms, inhibit optimizations
- FloatTransform = (_cmsFormatterIsFloat(InputFormat) && _cmsFormatterIsFloat(OutputFormat));
-
+ // On floating point transforms, inhibit cache
if (_cmsFormatterIsFloat(InputFormat) || _cmsFormatterIsFloat(OutputFormat))
dwFlags |= cmsFLAGS_NOCACHE;
// Check channel count
if ((cmsChannelsOf(EntryColorSpace) != cmsPipelineInputChannels(Lut)) ||
(cmsChannelsOf(ExitColorSpace) != cmsPipelineOutputChannels(Lut))) {
+ cmsPipelineFree(Lut);
cmsSignalError(ContextID, cmsERROR_NOT_SUITABLE, "Channel count doesn't match. Profile is corrupted");
return NULL;
}
xform ->ExitColorSpace = ExitColorSpace;
xform ->RenderingIntent = Intents[nProfiles-1];
+ // Take white points
+ SetWhitePoint(&xform->EntryWhitePoint, (cmsCIEXYZ*) cmsReadTag(hProfiles[0], cmsSigMediaWhitePointTag));
+ SetWhitePoint(&xform->ExitWhitePoint, (cmsCIEXYZ*) cmsReadTag(hProfiles[nProfiles-1], cmsSigMediaWhitePointTag));
+
// Create a gamut check LUT if requested
if (hGamutProfile != NULL && (dwFlags & cmsFLAGS_GAMUTCHECK))
for (i=0; i < nProfiles; i++) {
BPC[i] = dwFlags & cmsFLAGS_BLACKPOINTCOMPENSATION ? TRUE : FALSE;
Intents[i] = Intent;
- AdaptationStates[i] = GlobalAdaptationState;
+ AdaptationStates[i] = cmsSetAdaptationStateTHR(ContextID, -1);
}
hArray[0] = Input;
hArray[1] = Output;
- return cmsCreateMultiprofileTransformTHR(ContextID, hArray, Output == NULL ? 1 : 2, InputFormat, OutputFormat, Intent, dwFlags);
+ return cmsCreateMultiprofileTransformTHR(ContextID, hArray, Output == NULL ? 1U : 2U, InputFormat, OutputFormat, Intent, dwFlags);
}
CMSAPI cmsHTRANSFORM CMSEXPORT cmsCreateTransform(cmsHPROFILE Input,
Intents[0] = nIntent; Intents[1] = nIntent; Intents[2] = INTENT_RELATIVE_COLORIMETRIC; Intents[3] = ProofingIntent;
BPC[0] = DoBPC; BPC[1] = DoBPC; BPC[2] = 0; BPC[3] = 0;
- Adaptation[0] = Adaptation[1] = Adaptation[2] = Adaptation[3] = GlobalAdaptationState;
+ Adaptation[0] = Adaptation[1] = Adaptation[2] = Adaptation[3] = cmsSetAdaptationStateTHR(ContextID, -1);
if (!(dwFlags & (cmsFLAGS_SOFTPROOFING|cmsFLAGS_GAMUTCHECK)))
return cmsCreateTransformTHR(ContextID, InputProfile, InputFormat, OutputProfile, OutputFormat, nIntent, dwFlags);
cmsUInt32Number InputFormat,
cmsUInt32Number OutputFormat)
{
-
_cmsTRANSFORM* xform = (_cmsTRANSFORM*) hTransform;
cmsFormatter16 FromInput, ToOutput;
return FALSE;
}
- FromInput = _cmsGetFormatter(InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
- ToOutput = _cmsGetFormatter(OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
+ FromInput = _cmsGetFormatter(xform->ContextID, InputFormat, cmsFormatterInput, CMS_PACK_FLAGS_16BITS).Fmt16;
+ ToOutput = _cmsGetFormatter(xform->ContextID, OutputFormat, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS).Fmt16;
if (FromInput == NULL || ToOutput == NULL) {
cmsDesaturateLab = cmsDesaturateLab\r
cmsDoTransform = cmsDoTransform\r
cmsDoTransformStride = cmsDoTransformStride\r
+cmsDoTransformLineStride = cmsDoTransformLineStride\r
_cmsDoubleTo15Fixed16 = _cmsDoubleTo15Fixed16\r
_cmsDoubleTo8Fixed8 = _cmsDoubleTo8Fixed8\r
_cmsDupMem = _cmsDupMem\r
cmsOpenProfileFromFile = cmsOpenProfileFromFile\r
cmsOpenProfileFromFileTHR = cmsOpenProfileFromFileTHR\r
cmsOpenProfileFromIOhandlerTHR = cmsOpenProfileFromIOhandlerTHR\r
+cmsOpenProfileFromIOhandler2THR = cmsOpenProfileFromIOhandler2THR\r
cmsOpenProfileFromMem = cmsOpenProfileFromMem\r
cmsOpenProfileFromMemTHR = cmsOpenProfileFromMemTHR\r
cmsOpenProfileFromStream = cmsOpenProfileFromStream\r
cmsDictNextEntry = cmsDictNextEntry\r
_cmsGetTransformUserData = _cmsGetTransformUserData\r
_cmsSetTransformUserData = _cmsSetTransformUserData\r
+cmsGetHeaderCreator = cmsGetHeaderCreator\r
+cmsPluginTHR = cmsPluginTHR\r
+cmsGetPipelineContextID = cmsGetPipelineContextID\r
+cmsGetTransformInputFormat = cmsGetTransformInputFormat\r
+cmsGetTransformOutputFormat = cmsGetTransformOutputFormat\r
+cmsCreateContext = cmsCreateContext \r
+cmsDupContext = cmsDupContext \r
+cmsDeleteContext = cmsDeleteContext \r
+cmsGetContextUserData = cmsGetContextUserData \r
+cmsUnregisterPluginsTHR = cmsUnregisterPluginsTHR \r
+cmsSetAlarmCodesTHR = cmsSetAlarmCodesTHR \r
+cmsGetAlarmCodesTHR = cmsGetAlarmCodesTHR\r
+cmsSetAdaptationStateTHR = cmsSetAdaptationStateTHR\r
+cmsSetLogErrorHandlerTHR = cmsSetLogErrorHandlerTHR\r
+cmsGetSupportedIntentsTHR = cmsGetSupportedIntentsTHR\r
+cmsMLUtranslationsCount = cmsMLUtranslationsCount\r
+cmsMLUtranslationsCodes = cmsMLUtranslationsCodes\r
+_cmsCreateMutex = _cmsCreateMutex \r
+_cmsDestroyMutex = _cmsDestroyMutex\r
+_cmsLockMutex = _cmsLockMutex \r
+_cmsUnlockMutex = _cmsUnlockMutex \r
+cmsGetProfileIOhandler = cmsGetProfileIOhandler\r
+cmsGetEncodedCMMversion = cmsGetEncodedCMMversion\r
+_cmsFloat2Half = _cmsFloat2Half\r
+_cmsHalf2Float = _cmsHalf2Float\r
+_cmsFreeInterpParams = _cmsFreeInterpParams\r
+_cmsGetFormatter = _cmsGetFormatter\r
_cmsGetTransformFormatters16 = _cmsGetTransformFormatters16\r
_cmsGetTransformFormattersFloat = _cmsGetTransformFormattersFloat\r
+_cmsQuantizeVal = _cmsQuantizeVal\r
+_cmsReadDevicelinkLUT = _cmsReadDevicelinkLUT\r
+_cmsReadInputLUT = _cmsReadInputLUT\r
+_cmsReadOutputLUT = _cmsReadOutputLUT\r
+_cmsStageAllocIdentityCLut = _cmsStageAllocIdentityCLut\r
+_cmsStageAllocIdentityCurves = _cmsStageAllocIdentityCurves\r
+_cmsStageAllocLab2XYZ = _cmsStageAllocLab2XYZ\r
+_cmsStageAllocLabV2ToV4 = _cmsStageAllocLabV2ToV4\r
+_cmsStageAllocLabV4ToV2 = _cmsStageAllocLabV4ToV2\r
+_cmsStageAllocNamedColor = _cmsStageAllocNamedColor\r
+_cmsStageAllocXYZ2Lab = _cmsStageAllocXYZ2Lab\r
+cmsMD5add = cmsMD5add\r
+cmsMD5alloc = cmsMD5alloc\r
+cmsMD5finish = cmsMD5finish\r
+_cmsComputeInterpParams = _cmsComputeInterpParams\r
+cmsGetToneCurveParams = cmsGetToneCurveParams\r
+\r
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
#endif
// BorlandC 5.5, VC2003 are broken on that
-#if defined(__BORLANDC__) || (_MSC_VER < 1400) // 1400 == VC++ 8.0
+#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER < 1400)) // 1400 == VC++ 8.0
#define sinf(x) (float)sin((float)x)
#define sqrtf(x) (float)sqrt((float)x)
#endif
#define _cmsALIGNLONG(x) (((x)+(sizeof(cmsUInt32Number)-1)) & ~(sizeof(cmsUInt32Number)-1))
// Alignment to memory pointer
-#define _cmsALIGNMEM(x) (((x)+(sizeof(void *) - 1)) & ~(sizeof(void *) - 1))
+
+// (Ultra)SPARC with gcc requires ptr alignment of 8 bytes
+// even though sizeof(void *) is only four: for greatest flexibility
+// allow the build to specify ptr alignment.
+#ifndef CMS_PTR_ALIGNMENT
+# define CMS_PTR_ALIGNMENT sizeof(void *)
+#endif
+
+#define _cmsALIGNMEM(x) (((x)+(CMS_PTR_ALIGNMENT - 1)) & ~(CMS_PTR_ALIGNMENT - 1))
// Maximum encodeable values in floating point
#define MAX_ENCODEABLE_XYZ (1.0 + 32767.0/32768.0)
// Maximum of channels for internal pipeline evaluation
#define MAX_STAGE_CHANNELS 128
-// Unused parameter warning supression
+// Unused parameter warning suppression
#define cmsUNUSED_PARAMETER(x) ((void)x)
// The specification for "inline" is section 6.7.4 of the C99 standard (ISO/IEC 9899:1999).
# define cmsINLINE static inline
#endif
+// Allow signed overflow, we know this is harmless in this particular context
+#if defined(__clang__)
+# define CMS_NO_SANITIZE __attribute__((no_sanitize("signed-integer-overflow")))
+#else
+# define CMS_NO_SANITIZE
+#endif
+
// Other replacement functions
#ifdef _MSC_VER
# ifndef snprintf
# ifndef vsnprintf
# define vsnprintf _vsnprintf
# endif
+
+/// Properly define some macros to accommodate
+/// older MSVC versions.
+# if defined(_MSC_VER) && _MSC_VER <= 1700
+ #include <float.h>
+ #define isnan _isnan
+ #define isinf(x) (!_finite((x)))
+# endif
+
+#if !defined(_MSC_VER) && (defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L)
+ #if !defined(isinf)
+ #define isinf(x) (!finite((x)))
+ #endif
#endif
+#endif
+
// A fast way to convert from/to 16 <-> 8 bits
#define FROM_8_TO_16(rgb) (cmsUInt16Number) ((((cmsUInt16Number) (rgb)) << 8)|(rgb))
-#define FROM_16_TO_8(rgb) (cmsUInt8Number) ((((rgb) * 65281 + 8388608) >> 24) & 0xFF)
+#define FROM_16_TO_8(rgb) (cmsUInt8Number) ((((cmsUInt32Number)(rgb) * 65281U + 8388608U) >> 24) & 0xFFU)
// Code analysis is broken on asserts
#ifdef _MSC_VER
return _cmsQuickFloorWord(d);
}
-// Plug-In registering ---------------------------------------------------------------
+// Test bed entry points---------------------------------------------------------------
+#define CMSCHECKPOINT CMSAPI
+
+// Pthread support --------------------------------------------------------------------
+#ifndef CMS_NO_PTHREADS
+
+// This is the threading support. Unfortunately, it has to be platform-dependent because
+// windows does not support pthreads.
+#ifdef CMS_IS_WINDOWS_
+
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+
+
+// The locking scheme in LCMS requires a single 'top level' mutex
+// to work. This is actually implemented on Windows as a
+// CriticalSection, because they are lighter weight. With
+// pthreads, this is statically inited. Unfortunately, windows
+// can't officially statically init critical sections.
+//
+// We can work around this in 2 ways.
+//
+// 1) We can use a proper mutex purely to protect the init
+// of the CriticalSection. This in turns requires us to protect
+// the Mutex creation, which we can do using the snappily
+// named InterlockedCompareExchangePointer API (present on
+// windows XP and above).
+//
+// 2) In cases where we want to work on pre-Windows XP, we
+// can use an even more horrible hack described below.
+//
+// So why wouldn't we always use 2)? Because not calling
+// the init function for a critical section means it fails
+// testing with ApplicationVerifier (and presumably similar
+// tools).
+//
+// We therefore default to 1, and people who want to be able
+// to run on pre-Windows XP boxes can build with:
+// CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT
+// defined. This is automatically set for builds using
+// versions of MSVC that don't have this API available.
+//
+// From: http://locklessinc.com/articles/pthreads_on_windows/
+// The pthreads API has an initialization macro that has no correspondence to anything in
+// the windows API. By investigating the internal definition of the critical section type,
+// one may work out how to initialize one without calling InitializeCriticalSection().
+// The trick here is that InitializeCriticalSection() is not allowed to fail. It tries
+// to allocate a critical section debug object, but if no memory is available, it sets
+// the pointer to a specific value. (One would expect that value to be NULL, but it is
+// actually (void *)-1 for some reason.) Thus we can use this special value for that
+// pointer, and the critical section code will work.
+
+// The other important part of the critical section type to initialize is the number
+// of waiters. This controls whether or not the mutex is locked. Fortunately, this
+// part of the critical section is unlikely to change. Apparently, many programs
+// already test critical sections to see if they are locked using this value, so
+// Microsoft felt that it was necessary to keep it set at -1 for an unlocked critical
+// section, even when they changed the underlying algorithm to be more scalable.
+// The final parts of the critical section object are unimportant, and can be set
+// to zero for their defaults. This yields to an initialization macro:
+
+typedef CRITICAL_SECTION _cmsMutex;
+
+#ifdef _MSC_VER
+# if (_MSC_VER >= 1800)
+# pragma warning(disable : 26135)
+# endif
+#endif
+
+#ifndef CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT
+// If we are building with a version of MSVC smaller
+// than 1400 (i.e. before VS2005) then we don't have
+// the InterlockedCompareExchangePointer API, so use
+// the old version.
+# ifdef _MSC_VER
+# if _MSC_VER < 1400
+# define CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT
+# endif
+# endif
+#endif
+
+#ifdef CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT
+# define CMS_MUTEX_INITIALIZER {(PRTL_CRITICAL_SECTION_DEBUG) -1,-1,0,0,0,0}
+#else
+# define CMS_MUTEX_INITIALIZER {(PRTL_CRITICAL_SECTION_DEBUG)NULL,-1,0,0,0,0}
+#endif
+
+cmsINLINE int _cmsLockPrimitive(_cmsMutex *m)
+{
+ EnterCriticalSection(m);
+ return 0;
+}
+
+cmsINLINE int _cmsUnlockPrimitive(_cmsMutex *m)
+{
+ LeaveCriticalSection(m);
+ return 0;
+}
+
+cmsINLINE int _cmsInitMutexPrimitive(_cmsMutex *m)
+{
+ InitializeCriticalSection(m);
+ return 0;
+}
+
+cmsINLINE int _cmsDestroyMutexPrimitive(_cmsMutex *m)
+{
+ DeleteCriticalSection(m);
+ return 0;
+}
+
+cmsINLINE int _cmsEnterCriticalSectionPrimitive(_cmsMutex *m)
+{
+ EnterCriticalSection(m);
+ return 0;
+}
+
+cmsINLINE int _cmsLeaveCriticalSectionPrimitive(_cmsMutex *m)
+{
+ LeaveCriticalSection(m);
+ return 0;
+}
+
+#else
+
+// Rest of the wide world
+#include <pthread.h>
+
+#define CMS_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+typedef pthread_mutex_t _cmsMutex;
+
+
+cmsINLINE int _cmsLockPrimitive(_cmsMutex *m)
+{
+ return pthread_mutex_lock(m);
+}
+
+cmsINLINE int _cmsUnlockPrimitive(_cmsMutex *m)
+{
+ return pthread_mutex_unlock(m);
+}
+
+cmsINLINE int _cmsInitMutexPrimitive(_cmsMutex *m)
+{
+ return pthread_mutex_init(m, NULL);
+}
+
+cmsINLINE int _cmsDestroyMutexPrimitive(_cmsMutex *m)
+{
+ return pthread_mutex_destroy(m);
+}
+
+cmsINLINE int _cmsEnterCriticalSectionPrimitive(_cmsMutex *m)
+{
+ return pthread_mutex_lock(m);
+}
+
+cmsINLINE int _cmsLeaveCriticalSectionPrimitive(_cmsMutex *m)
+{
+ return pthread_mutex_unlock(m);
+}
+
+#endif
+#else
+
+#define CMS_MUTEX_INITIALIZER 0
+typedef int _cmsMutex;
+
+
+cmsINLINE int _cmsLockPrimitive(_cmsMutex *m)
+{
+ cmsUNUSED_PARAMETER(m);
+ return 0;
+}
+
+cmsINLINE int _cmsUnlockPrimitive(_cmsMutex *m)
+{
+ cmsUNUSED_PARAMETER(m);
+ return 0;
+}
+
+cmsINLINE int _cmsInitMutexPrimitive(_cmsMutex *m)
+{
+ cmsUNUSED_PARAMETER(m);
+ return 0;
+}
+
+cmsINLINE int _cmsDestroyMutexPrimitive(_cmsMutex *m)
+{
+ cmsUNUSED_PARAMETER(m);
+ return 0;
+}
+
+cmsINLINE int _cmsEnterCriticalSectionPrimitive(_cmsMutex *m)
+{
+ cmsUNUSED_PARAMETER(m);
+ return 0;
+}
+
+cmsINLINE int _cmsLeaveCriticalSectionPrimitive(_cmsMutex *m)
+{
+ cmsUNUSED_PARAMETER(m);
+ return 0;
+}
+#endif
+
+// Plug-In registration ---------------------------------------------------------------
// Specialized function for plug-in memory management. No pairing free() since whole pool is freed at once.
-void* _cmsPluginMalloc(cmsUInt32Number size);
+void* _cmsPluginMalloc(cmsContext ContextID, cmsUInt32Number size);
// Memory management
-cmsBool _cmsRegisterMemHandlerPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Interpolation
-cmsBool _cmsRegisterInterpPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterInterpPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Parametric curves
-cmsBool _cmsRegisterParametricCurvesPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterParametricCurvesPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Formatters management
-cmsBool _cmsRegisterFormattersPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterFormattersPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Tag type management
-cmsBool _cmsRegisterTagTypePlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterTagTypePlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Tag management
-cmsBool _cmsRegisterTagPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterTagPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Intent management
-cmsBool _cmsRegisterRenderingIntentPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Multi Process elements
-cmsBool _cmsRegisterMultiProcessElementPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterMultiProcessElementPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Optimization
-cmsBool _cmsRegisterOptimizationPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterOptimizationPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// Transform
-cmsBool _cmsRegisterTransformPlugin(cmsPluginBase* Plugin);
+cmsBool _cmsRegisterTransformPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
+
+// Mutex
+cmsBool _cmsRegisterMutexPlugin(cmsContext ContextID, cmsPluginBase* Plugin);
// ---------------------------------------------------------------------------------------------------------
-// Suballocators. Those are blocks of memory that is freed at the end on whole block.
+// Suballocators.
typedef struct _cmsSubAllocator_chunk_st {
cmsUInt8Number* Block;
_cmsSubAllocator* _cmsCreateSubAlloc(cmsContext ContextID, cmsUInt32Number Initial);
void _cmsSubAllocDestroy(_cmsSubAllocator* s);
void* _cmsSubAlloc(_cmsSubAllocator* s, cmsUInt32Number size);
+void* _cmsSubAllocDup(_cmsSubAllocator* s, const void *ptr, cmsUInt32Number size);
// ----------------------------------------------------------------------------------
+// The context clients.
+typedef enum {
+
+ UserPtr, // User-defined pointer
+ Logger,
+ AlarmCodesContext,
+ AdaptationStateContext,
+ MemPlugin,
+ InterpPlugin,
+ CurvesPlugin,
+ FormattersPlugin,
+ TagTypePlugin,
+ TagPlugin,
+ IntentPlugin,
+ MPEPlugin,
+ OptimizationPlugin,
+ TransformPlugin,
+ MutexPlugin,
+
+ // Last in list
+ MemoryClientMax
+
+} _cmsMemoryClient;
+
+
+// Container for memory management plug-in.
+typedef struct {
+
+ _cmsMallocFnPtrType MallocPtr;
+ _cmsMalloZerocFnPtrType MallocZeroPtr;
+ _cmsFreeFnPtrType FreePtr;
+ _cmsReallocFnPtrType ReallocPtr;
+ _cmsCallocFnPtrType CallocPtr;
+ _cmsDupFnPtrType DupPtr;
+
+} _cmsMemPluginChunkType;
+
+// Copy memory management function pointers from plug-in to chunk, taking care of missing routines
+void _cmsInstallAllocFunctions(cmsPluginMemHandler* Plugin, _cmsMemPluginChunkType* ptr);
+
+// Internal structure for context
+struct _cmsContext_struct {
+
+ struct _cmsContext_struct* Next; // Points to next context in the new style
+ _cmsSubAllocator* MemPool; // The memory pool that stores context data
+
+ void* chunks[MemoryClientMax]; // array of pointers to client chunks. Memory itself is hold in the suballocator.
+ // If NULL, then it reverts to global Context0
+
+ _cmsMemPluginChunkType DefaultMemoryManager; // The allocators used for creating the context itself. Cannot be overridden
+};
+
+// Returns a pointer to a valid context structure, including the global one if id is zero.
+// Verifies the magic number.
+struct _cmsContext_struct* _cmsGetContext(cmsContext ContextID);
+
+// Returns the block assigned to the specific zone.
+void* _cmsContextGetClientChunk(cmsContext id, _cmsMemoryClient mc);
+
+
+// Chunks of context memory by plug-in client -------------------------------------------------------
+
+// Those structures encapsulates all variables needed by the several context clients (mostly plug-ins)
+
+// Container for error logger -- not a plug-in
+typedef struct {
+
+ cmsLogErrorHandlerFunction LogErrorHandler; // Set to NULL for Context0 fallback
+
+} _cmsLogErrorChunkType;
+
+// The global Context0 storage for error logger
+extern _cmsLogErrorChunkType _cmsLogErrorChunk;
+
+// Allocate and init error logger container.
+void _cmsAllocLogErrorChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for alarm codes -- not a plug-in
+typedef struct {
+
+ cmsUInt16Number AlarmCodes[cmsMAXCHANNELS];
+
+} _cmsAlarmCodesChunkType;
+
+// The global Context0 storage for alarm codes
+extern _cmsAlarmCodesChunkType _cmsAlarmCodesChunk;
+
+// Allocate and init alarm codes container.
+void _cmsAllocAlarmCodesChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for adaptation state -- not a plug-in
+typedef struct {
+
+ cmsFloat64Number AdaptationState;
+
+} _cmsAdaptationStateChunkType;
+
+// The global Context0 storage for adaptation state
+extern _cmsAdaptationStateChunkType _cmsAdaptationStateChunk;
+
+// Allocate and init adaptation state container.
+void _cmsAllocAdaptationStateChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+
+// The global Context0 storage for memory management
+extern _cmsMemPluginChunkType _cmsMemPluginChunk;
+
+// Allocate and init memory management container.
+void _cmsAllocMemPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for interpolation plug-in
+typedef struct {
+
+ cmsInterpFnFactory Interpolators;
+
+} _cmsInterpPluginChunkType;
+
+// The global Context0 storage for interpolation plug-in
+extern _cmsInterpPluginChunkType _cmsInterpPluginChunk;
+
+// Allocate and init interpolation container.
+void _cmsAllocInterpPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for parametric curves plug-in
+typedef struct {
+
+ struct _cmsParametricCurvesCollection_st* ParametricCurves;
+
+} _cmsCurvesPluginChunkType;
+
+// The global Context0 storage for tone curves plug-in
+extern _cmsCurvesPluginChunkType _cmsCurvesPluginChunk;
+
+// Allocate and init parametric curves container.
+void _cmsAllocCurvesPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for formatters plug-in
+typedef struct {
+
+ struct _cms_formatters_factory_list* FactoryList;
+
+} _cmsFormattersPluginChunkType;
+
+// The global Context0 storage for formatters plug-in
+extern _cmsFormattersPluginChunkType _cmsFormattersPluginChunk;
+
+// Allocate and init formatters container.
+void _cmsAllocFormattersPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// This chunk type is shared by TagType plug-in and MPE Plug-in
+typedef struct {
+
+ struct _cmsTagTypeLinkedList_st* TagTypes;
+
+} _cmsTagTypePluginChunkType;
+
+
+// The global Context0 storage for tag types plug-in
+extern _cmsTagTypePluginChunkType _cmsTagTypePluginChunk;
+
+
+// The global Context0 storage for mult process elements plug-in
+extern _cmsTagTypePluginChunkType _cmsMPETypePluginChunk;
+
+// Allocate and init Tag types container.
+void _cmsAllocTagTypePluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+// Allocate and init MPE container.
+void _cmsAllocMPETypePluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+// Container for tag plug-in
+typedef struct {
+
+ struct _cmsTagLinkedList_st* Tag;
+
+} _cmsTagPluginChunkType;
+
+
+// The global Context0 storage for tag plug-in
+extern _cmsTagPluginChunkType _cmsTagPluginChunk;
+
+// Allocate and init Tag container.
+void _cmsAllocTagPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for intents plug-in
+typedef struct {
+
+ struct _cms_intents_list* Intents;
+
+} _cmsIntentsPluginChunkType;
+
+
+// The global Context0 storage for intents plug-in
+extern _cmsIntentsPluginChunkType _cmsIntentsPluginChunk;
+
+// Allocate and init intents container.
+void _cmsAllocIntentsPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for optimization plug-in
+typedef struct {
+
+ struct _cmsOptimizationCollection_st* OptimizationCollection;
+
+} _cmsOptimizationPluginChunkType;
+
+
+// The global Context0 storage for optimizers plug-in
+extern _cmsOptimizationPluginChunkType _cmsOptimizationPluginChunk;
+
+// Allocate and init optimizers container.
+void _cmsAllocOptimizationPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for transform plug-in
+typedef struct {
+
+ struct _cmsTransformCollection_st* TransformCollection;
+
+} _cmsTransformPluginChunkType;
+
+// The global Context0 storage for full-transform replacement plug-in
+extern _cmsTransformPluginChunkType _cmsTransformPluginChunk;
+
+// Allocate and init transform container.
+void _cmsAllocTransformPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// Container for mutex plug-in
+typedef struct {
+
+ _cmsCreateMutexFnPtrType CreateMutexPtr;
+ _cmsDestroyMutexFnPtrType DestroyMutexPtr;
+ _cmsLockMutexFnPtrType LockMutexPtr;
+ _cmsUnlockMutexFnPtrType UnlockMutexPtr;
+
+} _cmsMutexPluginChunkType;
+
+// The global Context0 storage for mutex plug-in
+extern _cmsMutexPluginChunkType _cmsMutexPluginChunk;
+
+// Allocate and init mutex container.
+void _cmsAllocMutexPluginChunk(struct _cmsContext_struct* ctx,
+ const struct _cmsContext_struct* src);
+
+// ----------------------------------------------------------------------------------
// MLU internal representation
typedef struct {
cmsUInt16Number Country;
cmsUInt32Number StrW; // Offset to current unicode string
- cmsUInt32Number Len; // Lenght in bytes
+ cmsUInt32Number Len; // Length in bytes
} _cmsMLUentry;
cmsContext ContextID;
// The directory
- int AllocatedEntries;
- int UsedEntries;
+ cmsUInt32Number AllocatedEntries;
+ cmsUInt32Number UsedEntries;
_cmsMLUentry* Entries; // Array of pointers to strings allocated in MemPool
// The Pool
cmsColorSpaceSignature ColorSpace;
cmsColorSpaceSignature PCS;
cmsUInt32Number RenderingIntent;
+
cmsUInt32Number flags;
cmsUInt32Number manufacturer, model;
cmsUInt64Number attributes;
+ cmsUInt32Number creator;
cmsProfileID ProfileID;
// Dictionary
cmsUInt32Number TagCount;
cmsTagSignature TagNames[MAX_TABLE_TAG];
- cmsTagSignature TagLinked[MAX_TABLE_TAG]; // The tag to wich is linked (0=none)
+ cmsTagSignature TagLinked[MAX_TABLE_TAG]; // The tag to which is linked (0=none)
cmsUInt32Number TagSizes[MAX_TABLE_TAG]; // Size on disk
cmsUInt32Number TagOffsets[MAX_TABLE_TAG];
cmsBool TagSaveAsRaw[MAX_TABLE_TAG]; // True to write uncooked
void * TagPtrs[MAX_TABLE_TAG];
cmsTagTypeHandler* TagTypeHandlers[MAX_TABLE_TAG]; // Same structure may be serialized on different types
- // depending on profile version, so we keep track of the // type handler for each tag in the list.
+ // depending on profile version, so we keep track of the
+ // type handler for each tag in the list.
// Special
cmsBool IsWrite;
+ // Keep a mutex for cmsReadTag -- Note that this only works if the user includes a mutex plugin
+ void * UsrMutex;
+
} _cmsICCPROFILE;
// IO helpers for profiles
int _cmsSearchTag(_cmsICCPROFILE* Icc, cmsTagSignature sig, cmsBool lFollowLinks);
// Tag types
-cmsTagTypeHandler* _cmsGetTagTypeHandler(cmsTagTypeSignature sig);
+cmsTagTypeHandler* _cmsGetTagTypeHandler(cmsContext ContextID, cmsTagTypeSignature sig);
cmsTagTypeSignature _cmsGetTagTrueType(cmsHPROFILE hProfile, cmsTagSignature sig);
-cmsTagDescriptor* _cmsGetTagDescriptor(cmsTagSignature sig);
+cmsTagDescriptor* _cmsGetTagDescriptor(cmsContext ContextID, cmsTagSignature sig);
// Error logging ---------------------------------------------------------------------------------------------------------
// Interpolation ---------------------------------------------------------------------------------------------------------
-cmsInterpParams* _cmsComputeInterpParams(cmsContext ContextID, int nSamples, int InputChan, int OutputChan, const void* Table, cmsUInt32Number dwFlags);
-cmsInterpParams* _cmsComputeInterpParamsEx(cmsContext ContextID, const cmsUInt32Number nSamples[], int InputChan, int OutputChan, const void* Table, cmsUInt32Number dwFlags);
-void _cmsFreeInterpParams(cmsInterpParams* p);
-cmsBool _cmsSetInterpolationRoutine(cmsInterpParams* p);
+CMSCHECKPOINT cmsInterpParams* CMSEXPORT _cmsComputeInterpParams(cmsContext ContextID, cmsUInt32Number nSamples, cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags);
+cmsInterpParams* _cmsComputeInterpParamsEx(cmsContext ContextID, const cmsUInt32Number nSamples[], cmsUInt32Number InputChan, cmsUInt32Number OutputChan, const void* Table, cmsUInt32Number dwFlags);
+CMSCHECKPOINT void CMSEXPORT _cmsFreeInterpParams(cmsInterpParams* p);
+cmsBool _cmsSetInterpolationRoutine(cmsContext ContextID, cmsInterpParams* p);
// Curves ----------------------------------------------------------------------------------------------------------------
// Special Stages (cannot be saved)
-cmsStage* _cmsStageAllocLab2XYZ(cmsContext ContextID);
-cmsStage* _cmsStageAllocXYZ2Lab(cmsContext ContextID);
-cmsStage* _cmsStageAllocLabPrelin(cmsContext ContextID);
-cmsStage* _cmsStageAllocLabV2ToV4(cmsContext ContextID);
-cmsStage* _cmsStageAllocLabV2ToV4curves(cmsContext ContextID);
-cmsStage* _cmsStageAllocLabV4ToV2(cmsContext ContextID);
-cmsStage* _cmsStageAllocNamedColor(cmsNAMEDCOLORLIST* NamedColorList, cmsBool UsePCS);
-cmsStage* _cmsStageAllocIdentityCurves(cmsContext ContextID, int nChannels);
-cmsStage* _cmsStageAllocIdentityCLut(cmsContext ContextID, int nChan);
-cmsStage* _cmsStageNormalizeFromLabFloat(cmsContext ContextID);
-cmsStage* _cmsStageNormalizeFromXyzFloat(cmsContext ContextID);
-cmsStage* _cmsStageNormalizeToLabFloat(cmsContext ContextID);
-cmsStage* _cmsStageNormalizeToXyzFloat(cmsContext ContextID);
-
-// For curve set only
-cmsToneCurve** _cmsStageGetPtrToCurveSet(const cmsStage* mpe);
+CMSCHECKPOINT cmsStage* CMSEXPORT _cmsStageAllocLab2XYZ(cmsContext ContextID);
+CMSCHECKPOINT cmsStage* CMSEXPORT _cmsStageAllocXYZ2Lab(cmsContext ContextID);
+cmsStage* _cmsStageAllocLabPrelin(cmsContext ContextID);
+CMSCHECKPOINT cmsStage* CMSEXPORT _cmsStageAllocLabV2ToV4(cmsContext ContextID);
+cmsStage* _cmsStageAllocLabV2ToV4curves(cmsContext ContextID);
+CMSCHECKPOINT cmsStage* CMSEXPORT _cmsStageAllocLabV4ToV2(cmsContext ContextID);
+CMSCHECKPOINT cmsStage* CMSEXPORT _cmsStageAllocNamedColor(cmsNAMEDCOLORLIST* NamedColorList, cmsBool UsePCS);
+CMSCHECKPOINT cmsStage* CMSEXPORT _cmsStageAllocIdentityCurves(cmsContext ContextID, cmsUInt32Number nChannels);
+CMSCHECKPOINT cmsStage* CMSEXPORT _cmsStageAllocIdentityCLut(cmsContext ContextID, cmsUInt32Number nChan);
+cmsStage* _cmsStageNormalizeFromLabFloat(cmsContext ContextID);
+cmsStage* _cmsStageNormalizeFromXyzFloat(cmsContext ContextID);
+cmsStage* _cmsStageNormalizeToLabFloat(cmsContext ContextID);
+cmsStage* _cmsStageNormalizeToXyzFloat(cmsContext ContextID);
+cmsStage* _cmsStageClipNegatives(cmsContext ContextID, cmsUInt32Number nChannels);
-// Pipeline Evaluator (in floating point)
-typedef void (* _cmsPipelineEvalFloatFn)(const cmsFloat32Number In[],
- cmsFloat32Number Out[],
- const void* Data);
+// For curve set only
+cmsToneCurve** _cmsStageGetPtrToCurveSet(const cmsStage* mpe);
struct _cmsPipeline_struct {
// Data & evaluators
void *Data;
- _cmsOPTeval16Fn Eval16Fn;
+ _cmsPipelineEval16Fn Eval16Fn;
_cmsPipelineEvalFloatFn EvalFloatFn;
_cmsFreeUserDataFn FreeDataFn;
_cmsDupUserDataFn DupDataFn;
// Read tags using low-level function, provide necessary glue code to adapt versions, etc. All those return a brand new copy
// of the LUTS, since ownership of original is up to the profile. The user should free allocated resources.
-cmsPipeline* _cmsReadInputLUT(cmsHPROFILE hProfile, int Intent);
-cmsPipeline* _cmsReadOutputLUT(cmsHPROFILE hProfile, int Intent);
-cmsPipeline* _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, int Intent);
+CMSCHECKPOINT cmsPipeline* CMSEXPORT _cmsReadInputLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent);
+CMSCHECKPOINT cmsPipeline* CMSEXPORT _cmsReadOutputLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent);
+CMSCHECKPOINT cmsPipeline* CMSEXPORT _cmsReadDevicelinkLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent);
// Special values
cmsBool _cmsReadMediaWhitePoint(cmsCIEXYZ* Dest, cmsHPROFILE hProfile);
// Profile linker --------------------------------------------------------------------------------------------------
+// Link several profiles to obtain a single LUT modelling the whole color transform. Intents, Black point
+// compensation and Adaptation parameters may vary across profiles. BPC and Adaptation refers to the PCS
+// after the profile. I.e, BPC[0] refers to connexion between profile(0) and profile(1)
cmsPipeline* _cmsLinkProfiles(cmsContext ContextID,
cmsUInt32Number nProfiles,
cmsUInt32Number TheIntents[],
// LUT optimization ------------------------------------------------------------------------------------------------
-cmsUInt16Number _cmsQuantizeVal(cmsFloat64Number i, int MaxSamples);
-int _cmsReasonableGridpointsByColorspace(cmsColorSpaceSignature Colorspace, cmsUInt32Number dwFlags);
+CMSCHECKPOINT cmsUInt16Number CMSEXPORT _cmsQuantizeVal(cmsFloat64Number i, cmsUInt32Number MaxSamples);
+
+CMSAPI cmsUInt32Number CMSEXPORT _cmsReasonableGridpointsByColorspace(cmsColorSpaceSignature Colorspace, cmsUInt32Number dwFlags);
cmsBool _cmsEndPointsBySpace(cmsColorSpaceSignature Space,
cmsUInt16Number **White,
cmsUInt16Number **Black,
cmsUInt32Number *nOutputs);
-cmsBool _cmsOptimizePipeline(cmsPipeline** Lut,
- int Intent,
+CMSAPI cmsBool CMSEXPORT _cmsOptimizePipeline(cmsContext ContextID,
+ cmsPipeline** Lut,
+ cmsUInt32Number Intent,
cmsUInt32Number* InputFormat,
cmsUInt32Number* OutputFormat,
cmsUInt32Number* dwFlags );
cmsBool _cmsFormatterIsFloat(cmsUInt32Number Type);
cmsBool _cmsFormatterIs8bit(cmsUInt32Number Type);
-cmsFormatter _cmsGetFormatter(cmsUInt32Number Type, // Specific type, i.e. TYPE_RGB_8
- cmsFormatterDirection Dir,
- cmsUInt32Number dwFlags);
+CMSCHECKPOINT cmsFormatter CMSEXPORT _cmsGetFormatter(cmsContext ContextID,
+ cmsUInt32Number Type, // Specific type, i.e. TYPE_RGB_8
+ cmsFormatterDirection Dir,
+ cmsUInt32Number dwFlags);
#ifndef CMS_NO_HALF_SUPPORT
// Half float
-cmsFloat32Number _cmsHalf2Float(cmsUInt16Number h);
-cmsUInt16Number _cmsFloat2Half(cmsFloat32Number flt);
+CMSCHECKPOINT cmsFloat32Number CMSEXPORT _cmsHalf2Float(cmsUInt16Number h);
+CMSCHECKPOINT cmsUInt16Number CMSEXPORT _cmsFloat2Half(cmsFloat32Number flt);
#endif
cmsUInt32Number InputFormat, OutputFormat; // Keep formats for further reference
// Points to transform code
- _cmsTransformFn xform;
+ _cmsTransform2Fn xform;
// Formatters, cannot be embedded into LUT because cache
cmsFormatter16 FromInput;
cmsColorSpaceSignature EntryColorSpace;
cmsColorSpaceSignature ExitColorSpace;
+ // White points (informative only)
+ cmsCIEXYZ EntryWhitePoint;
+ cmsCIEXYZ ExitWhitePoint;
+
// Profiles used to create the transform
cmsSEQ* Sequence;
void* UserData;
_cmsFreeUserDataFn FreeUserData;
+ // A way to provide backwards compatibility with full xform plugins
+ _cmsTransformFn OldXform;
+
} _cmsTRANSFORM;
-// --------------------------------------------------------------------------------------------------
+// Copies extra channels from input to output if the original flags in the transform structure
+// instructs to do so. This function is called on all standard transform functions.
+void _cmsHandleExtraChannels(_cmsTRANSFORM* p, const void* in,
+ void* out,
+ cmsUInt32Number PixelsPerLine,
+ cmsUInt32Number LineCount,
+ const cmsStride* Stride);
+
+// -----------------------------------------------------------------------------------------------------------------------
cmsHTRANSFORM _cmsChain2Lab(cmsContext ContextID,
cmsUInt32Number nProfiles,
# Don't require all the GNU mandated files
AUTOMAKE_OPTIONS = 1.7 foreign
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src
check_PROGRAMS = testcms
# CFLAGS = --pedantic -Wall -std=c99 -O2
+# The testsuite binary is statically linked. This is necessary as it uses some
+# of the internal functions that are not necessarily exported by the shared
+# library.
testcms_LDADD = $(top_builddir)/src/liblcms2.la
-testcms_LDFLAGS = @LDFLAGS@
-testcms_SOURCES = testcms2.c
+testcms_LDFLAGS = -static @LDFLAGS@
+testcms_SOURCES = testcms2.c testplugin.c zoo_icc.c testcms2.h
EXTRA_DIST = test1.icc bad.icc toosmall.icc test2.icc \
test3.icc test4.icc \
- test5.icc
+ test5.icc ibm-t61.icc crayons.icc bad_mpe.icc
check:
if [ $(top_srcdir) != $(top_builddir) ]; then \
cp $(top_srcdir)/testbed/*.ic? $(top_builddir)/testbed; \
fi
- ./testcms
+ LD_LIBRARY_PATH=$(top_builddir)/src/.libs ./testcms
if [ $(top_srcdir) != $(top_builddir) ]; then \
rm -f $(top_builddir)/testbed/*.ic?; \
fi
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
# Makefile for building testcms
#
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
host_triplet = @host@
check_PROGRAMS = testcms$(EXEEXT)
subdir = testbed
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am_testcms_OBJECTS = testcms2.$(OBJEXT)
+am_testcms_OBJECTS = testcms2.$(OBJEXT) testplugin.$(OBJEXT) \
+ zoo_icc.$(OBJEXT)
testcms_OBJECTS = $(am_testcms_OBJECTS)
testcms_DEPENDENCIES = $(top_builddir)/src/liblcms2.la
-testcms_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(testcms_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 =
+testcms_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(testcms_LDFLAGS) $(LDFLAGS) -o $@
+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@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/testcms2.Po \
+ ./$(DEPDIR)/testplugin.Po ./$(DEPDIR)/zoo_icc.Po
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)
+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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 = $(testcms_SOURCES)
DIST_SOURCES = $(testcms_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
# Don't require all the GNU mandated files
AUTOMAKE_OPTIONS = 1.7 foreign
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src
+AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src
# CFLAGS = --pedantic -Wall -std=c99 -O2
+
+# The testsuite binary is statically linked. This is necessary as it uses some
+# of the internal functions that are not necessarily exported by the shared
+# library.
testcms_LDADD = $(top_builddir)/src/liblcms2.la
-testcms_LDFLAGS = @LDFLAGS@
-testcms_SOURCES = testcms2.c
+testcms_LDFLAGS = -static @LDFLAGS@
+testcms_SOURCES = testcms2.c testplugin.c zoo_icc.c testcms2.h
EXTRA_DIST = test1.icc bad.icc toosmall.icc test2.icc \
test3.icc test4.icc \
- test5.icc
+ test5.icc ibm-t61.icc crayons.icc bad_mpe.icc
all: all-am
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testbed/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign testbed/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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+
testcms$(EXEEXT): $(testcms_OBJECTS) $(testcms_DEPENDENCIES) $(EXTRA_testcms_DEPENDENCIES)
@rm -f testcms$(EXEEXT)
- $(testcms_LINK) $(testcms_OBJECTS) $(testcms_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(testcms_LINK) $(testcms_OBJECTS) $(testcms_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcms2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testcms2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testplugin.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoo_icc.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.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@
+@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@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.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@
+@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@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(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@
+@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@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
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)
+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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/testcms2.Po
+ -rm -f ./$(DEPDIR)/testplugin.Po
+ -rm -f ./$(DEPDIR)/zoo_icc.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/testcms2.Po
+ -rm -f ./$(DEPDIR)/testplugin.Po
+ -rm -f ./$(DEPDIR)/zoo_icc.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
.MAKE: check-am install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool ctags \
- distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am 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 \
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
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
check:
if [ $(top_srcdir) != $(top_builddir) ]; then \
cp $(top_srcdir)/testbed/*.ic? $(top_builddir)/testbed; \
fi
- ./testcms
+ LD_LIBRARY_PATH=$(top_builddir)/src/.libs ./testcms
if [ $(top_srcdir) != $(top_builddir) ]; then \
rm -f $(top_builddir)/testbed/*.ic?; \
fi
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
//---------------------------------------------------------------------------------
//
-#ifdef _MSC_VER
-# define _CRT_SECURE_NO_WARNINGS 1
-#endif
-
-#include "lcms2_internal.h"
-
-// On Visual Studio, use debug CRT
-#ifdef _MSC_VER
-# include "crtdbg.h"
-# include <io.h>
-#endif
+#include "testcms2.h"
// A single check. Returns 1 if success, 0 if failed
typedef cmsInt32Number (*TestFn)(void);
#define cmsmin(a, b) (((a) < (b)) ? (a) : (b))
// Die, a fatal unexpected error is detected!
-static
-void Die(const char* Reason)
+void Die(const char* Reason, ...)
{
- printf("\n\nArrrgggg!!: %s!\n\n", Reason);
+ va_list args;
+ va_start(args, Reason);
+ vsprintf(ReasonToFailBuffer, Reason, args);
+ va_end(args);
+ printf("\n%s\n", ReasonToFailBuffer);
fflush(stdout);
exit(1);
}
// maximum requested as a single block and maximum allocated at a given time. Results are printed at the end
static cmsUInt32Number SingleHit, MaxAllocated=0, TotalMemory=0;
-// I'm hidding the size before the block. This is a well-known technique and probably the blocks coming from
+// I'm hiding the size before the block. This is a well-known technique and probably the blocks coming from
// malloc are built in a way similar to that, but I do on my own to be portable.
typedef struct {
cmsUInt32Number KeepSize;
cmsContext WhoAllocated;
+ cmsUInt32Number DontCheck;
union {
cmsUInt64Number HiSparc;
{
static cmsUInt32Number n = 1;
- return (cmsContext) n++;
+ return (cmsContext) (void*) ((cmsUInt8Number*) NULL + (n++ % 0xff0));
}
// The allocate routine
blk ->KeepSize = size;
blk ->WhoAllocated = ContextID;
+ blk ->DontCheck = 0;
return (void*) ((cmsUInt8Number*) blk + SIZE_OF_MEM_HEADER);
}
+
// The free routine
static
void DebugFree(cmsContext ContextID, void *Ptr)
blk = (_cmsMemoryBlock*) (((cmsUInt8Number*) Ptr) - SIZE_OF_MEM_HEADER);
TotalMemory -= blk ->KeepSize;
- if (blk ->WhoAllocated != ContextID) {
+ if (blk ->WhoAllocated != ContextID && !blk->DontCheck) {
Die("Trying to free memory allocated by a different thread");
}
free(blk);
}
+
// Reallocate, just a malloc, a copy and a free in this case.
static
void * DebugRealloc(cmsContext ContextID, void* Ptr, cmsUInt32Number NewSize)
void DebugMemPrintTotals(void)
{
printf("[Memory statistics]\n");
- printf("Allocated = %d MaxAlloc = %d Single block hit = %d\n", TotalMemory, MaxAllocated, SingleHit);
+ printf("Allocated = %u MaxAlloc = %u Single block hit = %u\n", TotalMemory, MaxAllocated, SingleHit);
+}
+
+
+void DebugMemDontCheckThis(void *Ptr)
+{
+ _cmsMemoryBlock* blk = (_cmsMemoryBlock*) (((cmsUInt8Number*) Ptr) - SIZE_OF_MEM_HEADER);
+
+ blk ->DontCheck = 1;
+}
+
+
+// Memory string
+static
+const char* MemStr(cmsUInt32Number size)
+{
+ static char Buffer[1024];
+
+ if (size > 1024*1024) {
+ sprintf(Buffer, "%g Mb", (cmsFloat64Number) size / (1024.0*1024.0));
+ }
+ else
+ if (size > 1024) {
+ sprintf(Buffer, "%g Kb", (cmsFloat64Number) size / 1024.0);
+ }
+ else
+ sprintf(Buffer, "%g bytes", (cmsFloat64Number) size);
+
+ return Buffer;
+}
+
+
+void TestMemoryLeaks(cmsBool ok)
+{
+ if (TotalMemory > 0)
+ printf("Ok, but %s are left!\n", MemStr(TotalMemory));
+ else {
+ if (ok) printf("Ok.\n");
+ }
}
// Here we go with the plug-in declaration
-static cmsPluginMemHandler DebugMemHandler = {{ cmsPluginMagicNumber, 2000, cmsPluginMemHandlerSig, NULL },
+static cmsPluginMemHandler DebugMemHandler = {{ cmsPluginMagicNumber, 2060, cmsPluginMemHandlerSig, NULL },
DebugMalloc, DebugFree, DebugRealloc, NULL, NULL, NULL };
-// Utils -------------------------------------------------------------------------------------
+// Returnds a pointer to the memhandler plugin
+void* PluginMemHandler(void)
+{
+ return (void*) &DebugMemHandler;
+}
+
+cmsContext WatchDogContext(void* usr)
+{
+ cmsContext ctx;
+
+ ctx = cmsCreateContext(&DebugMemHandler, usr);
+
+ if (ctx == NULL)
+ Die("Unable to create memory managed context");
+
+ DebugMemDontCheckThis(ctx);
+ return ctx;
+}
+
+
static
void FatalErrorQuit(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text)
cmsUNUSED_PARAMETER(ContextID);
cmsUNUSED_PARAMETER(ErrorCode);
+}
+
+void ResetFatalError(void)
+{
+ cmsSetLogErrorHandler(FatalErrorQuit);
}
+
// Print a dot for gauging
-static
void Dot(void)
{
fprintf(stdout, "."); fflush(stdout);
}
+void Say(const char* str)
+{
+ fprintf(stdout, "%s", str); fflush(stdout);
+}
+
+
// Keep track of the reason to fail
-static
+
void Fail(const char* frm, ...)
{
va_list args;
}
// Keep track of subtest
-static
+
void SubTest(const char* frm, ...)
{
va_list args;
va_end(args);
}
-
-// Memory string
-static
-const char* MemStr(cmsUInt32Number size)
-{
- static char Buffer[1024];
-
- if (size > 1024*1024) {
- sprintf(Buffer, "%g Mb", (cmsFloat64Number) size / (1024.0*1024.0));
- }
- else
- if (size > 1024) {
- sprintf(Buffer, "%g Kb", (cmsFloat64Number) size / 1024.0);
- }
- else
- sprintf(Buffer, "%g bytes", (cmsFloat64Number) size);
-
- return Buffer;
-}
-
-
// The check framework
static
void Check(const char* Title, TestFn Fn)
if (Fn() && !TrappedError) {
// It is a good place to check memory
- if (TotalMemory > 0)
- printf("Ok, but %s are left!\n", MemStr(TotalMemory));
- else
- printf("Ok.\n");
+ TestMemoryLeaks(TRUE);
+
}
else {
printf("FAIL!\n");
for (i=0; i < gamma ->nEntries; i++) {
char Val[30];
- sprintf(Val, "%d", i);
+ sprintf(Val, "%u", i);
cmsIT8SetDataRowCol(hIT8, i, 0, Val);
sprintf(Val, "0x%x", gamma ->Table16[i]);
cmsIT8SetDataRowCol(hIT8, i, 1, Val);
// Create a fake CMYK profile, without any other requeriment that being coarse CMYK.
-// DONT USE THIS PROFILE FOR ANYTHING, IT IS USELESS BUT FOR TESTING PURPOSES.
+// DON'T USE THIS PROFILE FOR ANYTHING, IT IS USELESS BUT FOR TESTING PURPOSES.
typedef struct {
cmsHTRANSFORM hLab2sRGB;
}
static
-cmsInt32Number ForwardSampler(register const cmsUInt16Number In[], cmsUInt16Number Out[], void* Cargo)
+cmsInt32Number ForwardSampler(CMSREGISTER const cmsUInt16Number In[], cmsUInt16Number Out[], void* Cargo)
{
FakeCMYKParams* p = (FakeCMYKParams*) Cargo;
cmsFloat64Number rgb[3], cmyk[4];
static
-cmsInt32Number ReverseSampler(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+cmsInt32Number ReverseSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo)
{
FakeCMYKParams* p = (FakeCMYKParams*) Cargo;
cmsFloat64Number c, m, y, k, rgb[3];
h = cmsOpenProfileFromFile(FileName, "r");
if (h == NULL) return 0;
-
- // Do some teste....
-
+
cmsCloseProfile(h);
-
return 1;
}
h = CreateFakeCMYK(300, FALSE);
if (!OneVirtual(h, "Fake CMYK profile", "lcms2cmyk.icc")) return 0;
+ // ---
+
+ h = cmsCreateBCHSWabstractProfileTHR(DbgThread(), 17, 0, 1.2, 0, 3, 5000, 5000);
+ if (!OneVirtual(h, "Brightness", "brightness.icc")) return 0;
return 1;
}
remove("glablcms2.icc");
remove("lcms2link.icc");
remove("lcms2link2.icc");
+ remove("brightness.icc");
}
// -------------------------------------------------------------------------------------------------
// Are we little or big endian? From Harbison&Steele.
static
-cmsInt32Number CheckEndianess(void)
+cmsInt32Number CheckEndianness(void)
{
cmsInt32Number BigEndian, IsOk;
union {
#endif
if (!IsOk) {
- Fail("\nOOOPPSS! You have CMS_USE_BIG_ENDIAN toggle misconfigured!\n\n"
+ Die("\nOOOPPSS! You have CMS_USE_BIG_ENDIAN toggle misconfigured!\n\n"
"Please, edit lcms2.h and %s the CMS_USE_BIG_ENDIAN toggle.\n", BigEndian? "uncomment" : "comment");
return 0;
}
(_cmsQuickFloor(-1.234) != -2) ||
(_cmsQuickFloor(-32767.1) != -32768)) {
- Fail("\nOOOPPSS! _cmsQuickFloor() does not work as expected in your machine!\n\n"
- "Please, edit lcms.h and uncomment the CMS_DONT_USE_FAST_FLOOR toggle.\n");
+ Die("\nOOOPPSS! _cmsQuickFloor() does not work as expected in your machine!\n\n"
+ "Please, edit lcms2.h and uncomment the CMS_DONT_USE_FAST_FLOOR toggle.\n");
return 0;
}
if (_cmsQuickFloorWord((cmsFloat64Number) i + 0.1234) != i) {
- Fail("\nOOOPPSS! _cmsQuickFloorWord() does not work as expected in your machine!\n\n"
- "Please, edit lcms.h and uncomment the CMS_DONT_USE_FAST_FLOOR toggle.\n");
+ Die("\nOOOPPSS! _cmsQuickFloorWord() does not work as expected in your machine!\n\n"
+ "Please, edit lcms2.h and uncomment the CMS_DONT_USE_FAST_FLOOR toggle.\n");
return 0;
}
}
static cmsFloat64Number MaxErr;
static cmsFloat64Number AllowedErr = FIXED_PRECISION_15_16;
-static
cmsBool IsGoodVal(const char *title, cmsFloat64Number in, cmsFloat64Number out, cmsFloat64Number max)
{
cmsFloat64Number Err = fabs(in - out);
return TRUE;
}
-static
+
cmsBool IsGoodFixed15_16(const char *title, cmsFloat64Number in, cmsFloat64Number out)
{
return IsGoodVal(title, in, out, FIXED_PRECISION_15_16);
}
-static
+
cmsBool IsGoodFixed8_8(const char *title, cmsFloat64Number in, cmsFloat64Number out)
{
return IsGoodVal(title, in, out, FIXED_PRECISION_8_8);
}
-static
cmsBool IsGoodWord(const char *title, cmsUInt16Number in, cmsUInt16Number out)
{
if ((abs(in - out) > 0 )) {
return TRUE;
}
-static
cmsBool IsGoodWordPrec(const char *title, cmsUInt16Number in, cmsUInt16Number out, cmsUInt16Number maxErr)
{
if ((abs(in - out) > maxErr )) {
return 1;
}
+// D50 constant --------------------------------------------------------------------------------------------
+
+static
+cmsInt32Number CheckD50Roundtrip(void)
+{
+ cmsFloat64Number cmsD50X_2 = 0.96420288;
+ cmsFloat64Number cmsD50Y_2 = 1.0;
+ cmsFloat64Number cmsD50Z_2 = 0.82490540;
+
+ cmsS15Fixed16Number xe = _cmsDoubleTo15Fixed16(cmsD50X);
+ cmsS15Fixed16Number ye = _cmsDoubleTo15Fixed16(cmsD50Y);
+ cmsS15Fixed16Number ze = _cmsDoubleTo15Fixed16(cmsD50Z);
+
+ cmsFloat64Number x = _cms15Fixed16toDouble(xe);
+ cmsFloat64Number y = _cms15Fixed16toDouble(ye);
+ cmsFloat64Number z = _cms15Fixed16toDouble(ze);
+
+ double dx = fabs(cmsD50X - x);
+ double dy = fabs(cmsD50Y - y);
+ double dz = fabs(cmsD50Z - z);
+
+ double euc = sqrt(dx*dx + dy*dy + dz* dz);
+
+ if (euc > 1E-5) {
+
+ Fail("D50 roundtrip |err| > (%f) ", euc);
+ return 0;
+ }
+
+ xe = _cmsDoubleTo15Fixed16(cmsD50X_2);
+ ye = _cmsDoubleTo15Fixed16(cmsD50Y_2);
+ ze = _cmsDoubleTo15Fixed16(cmsD50Z_2);
+
+ x = _cms15Fixed16toDouble(xe);
+ y = _cms15Fixed16toDouble(ye);
+ z = _cms15Fixed16toDouble(ze);
+
+ dx = fabs(cmsD50X_2 - x);
+ dy = fabs(cmsD50Y_2 - y);
+ dz = fabs(cmsD50Z_2 - z);
+
+ euc = sqrt(dx*dx + dy*dy + dz* dz);
+
+ if (euc > 1E-5) {
+
+ Fail("D50 roundtrip |err| > (%f) ", euc);
+ return 0;
+ }
+
+
+ return 1;
+}
+
// Linear interpolation -----------------------------------------------------------------------------------------------
// Since prime factors of 65535 (FFFF) are,
printf("\n");
for (j=10; j <= 4096; j++) {
- if ((j % 10) == 0) printf("%d \r", j);
+ if ((j % 10) == 0) printf("%u \r", j);
if (!Check1D(j, FALSE, 1)) return 0;
}
printf("\n");
for (j=10; j <= 4096; j++) {
- if ((j % 10) == 0) printf("%d \r", j);
+ if ((j % 10) == 0) printf("%u \r", j);
if (!Check1D(j, TRUE, 1)) return 0;
}
{
cmsPipeline* Lut;
cmsStage* clut;
- cmsFloat32Number Target[3], Result[3], Hint[3];
+ cmsFloat32Number Target[4], Result[4], Hint[4];
cmsFloat32Number err, max;
cmsInt32Number i;
cmsUInt16Number Table[] = {
if (Result[0] != 0 || Result[1] != 0 || Result[2] != 0){
Fail("Reverse interpolation didn't find zero");
- return 0;
+ goto Error;
}
// Transverse identity
cmsPipelineFree(Lut);
return (max <= FLOAT_PRECISSION);
+
+Error:
+ cmsPipelineFree(Lut);
+ return 0;
}
cmsPipelineEvalFloat(Target, Result, Lut);
- if (!IsGoodFixed15_16("0", Target[0], Result[0])) return 0;
- if (!IsGoodFixed15_16("1", Target[1], Result[1])) return 0;
- if (!IsGoodFixed15_16("2", Target[2], Result[2])) return 0;
+ if (!IsGoodFixed15_16("0", Target[0], Result[0])) goto Error;
+ if (!IsGoodFixed15_16("1", Target[1], Result[1])) goto Error;
+ if (!IsGoodFixed15_16("2", Target[2], Result[2])) goto Error;
}
SubTest("4->3 zero");
if (Result[0] != 0 || Result[1] != 0 || Result[2] != 0 || Result[3] != 0){
Fail("Reverse interpolation didn't find zero");
- return 0;
+ goto Error;
}
SubTest("4->3 find CMY");
cmsPipelineFree(Lut);
return (max <= FLOAT_PRECISSION);
+
+Error:
+ cmsPipelineFree(Lut);
+ return 0;
}
static
-cmsInt32Number Sampler3D(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register void * Cargo)
+cmsInt32Number Sampler3D(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void * Cargo)
{
Out[0] = Fn8D1(In[0], In[1], In[2], 0, 0, 0, 0, 0, 3);
}
static
-cmsInt32Number Sampler4D(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register void * Cargo)
+cmsInt32Number Sampler4D(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void * Cargo)
{
Out[0] = Fn8D1(In[0], In[1], In[2], In[3], 0, 0, 0, 0, 4);
}
static
-cmsInt32Number Sampler5D(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register void * Cargo)
+cmsInt32Number Sampler5D(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void * Cargo)
{
Out[0] = Fn8D1(In[0], In[1], In[2], In[3], In[4], 0, 0, 0, 5);
}
static
-cmsInt32Number Sampler6D(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register void * Cargo)
+cmsInt32Number Sampler6D(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void * Cargo)
{
Out[0] = Fn8D1(In[0], In[1], In[2], In[3], In[4], In[5], 0, 0, 6);
}
static
-cmsInt32Number Sampler7D(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register void * Cargo)
+cmsInt32Number Sampler7D(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void * Cargo)
{
Out[0] = Fn8D1(In[0], In[1], In[2], In[3], In[4], In[5], In[6], 0, 7);
}
static
-cmsInt32Number Sampler8D(register const cmsUInt16Number In[],
- register cmsUInt16Number Out[],
- register void * Cargo)
+cmsInt32Number Sampler8D(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER void * Cargo)
{
Out[0] = Fn8D1(In[0], In[1], In[2], In[3], In[4], In[5], In[6], In[7], 8);
-// Join two gamma tables in floting point format. Result should be a straight line
+// Join two gamma tables in floating point format. Result should be a straight line
static
cmsToneCurve* CombineGammaFloat(cmsToneCurve* g1, cmsToneCurve* g2)
{
h = cmsOpenProfileFromFileTHR(DbgThread(), "mlucheck.icc", "r");
- mlu3 = cmsReadTag(h, cmsSigProfileDescriptionTag);
+ mlu3 = (cmsMLU *) cmsReadTag(h, cmsSigProfileDescriptionTag);
if (mlu3 == NULL) { Fail("Profile didn't get the MLU\n"); rc = 0; goto Error; }
// Check all is still in place
{
cmsNAMEDCOLORLIST* nc = NULL, *nc2;
cmsInt32Number i, j, rc=1;
- char Name[255];
+ char Name[cmsMAX_PATH];
cmsUInt16Number PCS[3];
cmsUInt16Number Colorant[cmsMAXCHANNELS];
- char CheckName[255];
+ char CheckName[cmsMAX_PATH];
cmsUInt16Number CheckPCS[3];
cmsUInt16Number CheckColorant[cmsMAXCHANNELS];
cmsHPROFILE h;
nc = NULL;
h = cmsOpenProfileFromFileTHR(DbgThread(), "namedcol.icc", "r");
- nc2 = cmsReadTag(h, cmsSigNamedColor2Tag);
+ nc2 = (cmsNAMEDCOLORLIST *) cmsReadTag(h, cmsSigNamedColor2Tag);
if (cmsNamedColorCount(nc2) != 4096) { rc = 0; Fail("Invalid count"); goto Error; }
+// For educational purposes ONLY. No error checking is performed!
+static
+cmsInt32Number CreateNamedColorProfile(void)
+{
+ // Color list database
+ cmsNAMEDCOLORLIST* colors = cmsAllocNamedColorList(0, 10, 4, "PANTONE", "TCX");
+
+ // Containers for names
+ cmsMLU* DescriptionMLU, *CopyrightMLU;
+
+ // Create n empty profile
+ cmsHPROFILE hProfile = cmsOpenProfileFromFile("named.icc", "w");
+
+ // Values
+ cmsCIELab Lab;
+ cmsUInt16Number PCS[3], Colorant[4];
+
+ // Set profile class
+ cmsSetProfileVersion(hProfile, 4.3);
+ cmsSetDeviceClass(hProfile, cmsSigNamedColorClass);
+ cmsSetColorSpace(hProfile, cmsSigCmykData);
+ cmsSetPCS(hProfile, cmsSigLabData);
+ cmsSetHeaderRenderingIntent(hProfile, INTENT_PERCEPTUAL);
+
+ // Add description and copyright only in english/US
+ DescriptionMLU = cmsMLUalloc(0, 1);
+ CopyrightMLU = cmsMLUalloc(0, 1);
+
+ cmsMLUsetWide(DescriptionMLU, "en", "US", L"Profile description");
+ cmsMLUsetWide(CopyrightMLU, "en", "US", L"Profile copyright");
+
+ cmsWriteTag(hProfile, cmsSigProfileDescriptionTag, DescriptionMLU);
+ cmsWriteTag(hProfile, cmsSigCopyrightTag, CopyrightMLU);
+
+ // Set the media white point
+ cmsWriteTag(hProfile, cmsSigMediaWhitePointTag, cmsD50_XYZ());
+
+
+ // Populate one value, Colorant = CMYK values in 16 bits, PCS[] = Encoded Lab values (in V2 format!!)
+ Lab.L = 50; Lab.a = 10; Lab.b = -10;
+ cmsFloat2LabEncodedV2(PCS, &Lab);
+ Colorant[0] = 10 * 257; Colorant[1] = 20 * 257; Colorant[2] = 30 * 257; Colorant[3] = 40 * 257;
+ cmsAppendNamedColor(colors, "Hazelnut 14-1315", PCS, Colorant);
+
+ // Another one. Consider to write a routine for that
+ Lab.L = 40; Lab.a = -5; Lab.b = 8;
+ cmsFloat2LabEncodedV2(PCS, &Lab);
+ Colorant[0] = 10 * 257; Colorant[1] = 20 * 257; Colorant[2] = 30 * 257; Colorant[3] = 40 * 257;
+ cmsAppendNamedColor(colors, "Kale 18-0107", PCS, Colorant);
+
+ // Write the colors database
+ cmsWriteTag(hProfile, cmsSigNamedColor2Tag, colors);
+
+ // That will create the file
+ cmsCloseProfile(hProfile);
+
+ // Free resources
+ cmsFreeNamedColorList(colors);
+ cmsMLUfree(DescriptionMLU);
+ cmsMLUfree(CopyrightMLU);
+
+ remove("named.icc");
+
+ return 1;
+}
+
+
// ----------------------------------------------------------------------------------------------------------
// Formatters
static cmsBool FormatterFailed;
static
-void CheckSingleFormatter16(cmsUInt32Number Type, const char* Text)
+void CheckSingleFormatter16(cmsContext id, cmsUInt32Number Type, const char* Text)
{
cmsUInt16Number Values[cmsMAXCHANNELS];
cmsUInt8Number Buffer[1024];
info.OutputFormat = info.InputFormat = Type;
// Go forth and back
- f = _cmsGetFormatter(Type, cmsFormatterInput, CMS_PACK_FLAGS_16BITS);
- b = _cmsGetFormatter(Type, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS);
+ f = _cmsGetFormatter(id, Type, cmsFormatterInput, CMS_PACK_FLAGS_16BITS);
+ b = _cmsGetFormatter(id, Type, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS);
if (f.Fmt16 == NULL || b.Fmt16 == NULL) {
Fail("no formatter for %s", Text);
FormatterFailed = TRUE;
// Useful for debug
- f = _cmsGetFormatter(Type, cmsFormatterInput, CMS_PACK_FLAGS_16BITS);
- b = _cmsGetFormatter(Type, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS);
+ f = _cmsGetFormatter(id, Type, cmsFormatterInput, CMS_PACK_FLAGS_16BITS);
+ b = _cmsGetFormatter(id, Type, cmsFormatterOutput, CMS_PACK_FLAGS_16BITS);
return;
}
Values[i] <<= 8;
}
- b.Fmt16(&info, Values, Buffer, 1);
+ b.Fmt16(&info, Values, Buffer, 2);
memset(Values, 0, sizeof(Values));
- f.Fmt16(&info, Values, Buffer, 1);
+ f.Fmt16(&info, Values, Buffer, 2);
for (i=0; i < nChannels; i++) {
if (bytes == 1)
}
}
-#define C(a) CheckSingleFormatter16(a, #a)
+#define C(a) CheckSingleFormatter16(0, a, #a)
// Check all formatters
C( TYPE_ALabV2_8 );
C( TYPE_LabV2_16 );
+#ifndef CMS_NO_HALF_SUPPORT
+
C( TYPE_GRAY_HALF_FLT );
C( TYPE_RGB_HALF_FLT );
C( TYPE_CMYK_HALF_FLT );
C( TYPE_BGRA_HALF_FLT );
C( TYPE_ABGR_HALF_FLT );
+#endif
return FormatterFailed == 0 ? 1 : 0;
}
info.OutputFormat = info.InputFormat = Type;
// Go forth and back
- f = _cmsGetFormatter(Type, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT);
- b = _cmsGetFormatter(Type, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT);
+ f = _cmsGetFormatter(0, Type, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT);
+ b = _cmsGetFormatter(0, Type, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT);
if (f.FmtFloat == NULL || b.FmtFloat == NULL) {
Fail("no formatter for %s", Text);
FormatterFailed = TRUE;
// Useful for debug
- f = _cmsGetFormatter(Type, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT);
- b = _cmsGetFormatter(Type, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT);
+ f = _cmsGetFormatter(0, Type, cmsFormatterInput, CMS_PACK_FLAGS_FLOAT);
+ b = _cmsGetFormatter(0, Type, cmsFormatterOutput, CMS_PACK_FLAGS_FLOAT);
return;
}
C( TYPE_RGB_DBL );
C( TYPE_BGR_DBL );
C( TYPE_CMYK_DBL );
+ C( TYPE_XYZ_FLT );
+#ifndef CMS_NO_HALF_SUPPORT
C( TYPE_GRAY_HALF_FLT );
C( TYPE_RGB_HALF_FLT );
C( TYPE_CMYK_HALF_FLT );
C( TYPE_BGR_HALF_FLT );
C( TYPE_BGRA_HALF_FLT );
C( TYPE_ABGR_HALF_FLT );
+#endif
+
+
- return FormatterFailed == 0 ? 1 : 0;
+ return FormatterFailed == 0 ? 1 : 0;
}
#undef C
return cmsWriteTag(hProfile, tag, &XYZ);
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsCIEXYZ *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
return IsGoodFixed15_16("X", 1.0, Pt ->X) &&
IsGoodFixed15_16("Y", 1.1, Pt->Y) &&
return rc;
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsToneCurve *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
return cmsIsToneCurveLinear(Pt);
}
static
+cmsInt32Number CheckTextSingle(cmsInt32Number Pass, cmsHPROFILE hProfile, cmsTagSignature tag)
+{
+ cmsMLU *m, *Pt;
+ cmsInt32Number rc;
+ char Buffer[256];
+
+
+ switch (Pass) {
+
+ case 1:
+ m = cmsMLUalloc(DbgThread(), 0);
+ cmsMLUsetASCII(m, cmsNoLanguage, cmsNoCountry, "Test test");
+ rc = cmsWriteTag(hProfile, tag, m);
+ cmsMLUfree(m);
+ return rc;
+
+ case 2:
+ Pt = (cmsMLU *) cmsReadTag(hProfile, tag);
+ if (Pt == NULL) return 0;
+ cmsMLUgetASCII(Pt, cmsNoLanguage, cmsNoCountry, Buffer, 256);
+ if (strcmp(Buffer, "Test test") != 0) return FALSE;
+ return TRUE;
+
+ default:
+ return 0;
+ }
+}
+
+
+static
cmsInt32Number CheckText(cmsInt32Number Pass, cmsHPROFILE hProfile, cmsTagSignature tag)
{
cmsMLU *m, *Pt;
case 1:
m = cmsMLUalloc(DbgThread(), 0);
cmsMLUsetASCII(m, cmsNoLanguage, cmsNoCountry, "Test test");
+ cmsMLUsetASCII(m, "en", "US", "1 1 1 1");
+ cmsMLUsetASCII(m, "es", "ES", "2 2 2 2");
+ cmsMLUsetASCII(m, "ct", "ES", "3 3 3 3");
+ cmsMLUsetASCII(m, "en", "GB", "444444444");
rc = cmsWriteTag(hProfile, tag, m);
cmsMLUfree(m);
return rc;
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsMLU *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
cmsMLUgetASCII(Pt, cmsNoLanguage, cmsNoCountry, Buffer, 256);
- return strcmp(Buffer, "Test test") == 0;
+ if (strcmp(Buffer, "Test test") != 0) return FALSE;
+ cmsMLUgetASCII(Pt, "en", "US", Buffer, 256);
+ if (strcmp(Buffer, "1 1 1 1") != 0) return FALSE;
+ cmsMLUgetASCII(Pt, "es", "ES", Buffer, 256);
+ if (strcmp(Buffer, "2 2 2 2") != 0) return FALSE;
+ cmsMLUgetASCII(Pt, "ct", "ES", Buffer, 256);
+ if (strcmp(Buffer, "3 3 3 3") != 0) return FALSE;
+ cmsMLUgetASCII(Pt, "en", "GB", Buffer, 256);
+ if (strcmp(Buffer, "444444444") != 0) return FALSE;
+ return TRUE;
default:
return 0;
return rc;
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsICCData *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
return (Pt ->data[0] == '?') && (Pt ->flag == 0) && (Pt ->len == 1);
switch (Pass) {
case 1:
- Holder = cmsSigPerceptualReferenceMediumGamut;
+ Holder = (cmsTagSignature) cmsSigPerceptualReferenceMediumGamut;
return cmsWriteTag(hProfile, tag, &Holder);
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsTagSignature *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
return *Pt == cmsSigPerceptualReferenceMediumGamut;
return cmsWriteTag(hProfile, tag, &Holder);
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (struct tm *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
return (Pt ->tm_hour == 1 &&
case 2:
- nc = cmsReadTag(hProfile, tag);
+ nc = (cmsNAMEDCOLORLIST *) cmsReadTag(hProfile, tag);
if (nc == NULL) return 0;
for (i=0; i < max_check; i++) {
return rc;
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsPipeline *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
// Transform values, check for identity
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsFloat64Number *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
for (i=0; i < 9; i++) {
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsCIExyYTRIPLE *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
if (!IsGoodFixed15_16("xyY", Pt ->Red.x, c.Red.x)) return 0;
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsUInt8Number *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
for (i=0; i < cmsMAXCHANNELS; i++) {
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsICCMeasurementConditions *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
if (!IsGoodFixed15_16("Backing", Pt ->Backing.X, 0.1)) return 0;
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsUcrBg *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
cmsMLUgetASCII(Pt ->Desc, cmsNoLanguage, cmsNoCountry, Buffer, 256);
return rc;
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsPipeline *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
return CheckFloatLUT(Pt);
case 2:
- Pt = cmsReadTag(hProfile, tag);
+ Pt = (cmsScreening *) cmsReadTag(hProfile, tag);
if (Pt == NULL) return 0;
if (Pt ->nChannels != 1) return 0;
static
-void SetOneStr(cmsMLU** mlu, wchar_t* s1, wchar_t* s2)
+void SetOneStr(cmsMLU** mlu, const wchar_t* s1, const wchar_t* s2)
{
*mlu = cmsMLUalloc(DbgThread(), 0);
cmsMLUsetWide(*mlu, "en", "US", s1);
case 2:
- s = cmsReadTag(hProfile, cmsSigProfileSequenceDescTag);
+ s = (cmsSEQ *) cmsReadTag(hProfile, cmsSigProfileSequenceDescTag);
if (s == NULL) return 0;
if (s ->n != 3) return 0;
case 2:
- s = cmsReadTag(hProfile, cmsSigProfileSequenceIdTag);
+ s = (cmsSEQ *) cmsReadTag(hProfile, cmsSigProfileSequenceIdTag);
if (s == NULL) return 0;
if (s ->n != 3) return 0;
return 1;
case 2:
- v = cmsReadTag(hProfile, cmsSigViewingConditionsTag);
+ v = (cmsICCViewingConditions *) cmsReadTag(hProfile, cmsSigViewingConditionsTag);
if (v == NULL) return 0;
if (v ->IlluminantType != 1) return 0;
case 2:
- PtrCurve = cmsReadTag(hProfile, cmsSigVcgtTag);
+ PtrCurve = (cmsToneCurve **) cmsReadTag(hProfile, cmsSigVcgtTag);
if (PtrCurve == NULL) return 0;
if (!IsGoodVal("VCGT R", cmsEstimateGamma(PtrCurve[0], 0.01), 1.1, 0.001)) return 0;
if (!IsGoodVal("VCGT G", cmsEstimateGamma(PtrCurve[1], 0.01), 2.2, 0.001)) return 0;
switch (Pass) {
case 1:
- return cmsWriteRawTag(hProfile, 0x31323334, "data123", 7);
+ return cmsWriteRawTag(hProfile, (cmsTagSignature) 0x31323334, "data123", 7);
case 2:
- if (!cmsReadRawTag(hProfile, 0x31323334, Buffer, 7)) return 0;
+ if (!cmsReadRawTag(hProfile, (cmsTagSignature) 0x31323334, Buffer, 7)) return 0;
if (strncmp(Buffer, "data123", 7) != 0) return 0;
return 1;
if (h == NULL) return 0;
cmsSetProfileVersion(h, 4.3);
- if (cmsGetTagCount(h) != 0) { Fail("Empty profile with nonzero number of tags"); return 0; }
- if (cmsIsTag(h, cmsSigAToB0Tag)) { Fail("Found a tag in an empty profile"); return 0; }
+ if (cmsGetTagCount(h) != 0) { Fail("Empty profile with nonzero number of tags"); goto Error; }
+ if (cmsIsTag(h, cmsSigAToB0Tag)) { Fail("Found a tag in an empty profile"); goto Error; }
cmsSetColorSpace(h, cmsSigRgbData);
- if (cmsGetColorSpace(h) != cmsSigRgbData) { Fail("Unable to set colorspace"); return 0; }
+ if (cmsGetColorSpace(h) != cmsSigRgbData) { Fail("Unable to set colorspace"); goto Error; }
cmsSetPCS(h, cmsSigLabData);
- if (cmsGetPCS(h) != cmsSigLabData) { Fail("Unable to set colorspace"); return 0; }
+ if (cmsGetPCS(h) != cmsSigLabData) { Fail("Unable to set colorspace"); goto Error; }
cmsSetDeviceClass(h, cmsSigDisplayClass);
- if (cmsGetDeviceClass(h) != cmsSigDisplayClass) { Fail("Unable to set deviceclass"); return 0; }
+ if (cmsGetDeviceClass(h) != cmsSigDisplayClass) { Fail("Unable to set deviceclass"); goto Error; }
cmsSetHeaderRenderingIntent(h, INTENT_SATURATION);
- if (cmsGetHeaderRenderingIntent(h) != INTENT_SATURATION) { Fail("Unable to set rendering intent"); return 0; }
+ if (cmsGetHeaderRenderingIntent(h) != INTENT_SATURATION) { Fail("Unable to set rendering intent"); goto Error; }
for (Pass = 1; Pass <= 2; Pass++) {
SubTest("Tags holding XYZ");
- if (!CheckXYZ(Pass, h, cmsSigBlueColorantTag)) return 0;
- if (!CheckXYZ(Pass, h, cmsSigGreenColorantTag)) return 0;
- if (!CheckXYZ(Pass, h, cmsSigRedColorantTag)) return 0;
- if (!CheckXYZ(Pass, h, cmsSigMediaBlackPointTag)) return 0;
- if (!CheckXYZ(Pass, h, cmsSigMediaWhitePointTag)) return 0;
- if (!CheckXYZ(Pass, h, cmsSigLuminanceTag)) return 0;
+ if (!CheckXYZ(Pass, h, cmsSigBlueColorantTag)) goto Error;
+ if (!CheckXYZ(Pass, h, cmsSigGreenColorantTag)) goto Error;
+ if (!CheckXYZ(Pass, h, cmsSigRedColorantTag)) goto Error;
+ if (!CheckXYZ(Pass, h, cmsSigMediaBlackPointTag)) goto Error;
+ if (!CheckXYZ(Pass, h, cmsSigMediaWhitePointTag)) goto Error;
+ if (!CheckXYZ(Pass, h, cmsSigLuminanceTag)) goto Error;
SubTest("Tags holding curves");
- if (!CheckGamma(Pass, h, cmsSigBlueTRCTag)) return 0;
- if (!CheckGamma(Pass, h, cmsSigGrayTRCTag)) return 0;
- if (!CheckGamma(Pass, h, cmsSigGreenTRCTag)) return 0;
- if (!CheckGamma(Pass, h, cmsSigRedTRCTag)) return 0;
+ if (!CheckGamma(Pass, h, cmsSigBlueTRCTag)) goto Error;
+ if (!CheckGamma(Pass, h, cmsSigGrayTRCTag)) goto Error;
+ if (!CheckGamma(Pass, h, cmsSigGreenTRCTag)) goto Error;
+ if (!CheckGamma(Pass, h, cmsSigRedTRCTag)) goto Error;
SubTest("Tags holding text");
- if (!CheckText(Pass, h, cmsSigCharTargetTag)) return 0;
- if (!CheckText(Pass, h, cmsSigCopyrightTag)) return 0;
- if (!CheckText(Pass, h, cmsSigProfileDescriptionTag)) return 0;
- if (!CheckText(Pass, h, cmsSigDeviceMfgDescTag)) return 0;
- if (!CheckText(Pass, h, cmsSigDeviceModelDescTag)) return 0;
- if (!CheckText(Pass, h, cmsSigViewingCondDescTag)) return 0;
- if (!CheckText(Pass, h, cmsSigScreeningDescTag)) return 0;
+ if (!CheckTextSingle(Pass, h, cmsSigCharTargetTag)) goto Error;
+ if (!CheckTextSingle(Pass, h, cmsSigScreeningDescTag)) goto Error;
+
+ if (!CheckText(Pass, h, cmsSigCopyrightTag)) goto Error;
+ if (!CheckText(Pass, h, cmsSigProfileDescriptionTag)) goto Error;
+ if (!CheckText(Pass, h, cmsSigDeviceMfgDescTag)) goto Error;
+ if (!CheckText(Pass, h, cmsSigDeviceModelDescTag)) goto Error;
+ if (!CheckText(Pass, h, cmsSigViewingCondDescTag)) goto Error;
+
+
SubTest("Tags holding cmsICCData");
- if (!CheckData(Pass, h, cmsSigPs2CRD0Tag)) return 0;
- if (!CheckData(Pass, h, cmsSigPs2CRD1Tag)) return 0;
- if (!CheckData(Pass, h, cmsSigPs2CRD2Tag)) return 0;
- if (!CheckData(Pass, h, cmsSigPs2CRD3Tag)) return 0;
- if (!CheckData(Pass, h, cmsSigPs2CSATag)) return 0;
- if (!CheckData(Pass, h, cmsSigPs2RenderingIntentTag)) return 0;
+ if (!CheckData(Pass, h, cmsSigPs2CRD0Tag)) goto Error;
+ if (!CheckData(Pass, h, cmsSigPs2CRD1Tag)) goto Error;
+ if (!CheckData(Pass, h, cmsSigPs2CRD2Tag)) goto Error;
+ if (!CheckData(Pass, h, cmsSigPs2CRD3Tag)) goto Error;
+ if (!CheckData(Pass, h, cmsSigPs2CSATag)) goto Error;
+ if (!CheckData(Pass, h, cmsSigPs2RenderingIntentTag)) goto Error;
SubTest("Tags holding signatures");
- if (!CheckSignature(Pass, h, cmsSigColorimetricIntentImageStateTag)) return 0;
- if (!CheckSignature(Pass, h, cmsSigPerceptualRenderingIntentGamutTag)) return 0;
- if (!CheckSignature(Pass, h, cmsSigSaturationRenderingIntentGamutTag)) return 0;
- if (!CheckSignature(Pass, h, cmsSigTechnologyTag)) return 0;
+ if (!CheckSignature(Pass, h, cmsSigColorimetricIntentImageStateTag)) goto Error;
+ if (!CheckSignature(Pass, h, cmsSigPerceptualRenderingIntentGamutTag)) goto Error;
+ if (!CheckSignature(Pass, h, cmsSigSaturationRenderingIntentGamutTag)) goto Error;
+ if (!CheckSignature(Pass, h, cmsSigTechnologyTag)) goto Error;
SubTest("Tags holding date_time");
- if (!CheckDateTime(Pass, h, cmsSigCalibrationDateTimeTag)) return 0;
- if (!CheckDateTime(Pass, h, cmsSigDateTimeTag)) return 0;
+ if (!CheckDateTime(Pass, h, cmsSigCalibrationDateTimeTag)) goto Error;
+ if (!CheckDateTime(Pass, h, cmsSigDateTimeTag)) goto Error;
SubTest("Tags holding named color lists");
- if (!CheckNamedColor(Pass, h, cmsSigColorantTableTag, 15, FALSE)) return 0;
- if (!CheckNamedColor(Pass, h, cmsSigColorantTableOutTag, 15, FALSE)) return 0;
- if (!CheckNamedColor(Pass, h, cmsSigNamedColor2Tag, 4096, TRUE)) return 0;
+ if (!CheckNamedColor(Pass, h, cmsSigColorantTableTag, 15, FALSE)) goto Error;
+ if (!CheckNamedColor(Pass, h, cmsSigColorantTableOutTag, 15, FALSE)) goto Error;
+ if (!CheckNamedColor(Pass, h, cmsSigNamedColor2Tag, 4096, TRUE)) goto Error;
SubTest("Tags holding LUTs");
- if (!CheckLUT(Pass, h, cmsSigAToB0Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigAToB1Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigAToB2Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigBToA0Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigBToA1Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigBToA2Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigPreview0Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigPreview1Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigPreview2Tag)) return 0;
- if (!CheckLUT(Pass, h, cmsSigGamutTag)) return 0;
+ if (!CheckLUT(Pass, h, cmsSigAToB0Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigAToB1Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigAToB2Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigBToA0Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigBToA1Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigBToA2Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigPreview0Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigPreview1Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigPreview2Tag)) goto Error;
+ if (!CheckLUT(Pass, h, cmsSigGamutTag)) goto Error;
SubTest("Tags holding CHAD");
- if (!CheckCHAD(Pass, h, cmsSigChromaticAdaptationTag)) return 0;
+ if (!CheckCHAD(Pass, h, cmsSigChromaticAdaptationTag)) goto Error;
SubTest("Tags holding Chromaticity");
- if (!CheckChromaticity(Pass, h, cmsSigChromaticityTag)) return 0;
+ if (!CheckChromaticity(Pass, h, cmsSigChromaticityTag)) goto Error;
SubTest("Tags holding colorant order");
- if (!CheckColorantOrder(Pass, h, cmsSigColorantOrderTag)) return 0;
+ if (!CheckColorantOrder(Pass, h, cmsSigColorantOrderTag)) goto Error;
SubTest("Tags holding measurement");
- if (!CheckMeasurement(Pass, h, cmsSigMeasurementTag)) return 0;
+ if (!CheckMeasurement(Pass, h, cmsSigMeasurementTag)) goto Error;
SubTest("Tags holding CRD info");
- if (!CheckCRDinfo(Pass, h, cmsSigCrdInfoTag)) return 0;
+ if (!CheckCRDinfo(Pass, h, cmsSigCrdInfoTag)) goto Error;
SubTest("Tags holding UCR/BG");
- if (!CheckUcrBg(Pass, h, cmsSigUcrBgTag)) return 0;
+ if (!CheckUcrBg(Pass, h, cmsSigUcrBgTag)) goto Error;
SubTest("Tags holding MPE");
- if (!CheckMPE(Pass, h, cmsSigDToB0Tag)) return 0;
- if (!CheckMPE(Pass, h, cmsSigDToB1Tag)) return 0;
- if (!CheckMPE(Pass, h, cmsSigDToB2Tag)) return 0;
- if (!CheckMPE(Pass, h, cmsSigDToB3Tag)) return 0;
- if (!CheckMPE(Pass, h, cmsSigBToD0Tag)) return 0;
- if (!CheckMPE(Pass, h, cmsSigBToD1Tag)) return 0;
- if (!CheckMPE(Pass, h, cmsSigBToD2Tag)) return 0;
- if (!CheckMPE(Pass, h, cmsSigBToD3Tag)) return 0;
+ if (!CheckMPE(Pass, h, cmsSigDToB0Tag)) goto Error;
+ if (!CheckMPE(Pass, h, cmsSigDToB1Tag)) goto Error;
+ if (!CheckMPE(Pass, h, cmsSigDToB2Tag)) goto Error;
+ if (!CheckMPE(Pass, h, cmsSigDToB3Tag)) goto Error;
+ if (!CheckMPE(Pass, h, cmsSigBToD0Tag)) goto Error;
+ if (!CheckMPE(Pass, h, cmsSigBToD1Tag)) goto Error;
+ if (!CheckMPE(Pass, h, cmsSigBToD2Tag)) goto Error;
+ if (!CheckMPE(Pass, h, cmsSigBToD3Tag)) goto Error;
SubTest("Tags using screening");
- if (!CheckScreening(Pass, h, cmsSigScreeningTag)) return 0;
+ if (!CheckScreening(Pass, h, cmsSigScreeningTag)) goto Error;
SubTest("Tags holding profile sequence description");
- if (!CheckProfileSequenceTag(Pass, h)) return 0;
- if (!CheckProfileSequenceIDTag(Pass, h)) return 0;
+ if (!CheckProfileSequenceTag(Pass, h)) goto Error;
+ if (!CheckProfileSequenceIDTag(Pass, h)) goto Error;
SubTest("Tags holding ICC viewing conditions");
- if (!CheckICCViewingConditions(Pass, h)) return 0;
-
+ if (!CheckICCViewingConditions(Pass, h)) goto Error;
SubTest("VCGT tags");
- if (!CheckVCGT(Pass, h)) return 0;
+ if (!CheckVCGT(Pass, h)) goto Error;
SubTest("RAW tags");
- if (!CheckRAWtags(Pass, h)) return 0;
+ if (!CheckRAWtags(Pass, h)) goto Error;
SubTest("Dictionary meta tags");
- // if (!CheckDictionary16(Pass, h)) return 0;
- if (!CheckDictionary24(Pass, h)) return 0;
+ // if (!CheckDictionary16(Pass, h)) goto Error;
+ if (!CheckDictionary24(Pass, h)) goto Error;
if (Pass == 1) {
cmsSaveProfileToFile(h, "alltags.icc");
cmsCloseProfile(h);
remove("alltags.icc");
return 1;
+
+Error:
+ cmsCloseProfile(h);
+ remove("alltags.icc");
+ return 0;
+}
+
+
+// Thanks to Christopher James Halse Rogers for the bugfixing and providing this test
+static
+cmsInt32Number CheckVersionHeaderWriting(void)
+{
+ cmsHPROFILE h;
+ int index;
+ float test_versions[] = {
+ 2.3f,
+ 4.08f,
+ 4.09f,
+ 4.3f
+ };
+
+ for (index = 0; index < sizeof(test_versions)/sizeof(test_versions[0]); index++) {
+
+ h = cmsCreateProfilePlaceholder(DbgThread());
+ if (h == NULL) return 0;
+
+ cmsSetProfileVersion(h, test_versions[index]);
+
+ cmsSaveProfileToFile(h, "versions.icc");
+ cmsCloseProfile(h);
+
+ h = cmsOpenProfileFromFileTHR(DbgThread(), "versions.icc", "r");
+
+ // Only the first 3 digits are significant
+ if (fabs(cmsGetProfileVersion(h) - test_versions[index]) > 0.005) {
+ Fail("Version failed to round-trip: wrote %.2f, read %.2f",
+ test_versions[index], cmsGetProfileVersion(h));
+ return 0;
+ }
+
+ cmsCloseProfile(h);
+ remove("versions.icc");
+ }
+ return 1;
+}
+
+
+// Test on Richard Hughes "crayons.icc"
+static
+cmsInt32Number CheckMultilocalizedProfile(void)
+{
+ cmsHPROFILE hProfile;
+ cmsMLU *Pt;
+ char Buffer[256];
+
+ hProfile = cmsOpenProfileFromFile("crayons.icc", "r");
+
+ Pt = (cmsMLU *) cmsReadTag(hProfile, cmsSigProfileDescriptionTag);
+ cmsMLUgetASCII(Pt, "en", "GB", Buffer, 256);
+ if (strcmp(Buffer, "Crayon Colours") != 0) return FALSE;
+ cmsMLUgetASCII(Pt, "en", "US", Buffer, 256);
+ if (strcmp(Buffer, "Crayon Colors") != 0) return FALSE;
+
+ cmsCloseProfile(hProfile);
+
+ return TRUE;
}
{
- cmsHPROFILE h1 = cmsOpenProfileFromFile("test1.icc", "r");
- cmsHPROFILE h2 = cmsCreate_sRGBProfile();
+ cmsHPROFILE hp1 = cmsOpenProfileFromFile("test1.icc", "r");
+ cmsHPROFILE hp2 = cmsCreate_sRGBProfile();
- x1 = cmsCreateTransform(h1, TYPE_BGR_8, h2, TYPE_BGR_8, INTENT_PERCEPTUAL, 0);
+ x1 = cmsCreateTransform(hp1, TYPE_BGR_8, hp2, TYPE_BGR_8, INTENT_PERCEPTUAL, 0);
- cmsCloseProfile(h1); cmsCloseProfile(h2);
+ cmsCloseProfile(hp1); cmsCloseProfile(hp2);
if (x1 != NULL) {
cmsDeleteTransform(x1);
return 0;
static
cmsInt32Number CheckFloatlinearXFORM(cmsHTRANSFORM xform, cmsInt32Number nChan)
{
- cmsInt32Number n2, i, j;
+ cmsInt32Number i, j;
cmsFloat32Number In[cmsMAXCHANNELS], Out[cmsMAXCHANNELS];
- n2=0;
-
for (j=0; j < 0xFFFF; j++) {
for (i=0; i < nChan; i++) In[i] = (cmsFloat32Number) (j / 65535.0);;
static
cmsInt32Number CompareFloatXFORM(cmsHTRANSFORM xform1, cmsHTRANSFORM xform2, cmsInt32Number nChan)
{
- cmsInt32Number n2, i, j;
+ cmsInt32Number i, j;
cmsFloat32Number In[cmsMAXCHANNELS], Out1[cmsMAXCHANNELS], Out2[cmsMAXCHANNELS];
- n2=0;
-
for (j=0; j < 0xFFFF; j++) {
for (i=0; i < nChan; i++) In[i] = (cmsFloat32Number) (j / 65535.0);;
MaxErr = 0;
// Xform 1 goes from 8 bits to XYZ,
- rc = CheckOneRGB_f(xform1, 1, 1, 1, 0.0002926, 0.00030352, 0.00025037, 0.0001);
- rc &= CheckOneRGB_f(xform1, 127, 127, 127, 0.2046329, 0.212230, 0.175069, 0.0001);
- rc &= CheckOneRGB_f(xform1, 12, 13, 15, 0.0038364, 0.0039928, 0.00385212, 0.0001);
- rc &= CheckOneRGB_f(xform1, 128, 0, 0, 0.0940846, 0.0480030, 0.00300543, 0.0001);
- rc &= CheckOneRGB_f(xform1, 190, 25, 210, 0.3203491, 0.1605240, 0.46817115, 0.0001);
+ rc = CheckOneRGB_f(xform1, 1, 1, 1, 0.0002927, 0.0003035, 0.000250, 0.0001);
+ rc &= CheckOneRGB_f(xform1, 127, 127, 127, 0.2046329, 0.212230, 0.175069, 0.0001);
+ rc &= CheckOneRGB_f(xform1, 12, 13, 15, 0.0038364, 0.0039928, 0.003853, 0.0001);
+ rc &= CheckOneRGB_f(xform1, 128, 0, 0, 0.0941240, 0.0480256, 0.003005, 0.0001);
+ rc &= CheckOneRGB_f(xform1, 190, 25, 210, 0.3204592, 0.1605926, 0.468213, 0.0001);
// Xform 2 goes from 8 bits to Lab, we allow 0.01 error max
- rc &= CheckOneRGB_f(xform2, 1, 1, 1, 0.2741748, 0, 0, 0.01);
- rc &= CheckOneRGB_f(xform2, 127, 127, 127, 53.192776, 0, 0, 0.01);
- rc &= CheckOneRGB_f(xform2, 190, 25, 210, 47.043171, 74.564576, -56.89373, 0.01);
- rc &= CheckOneRGB_f(xform2, 128, 0, 0, 26.158100, 48.474477, 39.425916, 0.01);
+ rc &= CheckOneRGB_f(xform2, 1, 1, 1, 0.2741748, 0, 0, 0.01);
+ rc &= CheckOneRGB_f(xform2, 127, 127, 127, 53.192776, 0, 0, 0.01);
+ rc &= CheckOneRGB_f(xform2, 190, 25, 210, 47.052136, 74.565610, -56.883274, 0.01);
+ rc &= CheckOneRGB_f(xform2, 128, 0, 0, 26.164701, 48.478171, 39.4384713, 0.01);
cmsDeleteTransform(xform1);
cmsDeleteTransform(xform2);
cmsDeleteTransform(xform);
- if (Max > 3.0) return 0;
xform = cmsCreateTransformTHR(DbgThread(), hFOGRA, TYPE_CMYK_FLT, hSWOP, TYPE_CMYK_FLT, Intent, 0);
- Max = 0;
-
for (i=0; i <= 100; i++) {
CMYK1[0] = 10;
CMYK1[1] = 20;
cmsDeleteTransform(xform);
// dL should be below 3.0
- if (Max > 3.0) return 0;
// Same, but FOGRA to SWOP
xform = cmsCreateTransformTHR(DbgThread(), hFOGRA, TYPE_CMYK_FLT, hSWOP, TYPE_CMYK_FLT, INTENT_PRESERVE_K_ONLY_PERCEPTUAL, 0);
- Max = 0;
-
for (i=0; i <= 100; i++) {
CMYK1[0] = 0;
CMYK1[1] = 0;
cmsHPROFILE hSRGB, hAbove;
cmsHTRANSFORM xform;
cmsInt32Number rc;
- cmsUInt16Number Alarm[3] = { 0xDEAD, 0xBABE, 0xFACE };
+ cmsUInt16Number Alarm[16] = { 0xDEAD, 0xBABE, 0xFACE };
// Set alarm codes to fancy values so we could check the out of gamut condition
cmsSetAlarmCodes(Alarm);
SubTest("Gamut check on 16 bits");
- xform = cmsCreateProofingTransformTHR(DbgThread(), hAbove, TYPE_RGB_16, hAbove, TYPE_RGB_16, hAbove,
+ xform = cmsCreateProofingTransformTHR(DbgThread(), hAbove, TYPE_RGB_16, hAbove, TYPE_RGB_16, hSRGB,
INTENT_RELATIVE_COLORIMETRIC, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_GAMUTCHECK);
cmsCloseProfile(hSRGB);
}
+static
+cmsInt32Number CheckCGATS2(void)
+{
+ cmsHANDLE handle;
+ const cmsUInt8Number junk[] = { 0x0, 0xd, 0xd, 0xa, 0x20, 0xd, 0x20, 0x20, 0x20, 0x3a, 0x31, 0x3d, 0x3d, 0x3d, 0x3d };
+
+ handle = cmsIT8LoadFromMem(0, (const void*)junk, sizeof(junk));
+ if (handle)
+ cmsIT8Free(handle);
+
+ return 1;
+}
+
+
+static
+cmsInt32Number CheckCGATS_Overflow(void)
+{
+ cmsHANDLE handle;
+ const cmsUInt8Number junk[] = { "@\nA 1.e2147483648\n" };
+
+ handle = cmsIT8LoadFromMem(0, (const void*)junk, sizeof(junk));
+ if (handle)
+ cmsIT8Free(handle);
+
+ return 1;
+}
+
// Create CSA/CRD
static
_cmsFree(BuffThread, Buffer);
cmsCloseProfile(hProfile);
- remove(FileName);
+ if (FileName != NULL)
+ remove(FileName);
}
_cmsFree(BuffThread, Buffer);
cmsCloseProfile(hProfile);
- remove(FileName);
+ if (FileName != NULL)
+ remove(FileName);
}
static
cmsCloseProfile(pProfile);
- pProfile = cmsOpenProfileFromFile("sRGBlcms2.icc", "r");
+ pProfile = cmsOpenProfileFromFile("sRGBlcms2.icc", "r");
- h =(_cmsICCPROFILE*) pProfile;
+ h =(_cmsICCPROFILE*) pProfile;
if (cmsMD5computeID(pProfile)) cmsGetHeaderProfileID(pProfile, ProfileID3.ID8);
if (cmsMD5computeID(pProfile)) cmsGetHeaderProfileID(pProfile,ProfileID4.ID8);
cmsWriteTag(h, cmsSigAToB0Tag, pipeline);
cmsPipelineFree(pipeline);
- if (!cmsSaveProfileToFile(h, "lcms2link2.icc")) return 0;
+ if (!cmsSaveProfileToFile(h, "lcms2link2.icc")) return 0;
cmsCloseProfile(h);
// TestMPE
//
-// Created by Paul Miller on 30/08/2012.
+// Created by Paul Miller on 30/08/2016.
//
static
cmsHPROFILE IdentityMatrixProfile( cmsColorSpaceSignature dataSpace)
cmsHPROFILE input;
cmsHPROFILE xyzProfile = cmsCreateXYZProfile();
cmsHTRANSFORM xform;
- cmsFloat32Number in[3];
- cmsFloat32Number out[3];
+ cmsFloat32Number in[4];
+ cmsFloat32Number out[4];
in[0] = 1.0;
in[1] = 1.0;
in[2] = 1.0;
+ in[3] = 0.5;
// RGB to XYZ
input = IdentityMatrixProfile( cmsSigRgbData);
return 0;
- // XYZ to RGB
- input = IdentityMatrixProfile( cmsSigRgbData);
-
+ input = IdentityMatrixProfile( cmsSigXYZData);
+
+# define TYPE_XYZA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4))
+
+ xform = cmsCreateTransform( input, TYPE_XYZA_FLT, xyzProfile, TYPE_XYZA_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_COPY_ALPHA);
+ cmsCloseProfile(input);
+
+ cmsDoTransform( xform, in, out, 1);
+
+
+ cmsDeleteTransform( xform);
+
+ if (!IsGoodVal("Float XYZA->XYZA", in[0], out[0], FLOAT_PRECISSION) ||
+ !IsGoodVal("Float XYZA->XYZA", in[1], out[1], FLOAT_PRECISSION) ||
+ !IsGoodVal("Float XYZA->XYZA", in[2], out[2], FLOAT_PRECISSION) ||
+ !IsGoodVal("Float XYZA->XYZA", in[3], out[3], FLOAT_PRECISSION))
+ return 0;
+
+
+ // XYZ to RGB
+ input = IdentityMatrixProfile( cmsSigRgbData);
+
xform = cmsCreateTransform( xyzProfile, TYPE_XYZ_FLT, input, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, 0);
cmsCloseProfile(input);
return 1;
}
+/*
+ * parametric curve for Rec709
+ */
+static
+double Rec709(double L)
+{
+ if (L <0.018) return 4.5*L;
+ else
+ {
+ double a = 1.099* pow(L, 0.45);
+
+ a = a - 0.099;
+ return a;
+ }
+}
+
+
+static
+cmsInt32Number CheckParametricRec709(void)
+{
+ cmsFloat64Number params[7];
+ cmsToneCurve* t;
+ int i;
+
+ params[0] = 0.45; /* y */
+ params[1] = pow(1.099, 1.0 / 0.45); /* a */
+ params[2] = 0.0; /* b */
+ params[3] = 4.5; /* c */
+ params[4] = 0.018; /* d */
+ params[5] = -0.099; /* e */
+ params[6] = 0.0; /* f */
+
+ t = cmsBuildParametricToneCurve (NULL, 5, params);
+
+
+ for (i=0; i < 256; i++)
+ {
+ cmsFloat32Number n = (cmsFloat32Number) i / 255.0F;
+ cmsUInt16Number f1 = (cmsUInt16Number) floor(255.0 * cmsEvalToneCurveFloat(t, n) + 0.5);
+ cmsUInt16Number f2 = (cmsUInt16Number) floor(255.0*Rec709((double) i / 255.0) + 0.5);
+
+ if (f1 != f2)
+ {
+ cmsFreeToneCurve(t);
+ return 0;
+ }
+ }
+
+ cmsFreeToneCurve(t);
+ return 1;
+}
+
+
+#define kNumPoints 10
+
+typedef cmsFloat32Number(*Function)(cmsFloat32Number x);
+
+static cmsFloat32Number StraightLine( cmsFloat32Number x)
+{
+ return (cmsFloat32Number) (0.1 + 0.9 * x);
+}
+
+static cmsInt32Number TestCurve( const char* label, cmsToneCurve* curve, Function fn)
+{
+ cmsInt32Number ok = 1;
+ int i;
+ for (i = 0; i < kNumPoints*3; i++) {
+
+ cmsFloat32Number x = (cmsFloat32Number)i / (kNumPoints*3 - 1);
+ cmsFloat32Number expectedY = fn(x);
+ cmsFloat32Number out = cmsEvalToneCurveFloat( curve, x);
+
+ if (!IsGoodVal(label, expectedY, out, FLOAT_PRECISSION)) {
+ ok = 0;
+ }
+ }
+ return ok;
+}
+
+static
+cmsInt32Number CheckFloatSamples(void)
+{
+ cmsFloat32Number y[kNumPoints];
+ int i;
+ cmsToneCurve *curve;
+ cmsInt32Number ok;
+
+ for (i = 0; i < kNumPoints; i++) {
+ cmsFloat32Number x = (cmsFloat32Number)i / (kNumPoints-1);
+
+ y[i] = StraightLine(x);
+ }
+
+ curve = cmsBuildTabulatedToneCurveFloat(NULL, kNumPoints, y);
+ ok = TestCurve( "Float Samples", curve, StraightLine);
+ cmsFreeToneCurve(curve);
+
+ return ok;
+}
+
+static
+cmsInt32Number CheckFloatSegments(void)
+{
+ cmsInt32Number ok = 1;
+ int i;
+ cmsToneCurve *curve;
+
+ cmsFloat32Number y[ kNumPoints];
+
+ // build a segmented curve with a sampled section...
+ cmsCurveSegment Seg[3];
+
+ // Initialize segmented curve part up to 0.1
+ Seg[0].x0 = -1e22f; // -infinity
+ Seg[0].x1 = 0.1f;
+ Seg[0].Type = 6; // Y = (a * X + b) ^ Gamma + c
+ Seg[0].Params[0] = 1.0f; // gamma
+ Seg[0].Params[1] = 0.9f; // a
+ Seg[0].Params[2] = 0.0f; // b
+ Seg[0].Params[3] = 0.1f; // c
+ Seg[0].Params[4] = 0.0f;
+
+ // From zero to 1
+ Seg[1].x0 = 0.1f;
+ Seg[1].x1 = 0.9f;
+ Seg[1].Type = 0;
+
+ Seg[1].nGridPoints = kNumPoints;
+ Seg[1].SampledPoints = y;
+
+ for (i = 0; i < kNumPoints; i++) {
+ cmsFloat32Number x = (cmsFloat32Number) (0.1 + ((cmsFloat32Number)i / (kNumPoints-1)) * (0.9 - 0.1));
+ y[i] = StraightLine(x);
+ }
+
+ // from 1 to +infinity
+ Seg[2].x0 = 0.9f;
+ Seg[2].x1 = 1e22f; // +infinity
+ Seg[2].Type = 6;
+
+ Seg[2].Params[0] = 1.0f;
+ Seg[2].Params[1] = 0.9f;
+ Seg[2].Params[2] = 0.0f;
+ Seg[2].Params[3] = 0.1f;
+ Seg[2].Params[4] = 0.0f;
+
+ curve = cmsBuildSegmentedToneCurve(0, 3, Seg);
+
+ ok = TestCurve( "Float Segmented Curve", curve, StraightLine);
+
+ cmsFreeToneCurve( curve);
+
+ return ok;
+}
+
+
+static
+cmsInt32Number CheckReadRAW(void)
+{
+ cmsInt32Number tag_size, tag_size1;
+ char buffer[4];
+ cmsHPROFILE hProfile;
+
+
+ SubTest("RAW read on on-disk");
+ hProfile = cmsOpenProfileFromFile("test1.icc", "r");
+
+ if (hProfile == NULL)
+ return 0;
+
+ tag_size = cmsReadRawTag(hProfile, cmsSigGamutTag, buffer, 4);
+ tag_size1 = cmsReadRawTag(hProfile, cmsSigGamutTag, NULL, 0);
+
+ cmsCloseProfile(hProfile);
+
+ if (tag_size != 4)
+ return 0;
+
+ if (tag_size1 != 37009)
+ return 0;
+
+ SubTest("RAW read on in-memory created profiles");
+ hProfile = cmsCreate_sRGBProfile();
+ tag_size = cmsReadRawTag(hProfile, cmsSigGreenColorantTag, buffer, 4);
+ tag_size1 = cmsReadRawTag(hProfile, cmsSigGreenColorantTag, NULL, 0);
+
+ cmsCloseProfile(hProfile);
+
+ if (tag_size != 4)
+ return 0;
+ if (tag_size1 != 20)
+ return 0;
+
+ return 1;
+}
+
+
+static
+cmsInt32Number CheckMeta(void)
+{
+ char *data;
+ cmsHANDLE dict;
+ cmsHPROFILE p;
+ cmsUInt32Number clen;
+ FILE *fp;
+ int rc;
+
+ /* open file */
+ p = cmsOpenProfileFromFile("ibm-t61.icc", "r");
+ if (p == NULL) return 0;
+
+ /* read dictionary, but don't do anything with the value */
+ //COMMENT OUT THE NEXT TWO LINES AND IT WORKS FINE!!!
+ dict = cmsReadTag(p, cmsSigMetaTag);
+ if (dict == NULL) return 0;
+
+ /* serialize profile to memory */
+ rc = cmsSaveProfileToMem(p, NULL, &clen);
+ if (!rc) return 0;
+
+ data = (char*) malloc(clen);
+ rc = cmsSaveProfileToMem(p, data, &clen);
+ if (!rc) return 0;
+
+ /* write the memory blob to a file */
+ //NOTE: The crash does not happen if cmsSaveProfileToFile() is used */
+ fp = fopen("new.icc", "wb");
+ fwrite(data, 1, clen, fp);
+ fclose(fp);
+ free(data);
+
+ cmsCloseProfile(p);
+
+ /* open newly created file and read metadata */
+ p = cmsOpenProfileFromFile("new.icc", "r");
+ //ERROR: Bad dictionary Name/Value
+ //ERROR: Corrupted tag 'meta'
+ //test: test.c:59: main: Assertion `dict' failed.
+ dict = cmsReadTag(p, cmsSigMetaTag);
+ if (dict == NULL) return 0;
+
+ cmsCloseProfile(p);
+ return 1;
+}
+
+
+// Bug on applying null transforms on floating point buffers
+static
+cmsInt32Number CheckFloatNULLxform(void)
+{
+ int i;
+ cmsFloat32Number in[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ cmsFloat32Number out[10];
+
+ cmsHTRANSFORM xform = cmsCreateTransform(NULL, TYPE_GRAY_FLT, NULL, TYPE_GRAY_FLT, INTENT_PERCEPTUAL, cmsFLAGS_NULLTRANSFORM);
+
+ if (xform == NULL) {
+ Fail("Unable to create float null transform");
+ return 0;
+ }
+
+ cmsDoTransform(xform, in, out, 10);
+
+ cmsDeleteTransform(xform);
+ for (i=0; i < 10; i++) {
+
+ if (!IsGoodVal("float nullxform", in[i], out[i], 0.001)) {
+
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+static
+cmsInt32Number CheckRemoveTag(void)
+{
+ cmsHPROFILE p;
+ cmsMLU *mlu;
+ int ret;
+
+ p = cmsCreate_sRGBProfileTHR(NULL);
+
+ /* set value */
+ mlu = cmsMLUalloc (NULL, 1);
+ ret = cmsMLUsetASCII (mlu, "en", "US", "bar");
+ if (!ret) return 0;
+
+ ret = cmsWriteTag (p, cmsSigDeviceMfgDescTag, mlu);
+ if (!ret) return 0;
+
+ cmsMLUfree (mlu);
+
+ /* remove the tag */
+ ret = cmsWriteTag (p, cmsSigDeviceMfgDescTag, NULL);
+ if (!ret) return 0;
+
+ /* THIS EXPLODES */
+ cmsCloseProfile(p);
+ return 1;
+}
+
+
+static
+cmsInt32Number CheckMatrixSimplify(void)
+{
+
+ cmsHPROFILE pIn;
+ cmsHPROFILE pOut;
+ cmsHTRANSFORM t;
+ unsigned char buf[3] = { 127, 32, 64 };
+
+
+ pIn = cmsCreate_sRGBProfile();
+ pOut = cmsOpenProfileFromFile("ibm-t61.icc", "r");
+ if (pIn == NULL || pOut == NULL)
+ return 0;
+
+ t = cmsCreateTransform(pIn, TYPE_RGB_8, pOut, TYPE_RGB_8, INTENT_PERCEPTUAL, 0);
+ cmsDoTransformStride(t, buf, buf, 1, 1);
+ cmsDeleteTransform(t);
+ cmsCloseProfile(pIn);
+ cmsCloseProfile(pOut);
+
+
+ return buf[0] == 144 && buf[1] == 0 && buf[2] == 69;
+}
+
+
+
+static
+cmsInt32Number CheckTransformLineStride(void)
+{
+
+ cmsHPROFILE pIn;
+ cmsHPROFILE pOut;
+ cmsHTRANSFORM t;
+
+ // Our buffer is formed by 4 RGB8 lines, each line is 2 pixels wide plus a padding of one byte
+
+ cmsUInt8Number buf1[]= { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, };
+
+ // Our buffer2 is formed by 4 RGBA lines, each line is 2 pixels wide plus a padding of one byte
+
+ cmsUInt8Number buf2[] = { 0xff, 0xff, 0xff, 1, 0xff, 0xff, 0xff, 1, 0,
+ 0xff, 0xff, 0xff, 1, 0xff, 0xff, 0xff, 1, 0,
+ 0xff, 0xff, 0xff, 1, 0xff, 0xff, 0xff, 1, 0,
+ 0xff, 0xff, 0xff, 1, 0xff, 0xff, 0xff, 1, 0};
+
+ // Our buffer3 is formed by 4 RGBA16 lines, each line is 2 pixels wide plus a padding of two bytes
+
+ cmsUInt16Number buf3[] = { 0xffff, 0xffff, 0xffff, 0x0101, 0xffff, 0xffff, 0xffff, 0x0101, 0,
+ 0xffff, 0xffff, 0xffff, 0x0101, 0xffff, 0xffff, 0xffff, 0x0101, 0,
+ 0xffff, 0xffff, 0xffff, 0x0101, 0xffff, 0xffff, 0xffff, 0x0101, 0,
+ 0xffff, 0xffff, 0xffff, 0x0101, 0xffff, 0xffff, 0xffff, 0x0101, 0 };
+
+ cmsUInt8Number out[1024];
+
+
+ memset(out, 0, sizeof(out));
+ pIn = cmsCreate_sRGBProfile();
+ pOut = cmsOpenProfileFromFile("ibm-t61.icc", "r");
+ if (pIn == NULL || pOut == NULL)
+ return 0;
+
+ t = cmsCreateTransform(pIn, TYPE_RGB_8, pOut, TYPE_RGB_8, INTENT_PERCEPTUAL, cmsFLAGS_COPY_ALPHA);
+
+ cmsDoTransformLineStride(t, buf1, out, 2, 4, 7, 7, 0, 0);
+ cmsDeleteTransform(t);
+
+ if (memcmp(out, buf1, sizeof(buf1)) != 0) {
+ Fail("Failed transform line stride on RGB8");
+ cmsCloseProfile(pIn);
+ cmsCloseProfile(pOut);
+ return 0;
+ }
+
+ memset(out, 0, sizeof(out));
+
+ t = cmsCreateTransform(pIn, TYPE_RGBA_8, pOut, TYPE_RGBA_8, INTENT_PERCEPTUAL, cmsFLAGS_COPY_ALPHA);
+
+ cmsDoTransformLineStride(t, buf2, out, 2, 4, 9, 9, 0, 0);
+
+ cmsDeleteTransform(t);
+
+
+ if (memcmp(out, buf2, sizeof(buf2)) != 0) {
+ cmsCloseProfile(pIn);
+ cmsCloseProfile(pOut);
+ Fail("Failed transform line stride on RGBA8");
+ return 0;
+ }
+
+ memset(out, 0, sizeof(out));
+
+ t = cmsCreateTransform(pIn, TYPE_RGBA_16, pOut, TYPE_RGBA_16, INTENT_PERCEPTUAL, cmsFLAGS_COPY_ALPHA);
+
+ cmsDoTransformLineStride(t, buf3, out, 2, 4, 18, 18, 0, 0);
+
+ cmsDeleteTransform(t);
+
+ if (memcmp(out, buf3, sizeof(buf3)) != 0) {
+ cmsCloseProfile(pIn);
+ cmsCloseProfile(pOut);
+ Fail("Failed transform line stride on RGBA16");
+ return 0;
+ }
+
+
+ memset(out, 0, sizeof(out));
+
+
+ // From 8 to 16
+ t = cmsCreateTransform(pIn, TYPE_RGBA_8, pOut, TYPE_RGBA_16, INTENT_PERCEPTUAL, cmsFLAGS_COPY_ALPHA);
+
+ cmsDoTransformLineStride(t, buf2, out, 2, 4, 9, 18, 0, 0);
+
+ cmsDeleteTransform(t);
+
+ if (memcmp(out, buf3, sizeof(buf3)) != 0) {
+ cmsCloseProfile(pIn);
+ cmsCloseProfile(pOut);
+ Fail("Failed transform line stride on RGBA16");
+ return 0;
+ }
+
+
+
+ cmsCloseProfile(pIn);
+ cmsCloseProfile(pOut);
+
+ return 1;
+}
+
+
+static
+int CheckPlanar8opt(void)
+{
+ cmsHPROFILE aboveRGB = Create_AboveRGB();
+ cmsHPROFILE sRGB = cmsCreate_sRGBProfile();
+
+ cmsHTRANSFORM transform = cmsCreateTransform(sRGB, TYPE_RGB_8_PLANAR,
+ aboveRGB, TYPE_RGB_8_PLANAR,
+ INTENT_PERCEPTUAL, 0);
+
+ cmsDeleteTransform(transform);
+ cmsCloseProfile(aboveRGB);
+ cmsCloseProfile(sRGB);
+
+ return 1;
+}
+
+/**
+* Bug reported & fixed. Thanks to Kornel Lesinski for spotting this.
+*/
+static
+int CheckSE(void)
+{
+ cmsHPROFILE input_profile = Create_AboveRGB();
+ cmsHPROFILE output_profile = cmsCreate_sRGBProfile();
+
+ cmsHTRANSFORM tr = cmsCreateTransform(input_profile, TYPE_RGBA_8, output_profile, TYPE_RGBA_16_SE, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_COPY_ALPHA);
+
+ cmsUInt8Number rgba[4] = { 40, 41, 41, 0xfa };
+ cmsUInt16Number out[4];
+
+ cmsDoTransform(tr, rgba, out, 1);
+ cmsCloseProfile(input_profile);
+ cmsCloseProfile(output_profile);
+ cmsDeleteTransform(tr);
+
+ if (out[0] != 0xf622 || out[1] != 0x7f24 || out[2] != 0x7f24)
+ return 0;
+
+ return 1;
+}
+
+/**
+* Bug reported.
+*/
+static
+int CheckForgedMPE(void)
+{
+ cmsUInt32Number i;
+ cmsHPROFILE srcProfile;
+ cmsHPROFILE dstProfile;
+ cmsColorSpaceSignature srcCS;
+ cmsUInt32Number nSrcComponents;
+ cmsUInt32Number srcFormat;
+ cmsUInt32Number intent = 0;
+ cmsUInt32Number flags = 0;
+ cmsHTRANSFORM hTransform;
+ cmsUInt8Number output[4];
+
+ srcProfile = cmsOpenProfileFromFile("bad_mpe.icc", "r");
+ if (!srcProfile)
+ return 0;
+
+ dstProfile = cmsCreate_sRGBProfile();
+ if (!dstProfile) {
+ cmsCloseProfile(srcProfile);
+ return 0;
+ }
+
+ srcCS = cmsGetColorSpace(srcProfile);
+ nSrcComponents = cmsChannelsOf(srcCS);
+
+ if (srcCS == cmsSigLabData) {
+ srcFormat =
+ COLORSPACE_SH(PT_Lab) | CHANNELS_SH(nSrcComponents) | BYTES_SH(0);
+ }
+ else {
+ srcFormat =
+ COLORSPACE_SH(PT_ANY) | CHANNELS_SH(nSrcComponents) | BYTES_SH(1);
+ }
+
+ cmsSetLogErrorHandler(ErrorReportingFunction);
+
+ hTransform = cmsCreateTransform(srcProfile, srcFormat, dstProfile,
+ TYPE_BGR_8, intent, flags);
+ cmsCloseProfile(srcProfile);
+ cmsCloseProfile(dstProfile);
+
+ cmsSetLogErrorHandler(FatalErrorQuit);
+
+ // Should report error
+ if (!TrappedError) return 0;
+
+ TrappedError = FALSE;
+
+ // Transform should NOT be created
+ if (!hTransform) return 1;
+
+ // Never should reach here
+ if (T_BYTES(srcFormat) == 0) { // 0 means double
+ double input[128];
+ for (i = 0; i < nSrcComponents; i++)
+ input[i] = 0.5f;
+ cmsDoTransform(hTransform, input, output, 1);
+ }
+ else {
+ cmsUInt8Number input[128];
+ for (i = 0; i < nSrcComponents; i++)
+ input[i] = 128;
+ cmsDoTransform(hTransform, input, output, 1);
+ }
+ cmsDeleteTransform(hTransform);
+
+ return 0;
+}
+
+/**
+* What the self test is trying to do is creating a proofing transform
+* with gamut check, so we can getting the coverage of one profile of
+* another, i.e. to approximate the gamut intersection. e.g.
+* Thanks to Richard Hughes for providing the test
+*/
+static
+int CheckProofingIntersection(void)
+{
+ cmsHPROFILE profile_null, hnd1, hnd2;
+ cmsHTRANSFORM transform;
+
+ hnd1 = cmsCreate_sRGBProfile();
+ hnd2 = Create_AboveRGB();
+
+ profile_null = cmsCreateNULLProfileTHR(DbgThread());
+ transform = cmsCreateProofingTransformTHR(DbgThread(),
+ hnd1,
+ TYPE_RGB_FLT,
+ profile_null,
+ TYPE_GRAY_FLT,
+ hnd2,
+ INTENT_ABSOLUTE_COLORIMETRIC,
+ INTENT_ABSOLUTE_COLORIMETRIC,
+ cmsFLAGS_GAMUTCHECK |
+ cmsFLAGS_SOFTPROOFING);
+
+ cmsCloseProfile(hnd1);
+ cmsCloseProfile(hnd2);
+ cmsCloseProfile(profile_null);
+
+ // Failed?
+ if (transform == NULL) return 0;
+
+ cmsDeleteTransform(transform);
+ return 1;
+}
+
+/**
+* In 2.11: When I create a RGB profile, set the copyright data with an empty string,
+* then call cmsMD5computeID on said profile, the program crashes.
+*/
+static
+int CheckEmptyMLUC(void)
+{
+ cmsContext context = cmsCreateContext(NULL, NULL);
+ cmsCIExyY white = { 0.31271, 0.32902, 1.0 };
+ cmsCIExyYTRIPLE primaries =
+ {
+ .Red = { 0.640, 0.330, 1.0 },
+ .Green = { 0.300, 0.600, 1.0 },
+ .Blue = { 0.150, 0.060, 1.0 }
+ };
+
+ cmsFloat64Number parameters[10] = { 2.6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+ cmsToneCurve* toneCurve = cmsBuildParametricToneCurve(context, 1, parameters);
+ cmsToneCurve* toneCurves[3] = { toneCurve, toneCurve, toneCurve };
+
+ cmsHPROFILE profile = cmsCreateRGBProfileTHR(context, &white, &primaries, toneCurves);
+
+ cmsSetLogErrorHandlerTHR(context, FatalErrorQuit);
+
+ cmsFreeToneCurve(toneCurve);
+
+ // Set an empty copyright tag. This should log an error.
+ cmsMLU* mlu = cmsMLUalloc(context, 1);
+
+ cmsMLUsetASCII(mlu, "en", "AU", "");
+ cmsMLUsetWide(mlu, "en", "EN", L"");
+ cmsWriteTag(profile, cmsSigCopyrightTag, mlu);
+ cmsMLUfree(mlu);
+
+ // This will cause a crash after setting an empty copyright tag.
+ cmsMD5computeID(profile);
+
+ // Cleanup
+ cmsCloseProfile(profile);
+ DebugMemDontCheckThis(context);
+ cmsDeleteContext(context);
+
+ return 1;
+}
// --------------------------------------------------------------------------------------------------
// P E R F O R M A N C E C H E C K S
// --------------------------------------------------------------------------------------------------
-typedef struct {cmsUInt8Number r, g, b, a;} Scanline_rgb1;
-typedef struct {cmsUInt16Number r, g, b, a;} Scanline_rgb2;
-typedef struct {cmsUInt8Number r, g, b;} Scanline_rgb8;
-typedef struct {cmsUInt16Number r, g, b;} Scanline_rgb0;
+typedef struct {cmsUInt8Number r, g, b, a;} Scanline_rgba8;
+typedef struct {cmsUInt16Number r, g, b, a;} Scanline_rgba16;
+typedef struct {cmsFloat32Number r, g, b, a;} Scanline_rgba32;
+typedef struct {cmsUInt8Number r, g, b;} Scanline_rgb8;
+typedef struct {cmsUInt16Number r, g, b;} Scanline_rgb16;
+typedef struct {cmsFloat32Number r, g, b;} Scanline_rgb32;
static
cmsFloat64Number seconds = (cmsFloat64Number) diff / CLOCKS_PER_SEC;
cmsFloat64Number mpix_sec = Bytes / (1024.0*1024.0*seconds*SizeOfPixel);
- printf("%g MPixel/sec.\n", mpix_sec);
+ printf("%#4.3g MPixel/sec.\n", mpix_sec);
fflush(stdout);
}
static
-void SpeedTest16bits(const char * Title, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+void SpeedTest32bits(const char * Title, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_rgba32 *In;
+ cmsUInt32Number Mb;
+ cmsUInt32Number Interval = 4; // Power of 2 number to increment r,g,b values by in the loops to keep the test duration practically short
+ cmsUInt32Number NumPixels;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Die("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(DbgThread(), hlcmsProfileIn, TYPE_RGBA_FLT,
+ hlcmsProfileOut, TYPE_RGBA_FLT, Intent, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ NumPixels = 256 / Interval * 256 / Interval * 256 / Interval;
+ Mb = NumPixels * sizeof(Scanline_rgba32);
+
+ In = (Scanline_rgba32 *) malloc(Mb);
+
+ j = 0;
+ for (r=0; r < 256; r += Interval)
+ for (g=0; g < 256; g += Interval)
+ for (b=0; b < 256; b += Interval) {
+
+ In[j].r = r / 256.0f;
+ In[j].g = g / 256.0f;
+ In[j].b = b / 256.0f;
+ In[j].a = (In[j].r + In[j].g + In[j].b) / 3;
+
+ j++;
+ }
+
+ TitlePerformance(Title);
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, NumPixels);
+
+ diff = clock() - atime;
+ free(In);
+
+ PrintPerformance(Mb, sizeof(Scanline_rgba32), diff);
+ cmsDeleteTransform(hlcmsxform);
+
+}
+
+
+static
+void SpeedTest16bits(const char * Title, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+{
cmsInt32Number r, g, b, j;
clock_t atime;
cmsFloat64Number diff;
cmsHTRANSFORM hlcmsxform;
- Scanline_rgb0 *In;
+ Scanline_rgb16 *In;
cmsUInt32Number Mb;
if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
Die("Unable to open profiles");
hlcmsxform = cmsCreateTransformTHR(DbgThread(), hlcmsProfileIn, TYPE_RGB_16,
- hlcmsProfileOut, TYPE_RGB_16, Intent, cmsFLAGS_NOCACHE);
+ hlcmsProfileOut, TYPE_RGB_16, Intent, cmsFLAGS_NOCACHE);
cmsCloseProfile(hlcmsProfileIn);
cmsCloseProfile(hlcmsProfileOut);
- Mb = 256*256*256*sizeof(Scanline_rgb0);
- In = (Scanline_rgb0*) malloc(Mb);
+ Mb = 256*256*256 * sizeof(Scanline_rgb16);
+
+ In = (Scanline_rgb16*) malloc(Mb);
j = 0;
for (r=0; r < 256; r++)
for (g=0; g < 256; g++)
for (b=0; b < 256; b++) {
- In[j].r = (cmsUInt16Number) ((r << 8) | r);
- In[j].g = (cmsUInt16Number) ((g << 8) | g);
- In[j].b = (cmsUInt16Number) ((b << 8) | b);
+ In[j].r = (cmsUInt16Number) ((r << 8) | r);
+ In[j].g = (cmsUInt16Number) ((g << 8) | g);
+ In[j].b = (cmsUInt16Number) ((b << 8) | b);
- j++;
- }
+ j++;
+ }
TitlePerformance(Title);
diff = clock() - atime;
free(In);
- PrintPerformance(Mb, sizeof(Scanline_rgb0), diff);
+ PrintPerformance(Mb, sizeof(Scanline_rgb16), diff);
+ cmsDeleteTransform(hlcmsxform);
+
+}
+
+
+static
+void SpeedTest32bitsCMYK(const char * Title, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ Scanline_rgba32 *In;
+ cmsUInt32Number Mb;
+ cmsUInt32Number Interval = 4; // Power of 2 number to increment r,g,b values by in the loops to keep the test duration practically short
+ cmsUInt32Number NumPixels;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Die("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(DbgThread(), hlcmsProfileIn, TYPE_CMYK_FLT,
+ hlcmsProfileOut, TYPE_CMYK_FLT, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ NumPixels = 256 / Interval * 256 / Interval * 256 / Interval;
+ Mb = NumPixels * sizeof(Scanline_rgba32);
+
+ In = (Scanline_rgba32 *) malloc(Mb);
+
+ j = 0;
+ for (r=0; r < 256; r += Interval)
+ for (g=0; g < 256; g += Interval)
+ for (b=0; b < 256; b += Interval) {
+
+ In[j].r = r / 256.0f;
+ In[j].g = g / 256.0f;
+ In[j].b = b / 256.0f;
+ In[j].a = (In[j].r + In[j].g + In[j].b) / 3;
+
+ j++;
+ }
+
+
+ TitlePerformance(Title);
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, NumPixels);
+
+ diff = clock() - atime;
+
+ free(In);
+
+ PrintPerformance(Mb, sizeof(Scanline_rgba32), diff);
+
cmsDeleteTransform(hlcmsxform);
}
clock_t atime;
cmsFloat64Number diff;
cmsHTRANSFORM hlcmsxform;
- Scanline_rgb2 *In;
+ Scanline_rgba16 *In;
cmsUInt32Number Mb;
- if (hlcmsProfileOut == NULL || hlcmsProfileOut == NULL)
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
Die("Unable to open profiles");
hlcmsxform = cmsCreateTransformTHR(DbgThread(), hlcmsProfileIn, TYPE_CMYK_16,
- hlcmsProfileOut, TYPE_CMYK_16, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
+ hlcmsProfileOut, TYPE_CMYK_16, INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE);
cmsCloseProfile(hlcmsProfileIn);
cmsCloseProfile(hlcmsProfileOut);
- Mb = 256*256*256*sizeof(Scanline_rgb2);
+ Mb = 256*256*256*sizeof(Scanline_rgba16);
- In = (Scanline_rgb2*) malloc(Mb);
+ In = (Scanline_rgba16*) malloc(Mb);
j = 0;
for (r=0; r < 256; r++)
for (g=0; g < 256; g++)
for (b=0; b < 256; b++) {
- In[j].r = (cmsUInt16Number) ((r << 8) | r);
- In[j].g = (cmsUInt16Number) ((g << 8) | g);
- In[j].b = (cmsUInt16Number) ((b << 8) | b);
- In[j].a = 0;
+ In[j].r = (cmsUInt16Number) ((r << 8) | r);
+ In[j].g = (cmsUInt16Number) ((g << 8) | g);
+ In[j].b = (cmsUInt16Number) ((b << 8) | b);
+ In[j].a = 0;
- j++;
- }
+ j++;
+ }
TitlePerformance(Title);
free(In);
- PrintPerformance(Mb, sizeof(Scanline_rgb2), diff);
+ PrintPerformance(Mb, sizeof(Scanline_rgba16), diff);
cmsDeleteTransform(hlcmsxform);
clock_t atime;
cmsFloat64Number diff;
cmsHTRANSFORM hlcmsxform;
- Scanline_rgb2 *In;
+ Scanline_rgba8 *In;
cmsUInt32Number Mb;
if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
cmsCloseProfile(hlcmsProfileIn);
cmsCloseProfile(hlcmsProfileOut);
- Mb = 256*256*256*sizeof(Scanline_rgb2);
+ Mb = 256*256*256*sizeof(Scanline_rgba8);
- In = (Scanline_rgb2*) malloc(Mb);
+ In = (Scanline_rgba8*) malloc(Mb);
j = 0;
for (r=0; r < 256; r++)
In[j].b = (cmsUInt8Number) b;
In[j].a = (cmsUInt8Number) 0;
- j++;
- }
+ j++;
+ }
+
+ TitlePerformance(Title);
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, 256*256*256);
+
+ diff = clock() - atime;
+
+ free(In);
+
+ PrintPerformance(Mb, sizeof(Scanline_rgba8), diff);
+
+
+ cmsDeleteTransform(hlcmsxform);
+
+}
+
+
+static
+void SpeedTest32bitsGray(const char * Title, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ cmsFloat32Number *In;
+ cmsUInt32Number Mb;
+ cmsUInt32Number Interval = 4; // Power of 2 number to increment r,g,b values by in the loops to keep the test duration practically short
+ cmsUInt32Number NumPixels;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Die("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(DbgThread(), hlcmsProfileIn,
+ TYPE_GRAY_FLT, hlcmsProfileOut, TYPE_GRAY_FLT, Intent, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+
+ NumPixels = 256 / Interval * 256 / Interval * 256 / Interval;
+ Mb = NumPixels * sizeof(cmsFloat32Number);
+
+ In = (cmsFloat32Number*) malloc(Mb);
+
+ j = 0;
+ for (r = 0; r < 256; r += Interval)
+ for (g = 0; g < 256; g += Interval)
+ for (b = 0; b < 256; b += Interval) {
+
+ In[j] = ((r + g + b) / 768.0f);
+
+ j++;
+ }
+
+ TitlePerformance(Title);
+
+ atime = clock();
+
+ cmsDoTransform(hlcmsxform, In, In, NumPixels);
+
+ diff = clock() - atime;
+ free(In);
+
+ PrintPerformance(Mb, sizeof(cmsFloat32Number), diff);
+ cmsDeleteTransform(hlcmsxform);
+}
+
+
+static
+void SpeedTest16bitsGray(const char * Title, cmsHPROFILE hlcmsProfileIn, cmsHPROFILE hlcmsProfileOut, cmsInt32Number Intent)
+{
+ cmsInt32Number r, g, b, j;
+ clock_t atime;
+ cmsFloat64Number diff;
+ cmsHTRANSFORM hlcmsxform;
+ cmsUInt16Number *In;
+ cmsUInt32Number Mb;
+
+ if (hlcmsProfileIn == NULL || hlcmsProfileOut == NULL)
+ Die("Unable to open profiles");
+
+ hlcmsxform = cmsCreateTransformTHR(DbgThread(), hlcmsProfileIn,
+ TYPE_GRAY_16, hlcmsProfileOut, TYPE_GRAY_16, Intent, cmsFLAGS_NOCACHE);
+ cmsCloseProfile(hlcmsProfileIn);
+ cmsCloseProfile(hlcmsProfileOut);
+ Mb = 256*256*256 * sizeof(cmsUInt16Number);
+
+ In = (cmsUInt16Number *) malloc(Mb);
+
+ j = 0;
+ for (r=0; r < 256; r++)
+ for (g=0; g < 256; g++)
+ for (b=0; b < 256; b++) {
+
+ In[j] = (cmsUInt16Number) ((r + g + b) / 3);
+
+ j++;
+ }
TitlePerformance(Title);
cmsDoTransform(hlcmsxform, In, In, 256*256*256);
diff = clock() - atime;
-
free(In);
- PrintPerformance(Mb, sizeof(Scanline_rgb2), diff);
-
-
+ PrintPerformance(Mb, sizeof(cmsUInt16Number), diff);
cmsDeleteTransform(hlcmsxform);
-
}
Die("Unable to open profiles");
hlcmsxform = cmsCreateTransformTHR(DbgThread(), hlcmsProfileIn,
- TYPE_GRAY_8, hlcmsProfileOut, TYPE_GRAY_8, Intent, cmsFLAGS_NOCACHE);
+ TYPE_GRAY_8, hlcmsProfileOut, TYPE_GRAY_8, Intent, cmsFLAGS_NOCACHE);
cmsCloseProfile(hlcmsProfileIn);
cmsCloseProfile(hlcmsProfileOut);
Mb = 256*256*256;
for (g=0; g < 256; g++)
for (b=0; b < 256; b++) {
- In[j] = (cmsUInt8Number) r;
+ In[j] = (cmsUInt8Number) r;
- j++;
- }
+ j++;
+ }
TitlePerformance(Title);
printf( "=================================\n\n");
fflush(stdout);
+ SpeedTest8bits("8 bits on CLUT profiles",
+ cmsOpenProfileFromFile("test5.icc", "r"),
+ cmsOpenProfileFromFile("test3.icc", "r"),
+ INTENT_PERCEPTUAL);
+
SpeedTest16bits("16 bits on CLUT profiles",
cmsOpenProfileFromFile("test5.icc", "r"),
cmsOpenProfileFromFile("test3.icc", "r"), INTENT_PERCEPTUAL);
- SpeedTest8bits("8 bits on CLUT profiles",
+ SpeedTest32bits("32 bits on CLUT profiles",
cmsOpenProfileFromFile("test5.icc", "r"),
- cmsOpenProfileFromFile("test3.icc", "r"),
- INTENT_PERCEPTUAL);
+ cmsOpenProfileFromFile("test3.icc", "r"), INTENT_PERCEPTUAL);
+
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpeedTest8bits("8 bits on Matrix-Shaper profiles",
cmsOpenProfileFromFile("test5.icc", "r"),
cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
INTENT_PERCEPTUAL);
+ SpeedTest16bits("16 bits on Matrix-Shaper profiles",
+ cmsOpenProfileFromFile("test5.icc", "r"),
+ cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
+ INTENT_PERCEPTUAL);
+
+ SpeedTest32bits("32 bits on Matrix-Shaper profiles",
+ cmsOpenProfileFromFile("test5.icc", "r"),
+ cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
+ INTENT_PERCEPTUAL);
+
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
SpeedTest8bits("8 bits on SAME Matrix-Shaper profiles",
cmsOpenProfileFromFile("test5.icc", "r"),
cmsOpenProfileFromFile("test5.icc", "r"),
INTENT_PERCEPTUAL);
- SpeedTest8bits("8 bits on Matrix-Shaper profiles (AbsCol)",
- cmsOpenProfileFromFile("test5.icc", "r"),
- cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
- INTENT_ABSOLUTE_COLORIMETRIC);
-
- SpeedTest16bits("16 bits on Matrix-Shaper profiles",
- cmsOpenProfileFromFile("test5.icc", "r"),
+ SpeedTest16bits("16 bits on SAME Matrix-Shaper profiles",
+ cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
INTENT_PERCEPTUAL);
- SpeedTest16bits("16 bits on SAME Matrix-Shaper profiles",
+ SpeedTest32bits("32 bits on SAME Matrix-Shaper profiles",
cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
INTENT_PERCEPTUAL);
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ SpeedTest8bits("8 bits on Matrix-Shaper profiles (AbsCol)",
+ cmsOpenProfileFromFile("test5.icc", "r"),
+ cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
+ INTENT_ABSOLUTE_COLORIMETRIC);
+
SpeedTest16bits("16 bits on Matrix-Shaper profiles (AbsCol)",
cmsOpenProfileFromFile("test5.icc", "r"),
cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
INTENT_ABSOLUTE_COLORIMETRIC);
+ SpeedTest32bits("32 bits on Matrix-Shaper profiles (AbsCol)",
+ cmsOpenProfileFromFile("test5.icc", "r"),
+ cmsOpenProfileFromFile("aRGBlcms2.icc", "r"),
+ INTENT_ABSOLUTE_COLORIMETRIC);
+
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
SpeedTest8bits("8 bits on curves",
CreateCurves(),
CreateCurves(),
CreateCurves(),
INTENT_PERCEPTUAL);
+ SpeedTest32bits("32 bits on curves",
+ CreateCurves(),
+ CreateCurves(),
+ INTENT_PERCEPTUAL);
+
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
SpeedTest8bitsCMYK("8 bits on CMYK profiles",
cmsOpenProfileFromFile("test1.icc", "r"),
cmsOpenProfileFromFile("test2.icc", "r"));
cmsOpenProfileFromFile("test1.icc", "r"),
cmsOpenProfileFromFile("test2.icc", "r"));
+ SpeedTest32bitsCMYK("32 bits on CMYK profiles",
+ cmsOpenProfileFromFile("test1.icc", "r"),
+ cmsOpenProfileFromFile("test2.icc", "r"));
+
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
SpeedTest8bitsGray("8 bits on gray-to gray",
cmsOpenProfileFromFile("gray3lcms2.icc", "r"),
cmsOpenProfileFromFile("graylcms2.icc", "r"), INTENT_RELATIVE_COLORIMETRIC);
+ SpeedTest16bitsGray("16 bits on gray-to gray",
+ cmsOpenProfileFromFile("gray3lcms2.icc", "r"),
+ cmsOpenProfileFromFile("graylcms2.icc", "r"), INTENT_RELATIVE_COLORIMETRIC);
+
+ SpeedTest32bitsGray("32 bits on gray-to gray",
+ cmsOpenProfileFromFile("gray3lcms2.icc", "r"),
+ cmsOpenProfileFromFile("graylcms2.icc", "r"), INTENT_RELATIVE_COLORIMETRIC);
+
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
SpeedTest8bitsGray("8 bits on gray-to-lab gray",
cmsOpenProfileFromFile("graylcms2.icc", "r"),
cmsOpenProfileFromFile("glablcms2.icc", "r"), INTENT_RELATIVE_COLORIMETRIC);
+ SpeedTest16bitsGray("16 bits on gray-to-lab gray",
+ cmsOpenProfileFromFile("graylcms2.icc", "r"),
+ cmsOpenProfileFromFile("glablcms2.icc", "r"), INTENT_RELATIVE_COLORIMETRIC);
+
+ SpeedTest32bitsGray("32 bits on gray-to-lab gray",
+ cmsOpenProfileFromFile("graylcms2.icc", "r"),
+ cmsOpenProfileFromFile("glablcms2.icc", "r"), INTENT_RELATIVE_COLORIMETRIC);
+
+ printf("\n");
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
SpeedTest8bitsGray("8 bits on SAME gray-to-gray",
cmsOpenProfileFromFile("graylcms2.icc", "r"),
cmsOpenProfileFromFile("graylcms2.icc", "r"), INTENT_PERCEPTUAL);
+
+ SpeedTest16bitsGray("16 bits on SAME gray-to-gray",
+ cmsOpenProfileFromFile("graylcms2.icc", "r"),
+ cmsOpenProfileFromFile("graylcms2.icc", "r"), INTENT_PERCEPTUAL);
+
+ SpeedTest32bitsGray("32 bits on SAME gray-to-gray",
+ cmsOpenProfileFromFile("graylcms2.icc", "r"),
+ cmsOpenProfileFromFile("graylcms2.icc", "r"), INTENT_PERCEPTUAL);
+
+ printf("\n");
}
printf("Supported intents:\n");
for (i=0; i < n; i++) {
- printf("\t%d - %s\n", Codes[i], Descriptions[i]);
+ printf("\t%u - %s\n", Codes[i], Descriptions[i]);
}
printf("\n");
}
-// ZOO checks ------------------------------------------------------------------------------------------------------------
-
-
-#ifdef CMS_IS_WINDOWS_
-
-static char ZOOfolder[cmsMAX_PATH] = "c:\\colormaps\\";
-static char ZOOwrite[cmsMAX_PATH] = "c:\\colormaps\\write\\";
-static char ZOORawWrite[cmsMAX_PATH] = "c:\\colormaps\\rawwrite\\";
-
-
-// Read all tags on a profile given by its handle
-static
-void ReadAllTags(cmsHPROFILE h)
-{
- cmsInt32Number i, n;
- cmsTagSignature sig;
-
- n = cmsGetTagCount(h);
- for (i=0; i < n; i++) {
-
- sig = cmsGetTagSignature(h, i);
- if (cmsReadTag(h, sig) == NULL) return;
- }
-}
-
-
-// Read all tags on a profile given by its handle
-static
-void ReadAllRAWTags(cmsHPROFILE h)
-{
- cmsInt32Number i, n;
- cmsTagSignature sig;
- cmsInt32Number len;
-
- n = cmsGetTagCount(h);
- for (i=0; i < n; i++) {
-
- sig = cmsGetTagSignature(h, i);
- len = cmsReadRawTag(h, sig, NULL, 0);
- }
-}
-
-
-static
-void PrintInfo(cmsHPROFILE h, cmsInfoType Info)
-{
- wchar_t* text;
- cmsInt32Number len;
- cmsContext id = DbgThread();
-
- len = cmsGetProfileInfo(h, Info, "en", "US", NULL, 0);
- if (len == 0) return;
-
- text = _cmsMalloc(id, len);
- cmsGetProfileInfo(h, Info, "en", "US", text, len);
-
- wprintf(L"%s\n", text);
- _cmsFree(id, text);
-}
-
-
-static
-void PrintAllInfos(cmsHPROFILE h)
-{
- PrintInfo(h, cmsInfoDescription);
- PrintInfo(h, cmsInfoManufacturer);
- PrintInfo(h, cmsInfoModel);
- PrintInfo(h, cmsInfoCopyright);
- printf("\n\n");
-}
-
-static
-void ReadAllLUTS(cmsHPROFILE h)
-{
- cmsPipeline* a;
- cmsCIEXYZ Black;
-
- a = _cmsReadInputLUT(h, INTENT_PERCEPTUAL);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadInputLUT(h, INTENT_RELATIVE_COLORIMETRIC);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadInputLUT(h, INTENT_SATURATION);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadInputLUT(h, INTENT_ABSOLUTE_COLORIMETRIC);
- if (a) cmsPipelineFree(a);
-
-
- a = _cmsReadOutputLUT(h, INTENT_PERCEPTUAL);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadOutputLUT(h, INTENT_RELATIVE_COLORIMETRIC);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadOutputLUT(h, INTENT_SATURATION);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadOutputLUT(h, INTENT_ABSOLUTE_COLORIMETRIC);
- if (a) cmsPipelineFree(a);
-
-
- a = _cmsReadDevicelinkLUT(h, INTENT_PERCEPTUAL);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadDevicelinkLUT(h, INTENT_RELATIVE_COLORIMETRIC);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadDevicelinkLUT(h, INTENT_SATURATION);
- if (a) cmsPipelineFree(a);
-
- a = _cmsReadDevicelinkLUT(h, INTENT_ABSOLUTE_COLORIMETRIC);
- if (a) cmsPipelineFree(a);
-
-
- cmsDetectDestinationBlackPoint(&Black, h, INTENT_PERCEPTUAL, 0);
- cmsDetectDestinationBlackPoint(&Black, h, INTENT_RELATIVE_COLORIMETRIC, 0);
- cmsDetectDestinationBlackPoint(&Black, h, INTENT_SATURATION, 0);
- cmsDetectDestinationBlackPoint(&Black, h, INTENT_ABSOLUTE_COLORIMETRIC, 0);
- cmsDetectTAC(h);
-}
-
-// Check one specimen in the ZOO
-
-static
-cmsInt32Number CheckSingleSpecimen(const char* Profile)
-{
- char BuffSrc[256];
- char BuffDst[256];
- cmsHPROFILE h;
-
- sprintf(BuffSrc, "%s%s", ZOOfolder, Profile);
- sprintf(BuffDst, "%s%s", ZOOwrite, Profile);
-
- h = cmsOpenProfileFromFile(BuffSrc, "r");
- if (h == NULL) return 0;
-
- printf("%s\n", Profile);
- PrintAllInfos(h);
- ReadAllTags(h);
- // ReadAllRAWTags(h);
- ReadAllLUTS(h);
-
- cmsSaveProfileToFile(h, BuffDst);
- cmsCloseProfile(h);
-
- h = cmsOpenProfileFromFile(BuffDst, "r");
- if (h == NULL) return 0;
- ReadAllTags(h);
-
-
- cmsCloseProfile(h);
-
- return 1;
-}
-
-static
-cmsInt32Number CheckRAWSpecimen(const char* Profile)
-{
- char BuffSrc[256];
- char BuffDst[256];
- cmsHPROFILE h;
-
- sprintf(BuffSrc, "%s%s", ZOOfolder, Profile);
- sprintf(BuffDst, "%s%s", ZOORawWrite, Profile);
-
- h = cmsOpenProfileFromFile(BuffSrc, "r");
- if (h == NULL) return 0;
-
- ReadAllTags(h);
- ReadAllRAWTags(h);
- cmsSaveProfileToFile(h, BuffDst);
- cmsCloseProfile(h);
-
- h = cmsOpenProfileFromFile(BuffDst, "r");
- if (h == NULL) return 0;
- ReadAllTags(h);
- cmsCloseProfile(h);
-
- return 1;
-}
-
-
-static
-void CheckProfileZOO(void)
-{
-
- struct _finddata_t c_file;
- intptr_t hFile;
-
- cmsSetLogErrorHandler(NULL);
-
- if ( (hFile = _findfirst("c:\\colormaps\\*.*", &c_file)) == -1L )
- printf("No files in current directory");
- else
- {
- do
- {
-
- printf("%s\n", c_file.name);
- if (strcmp(c_file.name, ".") != 0 &&
- strcmp(c_file.name, "..") != 0) {
-
- CheckSingleSpecimen( c_file.name);
- CheckRAWSpecimen( c_file.name);
-
- if (TotalMemory > 0)
- printf("Ok, but %s are left!\n", MemStr(TotalMemory));
- else
- printf("Ok.\n");
-
- }
-
- } while ( _findnext(hFile, &c_file) == 0 );
-
- _findclose(hFile);
- }
-
- cmsSetLogErrorHandler(FatalErrorQuit);
-}
-
-#endif
-
-
-#if 0
-#define TYPE_709 709
-static double Rec709Math(int Type, const double Params[], double R)
-{ double Fun;
-
-switch (Type)
-{
-case 709:
-
-if (R <= (Params[3]*Params[4])) Fun = R / Params[3];
-else Fun = pow(((R - Params[2])/Params[1]), Params[0]);
-break;
-
-case -709:
-
-if (R <= Params[4]) Fun = R * Params[3];
-else Fun = Params[1] * pow(R, (1/Params[0])) + Params[2];
-break;
-}
-return Fun;
-}
-
-
-// Add nonstandard TRC curves -> Rec709
-cmsPluginParametricCurves NewCurvePlugin = {
-{ cmsPluginMagicNumber, 2000, cmsPluginParametricCurveSig, NULL },
-1, {TYPE_709}, {5}, Rec709Math};
-#endif
-
-
// ---------------------------------------------------------------------------------------
int main(int argc, char* argv[])
{
-
cmsInt32Number Exhaustive = 0;
cmsInt32Number DoSpeedTests = 1;
cmsInt32Number DoCheckTests = 1;
+ cmsInt32Number DoPluginTests = 1;
+ cmsInt32Number DoZooTests = 0;
#ifdef _MSC_VER
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
+
+ // First of all, check for the right header
+ if (cmsGetEncodedCMMversion() != LCMS_VERSION) {
+ Die("Oops, you are mixing header and shared lib!\nHeader version reports to be '%d' and shared lib '%d'\n", LCMS_VERSION, cmsGetEncodedCMMversion());
+ }
+
printf("LittleCMS %2.2f test bed %s %s\n\n", LCMS_VERSION / 1000.0, __DATE__, __TIME__);
if ((argc == 2) && strcmp(argv[1], "--exhaustive") == 0) {
printf("Running exhaustive tests (will take a while...)\n\n");
}
+#ifdef LCMS_FAST_EXTENSIONS
+ printf("Installing fast float extension ...");
+ cmsPlugin(cmsFastFloatExtensions());
+ printf("done.\n");
+#endif
+
+
printf("Installing debug memory plug-in ... ");
cmsPlugin(&DebugMemHandler);
printf("done.\n");
printf("Installing error logger ... ");
cmsSetLogErrorHandler(FatalErrorQuit);
printf("done.\n");
-
-#ifdef CMS_IS_WINDOWS_
- // CheckProfileZOO();
-#endif
-
+
PrintSupportedIntents();
-
-
-
- // Create utility profiles
- Check("Creation of test profiles", CreateTestProfiles);
-
- if (DoCheckTests)
- {
+
Check("Base types", CheckBaseTypes);
- Check("endianess", CheckEndianess);
+ Check("endianness", CheckEndianness);
Check("quick floor", CheckQuickFloor);
Check("quick floor word", CheckQuickFloorWord);
Check("Fixed point 15.16 representation", CheckFixedPoint15_16);
Check("Fixed point 8.8 representation", CheckFixedPoint8_8);
+ Check("D50 roundtrip", CheckD50Roundtrip);
+
+ // Create utility profiles
+ if (DoCheckTests || DoSpeedTests)
+ Check("Creation of test profiles", CreateTestProfiles);
+ if (DoCheckTests) {
+
// Forward 1D interpolation
Check("1D interpolation in 2pt tables", Check1DLERP2);
Check("1D interpolation in 3pt tables", Check1DLERP3);
// Named color
Check("Named color lists", CheckNamedColorList);
+ Check("Create named color profile", CreateNamedColorProfile);
+
// Profile I/O (this one is huge!)
Check("Profile creation", CheckProfileCreation);
-
+ Check("Header version", CheckVersionHeaderWriting);
+ Check("Multilocalized profile", CheckMultilocalizedProfile);
// Error reporting
Check("Error reporting on bad profiles", CheckErrReportingOnBadProfiles);
Check("TAC detection", CheckTAC);
Check("CGATS parser", CheckCGATS);
+ Check("CGATS parser on junk", CheckCGATS2);
+ Check("CGATS parser on overflow", CheckCGATS_Overflow);
Check("PostScript generator", CheckPostScript);
Check("Segment maxima GBD", CheckGBD);
Check("MD5 digest", CheckMD5);
Check("Linking", CheckLinking);
Check("floating point tags on XYZ", CheckFloatXYZ);
Check("RGB->Lab->RGB with alpha on FLT", ChecksRGB2LabFLT);
+ Check("Parametric curve on Rec709", CheckParametricRec709);
+ Check("Floating Point sampled curve with non-zero start", CheckFloatSamples);
+ Check("Floating Point segmented curve with short sampled segment", CheckFloatSegments);
+ Check("Read RAW portions", CheckReadRAW);
+ Check("Check MetaTag", CheckMeta);
+ Check("Null transform on floats", CheckFloatNULLxform);
+ Check("Set free a tag", CheckRemoveTag);
+ Check("Matrix simplification", CheckMatrixSimplify);
+ Check("Planar 8 optimization", CheckPlanar8opt);
+ Check("Swap endian feature", CheckSE);
+ Check("Transform line stride RGB", CheckTransformLineStride);
+ Check("Forged MPE profile", CheckForgedMPE);
+ Check("Proofing intersection", CheckProofingIntersection);
+ Check("Empty MLUC", CheckEmptyMLUC);
+ }
+
+ if (DoPluginTests)
+ {
+
+ Check("Context memory handling", CheckAllocContext);
+ Check("Simple context functionality", CheckSimpleContext);
+ Check("Alarm codes context", CheckAlarmColorsContext);
+ Check("Adaptation state context", CheckAdaptationStateContext);
+ Check("1D interpolation plugin", CheckInterp1DPlugin);
+ Check("3D interpolation plugin", CheckInterp3DPlugin);
+ Check("Parametric curve plugin", CheckParametricCurvePlugin);
+ Check("Formatters plugin", CheckFormattersPlugin);
+ Check("Tag type plugin", CheckTagTypePlugin);
+ Check("MPE type plugin", CheckMPEPlugin);
+ Check("Optimization plugin", CheckOptimizationPlugin);
+ Check("Rendering intent plugin", CheckIntentPlugin);
+ Check("Full transform plugin", CheckTransformPlugin);
+ Check("Mutex plugin", CheckMutexPlugin);
+
}
if (DoSpeedTests)
SpeedTest();
+
+#ifdef CMS_IS_WINDOWS_
+ if (DoZooTests)
+ CheckProfileZOO();
+#endif
+
DebugMemPrintTotals();
cmsUnregisterPlugins();
// Cleanup
- RemoveTestProfiles();
+ if (DoCheckTests || DoSpeedTests)
+ RemoveTestProfiles();
return TotalFail;
}
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+
+#ifndef TESTCMS2_H
+#define TESTCMS2_H
+
+#include "lcms2_internal.h"
+
+#ifdef LCMS_FAST_EXTENSIONS
+# include "fast_float_internal.h"
+#endif
+
+// On Visual Studio, use debug CRT
+#ifdef _MSC_VER
+# include "crtdbg.h"
+#endif
+
+#ifdef CMS_IS_WINDOWS_
+# include <io.h>
+#endif
+
+#define cmsmin(a, b) (((a) < (b)) ? (a) : (b))
+
+// Used to mark special pointers
+void DebugMemDontCheckThis(void *Ptr);
+
+
+cmsBool IsGoodVal(const char *title, cmsFloat64Number in, cmsFloat64Number out, cmsFloat64Number max);
+cmsBool IsGoodFixed15_16(const char *title, cmsFloat64Number in, cmsFloat64Number out);
+cmsBool IsGoodFixed8_8(const char *title, cmsFloat64Number in, cmsFloat64Number out);
+cmsBool IsGoodWord(const char *title, cmsUInt16Number in, cmsUInt16Number out);
+cmsBool IsGoodWordPrec(const char *title, cmsUInt16Number in, cmsUInt16Number out, cmsUInt16Number maxErr);
+
+void* PluginMemHandler(void);
+cmsContext WatchDogContext(void* usr);
+
+void ResetFatalError(void);
+void Die(const char* Reason, ...);
+void Dot(void);
+void Fail(const char* frm, ...);
+void SubTest(const char* frm, ...);
+void TestMemoryLeaks(cmsBool ok);
+void Say(const char* str);
+
+// Plug-in tests
+cmsInt32Number CheckSimpleContext(void);
+cmsInt32Number CheckAllocContext(void);
+cmsInt32Number CheckAlarmColorsContext(void);
+cmsInt32Number CheckAdaptationStateContext(void);
+cmsInt32Number CheckInterp1DPlugin(void);
+cmsInt32Number CheckInterp3DPlugin(void);
+cmsInt32Number CheckParametricCurvePlugin(void);
+cmsInt32Number CheckFormattersPlugin(void);
+cmsInt32Number CheckTagTypePlugin(void);
+cmsInt32Number CheckMPEPlugin(void);
+cmsInt32Number CheckOptimizationPlugin(void);
+cmsInt32Number CheckIntentPlugin(void);
+cmsInt32Number CheckTransformPlugin(void);
+cmsInt32Number CheckMutexPlugin(void);
+cmsInt32Number CheckMethodPackDoublesFromFloat(void);
+
+
+// Zoo
+void CheckProfileZOO(void);
+
+#endif
+
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+
+#include "testcms2.h"
+
+// --------------------------------------------------------------------------------------------------
+// Auxiliary, duplicate a context and mark the block as non-debug because in this case the allocator
+// and deallocator have different context owners
+// --------------------------------------------------------------------------------------------------
+
+static
+cmsContext DupContext(cmsContext src, void* Data)
+{
+ cmsContext cpy = cmsDupContext(src, Data);
+
+ DebugMemDontCheckThis(cpy);
+
+ return cpy;
+}
+
+// --------------------------------------------------------------------------------------------------
+// Simple context functions
+// --------------------------------------------------------------------------------------------------
+
+// Allocation order
+cmsInt32Number CheckAllocContext(void)
+{
+ cmsContext c1, c2, c3, c4;
+
+
+ c1 = cmsCreateContext(NULL, NULL); // This creates a context by using the normal malloc
+ DebugMemDontCheckThis(c1);
+ cmsDeleteContext(c1);
+
+ c2 = cmsCreateContext(PluginMemHandler(), NULL); // This creates a context by using the debug malloc
+ DebugMemDontCheckThis(c2);
+ cmsDeleteContext(c2);
+
+ c1 = cmsCreateContext(NULL, NULL);
+ DebugMemDontCheckThis(c1);
+
+ c2 = cmsCreateContext(PluginMemHandler(), NULL);
+ DebugMemDontCheckThis(c2);
+
+ cmsPluginTHR(c1, PluginMemHandler()); // Now the context have custom allocators
+
+ c3 = DupContext(c1, NULL);
+ c4 = DupContext(c2, NULL);
+
+
+
+ cmsDeleteContext(c1); // Should be deleted by using nomal malloc
+ cmsDeleteContext(c2); // Should be deleted by using debug malloc
+ cmsDeleteContext(c3); // Should be deleted by using nomal malloc
+ cmsDeleteContext(c4); // Should be deleted by using debug malloc
+
+ return 1;
+}
+
+// Test the very basic context capabilities
+cmsInt32Number CheckSimpleContext(void)
+{
+ int a = 1;
+ int b = 32;
+ cmsInt32Number rc = 0;
+
+ cmsContext c1, c2, c3;
+
+ // This function creates a context with a special
+ // memory manager that check allocation
+ c1 = WatchDogContext(&a);
+ cmsDeleteContext(c1);
+
+ c1 = WatchDogContext(&a);
+
+ // Let's check duplication
+ c2 = DupContext(c1, NULL);
+ c3 = DupContext(c2, NULL);
+
+ // User data should have been propagated
+ rc = (*(int*) cmsGetContextUserData(c3)) == 1 ;
+
+ // Free resources
+ cmsDeleteContext(c1);
+ cmsDeleteContext(c2);
+ cmsDeleteContext(c3);
+
+ if (!rc) {
+ Fail("Creation of user data failed");
+ return 0;
+ }
+
+ // Back to create 3 levels of inherance
+ c1 = cmsCreateContext(NULL, &a);
+ DebugMemDontCheckThis(c1);
+
+ c2 = DupContext(c1, NULL);
+ c3 = DupContext(c2, &b);
+
+ rc = (*(int*) cmsGetContextUserData(c3)) == 32 ;
+
+ cmsDeleteContext(c1);
+ cmsDeleteContext(c2);
+ cmsDeleteContext(c3);
+
+ if (!rc) {
+ Fail("Modification of user data failed");
+ return 0;
+ }
+
+ // All seems ok
+ return rc;
+}
+
+
+
+
+// --------------------------------------------------------------------------------------------------
+//Alarm color functions
+// --------------------------------------------------------------------------------------------------
+
+// This function tests the alarm codes across contexts
+cmsInt32Number CheckAlarmColorsContext(void)
+{
+ cmsInt32Number rc = 0;
+ const cmsUInt16Number codes[] = {0x0000, 0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888, 0x9999, 0xaaaa, 0xbbbb, 0xcccc, 0xdddd, 0xeeee, 0xffff};
+ cmsUInt16Number out[16];
+ cmsContext c1, c2, c3;
+ int i;
+
+ c1 = WatchDogContext(NULL);
+
+ cmsSetAlarmCodesTHR(c1, codes);
+ c2 = DupContext(c1, NULL);
+ c3 = DupContext(c2, NULL);
+
+ cmsGetAlarmCodesTHR(c3, out);
+
+ rc = 1;
+ for (i=0; i < 16; i++) {
+ if (out[i] != codes[i]) {
+ Fail("Bad alarm code %x != %x", out[i], codes[i]);
+ rc = 0;
+ break;
+ }
+ }
+
+ cmsDeleteContext(c1);
+ cmsDeleteContext(c2);
+ cmsDeleteContext(c3);
+
+ return rc;
+}
+
+
+// --------------------------------------------------------------------------------------------------
+//Adaptation state functions
+// --------------------------------------------------------------------------------------------------
+
+// Similar to the previous, but for adaptation state
+cmsInt32Number CheckAdaptationStateContext(void)
+{
+ cmsInt32Number rc = 0;
+ cmsContext c1, c2, c3;
+ cmsFloat64Number old1, old2;
+
+ old1 = cmsSetAdaptationStateTHR(NULL, -1);
+
+ c1 = WatchDogContext(NULL);
+
+ cmsSetAdaptationStateTHR(c1, 0.7);
+
+ c2 = DupContext(c1, NULL);
+ c3 = DupContext(c2, NULL);
+
+ rc = IsGoodVal("Adaptation state", cmsSetAdaptationStateTHR(c3, -1), 0.7, 0.001);
+
+ cmsDeleteContext(c1);
+ cmsDeleteContext(c2);
+ cmsDeleteContext(c3);
+
+ old2 = cmsSetAdaptationStateTHR(NULL, -1);
+
+ if (old1 != old2) {
+ Fail("Adaptation state has changed");
+ return 0;
+ }
+
+ return rc;
+}
+
+// --------------------------------------------------------------------------------------------------
+// Interpolation plugin check: A fake 1D and 3D interpolation will be used to test the functionality.
+// --------------------------------------------------------------------------------------------------
+
+// This fake interpolation takes always the closest lower node in the interpolation table for 1D
+static
+void Fake1Dfloat(const cmsFloat32Number Value[],
+ cmsFloat32Number Output[],
+ const cmsInterpParams* p)
+{
+ cmsFloat32Number val2;
+ int cell;
+ const cmsFloat32Number* LutTable = (const cmsFloat32Number*) p ->Table;
+
+ // Clip upper values
+ if (Value[0] >= 1.0) {
+ Output[0] = LutTable[p -> Domain[0]];
+ return;
+ }
+
+ val2 = p -> Domain[0] * Value[0];
+ cell = (int) floor(val2);
+ Output[0] = LutTable[cell] ;
+}
+
+// This fake interpolation just uses scrambled negated indexes for output
+static
+void Fake3D16(CMSREGISTER const cmsUInt16Number Input[],
+ CMSREGISTER cmsUInt16Number Output[],
+ CMSREGISTER const struct _cms_interp_struc* p)
+{
+ Output[0] = 0xFFFF - Input[2];
+ Output[1] = 0xFFFF - Input[1];
+ Output[2] = 0xFFFF - Input[0];
+}
+
+// The factory chooses interpolation routines on depending on certain conditions.
+cmsInterpFunction my_Interpolators_Factory(cmsUInt32Number nInputChannels,
+ cmsUInt32Number nOutputChannels,
+ cmsUInt32Number dwFlags)
+{
+ cmsInterpFunction Interpolation;
+ cmsBool IsFloat = (dwFlags & CMS_LERP_FLAGS_FLOAT);
+
+ // Initialize the return to zero as a non-supported mark
+ memset(&Interpolation, 0, sizeof(Interpolation));
+
+ // For 1D to 1D and floating point
+ if (nInputChannels == 1 && nOutputChannels == 1 && IsFloat) {
+
+ Interpolation.LerpFloat = Fake1Dfloat;
+ }
+ else
+ if (nInputChannels == 3 && nOutputChannels == 3 && !IsFloat) {
+
+ // For 3D to 3D and 16 bits
+ Interpolation.Lerp16 = Fake3D16;
+ }
+
+ // Here is the interpolation
+ return Interpolation;
+}
+
+// Interpolation plug-in
+static
+cmsPluginInterpolation InterpPluginSample = {
+
+ { cmsPluginMagicNumber, 2060, cmsPluginInterpolationSig, NULL },
+ my_Interpolators_Factory
+};
+
+
+// This is the check code for 1D interpolation plug-in
+cmsInt32Number CheckInterp1DPlugin(void)
+{
+ cmsToneCurve* Sampled1D = NULL;
+ cmsContext ctx = NULL;
+ cmsContext cpy = NULL;
+ const cmsFloat32Number tab[] = { 0.0f, 0.10f, 0.20f, 0.30f, 0.40f, 0.50f, 0.60f, 0.70f, 0.80f, 0.90f, 1.00f }; // A straight line
+
+ // 1st level context
+ ctx = WatchDogContext(NULL);
+ if (ctx == NULL) {
+ Fail("Cannot create context");
+ goto Error;
+ }
+
+ cmsPluginTHR(ctx, &InterpPluginSample);
+
+ cpy = DupContext(ctx, NULL);
+ if (cpy == NULL) {
+ Fail("Cannot create context (2)");
+ goto Error;
+ }
+
+ Sampled1D = cmsBuildTabulatedToneCurveFloat(cpy, 11, tab);
+ if (Sampled1D == NULL) {
+ Fail("Cannot create tone curve (1)");
+ goto Error;
+ }
+
+ // Do some interpolations with the plugin
+ if (!IsGoodVal("0.10", cmsEvalToneCurveFloat(Sampled1D, 0.10f), 0.10, 0.01)) goto Error;
+ if (!IsGoodVal("0.13", cmsEvalToneCurveFloat(Sampled1D, 0.13f), 0.10, 0.01)) goto Error;
+ if (!IsGoodVal("0.55", cmsEvalToneCurveFloat(Sampled1D, 0.55f), 0.50, 0.01)) goto Error;
+ if (!IsGoodVal("0.9999", cmsEvalToneCurveFloat(Sampled1D, 0.9999f), 0.90, 0.01)) goto Error;
+
+ cmsFreeToneCurve(Sampled1D);
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+
+ // Now in global context
+ Sampled1D = cmsBuildTabulatedToneCurveFloat(NULL, 11, tab);
+ if (Sampled1D == NULL) {
+ Fail("Cannot create tone curve (2)");
+ goto Error;
+ }
+
+ // Now without the plug-in
+ if (!IsGoodVal("0.10", cmsEvalToneCurveFloat(Sampled1D, 0.10f), 0.10, 0.001)) goto Error;
+ if (!IsGoodVal("0.13", cmsEvalToneCurveFloat(Sampled1D, 0.13f), 0.13, 0.001)) goto Error;
+ if (!IsGoodVal("0.55", cmsEvalToneCurveFloat(Sampled1D, 0.55f), 0.55, 0.001)) goto Error;
+ if (!IsGoodVal("0.9999", cmsEvalToneCurveFloat(Sampled1D, 0.9999f), 0.9999, 0.001)) goto Error;
+
+ cmsFreeToneCurve(Sampled1D);
+ return 1;
+
+Error:
+ if (ctx != NULL) cmsDeleteContext(ctx);
+ if (cpy != NULL) cmsDeleteContext(ctx);
+ if (Sampled1D != NULL) cmsFreeToneCurve(Sampled1D);
+ return 0;
+
+}
+
+// Checks the 3D interpolation
+cmsInt32Number CheckInterp3DPlugin(void)
+{
+
+ cmsPipeline* p;
+ cmsStage* clut;
+ cmsContext ctx;
+ cmsUInt16Number In[3], Out[3];
+ cmsUInt16Number identity[] = {
+
+ 0, 0, 0,
+ 0, 0, 0xffff,
+ 0, 0xffff, 0,
+ 0, 0xffff, 0xffff,
+ 0xffff, 0, 0,
+ 0xffff, 0, 0xffff,
+ 0xffff, 0xffff, 0,
+ 0xffff, 0xffff, 0xffff
+ };
+
+
+ ctx = WatchDogContext(NULL);
+ if (ctx == NULL) {
+ Fail("Cannot create context");
+ return 0;
+ }
+
+
+ cmsPluginTHR(ctx, &InterpPluginSample);
+
+
+ p = cmsPipelineAlloc(ctx, 3, 3);
+ clut = cmsStageAllocCLut16bit(ctx, 2, 3, 3, identity);
+ cmsPipelineInsertStage(p, cmsAT_BEGIN, clut);
+
+ // Do some interpolations with the plugin
+
+ In[0] = 0; In[1] = 0; In[2] = 0;
+ cmsPipelineEval16(In, Out, p);
+
+ if (!IsGoodWord("0", Out[0], 0xFFFF - 0)) goto Error;
+ if (!IsGoodWord("1", Out[1], 0xFFFF - 0)) goto Error;
+ if (!IsGoodWord("2", Out[2], 0xFFFF - 0)) goto Error;
+
+ In[0] = 0x1234; In[1] = 0x5678; In[2] = 0x9ABC;
+ cmsPipelineEval16(In, Out, p);
+
+ if (!IsGoodWord("0", 0xFFFF - 0x9ABC, Out[0])) goto Error;
+ if (!IsGoodWord("1", 0xFFFF - 0x5678, Out[1])) goto Error;
+ if (!IsGoodWord("2", 0xFFFF - 0x1234, Out[2])) goto Error;
+
+ cmsPipelineFree(p);
+ cmsDeleteContext(ctx);
+
+ // Now without the plug-in
+
+ p = cmsPipelineAlloc(NULL, 3, 3);
+ clut = cmsStageAllocCLut16bit(NULL, 2, 3, 3, identity);
+ cmsPipelineInsertStage(p, cmsAT_BEGIN, clut);
+
+ In[0] = 0; In[1] = 0; In[2] = 0;
+ cmsPipelineEval16(In, Out, p);
+
+ if (!IsGoodWord("0", 0, Out[0])) goto Error;
+ if (!IsGoodWord("1", 0, Out[1])) goto Error;
+ if (!IsGoodWord("2", 0, Out[2])) goto Error;
+
+ In[0] = 0x1234; In[1] = 0x5678; In[2] = 0x9ABC;
+ cmsPipelineEval16(In, Out, p);
+
+ if (!IsGoodWord("0", 0x1234, Out[0])) goto Error;
+ if (!IsGoodWord("1", 0x5678, Out[1])) goto Error;
+ if (!IsGoodWord("2", 0x9ABC, Out[2])) goto Error;
+
+ cmsPipelineFree(p);
+ return 1;
+
+Error:
+ cmsPipelineFree(p);
+ return 0;
+
+}
+
+// --------------------------------------------------------------------------------------------------
+// Parametric curve plugin check: sin(x)/cos(x) function will be used to test the functionality.
+// --------------------------------------------------------------------------------------------------
+
+#define TYPE_SIN 1000
+#define TYPE_COS 1010
+#define TYPE_TAN 1020
+#define TYPE_709 709
+
+static cmsFloat64Number my_fns(cmsInt32Number Type,
+ const cmsFloat64Number Params[],
+ cmsFloat64Number R)
+{
+ cmsFloat64Number Val;
+ switch (Type) {
+
+ case TYPE_SIN:
+ Val = Params[0]* sin(R * M_PI);
+ break;
+
+ case -TYPE_SIN:
+ Val = asin(R) / (M_PI * Params[0]);
+ break;
+
+ case TYPE_COS:
+ Val = Params[0]* cos(R * M_PI);
+ break;
+
+ case -TYPE_COS:
+ Val = acos(R) / (M_PI * Params[0]);
+ break;
+
+ default: return -1.0;
+
+ }
+
+ return Val;
+}
+
+static
+cmsFloat64Number my_fns2(cmsInt32Number Type,
+ const cmsFloat64Number Params[],
+ cmsFloat64Number R)
+{
+ cmsFloat64Number Val;
+ switch (Type) {
+
+ case TYPE_TAN:
+ Val = Params[0]* tan(R * M_PI);
+ break;
+
+ case -TYPE_TAN:
+ Val = atan(R) / (M_PI * Params[0]);
+ break;
+
+ default: return -1.0;
+ }
+
+ return Val;
+}
+
+
+static double Rec709Math(int Type, const double Params[], double R)
+{
+ double Fun = 0;
+
+ switch (Type)
+ {
+ case 709:
+
+ if (R <= (Params[3]*Params[4])) Fun = R / Params[3];
+ else Fun = pow(((R - Params[2])/Params[1]), Params[0]);
+ break;
+
+ case -709:
+
+ if (R <= Params[4]) Fun = R * Params[3];
+ else Fun = Params[1] * pow(R, (1/Params[0])) + Params[2];
+ break;
+ }
+ return Fun;
+}
+
+
+// Add nonstandard TRC curves -> Rec709
+
+cmsPluginParametricCurves Rec709Plugin = {
+
+ { cmsPluginMagicNumber, 2060, cmsPluginParametricCurveSig, NULL },
+
+ 1, {TYPE_709}, {5}, Rec709Math
+
+};
+
+
+static
+cmsPluginParametricCurves CurvePluginSample = {
+ { cmsPluginMagicNumber, 2060, cmsPluginParametricCurveSig, NULL },
+
+ 2, // nFunctions
+ { TYPE_SIN, TYPE_COS }, // Function Types
+ { 1, 1 }, // ParameterCount
+ my_fns // Evaluator
+};
+
+static
+cmsPluginParametricCurves CurvePluginSample2 = {
+ { cmsPluginMagicNumber, 2060, cmsPluginParametricCurveSig, NULL },
+
+ 1, // nFunctions
+ { TYPE_TAN}, // Function Types
+ { 1 }, // ParameterCount
+ my_fns2 // Evaluator
+};
+
+// --------------------------------------------------------------------------------------------------
+// In this test, the DupContext function will be checked as well
+// --------------------------------------------------------------------------------------------------
+cmsInt32Number CheckParametricCurvePlugin(void)
+{
+ cmsContext ctx = NULL;
+ cmsContext cpy = NULL;
+ cmsContext cpy2 = NULL;
+ cmsToneCurve* sinus;
+ cmsToneCurve* cosinus;
+ cmsToneCurve* tangent;
+ cmsToneCurve* reverse_sinus;
+ cmsToneCurve* reverse_cosinus;
+ cmsFloat64Number scale = 1.0;
+
+
+ ctx = WatchDogContext(NULL);
+
+ cmsPluginTHR(ctx, &CurvePluginSample);
+
+ cpy = DupContext(ctx, NULL);
+
+ cmsPluginTHR(cpy, &CurvePluginSample2);
+
+ cpy2 = DupContext(cpy, NULL);
+
+ cmsPluginTHR(cpy2, &Rec709Plugin);
+
+
+ sinus = cmsBuildParametricToneCurve(cpy, TYPE_SIN, &scale);
+ cosinus = cmsBuildParametricToneCurve(cpy, TYPE_COS, &scale);
+ tangent = cmsBuildParametricToneCurve(cpy, TYPE_TAN, &scale);
+ reverse_sinus = cmsReverseToneCurve(sinus);
+ reverse_cosinus = cmsReverseToneCurve(cosinus);
+
+
+ if (!IsGoodVal("0.10", cmsEvalToneCurveFloat(sinus, 0.10f), sin(0.10 * M_PI) , 0.001)) goto Error;
+ if (!IsGoodVal("0.60", cmsEvalToneCurveFloat(sinus, 0.60f), sin(0.60* M_PI), 0.001)) goto Error;
+ if (!IsGoodVal("0.90", cmsEvalToneCurveFloat(sinus, 0.90f), sin(0.90* M_PI), 0.001)) goto Error;
+
+ if (!IsGoodVal("0.10", cmsEvalToneCurveFloat(cosinus, 0.10f), cos(0.10* M_PI), 0.001)) goto Error;
+ if (!IsGoodVal("0.60", cmsEvalToneCurveFloat(cosinus, 0.60f), cos(0.60* M_PI), 0.001)) goto Error;
+ if (!IsGoodVal("0.90", cmsEvalToneCurveFloat(cosinus, 0.90f), cos(0.90* M_PI), 0.001)) goto Error;
+
+ if (!IsGoodVal("0.10", cmsEvalToneCurveFloat(tangent, 0.10f), tan(0.10* M_PI), 0.001)) goto Error;
+ if (!IsGoodVal("0.60", cmsEvalToneCurveFloat(tangent, 0.60f), tan(0.60* M_PI), 0.001)) goto Error;
+ if (!IsGoodVal("0.90", cmsEvalToneCurveFloat(tangent, 0.90f), tan(0.90* M_PI), 0.001)) goto Error;
+
+
+ if (!IsGoodVal("0.10", cmsEvalToneCurveFloat(reverse_sinus, 0.10f), asin(0.10)/M_PI, 0.001)) goto Error;
+ if (!IsGoodVal("0.60", cmsEvalToneCurveFloat(reverse_sinus, 0.60f), asin(0.60)/M_PI, 0.001)) goto Error;
+ if (!IsGoodVal("0.90", cmsEvalToneCurveFloat(reverse_sinus, 0.90f), asin(0.90)/M_PI, 0.001)) goto Error;
+
+ if (!IsGoodVal("0.10", cmsEvalToneCurveFloat(reverse_cosinus, 0.10f), acos(0.10)/M_PI, 0.001)) goto Error;
+ if (!IsGoodVal("0.60", cmsEvalToneCurveFloat(reverse_cosinus, 0.60f), acos(0.60)/M_PI, 0.001)) goto Error;
+ if (!IsGoodVal("0.90", cmsEvalToneCurveFloat(reverse_cosinus, 0.90f), acos(0.90)/M_PI, 0.001)) goto Error;
+
+ cmsFreeToneCurve(sinus);
+ cmsFreeToneCurve(cosinus);
+ cmsFreeToneCurve(tangent);
+ cmsFreeToneCurve(reverse_sinus);
+ cmsFreeToneCurve(reverse_cosinus);
+
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+ cmsDeleteContext(cpy2);
+
+ return 1;
+
+Error:
+
+ cmsFreeToneCurve(sinus);
+ cmsFreeToneCurve(reverse_sinus);
+ cmsFreeToneCurve(cosinus);
+ cmsFreeToneCurve(reverse_cosinus);
+
+ if (ctx != NULL) cmsDeleteContext(ctx);
+ if (cpy != NULL) cmsDeleteContext(cpy);
+ if (cpy2 != NULL) cmsDeleteContext(cpy2);
+ return 0;
+}
+
+// --------------------------------------------------------------------------------------------------
+// formatters plugin check: 5-6-5 RGB format
+// --------------------------------------------------------------------------------------------------
+
+// We define this special type as 0 bytes not float, and set the upper bit
+
+#define TYPE_RGB_565 (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(0) | (1 << 23))
+
+cmsUInt8Number* my_Unroll565(CMSREGISTER struct _cmstransform_struct* nfo,
+ CMSREGISTER cmsUInt16Number wIn[],
+ CMSREGISTER cmsUInt8Number* accum,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+ cmsUInt16Number pixel = *(cmsUInt16Number*) accum; // Take whole pixel
+
+ double r = floor(((double) (pixel & 31) * 65535.0) / 31.0 + 0.5);
+ double g = floor((((pixel >> 5) & 63) * 65535.0) / 63.0 + 0.5);
+ double b = floor((((pixel >> 11) & 31) * 65535.0) / 31.0 + 0.5);
+
+ wIn[2] = (cmsUInt16Number) r;
+ wIn[1] = (cmsUInt16Number) g;
+ wIn[0] = (cmsUInt16Number) b;
+
+ return accum + 2;
+}
+
+cmsUInt8Number* my_Pack565(CMSREGISTER _cmsTRANSFORM* info,
+ CMSREGISTER cmsUInt16Number wOut[],
+ CMSREGISTER cmsUInt8Number* output,
+ CMSREGISTER cmsUInt32Number Stride)
+{
+
+ CMSREGISTER cmsUInt16Number pixel;
+ int r, g, b;
+
+ r = (int) floor(( wOut[2] * 31) / 65535.0 + 0.5);
+ g = (int) floor(( wOut[1] * 63) / 65535.0 + 0.5);
+ b = (int) floor(( wOut[0] * 31) / 65535.0 + 0.5);
+
+
+ pixel = (r & 31) | (( g & 63) << 5) | ((b & 31) << 11);
+
+
+ *(cmsUInt16Number*) output = pixel;
+ return output + 2;
+}
+
+
+cmsFormatter my_FormatterFactory(cmsUInt32Number Type,
+ cmsFormatterDirection Dir,
+ cmsUInt32Number dwFlags)
+{
+ cmsFormatter Result = { NULL };
+
+ if ((Type == TYPE_RGB_565) &&
+ !(dwFlags & CMS_PACK_FLAGS_FLOAT) &&
+ (Dir == cmsFormatterInput)) {
+ Result.Fmt16 = my_Unroll565;
+ }
+ return Result;
+}
+
+
+cmsFormatter my_FormatterFactory2(cmsUInt32Number Type,
+ cmsFormatterDirection Dir,
+ cmsUInt32Number dwFlags)
+{
+ cmsFormatter Result = { NULL };
+
+ if ((Type == TYPE_RGB_565) &&
+ !(dwFlags & CMS_PACK_FLAGS_FLOAT) &&
+ (Dir == cmsFormatterOutput)) {
+ Result.Fmt16 = my_Pack565;
+ }
+ return Result;
+}
+
+static
+cmsPluginFormatters FormattersPluginSample = { {cmsPluginMagicNumber,
+ 2060,
+ cmsPluginFormattersSig,
+ NULL},
+ my_FormatterFactory };
+
+
+
+static
+cmsPluginFormatters FormattersPluginSample2 = { {cmsPluginMagicNumber,
+ 2060,
+ cmsPluginFormattersSig,
+ NULL},
+ my_FormatterFactory2 };
+
+
+cmsInt32Number CheckFormattersPlugin(void)
+{
+ cmsContext ctx = WatchDogContext(NULL);
+ cmsContext cpy;
+ cmsContext cpy2;
+ cmsHTRANSFORM xform;
+ cmsUInt16Number stream[]= { 0xffffU, 0x1234U, 0x0000U, 0x33ddU };
+ cmsUInt16Number result[4];
+ int i;
+
+
+ cmsPluginTHR(ctx, &FormattersPluginSample);
+
+ cpy = DupContext(ctx, NULL);
+
+ cmsPluginTHR(cpy, &FormattersPluginSample2);
+
+ cpy2 = DupContext(cpy, NULL);
+
+ xform = cmsCreateTransformTHR(cpy2, NULL, TYPE_RGB_565, NULL, TYPE_RGB_565, INTENT_PERCEPTUAL, cmsFLAGS_NULLTRANSFORM);
+
+ cmsDoTransform(xform, stream, result, 4);
+
+ cmsDeleteTransform(xform);
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+ cmsDeleteContext(cpy2);
+
+ for (i=0; i < 4; i++)
+ if (stream[i] != result[i]) return 0;
+
+ return 1;
+}
+
+// --------------------------------------------------------------------------------------------------
+// TagTypePlugin plugin check
+// --------------------------------------------------------------------------------------------------
+
+#define SigIntType ((cmsTagTypeSignature) 0x74747448) // 'tttH'
+#define SigInt ((cmsTagSignature) 0x74747448) // 'tttH'
+
+static
+void *Type_int_Read(struct _cms_typehandler_struct* self,
+ cmsIOHANDLER* io,
+ cmsUInt32Number* nItems,
+ cmsUInt32Number SizeOfTag)
+{
+ cmsUInt32Number* Ptr = (cmsUInt32Number*) _cmsMalloc(self ->ContextID, sizeof(cmsUInt32Number));
+ if (Ptr == NULL) return NULL;
+ if (!_cmsReadUInt32Number(io, Ptr)) return NULL;
+ *nItems = 1;
+ return Ptr;
+}
+
+static
+cmsBool Type_int_Write(struct _cms_typehandler_struct* self,
+ cmsIOHANDLER* io,
+ void* Ptr, cmsUInt32Number nItems)
+{
+ return _cmsWriteUInt32Number(io, *(cmsUInt32Number*) Ptr);
+}
+
+static
+void* Type_int_Dup(struct _cms_typehandler_struct* self,
+ const void *Ptr, cmsUInt32Number n)
+{
+ return _cmsDupMem(self ->ContextID, Ptr, n * sizeof(cmsUInt32Number));
+}
+
+void Type_int_Free(struct _cms_typehandler_struct* self,
+ void* Ptr)
+{
+ _cmsFree(self ->ContextID, Ptr);
+}
+
+
+static cmsPluginTag HiddenTagPluginSample = {
+
+ { cmsPluginMagicNumber, 2060, cmsPluginTagSig, NULL},
+ SigInt, { 1, 1, { SigIntType }, NULL }
+};
+
+static cmsPluginTagType TagTypePluginSample = {
+
+ { cmsPluginMagicNumber, 2060, cmsPluginTagTypeSig, (cmsPluginBase*) &HiddenTagPluginSample},
+ { SigIntType, Type_int_Read, Type_int_Write, Type_int_Dup, Type_int_Free, NULL }
+};
+
+
+cmsInt32Number CheckTagTypePlugin(void)
+{
+ cmsContext ctx = NULL;
+ cmsContext cpy = NULL;
+ cmsContext cpy2 = NULL;
+ cmsHPROFILE h = NULL;
+ cmsUInt32Number myTag = 1234;
+ cmsUInt32Number rc = 0;
+ char* data = NULL;
+ cmsUInt32Number *ptr = NULL;
+ cmsUInt32Number clen = 0;
+
+
+ ctx = WatchDogContext(NULL);
+ cmsPluginTHR(ctx, &TagTypePluginSample);
+
+ cpy = DupContext(ctx, NULL);
+ cpy2 = DupContext(cpy, NULL);
+
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+
+ h = cmsCreateProfilePlaceholder(cpy2);
+ if (h == NULL) {
+ Fail("Create placeholder failed");
+ goto Error;
+ }
+
+
+ if (!cmsWriteTag(h, SigInt, &myTag)) {
+ Fail("Plug-in failed");
+ goto Error;
+ }
+
+ rc = cmsSaveProfileToMem(h, NULL, &clen);
+ if (!rc) {
+ Fail("Fetch mem size failed");
+ goto Error;
+ }
+
+
+ data = (char*) malloc(clen);
+ if (data == NULL) {
+ Fail("malloc failed ?!?");
+ goto Error;
+ }
+
+
+ rc = cmsSaveProfileToMem(h, data, &clen);
+ if (!rc) {
+ Fail("Save to mem failed");
+ goto Error;
+ }
+
+ cmsCloseProfile(h);
+
+ cmsSetLogErrorHandler(NULL);
+ h = cmsOpenProfileFromMem(data, clen);
+ if (h == NULL) {
+ Fail("Open profile failed");
+ goto Error;
+ }
+
+ ptr = (cmsUInt32Number*) cmsReadTag(h, SigInt);
+ if (ptr != NULL) {
+
+ Fail("read tag/context switching failed");
+ goto Error;
+ }
+
+ cmsCloseProfile(h);
+ ResetFatalError();
+
+ h = cmsOpenProfileFromMemTHR(cpy2, data, clen);
+ if (h == NULL) {
+ Fail("Open profile from mem failed");
+ goto Error;
+ }
+
+ // Get rid of data
+ free(data); data = NULL;
+
+ ptr = (cmsUInt32Number*) cmsReadTag(h, SigInt);
+ if (ptr == NULL) {
+ Fail("Read tag/conext switching failed (2)");
+ return 0;
+ }
+
+ rc = (*ptr == 1234);
+
+ cmsCloseProfile(h);
+
+ cmsDeleteContext(cpy2);
+
+ return rc;
+
+Error:
+
+ if (h != NULL) cmsCloseProfile(h);
+ if (ctx != NULL) cmsDeleteContext(ctx);
+ if (cpy != NULL) cmsDeleteContext(cpy);
+ if (cpy2 != NULL) cmsDeleteContext(cpy2);
+ if (data) free(data);
+
+ return 0;
+}
+
+// --------------------------------------------------------------------------------------------------
+// MPE plugin check:
+// --------------------------------------------------------------------------------------------------
+#define SigNegateType ((cmsStageSignature)0x6E202020)
+
+static
+void EvaluateNegate(const cmsFloat32Number In[],
+ cmsFloat32Number Out[],
+ const cmsStage *mpe)
+{
+ Out[0] = 1.0f - In[0];
+ Out[1] = 1.0f - In[1];
+ Out[2] = 1.0f - In[2];
+}
+
+static
+cmsStage* StageAllocNegate(cmsContext ContextID)
+{
+ return _cmsStageAllocPlaceholder(ContextID,
+ SigNegateType, 3, 3, EvaluateNegate,
+ NULL, NULL, NULL);
+}
+
+static
+void *Type_negate_Read(struct _cms_typehandler_struct* self,
+ cmsIOHANDLER* io,
+ cmsUInt32Number* nItems,
+ cmsUInt32Number SizeOfTag)
+{
+ cmsUInt16Number Chans;
+ if (!_cmsReadUInt16Number(io, &Chans)) return NULL;
+ if (Chans != 3) return NULL;
+
+ *nItems = 1;
+ return StageAllocNegate(self -> ContextID);
+}
+
+static
+cmsBool Type_negate_Write(struct _cms_typehandler_struct* self,
+ cmsIOHANDLER* io,
+ void* Ptr, cmsUInt32Number nItems)
+{
+
+ if (!_cmsWriteUInt16Number(io, 3)) return FALSE;
+ return TRUE;
+}
+
+static
+cmsPluginMultiProcessElement MPEPluginSample = {
+
+ {cmsPluginMagicNumber, 2060, cmsPluginMultiProcessElementSig, NULL},
+
+ { (cmsTagTypeSignature) SigNegateType, Type_negate_Read, Type_negate_Write, NULL, NULL, NULL }
+};
+
+
+cmsInt32Number CheckMPEPlugin(void)
+{
+ cmsContext ctx = NULL;
+ cmsContext cpy = NULL;
+ cmsContext cpy2 = NULL;
+ cmsHPROFILE h = NULL;
+ cmsUInt32Number myTag = 1234;
+ cmsUInt32Number rc = 0;
+ char* data = NULL;
+ cmsUInt32Number clen = 0;
+ cmsFloat32Number In[3], Out[3];
+ cmsPipeline* pipe;
+
+ ctx = WatchDogContext(NULL);
+ cmsPluginTHR(ctx, &MPEPluginSample);
+
+ cpy = DupContext(ctx, NULL);
+ cpy2 = DupContext(cpy, NULL);
+
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+
+ h = cmsCreateProfilePlaceholder(cpy2);
+ if (h == NULL) {
+ Fail("Create placeholder failed");
+ goto Error;
+ }
+
+ pipe = cmsPipelineAlloc(cpy2, 3, 3);
+ cmsPipelineInsertStage(pipe, cmsAT_BEGIN, StageAllocNegate(cpy2));
+
+
+ In[0] = 0.3f; In[1] = 0.2f; In[2] = 0.9f;
+ cmsPipelineEvalFloat(In, Out, pipe);
+
+ rc = (IsGoodVal("0", Out[0], 1.0-In[0], 0.001) &&
+ IsGoodVal("1", Out[1], 1.0-In[1], 0.001) &&
+ IsGoodVal("2", Out[2], 1.0-In[2], 0.001));
+
+ if (!rc) {
+ Fail("Pipeline failed");
+ goto Error;
+ }
+
+ if (!cmsWriteTag(h, cmsSigDToB3Tag, pipe)) {
+ Fail("Plug-in failed");
+ goto Error;
+ }
+
+ // This cleans the stage as well
+ cmsPipelineFree(pipe);
+
+ rc = cmsSaveProfileToMem(h, NULL, &clen);
+ if (!rc) {
+ Fail("Fetch mem size failed");
+ goto Error;
+ }
+
+
+ data = (char*) malloc(clen);
+ if (data == NULL) {
+ Fail("malloc failed ?!?");
+ goto Error;
+ }
+
+
+ rc = cmsSaveProfileToMem(h, data, &clen);
+ if (!rc) {
+ Fail("Save to mem failed");
+ goto Error;
+ }
+
+ cmsCloseProfile(h);
+
+
+ cmsSetLogErrorHandler(NULL);
+ h = cmsOpenProfileFromMem(data, clen);
+ if (h == NULL) {
+ Fail("Open profile failed");
+ goto Error;
+ }
+
+ pipe = (cmsPipeline*) cmsReadTag(h, cmsSigDToB3Tag);
+ if (pipe != NULL) {
+
+ // Unsupported stage, should fail
+ Fail("read tag/context switching failed");
+ goto Error;
+ }
+
+ cmsCloseProfile(h);
+
+ ResetFatalError();
+
+ h = cmsOpenProfileFromMemTHR(cpy2, data, clen);
+ if (h == NULL) {
+ Fail("Open profile from mem failed");
+ goto Error;
+ }
+
+ // Get rid of data
+ free(data); data = NULL;
+
+ pipe = (cmsPipeline*) cmsReadTag(h, cmsSigDToB3Tag);
+ if (pipe == NULL) {
+ Fail("Read tag/conext switching failed (2)");
+ return 0;
+ }
+
+ // Evaluate for negation
+ In[0] = 0.3f; In[1] = 0.2f; In[2] = 0.9f;
+ cmsPipelineEvalFloat(In, Out, pipe);
+
+ rc = (IsGoodVal("0", Out[0], 1.0-In[0], 0.001) &&
+ IsGoodVal("1", Out[1], 1.0-In[1], 0.001) &&
+ IsGoodVal("2", Out[2], 1.0-In[2], 0.001));
+
+ cmsCloseProfile(h);
+
+ cmsDeleteContext(cpy2);
+
+ return rc;
+
+Error:
+
+ if (h != NULL) cmsCloseProfile(h);
+ if (ctx != NULL) cmsDeleteContext(ctx);
+ if (cpy != NULL) cmsDeleteContext(cpy);
+ if (cpy2 != NULL) cmsDeleteContext(cpy2);
+ if (data) free(data);
+
+ return 0;
+}
+
+
+// --------------------------------------------------------------------------------------------------
+// Optimization plugin check:
+// --------------------------------------------------------------------------------------------------
+
+static
+void FastEvaluateCurves(CMSREGISTER const cmsUInt16Number In[],
+ CMSREGISTER cmsUInt16Number Out[],
+ CMSREGISTER const void* Data)
+{
+ Out[0] = In[0];
+}
+
+static
+cmsBool MyOptimize(cmsPipeline** Lut,
+ cmsUInt32Number Intent,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+{
+ cmsStage* mpe;
+ _cmsStageToneCurvesData* Data;
+
+ // Only curves in this LUT? All are identities?
+ for (mpe = cmsPipelineGetPtrToFirstStage(*Lut);
+ mpe != NULL;
+ mpe = cmsStageNext(mpe)) {
+
+ if (cmsStageType(mpe) != cmsSigCurveSetElemType) return FALSE;
+
+ // Check for identity
+ Data = (_cmsStageToneCurvesData*) cmsStageData(mpe);
+ if (Data ->nCurves != 1) return FALSE;
+ if (cmsEstimateGamma(Data->TheCurves[0], 0.1) > 1.0) return FALSE;
+
+ }
+
+ *dwFlags |= cmsFLAGS_NOCACHE;
+ _cmsPipelineSetOptimizationParameters(*Lut, FastEvaluateCurves, NULL, NULL, NULL);
+
+ return TRUE;
+}
+
+cmsPluginOptimization OptimizationPluginSample = {
+
+ {cmsPluginMagicNumber, 2060, cmsPluginOptimizationSig, NULL},
+ MyOptimize
+};
+
+
+cmsInt32Number CheckOptimizationPlugin(void)
+{
+ cmsContext ctx = WatchDogContext(NULL);
+ cmsContext cpy;
+ cmsContext cpy2;
+ cmsHTRANSFORM xform;
+ cmsUInt8Number In[]= { 10, 20, 30, 40 };
+ cmsUInt8Number Out[4];
+ cmsToneCurve* Linear[1];
+ cmsHPROFILE h;
+ int i;
+
+ cmsPluginTHR(ctx, &OptimizationPluginSample);
+
+ cpy = DupContext(ctx, NULL);
+ cpy2 = DupContext(cpy, NULL);
+
+ Linear[0] = cmsBuildGamma(cpy2, 1.0);
+ h = cmsCreateLinearizationDeviceLinkTHR(cpy2, cmsSigGrayData, Linear);
+ cmsFreeToneCurve(Linear[0]);
+
+ xform = cmsCreateTransformTHR(cpy2, h, TYPE_GRAY_8, h, TYPE_GRAY_8, INTENT_PERCEPTUAL, 0);
+ cmsCloseProfile(h);
+
+ cmsDoTransform(xform, In, Out, 4);
+
+ cmsDeleteTransform(xform);
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+ cmsDeleteContext(cpy2);
+
+ for (i=0; i < 4; i++)
+ if (In[i] != Out[i]) return 0;
+
+ return 1;
+}
+
+
+// --------------------------------------------------------------------------------------------------
+// Check the intent plug-in
+// --------------------------------------------------------------------------------------------------
+
+/*
+ This example creates a new rendering intent, at intent number 300, that is identical to perceptual
+ intent for all color spaces but gray to gray transforms, in this case it bypasses the data.
+ Note that it has to clear all occurrences of intent 300 in the intents array to avoid
+ infinite recursion.
+*/
+
+#define INTENT_DECEPTIVE 300
+
+static
+cmsPipeline* MyNewIntent(cmsContext ContextID,
+ cmsUInt32Number nProfiles,
+ cmsUInt32Number TheIntents[],
+ cmsHPROFILE hProfiles[],
+ cmsBool BPC[],
+ cmsFloat64Number AdaptationStates[],
+ cmsUInt32Number dwFlags)
+{
+ cmsPipeline* Result;
+ cmsUInt32Number ICCIntents[256];
+ cmsUInt32Number i;
+
+ for (i=0; i < nProfiles; i++)
+ ICCIntents[i] = (TheIntents[i] == INTENT_DECEPTIVE) ? INTENT_PERCEPTUAL :
+ TheIntents[i];
+
+ if (cmsGetColorSpace(hProfiles[0]) != cmsSigGrayData ||
+ cmsGetColorSpace(hProfiles[nProfiles-1]) != cmsSigGrayData)
+ return _cmsDefaultICCintents(ContextID, nProfiles,
+ ICCIntents, hProfiles,
+ BPC, AdaptationStates,
+ dwFlags);
+
+ Result = cmsPipelineAlloc(ContextID, 1, 1);
+ if (Result == NULL) return NULL;
+
+ cmsPipelineInsertStage(Result, cmsAT_BEGIN,
+ cmsStageAllocIdentity(ContextID, 1));
+
+ return Result;
+}
+
+static cmsPluginRenderingIntent IntentPluginSample = {
+
+ {cmsPluginMagicNumber, 2060, cmsPluginRenderingIntentSig, NULL},
+
+ INTENT_DECEPTIVE, MyNewIntent, "bypass gray to gray rendering intent"
+};
+
+cmsInt32Number CheckIntentPlugin(void)
+{
+ cmsContext ctx = WatchDogContext(NULL);
+ cmsContext cpy;
+ cmsContext cpy2;
+ cmsHTRANSFORM xform;
+ cmsHPROFILE h1, h2;
+ cmsToneCurve* Linear1;
+ cmsToneCurve* Linear2;
+ cmsUInt8Number In[]= { 10, 20, 30, 40 };
+ cmsUInt8Number Out[4];
+ int i;
+
+ cmsPluginTHR(ctx, &IntentPluginSample);
+
+ cpy = DupContext(ctx, NULL);
+ cpy2 = DupContext(cpy, NULL);
+
+ Linear1 = cmsBuildGamma(cpy2, 3.0);
+ Linear2 = cmsBuildGamma(cpy2, 0.1);
+ h1 = cmsCreateLinearizationDeviceLinkTHR(cpy2, cmsSigGrayData, &Linear1);
+ h2 = cmsCreateLinearizationDeviceLinkTHR(cpy2, cmsSigGrayData, &Linear2);
+
+ cmsFreeToneCurve(Linear1);
+ cmsFreeToneCurve(Linear2);
+
+ xform = cmsCreateTransformTHR(cpy2, h1, TYPE_GRAY_8, h2, TYPE_GRAY_8, INTENT_DECEPTIVE, 0);
+ cmsCloseProfile(h1); cmsCloseProfile(h2);
+
+ cmsDoTransform(xform, In, Out, 4);
+
+ cmsDeleteTransform(xform);
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+ cmsDeleteContext(cpy2);
+
+ for (i=0; i < 4; i++)
+ if (Out[i] != In[i]) return 0;
+
+ return 1;
+}
+
+
+// --------------------------------------------------------------------------------------------------
+// Check the full transform plug-in
+// --------------------------------------------------------------------------------------------------
+
+// This is a sample intent that only works for gray8 as output, and always returns '42'
+static
+void TrancendentalTransform(struct _cmstransform_struct * CMM,
+ const void* InputBuffer,
+ void* OutputBuffer,
+ cmsUInt32Number Size,
+ cmsUInt32Number Stride)
+{
+ cmsUInt32Number i;
+
+ for (i=0; i < Size; i++)
+ {
+ ((cmsUInt8Number*) OutputBuffer)[i] = 0x42;
+ }
+
+}
+
+
+cmsBool TransformFactory(_cmsTransformFn* xformPtr,
+ void** UserData,
+ _cmsFreeUserDataFn* FreePrivateDataFn,
+ cmsPipeline** Lut,
+ cmsUInt32Number* InputFormat,
+ cmsUInt32Number* OutputFormat,
+ cmsUInt32Number* dwFlags)
+
+{
+ if (*OutputFormat == TYPE_GRAY_8)
+ {
+ // *Lut holds the pipeline to be applied
+ *xformPtr = TrancendentalTransform;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
+// The Plug-in entry point
+static cmsPluginTransform FullTransformPluginSample = {
+
+ { cmsPluginMagicNumber, 2060, cmsPluginTransformSig, NULL},
+
+ TransformFactory
+};
+
+cmsInt32Number CheckTransformPlugin(void)
+{
+ cmsContext ctx = WatchDogContext(NULL);
+ cmsContext cpy;
+ cmsContext cpy2;
+ cmsHTRANSFORM xform;
+ cmsUInt8Number In[]= { 10, 20, 30, 40 };
+ cmsUInt8Number Out[4];
+ cmsToneCurve* Linear;
+ cmsHPROFILE h;
+ int i;
+
+
+ cmsPluginTHR(ctx, &FullTransformPluginSample);
+
+ cpy = DupContext(ctx, NULL);
+ cpy2 = DupContext(cpy, NULL);
+
+ Linear = cmsBuildGamma(cpy2, 1.0);
+ h = cmsCreateLinearizationDeviceLinkTHR(cpy2, cmsSigGrayData, &Linear);
+ cmsFreeToneCurve(Linear);
+
+ xform = cmsCreateTransformTHR(cpy2, h, TYPE_GRAY_8, h, TYPE_GRAY_8, INTENT_PERCEPTUAL, 0);
+ cmsCloseProfile(h);
+
+ cmsDoTransform(xform, In, Out, 4);
+
+
+ cmsDeleteTransform(xform);
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+ cmsDeleteContext(cpy2);
+
+ for (i=0; i < 4; i++)
+ if (Out[i] != 0x42) return 0;
+
+ return 1;
+}
+
+
+// --------------------------------------------------------------------------------------------------
+// Check the mutex plug-in
+// --------------------------------------------------------------------------------------------------
+
+typedef struct {
+ int nlocks;
+} MyMtx;
+
+
+static
+void* MyMtxCreate(cmsContext id)
+{
+ MyMtx* mtx = (MyMtx*) _cmsMalloc(id, sizeof(MyMtx));
+ mtx ->nlocks = 0;
+ return mtx;
+}
+
+static
+void MyMtxDestroy(cmsContext id, void* mtx)
+{
+ MyMtx* mtx_ = (MyMtx*) mtx;
+
+ if (mtx_->nlocks != 0)
+ Die("Locks != 0 when setting free a mutex");
+
+ _cmsFree(id, mtx);
+
+}
+
+static
+cmsBool MyMtxLock(cmsContext id, void* mtx)
+{
+ MyMtx* mtx_ = (MyMtx*) mtx;
+ mtx_->nlocks++;
+
+ return TRUE;
+}
+
+static
+void MyMtxUnlock(cmsContext id, void* mtx)
+{
+ MyMtx* mtx_ = (MyMtx*) mtx;
+ mtx_->nlocks--;
+
+}
+
+
+static cmsPluginMutex MutexPluginSample = {
+
+ { cmsPluginMagicNumber, 2060, cmsPluginMutexSig, NULL},
+
+ MyMtxCreate, MyMtxDestroy, MyMtxLock, MyMtxUnlock
+};
+
+
+cmsInt32Number CheckMutexPlugin(void)
+{
+ cmsContext ctx = WatchDogContext(NULL);
+ cmsContext cpy;
+ cmsContext cpy2;
+ cmsHTRANSFORM xform;
+ cmsUInt8Number In[]= { 10, 20, 30, 40 };
+ cmsUInt8Number Out[4];
+ cmsToneCurve* Linear;
+ cmsHPROFILE h;
+ int i;
+
+
+ cmsPluginTHR(ctx, &MutexPluginSample);
+
+ cpy = DupContext(ctx, NULL);
+ cpy2 = DupContext(cpy, NULL);
+
+ Linear = cmsBuildGamma(cpy2, 1.0);
+ h = cmsCreateLinearizationDeviceLinkTHR(cpy2, cmsSigGrayData, &Linear);
+ cmsFreeToneCurve(Linear);
+
+ xform = cmsCreateTransformTHR(cpy2, h, TYPE_GRAY_8, h, TYPE_GRAY_8, INTENT_PERCEPTUAL, 0);
+ cmsCloseProfile(h);
+
+ cmsDoTransform(xform, In, Out, 4);
+
+
+ cmsDeleteTransform(xform);
+ cmsDeleteContext(ctx);
+ cmsDeleteContext(cpy);
+ cmsDeleteContext(cpy2);
+
+ for (i=0; i < 4; i++)
+ if (Out[i] != In[i]) return 0;
+
+ return 1;
+}
+
+
+cmsInt32Number CheckMethodPackDoublesFromFloat(void)
+{
+
+ cmsContext ctx = WatchDogContext(NULL);
+
+ cmsHTRANSFORM xform;
+ cmsHTRANSFORM l_pFakeProfileLAB;
+
+ cmsFloat64Number l_D_OutputColorArrayBlack[8];
+ cmsFloat64Number l_D_OutputColorArrayBlue[8];
+
+ cmsCIELab LabInBlack;
+ cmsCIELab LabInBlue;
+
+ cmsUInt16Number Lab_UI16_Black[3];
+ cmsUInt16Number Lab_UI16_Blue[3];
+
+ cmsHPROFILE OutputCMYKProfile;
+ cmsUInt32Number l_UI32_OutputFormat;
+
+
+ cmsPluginTHR(ctx, &FullTransformPluginSample);
+
+
+ l_pFakeProfileLAB = cmsCreateLab2ProfileTHR(ctx, NULL);
+
+ if (l_pFakeProfileLAB == NULL)
+ return 0;
+
+ OutputCMYKProfile = cmsOpenProfileFromFileTHR(ctx, "TestCLT.icc", "r");
+
+ if (OutputCMYKProfile == NULL)
+ return 0;
+
+ l_UI32_OutputFormat = 0;
+ l_UI32_OutputFormat |= COLORSPACE_SH(PT_CMYK);
+ l_UI32_OutputFormat |= PLANAR_SH(1);
+ l_UI32_OutputFormat |= CHANNELS_SH(4);
+ l_UI32_OutputFormat |= BYTES_SH(0);
+ l_UI32_OutputFormat |= FLOAT_SH(1);
+
+
+ xform = cmsCreateTransformTHR(ctx, l_pFakeProfileLAB, TYPE_Lab_DBL, OutputCMYKProfile, l_UI32_OutputFormat, INTENT_PERCEPTUAL, 0);
+ cmsCloseProfile(OutputCMYKProfile);
+ cmsCloseProfile(l_pFakeProfileLAB);
+
+ Lab_UI16_Black[0] = 0;
+ Lab_UI16_Black[1] = 32768;
+ Lab_UI16_Black[2] = 32768;
+
+ Lab_UI16_Blue[0] = 0;
+ Lab_UI16_Blue[1] = 8192;
+ Lab_UI16_Blue[2] = 8192;
+
+ cmsLabEncoded2Float(&LabInBlack, Lab_UI16_Black);
+ cmsLabEncoded2Float(&LabInBlue, Lab_UI16_Blue);
+
+ memset(l_D_OutputColorArrayBlack, 0, sizeof(l_D_OutputColorArrayBlack));
+ memset(l_D_OutputColorArrayBlue, 0, sizeof(l_D_OutputColorArrayBlue));
+
+ cmsDoTransform(xform, &LabInBlack, l_D_OutputColorArrayBlack, 1);
+ cmsDoTransform(xform, &LabInBlue, l_D_OutputColorArrayBlue, 1);
+
+
+ cmsDeleteTransform(xform);
+ cmsDeleteContext(ctx);
+
+ return 1;
+}
+
#include <windows.h>
-#include "lcms.h"
+#include "lcms2_plugin.h"
-static cmsHPROFILE prof_xyz,prof_rgb;
-static cmsHTRANSFORM trans_xyz_to_rgb,trans_rgb_to_xyz;
+static cmsContext ctx;
+static cmsHPROFILE prof_cmyk, prof_rgb;
+static volatile int rc = 0;
-static DWORD WINAPI make_trans_xyz_to_rgb(LPVOID lpParameter)
+
+static
+void* MyMtxCreate(cmsContext id)
{
- trans_xyz_to_rgb = cmsCreateTransform(
- prof_xyz,TYPE_XYZ_DBL,
- prof_rgb,TYPE_RGB_DBL,
- INTENT_ABSOLUTE_COLORIMETRIC,cmsFLAGS_NOTPRECALC);
- return 0;
+ return (void*) CreateMutex( NULL, FALSE, NULL);
}
-static DWORD WINAPI make_trans_rgb_to_xyz(LPVOID lpParameter)
+static
+void MyMtxDestroy(cmsContext id, void* mtx)
{
- trans_rgb_to_xyz = cmsCreateTransform(
- prof_rgb,TYPE_RGB_DBL,
- prof_xyz,TYPE_XYZ_DBL,
- INTENT_ABSOLUTE_COLORIMETRIC,cmsFLAGS_NOTPRECALC);
- return 0;
+ CloseHandle((HANDLE) mtx);
+}
+
+static
+cmsBool MyMtxLock(cmsContext id, void* mtx)
+{
+ WaitForSingleObject((HANDLE) mtx, INFINITE);
+ return TRUE;
+}
+
+static
+void MyMtxUnlock(cmsContext id, void* mtx)
+{
+ ReleaseMutex((HANDLE) mtx);
+}
+
+
+static cmsPluginMutex MutexPluginSample = {
+
+ { cmsPluginMagicNumber, 2060, cmsPluginMutexSig, NULL},
+
+ MyMtxCreate, MyMtxDestroy, MyMtxLock, MyMtxUnlock
+};
+
+
+static DWORD WINAPI one_thread(LPVOID lpParameter)
+{
+ int i, j;
+ cmsUInt8Number rgb[3*1000];
+ cmsUInt8Number cmyk[4*1000];
+
+ Sleep(rand() % 500 );
+ cmsHTRANSFORM xform = cmsCreateTransformTHR(ctx, prof_rgb, TYPE_RGB_8, prof_cmyk, TYPE_CMYK_8, 0, 0);
+
+ for (i=0; i < 100000; i++) {
+
+ for (j=0; j < 1000; j++)
+ {
+ rgb[j * 3 ] = 189;
+ rgb[j * 3 + 1] = 100;
+ rgb[j * 3 + 2] = 75;
+ }
+ cmsDoTransform(xform, rgb, cmyk, 1000);
+ for (j=0; j < 1000; j++)
+ {
+ if (cmyk[j * 4 ] != 37 ||
+ cmyk[j * 4 + 1 ] != 188 ||
+ cmyk[j * 4 + 2 ] != 195 ||
+ cmyk[j * 4 + 3 ] != 7)
+ {
+ OutputDebugString(L"ERROR\n");
+ rc = 1;
+ }
+
+ }
+
+ }
+
+ cmsDeleteTransform(xform);
+
+ return 0;
}
-int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR
-lpCmdLine,int nCmdShow)
+int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
- prof_xyz = cmsCreateXYZProfile();
- prof_rgb = cmsOpenProfileFromFile("AdobeRGB1998.icc","rb");
-//cmsCreate_sRGBProfile();
- for (int i=0;i<10;++i)
- {
-#define try_threads
-#ifdef try_threads
- DWORD threadid;
- HANDLE workers[2];
- workers[0] = CreateThread(NULL,0,make_trans_xyz_to_rgb,NULL,0,&threadid);
- workers[1] = CreateThread(NULL,0,make_trans_rgb_to_xyz,NULL,0,&threadid);
- WaitForMultipleObjects(2,workers,TRUE,INFINITE);
- for (unsigned i=0;i<2;++i)
- CloseHandle(workers[i]);
-#else
- make_trans_xyz_to_rgb(0);
- make_trans_rgb_to_xyz(0);
-#endif
- cmsDeleteTransform(trans_xyz_to_rgb);
- cmsDeleteTransform(trans_rgb_to_xyz);
- }
- cmsCloseProfile(prof_rgb);
- cmsCloseProfile(prof_xyz);
+ int i;
+ cmsContext ctx;
+
+ OutputDebugString(L"Test in progress...\n");
+
+ ctx = cmsCreateContext(NULL, 0);
+
+ prof_cmyk = cmsOpenProfileFromFileTHR(ctx, "USWebCoatedSWOP.icc", "r");
+ prof_rgb = cmsOpenProfileFromFileTHR(ctx, "AdobeRGB1998.icc","r");
+
+
+#define NWORKERS 10
+
+ HANDLE workers[NWORKERS];
+
+
+ for (int i=0; i<NWORKERS; ++i)
+ {
+ DWORD threadid;
+
+ workers[i] = CreateThread(NULL,0,one_thread,NULL,0,&threadid);
+ }
+
+ WaitForMultipleObjects(NWORKERS,workers,TRUE,INFINITE);
+
+ for ( i=0;i<NWORKERS;++i)
+ CloseHandle(workers[i]);
+
+
+ cmsCloseProfile(prof_rgb);
+ cmsCloseProfile(prof_cmyk);
+ cmsDeleteContext(ctx);
+
+ OutputDebugString(L"Test Done\n");
+
+ return rc;
}
--- /dev/null
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+
+
+#include "testcms2.h"
+
+
+// ZOO checks ------------------------------------------------------------------------------------------------------------
+
+
+#ifdef CMS_IS_WINDOWS_
+
+static char ZOOfolder[cmsMAX_PATH] = "c:\\colormaps\\";
+static char ZOOwrite[cmsMAX_PATH] = "c:\\colormaps\\write\\";
+static char ZOORawWrite[cmsMAX_PATH] = "c:\\colormaps\\rawwrite\\";
+
+
+// Read all tags on a profile given by its handle
+static
+void ReadAllTags(cmsHPROFILE h)
+{
+ cmsInt32Number i, n;
+ cmsTagSignature sig;
+
+ n = cmsGetTagCount(h);
+ for (i=0; i < n; i++) {
+
+ sig = cmsGetTagSignature(h, i);
+ if (cmsReadTag(h, sig) == NULL) return;
+ }
+}
+
+
+// Read all tags on a profile given by its handle
+static
+void ReadAllRAWTags(cmsHPROFILE h)
+{
+ cmsInt32Number i, n;
+ cmsTagSignature sig;
+ cmsInt32Number len;
+
+ n = cmsGetTagCount(h);
+ for (i=0; i < n; i++) {
+
+ sig = cmsGetTagSignature(h, i);
+ len = cmsReadRawTag(h, sig, NULL, 0);
+ }
+}
+
+
+static
+void PrintInfo(cmsHPROFILE h, cmsInfoType Info)
+{
+ wchar_t* text;
+ cmsInt32Number len;
+ cmsContext id = 0;
+
+ len = cmsGetProfileInfo(h, Info, "en", "US", NULL, 0);
+ if (len == 0) return;
+
+ text = (wchar_t*) _cmsMalloc(id, len);
+ cmsGetProfileInfo(h, Info, "en", "US", text, len);
+
+ wprintf(L"%s\n", text);
+ _cmsFree(id, text);
+}
+
+
+static
+void PrintAllInfos(cmsHPROFILE h)
+{
+ PrintInfo(h, cmsInfoDescription);
+ PrintInfo(h, cmsInfoManufacturer);
+ PrintInfo(h, cmsInfoModel);
+ PrintInfo(h, cmsInfoCopyright);
+ printf("\n\n");
+}
+
+static
+void ReadAllLUTS(cmsHPROFILE h)
+{
+ cmsPipeline* a;
+ cmsCIEXYZ Black;
+
+ a = _cmsReadInputLUT(h, INTENT_PERCEPTUAL);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadInputLUT(h, INTENT_RELATIVE_COLORIMETRIC);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadInputLUT(h, INTENT_SATURATION);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadInputLUT(h, INTENT_ABSOLUTE_COLORIMETRIC);
+ if (a) cmsPipelineFree(a);
+
+
+ a = _cmsReadOutputLUT(h, INTENT_PERCEPTUAL);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadOutputLUT(h, INTENT_RELATIVE_COLORIMETRIC);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadOutputLUT(h, INTENT_SATURATION);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadOutputLUT(h, INTENT_ABSOLUTE_COLORIMETRIC);
+ if (a) cmsPipelineFree(a);
+
+
+ a = _cmsReadDevicelinkLUT(h, INTENT_PERCEPTUAL);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadDevicelinkLUT(h, INTENT_RELATIVE_COLORIMETRIC);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadDevicelinkLUT(h, INTENT_SATURATION);
+ if (a) cmsPipelineFree(a);
+
+ a = _cmsReadDevicelinkLUT(h, INTENT_ABSOLUTE_COLORIMETRIC);
+ if (a) cmsPipelineFree(a);
+
+
+ cmsDetectDestinationBlackPoint(&Black, h, INTENT_PERCEPTUAL, 0);
+ cmsDetectDestinationBlackPoint(&Black, h, INTENT_RELATIVE_COLORIMETRIC, 0);
+ cmsDetectDestinationBlackPoint(&Black, h, INTENT_SATURATION, 0);
+ cmsDetectDestinationBlackPoint(&Black, h, INTENT_ABSOLUTE_COLORIMETRIC, 0);
+ cmsDetectTAC(h);
+}
+
+// Check one specimen in the ZOO
+
+static
+cmsInt32Number CheckSingleSpecimen(const char* Profile)
+{
+ char BuffSrc[256];
+ char BuffDst[256];
+ cmsHPROFILE h;
+
+ sprintf(BuffSrc, "%s%s", ZOOfolder, Profile);
+ sprintf(BuffDst, "%s%s", ZOOwrite, Profile);
+
+ h = cmsOpenProfileFromFile(BuffSrc, "r");
+ if (h == NULL) return 0;
+
+ printf("%s\n", Profile);
+
+ PrintAllInfos(h);
+ ReadAllTags(h);
+ ReadAllLUTS(h);
+ // ReadAllRAWTags(h);
+
+
+ cmsSaveProfileToFile(h, BuffDst);
+ cmsCloseProfile(h);
+
+ h = cmsOpenProfileFromFile(BuffDst, "r");
+ if (h == NULL) return 0;
+ ReadAllTags(h);
+
+
+ cmsCloseProfile(h);
+
+ return 1;
+}
+
+static
+cmsInt32Number CheckRAWSpecimen(const char* Profile)
+{
+ char BuffSrc[256];
+ char BuffDst[256];
+ cmsHPROFILE h;
+
+ sprintf(BuffSrc, "%s%s", ZOOfolder, Profile);
+ sprintf(BuffDst, "%s%s", ZOORawWrite, Profile);
+
+ h = cmsOpenProfileFromFile(BuffSrc, "r");
+ if (h == NULL) return 0;
+
+ ReadAllTags(h);
+ ReadAllRAWTags(h);
+ cmsSaveProfileToFile(h, BuffDst);
+ cmsCloseProfile(h);
+
+ h = cmsOpenProfileFromFile(BuffDst, "r");
+ if (h == NULL) return 0;
+ ReadAllTags(h);
+ cmsCloseProfile(h);
+
+ return 1;
+}
+
+
+static int input = 0,
+ disp = 0,
+ output = 0,
+ link = 0,
+ abst = 0,
+ color = 0,
+ named = 0;
+
+static int rgb = 0,
+ cmyk = 0,
+ gray = 0,
+ other = 0;
+
+
+
+static
+int count_stats(const char* Profile)
+{
+ char BuffSrc[256];
+ cmsHPROFILE h;
+ cmsCIEXYZ Black;
+
+ sprintf(BuffSrc, "%s%s", ZOOfolder, Profile);
+
+ h = cmsOpenProfileFromFile(BuffSrc, "r");
+ if (h == NULL) return 0;
+
+
+ switch (cmsGetDeviceClass(h)) {
+
+ case cmsSigInputClass : input++; break;
+ case cmsSigDisplayClass : disp++; break;
+ case cmsSigOutputClass : output++; break;
+ case cmsSigLinkClass : link++; break;
+ case cmsSigAbstractClass : abst++; break;
+ case cmsSigColorSpaceClass : color++; break;
+ case cmsSigNamedColorClass : named ++; break;
+ }
+
+
+ switch (cmsGetColorSpace(h)) {
+
+ case cmsSigRgbData: rgb++; break;
+ case cmsSigCmykData: cmyk++; break;
+ case cmsSigGrayData: gray++; break;
+ default: other++;
+ }
+
+ cmsDetectDestinationBlackPoint(&Black, h, INTENT_PERCEPTUAL, 0);
+ cmsDetectDestinationBlackPoint(&Black, h, INTENT_RELATIVE_COLORIMETRIC, 0);
+ cmsDetectDestinationBlackPoint(&Black, h, INTENT_SATURATION, 0);
+
+ cmsCloseProfile(h);
+
+ return 1;
+}
+
+
+
+void CheckProfileZOO(void)
+{
+
+ struct _finddata_t c_file;
+ intptr_t hFile;
+
+ cmsSetLogErrorHandler(NULL);
+
+ if ( (hFile = _findfirst("c:\\colormaps\\*.*", &c_file)) == -1L )
+ printf("No files in current directory");
+ else
+ {
+ do
+ {
+ if (strcmp(c_file.name, ".") != 0 &&
+ strcmp(c_file.name, "..") != 0) {
+
+ CheckSingleSpecimen( c_file.name);
+ CheckRAWSpecimen( c_file.name);
+
+ count_stats(c_file.name);
+
+ TestMemoryLeaks(FALSE);
+
+ }
+
+ } while ( _findnext(hFile, &c_file) == 0 );
+
+ _findclose(hFile);
+ }
+
+ ResetFatalError();
+}
+
+#endif
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
extern int xoptind;
extern char *xoptarg;
-extern int xopterr;
-extern char SW;
int xgetopt(int argc, char *argv[], char *optionS);
-//---------------------------------------------------------------------------------\r
-//\r
-// Little Color Management System\r
-// Copyright (c) 1998-2010 Marti Maria Saguer\r
-//\r
-// Permission is hereby granted, free of charge, to any person obtaining\r
-// a copy of this software and associated documentation files (the "Software"),\r
-// to deal in the Software without restriction, including without limitation\r
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
-// and/or sell copies of the Software, and to permit persons to whom the Software\r
-// is furnished to do so, subject to the following conditions:\r
-//\r
-// The above copyright notice and this permission notice shall be included in\r
-// all copies or substantial portions of the Software.\r
-//\r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r
-// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-//\r
-//---------------------------------------------------------------------------------\r
-//\r
-\r
-#include "utils.h"\r
-\r
-\r
-int Verbose = 0;\r
-\r
-static char ProgramName[256] = "";\r
-\r
-void FatalError(const char *frm, ...)\r
-{\r
- va_list args;\r
-\r
- va_start(args, frm);\r
- fprintf(stderr, "[%s fatal error]: ", ProgramName);\r
- vfprintf(stderr, frm, args);\r
- fprintf(stderr, "\n");\r
- va_end(args);\r
-\r
- exit(1);\r
-}\r
-\r
-// Show errors to the end user (unless quiet option)\r
-static\r
-void MyErrorLogHandler(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text)\r
-{\r
- if (Verbose >= 0)\r
- fprintf(stderr, "[%s]: %s\n", ProgramName, Text);\r
-\r
- UTILS_UNUSED_PARAMETER(ErrorCode);\r
- UTILS_UNUSED_PARAMETER(ContextID);\r
-}\r
-\r
-\r
-void InitUtils(const char* PName)\r
-{\r
- strncpy(ProgramName, PName, sizeof(ProgramName));\r
- ProgramName[sizeof(ProgramName)-1] = 0;\r
-\r
- cmsSetLogErrorHandler(MyErrorLogHandler);\r
-}\r
-\r
-\r
-// Virtual profiles are handled here.\r
-cmsHPROFILE OpenStockProfile(cmsContext ContextID, const char* File)\r
-{\r
- if (!File)\r
- return cmsCreate_sRGBProfileTHR(ContextID);\r
-\r
- if (cmsstrcasecmp(File, "*Lab2") == 0)\r
- return cmsCreateLab2ProfileTHR(ContextID, NULL);\r
-\r
- if (cmsstrcasecmp(File, "*Lab4") == 0)\r
- return cmsCreateLab4ProfileTHR(ContextID, NULL);\r
-\r
- if (cmsstrcasecmp(File, "*Lab") == 0)\r
- return cmsCreateLab4ProfileTHR(ContextID, NULL);\r
-\r
- if (cmsstrcasecmp(File, "*LabD65") == 0) {\r
-\r
- cmsCIExyY D65xyY;\r
-\r
- cmsWhitePointFromTemp( &D65xyY, 6504);\r
- return cmsCreateLab4ProfileTHR(ContextID, &D65xyY);\r
- }\r
-\r
- if (cmsstrcasecmp(File, "*XYZ") == 0)\r
- return cmsCreateXYZProfileTHR(ContextID);\r
-\r
- if (cmsstrcasecmp(File, "*Gray22") == 0) {\r
-\r
- cmsToneCurve* Curve = cmsBuildGamma(ContextID, 2.2);\r
- cmsHPROFILE hProfile = cmsCreateGrayProfileTHR(ContextID, cmsD50_xyY(), Curve);\r
- cmsFreeToneCurve(Curve);\r
- return hProfile;\r
- }\r
-\r
- if (cmsstrcasecmp(File, "*Gray30") == 0) {\r
-\r
- cmsToneCurve* Curve = cmsBuildGamma(ContextID, 3.0);\r
- cmsHPROFILE hProfile = cmsCreateGrayProfileTHR(ContextID, cmsD50_xyY(), Curve);\r
- cmsFreeToneCurve(Curve);\r
- return hProfile;\r
- }\r
-\r
- if (cmsstrcasecmp(File, "*srgb") == 0)\r
- return cmsCreate_sRGBProfileTHR(ContextID);\r
-\r
- if (cmsstrcasecmp(File, "*null") == 0)\r
- return cmsCreateNULLProfileTHR(ContextID);\r
-\r
-\r
- if (cmsstrcasecmp(File, "*Lin2222") == 0) {\r
-\r
- cmsToneCurve* Gamma = cmsBuildGamma(0, 2.2);\r
- cmsToneCurve* Gamma4[4];\r
- cmsHPROFILE hProfile;\r
-\r
- Gamma4[0] = Gamma4[1] = Gamma4[2] = Gamma4[3] = Gamma;\r
- hProfile = cmsCreateLinearizationDeviceLink(cmsSigCmykData, Gamma4);\r
- cmsFreeToneCurve(Gamma);\r
- return hProfile;\r
- }\r
-\r
-\r
- return cmsOpenProfileFromFileTHR(ContextID, File, "r");\r
-}\r
-\r
-// Help on available built-ins\r
-void PrintBuiltins(void)\r
-{\r
- fprintf(stderr, "\nBuilt-in profiles:\n\n");\r
- fprintf(stderr, "\t*Lab2 -- D50-based v2 CIEL*a*b\n"\r
- "\t*Lab4 -- D50-based v4 CIEL*a*b\n"\r
- "\t*Lab -- D50-based v4 CIEL*a*b\n"\r
- "\t*XYZ -- CIE XYZ (PCS)\n"\r
- "\t*sRGB -- sRGB color space\n"\r
- "\t*Gray22 - Monochrome of Gamma 2.2\n"\r
- "\t*Gray30 - Monochrome of Gamma 3.0\n"\r
- "\t*null - Monochrome black for all input\n"\r
- "\t*Lin2222- CMYK linearization of gamma 2.2 on each channel\n");\r
-}\r
-\r
-\r
-// Auxiliar for printing information on profile\r
-static\r
-void PrintInfo(cmsHPROFILE h, cmsInfoType Info)\r
-{\r
- char* text;\r
- int len;\r
-\r
- len = cmsGetProfileInfoASCII(h, Info, "en", "US", NULL, 0);\r
- if (len == 0) return;\r
-\r
- text = malloc(len * sizeof(char));\r
- if (text == NULL) return;\r
-\r
- cmsGetProfileInfoASCII(h, Info, "en", "US", text, len);\r
-\r
- if (strlen(text) > 0)\r
- printf("%s\n", text);\r
-\r
- free(text);\r
-}\r
-\r
-\r
-\r
-// Displays the colorant table\r
-static\r
-void PrintColorantTable(cmsHPROFILE hInput, cmsTagSignature Sig, const char* Title)\r
-{\r
- cmsNAMEDCOLORLIST* list;\r
- int i, n;\r
-\r
- if (cmsIsTag(hInput, Sig)) {\r
-\r
- printf("%s:\n", Title);\r
-\r
- list = cmsReadTag(hInput, Sig);\r
- if (list == NULL) {\r
- printf("(Unavailable)\n");\r
- return;\r
- }\r
-\r
- n = cmsNamedColorCount(list);\r
- for (i=0; i < n; i++) {\r
-\r
- char Name[cmsMAX_PATH];\r
-\r
- cmsNamedColorInfo(list, i, Name, NULL, NULL, NULL, NULL);\r
- printf("\t%s\n", Name);\r
- }\r
-\r
- printf("\n");\r
- }\r
-\r
-}\r
-\r
-\r
-void PrintProfileInformation(cmsHPROFILE hInput)\r
-{\r
- PrintInfo(hInput, cmsInfoDescription);\r
- PrintInfo(hInput, cmsInfoManufacturer);\r
- PrintInfo(hInput, cmsInfoModel);\r
- PrintInfo(hInput, cmsInfoCopyright);\r
-\r
- if (Verbose > 2) {\r
-\r
- PrintColorantTable(hInput, cmsSigColorantTableTag, "Input colorant table");\r
- PrintColorantTable(hInput, cmsSigColorantTableOutTag, "Input colorant out table");\r
- }\r
-\r
- printf("\n");\r
-}\r
-\r
-// -----------------------------------------------------------------------------\r
-\r
-\r
-void PrintRenderingIntents(void)\r
-{\r
- cmsUInt32Number Codes[200];\r
- char* Descriptions[200];\r
- cmsUInt32Number n, i;\r
-\r
- fprintf(stderr, "%ct<n> rendering intent:\n\n", SW);\r
-\r
- n = cmsGetSupportedIntents(200, Codes, Descriptions);\r
-\r
- for (i=0; i < n; i++) {\r
- fprintf(stderr, "\t%d - %s\n", Codes[i], Descriptions[i]);\r
- }\r
- fprintf(stderr, "\n");\r
-}\r
-\r
-\r
-\r
-// ------------------------------------------------------------------------------\r
-\r
-cmsBool SaveMemoryBlock(const cmsUInt8Number* Buffer, cmsUInt32Number dwLen, const char* Filename)\r
-{\r
- FILE* out = fopen(Filename, "wb");\r
- if (out == NULL) {\r
- FatalError("Cannot create '%s'", Filename);\r
- return FALSE;\r
- }\r
-\r
- if (fwrite(Buffer, 1, dwLen, out) != dwLen) {\r
- FatalError("Cannot write %ld bytes to %s", dwLen, Filename);\r
- return FALSE;\r
- }\r
-\r
- if (fclose(out) != 0) {\r
- FatalError("Error flushing file '%s'", Filename);\r
- return FALSE;\r
- }\r
-\r
- return TRUE;\r
-}\r
-\r
-// ------------------------------------------------------------------------------\r
-\r
-// Return a pixel type on depending on the number of channels\r
-int PixelTypeFromChanCount(int ColorChannels)\r
-{\r
- switch (ColorChannels) {\r
-\r
- case 1: return PT_GRAY;\r
- case 2: return PT_MCH2;\r
- case 3: return PT_MCH3;\r
- case 4: return PT_CMYK;\r
- case 5: return PT_MCH5;\r
- case 6: return PT_MCH6;\r
- case 7: return PT_MCH7;\r
- case 8: return PT_MCH8;\r
- case 9: return PT_MCH9;\r
- case 10: return PT_MCH10;\r
- case 11: return PT_MCH11;\r
- case 12: return PT_MCH12;\r
- case 13: return PT_MCH13;\r
- case 14: return PT_MCH14;\r
- case 15: return PT_MCH15;\r
-\r
- default:\r
-\r
- FatalError("What a weird separation of %d channels?!?!", ColorChannels);\r
- return -1;\r
- }\r
-}\r
-\r
-\r
-// ------------------------------------------------------------------------------\r
-\r
-// Return number of channels of pixel type\r
-int ChanCountFromPixelType(int ColorChannels)\r
-{\r
- switch (ColorChannels) {\r
-\r
- case PT_GRAY: return 1;\r
-\r
- case PT_RGB:\r
- case PT_CMY:\r
- case PT_Lab:\r
- case PT_YUV:\r
- case PT_YCbCr: return 3;\r
-\r
- case PT_CMYK: return 4 ;\r
- case PT_MCH2: return 2 ;\r
- case PT_MCH3: return 3 ;\r
- case PT_MCH4: return 4 ;\r
- case PT_MCH5: return 5 ;\r
- case PT_MCH6: return 6 ;\r
- case PT_MCH7: return 7 ;\r
- case PT_MCH8: return 8 ;\r
- case PT_MCH9: return 9 ;\r
- case PT_MCH10: return 10;\r
- case PT_MCH11: return 11;\r
- case PT_MCH12: return 12;\r
- case PT_MCH13: return 12;\r
- case PT_MCH14: return 14;\r
- case PT_MCH15: return 15;\r
-\r
- default:\r
-\r
- FatalError("Unsupported color space of %d channels", ColorChannels);\r
- return -1;\r
- }\r
-}\r
-\r
-\r
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+
+#include "utils.h"
+
+
+int Verbose = 0;
+
+static char ProgramName[256] = "";
+
+void FatalError(const char *frm, ...)
+{
+ va_list args;
+
+ va_start(args, frm);
+ fprintf(stderr, "[%s fatal error]: ", ProgramName);
+ vfprintf(stderr, frm, args);
+ fprintf(stderr, "\n");
+ va_end(args);
+
+ exit(1);
+}
+
+// Show errors to the end user (unless quiet option)
+static
+void MyErrorLogHandler(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text)
+{
+ if (Verbose >= 0)
+ fprintf(stderr, "[%s]: %s\n", ProgramName, Text);
+
+ UTILS_UNUSED_PARAMETER(ErrorCode);
+ UTILS_UNUSED_PARAMETER(ContextID);
+}
+
+
+void InitUtils(const char* PName)
+{
+ strncpy(ProgramName, PName, sizeof(ProgramName));
+ ProgramName[sizeof(ProgramName)-1] = 0;
+
+ cmsSetLogErrorHandler(MyErrorLogHandler);
+}
+
+
+// Virtual profiles are handled here.
+cmsHPROFILE OpenStockProfile(cmsContext ContextID, const char* File)
+{
+ if (!File)
+ return cmsCreate_sRGBProfileTHR(ContextID);
+
+ if (cmsstrcasecmp(File, "*Lab2") == 0)
+ return cmsCreateLab2ProfileTHR(ContextID, NULL);
+
+ if (cmsstrcasecmp(File, "*Lab4") == 0)
+ return cmsCreateLab4ProfileTHR(ContextID, NULL);
+
+ if (cmsstrcasecmp(File, "*Lab") == 0)
+ return cmsCreateLab4ProfileTHR(ContextID, NULL);
+
+ if (cmsstrcasecmp(File, "*LabD65") == 0) {
+
+ cmsCIExyY D65xyY;
+
+ cmsWhitePointFromTemp( &D65xyY, 6504);
+ return cmsCreateLab4ProfileTHR(ContextID, &D65xyY);
+ }
+
+ if (cmsstrcasecmp(File, "*XYZ") == 0)
+ return cmsCreateXYZProfileTHR(ContextID);
+
+ if (cmsstrcasecmp(File, "*Gray22") == 0) {
+
+ cmsToneCurve* Curve = cmsBuildGamma(ContextID, 2.2);
+ cmsHPROFILE hProfile = cmsCreateGrayProfileTHR(ContextID, cmsD50_xyY(), Curve);
+ cmsFreeToneCurve(Curve);
+ return hProfile;
+ }
+
+ if (cmsstrcasecmp(File, "*Gray30") == 0) {
+
+ cmsToneCurve* Curve = cmsBuildGamma(ContextID, 3.0);
+ cmsHPROFILE hProfile = cmsCreateGrayProfileTHR(ContextID, cmsD50_xyY(), Curve);
+ cmsFreeToneCurve(Curve);
+ return hProfile;
+ }
+
+ if (cmsstrcasecmp(File, "*srgb") == 0)
+ return cmsCreate_sRGBProfileTHR(ContextID);
+
+ if (cmsstrcasecmp(File, "*null") == 0)
+ return cmsCreateNULLProfileTHR(ContextID);
+
+
+ if (cmsstrcasecmp(File, "*Lin2222") == 0) {
+
+ cmsToneCurve* Gamma = cmsBuildGamma(0, 2.2);
+ cmsToneCurve* Gamma4[4];
+ cmsHPROFILE hProfile;
+
+ Gamma4[0] = Gamma4[1] = Gamma4[2] = Gamma4[3] = Gamma;
+ hProfile = cmsCreateLinearizationDeviceLink(cmsSigCmykData, Gamma4);
+ cmsFreeToneCurve(Gamma);
+ return hProfile;
+ }
+
+
+ return cmsOpenProfileFromFileTHR(ContextID, File, "r");
+}
+
+// Help on available built-ins
+void PrintBuiltins(void)
+{
+ fprintf(stderr, "\nBuilt-in profiles:\n\n");
+ fprintf(stderr, "\t*Lab2 -- D50-based v2 CIEL*a*b\n"
+ "\t*Lab4 -- D50-based v4 CIEL*a*b\n"
+ "\t*Lab -- D50-based v4 CIEL*a*b\n"
+ "\t*XYZ -- CIE XYZ (PCS)\n"
+ "\t*sRGB -- sRGB color space\n"
+ "\t*Gray22 - Monochrome of Gamma 2.2\n"
+ "\t*Gray30 - Monochrome of Gamma 3.0\n"
+ "\t*null - Monochrome black for all input\n"
+ "\t*Lin2222- CMYK linearization of gamma 2.2 on each channel\n\n");
+}
+
+
+// Auxiliary for printing information on profile
+static
+void PrintInfo(cmsHPROFILE h, cmsInfoType Info)
+{
+ char* text;
+ int len;
+
+ len = cmsGetProfileInfoASCII(h, Info, "en", "US", NULL, 0);
+ if (len == 0) return;
+
+ text = (char*) malloc(len * sizeof(char));
+ if (text == NULL) return;
+
+ cmsGetProfileInfoASCII(h, Info, "en", "US", text, len);
+
+ if (strlen(text) > 0)
+ printf("%s\n", text);
+
+ free(text);
+}
+
+
+
+// Displays the colorant table
+static
+void PrintColorantTable(cmsHPROFILE hInput, cmsTagSignature Sig, const char* Title)
+{
+ cmsNAMEDCOLORLIST* list;
+ int i, n;
+
+ if (cmsIsTag(hInput, Sig)) {
+
+ printf("%s:\n", Title);
+
+ list = (cmsNAMEDCOLORLIST*) cmsReadTag(hInput, Sig);
+ if (list == NULL) {
+ printf("(Unavailable)\n");
+ return;
+ }
+
+ n = cmsNamedColorCount(list);
+ for (i=0; i < n; i++) {
+
+ char Name[cmsMAX_PATH];
+
+ cmsNamedColorInfo(list, i, Name, NULL, NULL, NULL, NULL);
+ printf("\t%s\n", Name);
+ }
+
+ printf("\n");
+ }
+
+}
+
+
+void PrintProfileInformation(cmsHPROFILE hInput)
+{
+ if (hInput == NULL) {
+ fprintf(stderr, "*Wrong or corrupted profile*\n");
+ return;
+ }
+
+ PrintInfo(hInput, cmsInfoDescription);
+ PrintInfo(hInput, cmsInfoManufacturer);
+ PrintInfo(hInput, cmsInfoModel);
+ PrintInfo(hInput, cmsInfoCopyright);
+
+ if (Verbose > 2) {
+
+ PrintColorantTable(hInput, cmsSigColorantTableTag, "Input colorant table");
+ PrintColorantTable(hInput, cmsSigColorantTableOutTag, "Input colorant out table");
+ }
+
+ printf("\n");
+}
+
+// -----------------------------------------------------------------------------
+
+
+void PrintRenderingIntents(void)
+{
+ cmsUInt32Number Codes[200];
+ char* Descriptions[200];
+ cmsUInt32Number n, i;
+
+ fprintf(stderr, "-t<n> rendering intent:\n\n");
+
+ n = cmsGetSupportedIntents(200, Codes, Descriptions);
+
+ for (i=0; i < n; i++) {
+ fprintf(stderr, "\t%u - %s\n", Codes[i], Descriptions[i]);
+ }
+ fprintf(stderr, "\n");
+}
+
+
+
+// ------------------------------------------------------------------------------
+
+cmsBool SaveMemoryBlock(const cmsUInt8Number* Buffer, cmsUInt32Number dwLen, const char* Filename)
+{
+ FILE* out = fopen(Filename, "wb");
+ if (out == NULL) {
+ FatalError("Cannot create '%s'", Filename);
+ return FALSE;
+ }
+
+ if (fwrite(Buffer, 1, dwLen, out) != dwLen) {
+ FatalError("Cannot write %ld bytes to %s", (long) dwLen, Filename);
+ return FALSE;
+ }
+
+ if (fclose(out) != 0) {
+ FatalError("Error flushing file '%s'", Filename);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+// ------------------------------------------------------------------------------
+
+// Return a pixel type on depending on the number of channels
+int PixelTypeFromChanCount(int ColorChannels)
+{
+ switch (ColorChannels) {
+
+ case 1: return PT_GRAY;
+ case 2: return PT_MCH2;
+ case 3: return PT_MCH3;
+ case 4: return PT_CMYK;
+ case 5: return PT_MCH5;
+ case 6: return PT_MCH6;
+ case 7: return PT_MCH7;
+ case 8: return PT_MCH8;
+ case 9: return PT_MCH9;
+ case 10: return PT_MCH10;
+ case 11: return PT_MCH11;
+ case 12: return PT_MCH12;
+ case 13: return PT_MCH13;
+ case 14: return PT_MCH14;
+ case 15: return PT_MCH15;
+
+ default:
+
+ FatalError("What a weird separation of %d channels?!?!", ColorChannels);
+ return -1;
+ }
+}
+
+
+// ------------------------------------------------------------------------------
+
+// Return number of channels of pixel type
+int ChanCountFromPixelType(int ColorChannels)
+{
+ switch (ColorChannels) {
+
+ case PT_GRAY: return 1;
+
+ case PT_RGB:
+ case PT_CMY:
+ case PT_Lab:
+ case PT_YUV:
+ case PT_YCbCr: return 3;
+
+ case PT_CMYK: return 4 ;
+ case PT_MCH2: return 2 ;
+ case PT_MCH3: return 3 ;
+ case PT_MCH4: return 4 ;
+ case PT_MCH5: return 5 ;
+ case PT_MCH6: return 6 ;
+ case PT_MCH7: return 7 ;
+ case PT_MCH8: return 8 ;
+ case PT_MCH9: return 9 ;
+ case PT_MCH10: return 10;
+ case PT_MCH11: return 11;
+ case PT_MCH12: return 12;
+ case PT_MCH13: return 12;
+ case PT_MCH14: return 14;
+ case PT_MCH15: return 15;
+
+ default:
+
+ FatalError("Unsupported color space of %d channels", ColorChannels);
+ return -1;
+ }
+}
-/*
- getopt.c
-*/
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+// xgetopt.c -- loosely based on System V getopt()
+//
+// option ::= SW [optLetter]* [argLetter space* argument]
+//
-#include <errno.h>
#include <string.h>
#include <stdio.h>
-int xoptind = 1; /* index of which argument is next */
-char *xoptarg; /* pointer to argument of current option */
-int xopterr = 0; /* allow error message */
+int xoptind = 1;
+char *xoptarg;
-static char *letP = NULL; /* remember next option char's location */
-char SW = '-'; /* DOS switch character, either '-' or '/' */
+static char *nextArg = NULL;
-/*
- Parse the command line options, System V style.
+#define SW '-'
- Standard option syntax is:
- option ::= SW [optLetter]* [argLetter space* argument]
-
-*/
-
-int xgetopt(int argc, char *argv[], char *optionS)
+int xgetopt(int argc, char* argv[], char* optionS)
{
unsigned char ch;
- char *optP;
+ char* optP;
- if (SW == 0) {
- SW = '/';
- }
+ if (argc > xoptind)
+ {
- if (argc > xoptind) {
- if (letP == NULL) {
- if ((letP = argv[xoptind]) == NULL ||
- *(letP++) != SW) goto gopEOF;
- if (*letP == SW) {
- xoptind++; goto gopEOF;
- }
+ if (nextArg == NULL)
+ {
+ if ((nextArg = argv[xoptind]) == NULL || *(nextArg++) != SW) goto end_eof;
}
- if (0 == (ch = *(letP++))) {
- xoptind++; goto gopEOF;
+
+ if ((ch = *(nextArg++)) == 0)
+ {
+ xoptind++;
+ goto end_eof;
}
- if (':' == ch || (optP = strchr(optionS, ch)) == NULL)
- goto gopError;
- if (':' == *(++optP)) {
+
+ if (ch == ':' || (optP = strchr(optionS, ch)) == NULL)
+ goto end_error;
+
+ if (*(++optP) == ':')
+ {
xoptind++;
- if (0 == *letP) {
- if (argc <= xoptind) goto gopError;
- letP = argv[xoptind++];
+
+ if (*nextArg == 0)
+ {
+ if (argc <= xoptind) goto end_error;
+ nextArg = argv[xoptind++];
}
- xoptarg = letP;
- letP = NULL;
- } else {
- if (0 == *letP) {
+
+ xoptarg = nextArg;
+ nextArg = NULL;
+
+ }
+ else
+ {
+ if (*nextArg == 0)
+ {
xoptind++;
- letP = NULL;
+ nextArg = NULL;
}
+
xoptarg = NULL;
}
+
return ch;
}
-gopEOF:
- xoptarg = letP = NULL;
+
+end_eof:
+ xoptarg = nextArg = NULL;
return EOF;
-gopError:
+end_error:
xoptarg = NULL;
- errno = EINVAL;
- if (xopterr)
- perror ("get command line option");
- return ('?');
+ return '?';
}
-program delphidemo;\r
-\r
-uses\r
- Forms,\r
- demo1 in 'demo1.pas' {Form1};\r
-\r
-{$R *.RES}\r
-\r
-begin\r
- Application.Initialize;\r
- Application.CreateForm(TForm1, Form1);\r
- Application.Run;\r
-end.\r
+program delphidemo;
+
+uses
+ Forms,
+ demo1 in 'demo1.pas' {Form1};
+
+{$R *.RES}
+
+begin
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
- <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <PropertyGroup>\r
- <ProjectGuid>{E3F889E8-CB8A-49AE-8173-4DDA022466BE}</ProjectGuid>\r
- <MainSource>delphidemo.dpr</MainSource>\r
- <Config Condition="'$(Config)'==''">Debug</Config>\r
- <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>\r
- <ProjectVersion>12.0</ProjectVersion>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">\r
- <Base>true</Base>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">\r
- <Cfg_1>true</Cfg_1>\r
- <CfgParent>Base</CfgParent>\r
- <Base>true</Base>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">\r
- <Cfg_2>true</Cfg_2>\r
- <CfgParent>Base</CfgParent>\r
- <Base>true</Base>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Base)'!=''">\r
- <DCC_UsePackage>vcl;rtl;vclx;vclimg;vclactnband;dbrtl;vcldb;vcldbx;bdertl;vcltouch;xmlrtl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;vclib;ibxpress;adortl;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_140;Intraweb_100_140;VclSmp;vclie;websnap;webdsnap;inetdb;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DbxClientDriver;DataSnapServer;DBXInterBaseDriver;DBXMySQLDriver;dbxcds;DBXFirebirdDriver;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;Rave77VCL</DCC_UsePackage>\r
- <DCC_ImageBase>00400000</DCC_ImageBase>\r
- <DCC_SymbolReferenceInfo>1</DCC_SymbolReferenceInfo>\r
- <DCC_DependencyCheckOutputName>delphidemo.exe</DCC_DependencyCheckOutputName>\r
- <DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>\r
- <DCC_Platform>x86</DCC_Platform>\r
- <DCC_N>true</DCC_N>\r
- <DCC_S>false</DCC_S>\r
- <DCC_K>false</DCC_K>\r
- <DCC_E>false</DCC_E>\r
- <DCC_F>false</DCC_F>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Cfg_1)'!=''">\r
- <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>\r
- <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>\r
- <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>\r
- <DCC_DebugInformation>false</DCC_DebugInformation>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Cfg_2)'!=''">\r
- <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>\r
- </PropertyGroup>\r
- <ItemGroup>\r
- <DelphiCompile Include="delphidemo.dpr">\r
- <MainSource>MainSource</MainSource>\r
- </DelphiCompile>\r
- <DCCReference Include="demo1.pas">\r
- <Form>Form1</Form>\r
- </DCCReference>\r
- <BuildConfiguration Include="Base">\r
- <Key>Base</Key>\r
- </BuildConfiguration>\r
- <BuildConfiguration Include="Debug">\r
- <Key>Cfg_2</Key>\r
- <CfgParent>Base</CfgParent>\r
- </BuildConfiguration>\r
- <BuildConfiguration Include="Release">\r
- <Key>Cfg_1</Key>\r
- <CfgParent>Base</CfgParent>\r
- </BuildConfiguration>\r
- </ItemGroup>\r
- <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>\r
- <ProjectExtensions>\r
- <Borland.Personality>Delphi.Personality.12</Borland.Personality>\r
- <Borland.ProjectType>VCLApplication</Borland.ProjectType>\r
- <BorlandProject>\r
- <Delphi.Personality>\r
- <Source>\r
- <Source Name="MainSource">delphidemo.dpr</Source>\r
- </Source>\r
- <Parameters>\r
- <Parameters Name="UseLauncher">False</Parameters>\r
- <Parameters Name="DebugCWD">d:\lcms-1.13\delphi</Parameters>\r
- <Parameters Name="LoadAllSymbols">True</Parameters>\r
- <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>\r
- </Parameters>\r
- <VersionInfo>\r
- <VersionInfo Name="IncludeVerInfo">False</VersionInfo>\r
- <VersionInfo Name="AutoIncBuild">False</VersionInfo>\r
- <VersionInfo Name="MajorVer">1</VersionInfo>\r
- <VersionInfo Name="MinorVer">0</VersionInfo>\r
- <VersionInfo Name="Release">0</VersionInfo>\r
- <VersionInfo Name="Build">0</VersionInfo>\r
- <VersionInfo Name="Debug">False</VersionInfo>\r
- <VersionInfo Name="PreRelease">False</VersionInfo>\r
- <VersionInfo Name="Special">False</VersionInfo>\r
- <VersionInfo Name="Private">False</VersionInfo>\r
- <VersionInfo Name="DLL">False</VersionInfo>\r
- <VersionInfo Name="Locale">3082</VersionInfo>\r
- <VersionInfo Name="CodePage">1252</VersionInfo>\r
- </VersionInfo>\r
- <VersionInfoKeys>\r
- <VersionInfoKeys Name="CompanyName"/>\r
- <VersionInfoKeys Name="FileDescription"/>\r
- <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>\r
- <VersionInfoKeys Name="InternalName"/>\r
- <VersionInfoKeys Name="LegalCopyright"/>\r
- <VersionInfoKeys Name="LegalTrademarks"/>\r
- <VersionInfoKeys Name="OriginalFilename"/>\r
- <VersionInfoKeys Name="ProductName"/>\r
- <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>\r
- <VersionInfoKeys Name="Comments"/>\r
- </VersionInfoKeys>\r
- <Excluded_Packages>\r
- <Excluded_Packages Name="$(BDS)\bin\dcloffice2k140.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>\r
- <Excluded_Packages Name="$(BDS)\bin\dclofficexp140.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>\r
- </Excluded_Packages>\r
- </Delphi.Personality>\r
- <ModelSupport>False</ModelSupport>\r
- </BorlandProject>\r
- <ProjectFileVersion>12</ProjectFileVersion>\r
- </ProjectExtensions>\r
- </Project>\r
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{E3F889E8-CB8A-49AE-8173-4DDA022466BE}</ProjectGuid>
+ <MainSource>delphidemo.dpr</MainSource>
+ <Config Condition="'$(Config)'==''">Debug</Config>
+ <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+ <ProjectVersion>12.0</ProjectVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
+ <Cfg_1>true</Cfg_1>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
+ <Cfg_2>true</Cfg_2>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base)'!=''">
+ <DCC_UsePackage>vcl;rtl;vclx;vclimg;vclactnband;dbrtl;vcldb;vcldbx;bdertl;vcltouch;xmlrtl;dsnap;dsnapcon;TeeUI;TeeDB;Tee;vclib;ibxpress;adortl;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_100_140;Intraweb_100_140;VclSmp;vclie;websnap;webdsnap;inetdb;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DbxClientDriver;DataSnapServer;DBXInterBaseDriver;DBXMySQLDriver;dbxcds;DBXFirebirdDriver;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;Rave77VCL</DCC_UsePackage>
+ <DCC_ImageBase>00400000</DCC_ImageBase>
+ <DCC_SymbolReferenceInfo>1</DCC_SymbolReferenceInfo>
+ <DCC_DependencyCheckOutputName>delphidemo.exe</DCC_DependencyCheckOutputName>
+ <DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+ <DCC_Platform>x86</DCC_Platform>
+ <DCC_N>true</DCC_N>
+ <DCC_S>false</DCC_S>
+ <DCC_K>false</DCC_K>
+ <DCC_E>false</DCC_E>
+ <DCC_F>false</DCC_F>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
+ <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+ <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+ <DCC_DebugInformation>false</DCC_DebugInformation>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+ </PropertyGroup>
+ <ItemGroup>
+ <DelphiCompile Include="delphidemo.dpr">
+ <MainSource>MainSource</MainSource>
+ </DelphiCompile>
+ <DCCReference Include="demo1.pas">
+ <Form>Form1</Form>
+ </DCCReference>
+ <BuildConfiguration Include="Base">
+ <Key>Base</Key>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Debug">
+ <Key>Cfg_2</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Release">
+ <Key>Cfg_1</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ </ItemGroup>
+ <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
+ <ProjectExtensions>
+ <Borland.Personality>Delphi.Personality.12</Borland.Personality>
+ <Borland.ProjectType>VCLApplication</Borland.ProjectType>
+ <BorlandProject>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">delphidemo.dpr</Source>
+ </Source>
+ <Parameters>
+ <Parameters Name="UseLauncher">False</Parameters>
+ <Parameters Name="DebugCWD">d:\lcms-1.13\delphi</Parameters>
+ <Parameters Name="LoadAllSymbols">True</Parameters>
+ <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
+ </Parameters>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">False</VersionInfo>
+ <VersionInfo Name="MajorVer">1</VersionInfo>
+ <VersionInfo Name="MinorVer">0</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">0</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">3082</VersionInfo>
+ <VersionInfo Name="CodePage">1252</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName"/>
+ <VersionInfoKeys Name="FileDescription"/>
+ <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName"/>
+ <VersionInfoKeys Name="LegalCopyright"/>
+ <VersionInfoKeys Name="LegalTrademarks"/>
+ <VersionInfoKeys Name="OriginalFilename"/>
+ <VersionInfoKeys Name="ProductName"/>
+ <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="Comments"/>
+ </VersionInfoKeys>
+ <Excluded_Packages>
+ <Excluded_Packages Name="$(BDS)\bin\dcloffice2k140.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
+ <Excluded_Packages Name="$(BDS)\bin\dclofficexp140.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
+ </Excluded_Packages>
+ </Delphi.Personality>
+ <ModelSupport>False</ModelSupport>
+ </BorlandProject>
+ <ProjectFileVersion>12</ProjectFileVersion>
+ </ProjectExtensions>
+ </Project>
-unit demo1;\r
-\r
-interface\r
-\r
-uses\r
- Windows, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,\r
- ExtCtrls, StdCtrls, ExtDlgs, lcms2dll, ComCtrls;\r
-\r
-type\r
- TForm1 = class(TForm)\r
-\r
- Image1: TImage;\r
- Image2: TImage;\r
- Panel1: TPanel;\r
- Splitter1: TSplitter;\r
- Button2: TButton;\r
- ComboBoxInput: TComboBox;\r
- ComboBoxOutput: TComboBox;\r
- Label1: TLabel;\r
- Label2: TLabel;\r
- WBCompensation: TCheckBox;\r
- NoTransform: TCheckBox;\r
- RadioGroup1: TRadioGroup;\r
- OpenPictureDialog1: TOpenPictureDialog;\r
- Button1: TButton;\r
- ProgressBar1: TProgressBar;\r
- ComboBoxIntent: TComboBox;\r
- Label3: TLabel;\r
- Button3: TButton;\r
- Button4: TButton;\r
- OpenDialog1: TOpenDialog;\r
- Label4: TLabel;\r
- ScrollBar1: TScrollBar;\r
-\r
- procedure Button2Click(Sender: TObject);\r
- procedure Button1Click(Sender: TObject);\r
- procedure Button3Click(Sender: TObject);\r
- procedure Button4Click(Sender: TObject);\r
- procedure ComboBoxIntentChange(Sender: TObject);\r
- procedure ScrollBar1Change(Sender: TObject);\r
- private\r
- { Private declarations }\r
- function ComputeFlags: DWORD;\r
-\r
- public\r
- constructor Create(Owner: TComponent); Override;\r
- { Public declarations }\r
- end;\r
-\r
-var\r
- Form1: TForm1;\r
-\r
-implementation\r
-\r
-{$R *.DFM}\r
-\r
-CONST\r
- IS_INPUT = $1;\r
- IS_DISPLAY = $2;\r
- IS_COLORSPACE = $4;\r
- IS_OUTPUT = $8;\r
- IS_ABSTRACT = $10;\r
-\r
-VAR\r
- IntentCodes: array [0 .. 20] of cmsUInt32Number;\r
-\r
-FUNCTION InSignatures(Signature: cmsProfileClassSignature; dwFlags: DWORD): Boolean;\r
-BEGIN\r
-\r
- if (((dwFlags AND IS_DISPLAY) <> 0) AND (Signature = cmsSigDisplayClass)) then\r
- InSignatures := TRUE\r
- else if (((dwFlags AND IS_OUTPUT) <> 0) AND (Signature = cmsSigOutputClass))\r
- then\r
- InSignatures := TRUE\r
- else if (((dwFlags AND IS_INPUT) <> 0) AND (Signature = cmsSigInputClass))\r
- then\r
- InSignatures := TRUE\r
- else if (((dwFlags AND IS_COLORSPACE) <> 0) AND\r
- (Signature = cmsSigColorSpaceClass)) then\r
- InSignatures := TRUE\r
- else if (((dwFlags AND IS_ABSTRACT) <> 0) AND\r
- (Signature = cmsSigAbstractClass)) then\r
- InSignatures := TRUE\r
- else\r
- InSignatures := FALSE\r
-END;\r
-\r
-PROCEDURE FillCombo(var Combo: TComboBox; Signatures: DWORD);\r
-var\r
- Files, Descriptions: TStringList;\r
- Found: Integer;\r
- SearchRec: TSearchRec;\r
- Path, Profile: String;\r
- Dir: ARRAY [0 .. 1024] OF Char;\r
- hProfile: cmsHPROFILE;\r
- Descrip: array [0 .. 256] of Char;\r
-begin\r
- Files := TStringList.Create;\r
- Descriptions := TStringList.Create;\r
- GetSystemDirectory(Dir, 1023);\r
- Path := String(Dir) + '\SPOOL\DRIVERS\COLOR\';\r
- Found := FindFirst(Path + '*.ic?', faAnyFile, SearchRec);\r
- while Found = 0 do\r
- begin\r
- Profile := Path + SearchRec.Name;\r
- hProfile := cmsOpenProfileFromFile(PAnsiChar(AnsiString(Profile)), 'r');\r
- if (hProfile <> NIL) THEN\r
- begin\r
-\r
- if ((cmsGetColorSpace(hProfile) = cmsSigRgbData) AND InSignatures\r
- (cmsGetDeviceClass(hProfile), Signatures)) then\r
- begin\r
- cmsGetProfileInfo(hProfile, cmsInfoDescription, 'EN', 'us', Descrip,\r
- 256);\r
- Descriptions.Add(Descrip);\r
- Files.Add(Profile);\r
- end;\r
- cmsCloseProfile(hProfile);\r
- end;\r
-\r
- Found := FindNext(SearchRec);\r
-\r
- end;\r
- FindClose(SearchRec);\r
- Combo.Items := Descriptions;\r
- Combo.Tag := Integer(Files);\r
-end;\r
-\r
-// A rather simple Logger... note the "cdecl" convention\r
-PROCEDURE ErrorLogger(ContextID: cmsContext; ErrorCode: cmsUInt32Number;\r
- Text: PAnsiChar); Cdecl;\r
-begin\r
- MessageBox(0, PWideChar(WideString(Text)), 'Something is going wrong...',\r
- MB_OK OR MB_ICONWARNING or MB_TASKMODAL);\r
-end;\r
-\r
-constructor TForm1.Create(Owner: TComponent);\r
-var\r
- IntentNames: array [0 .. 20] of PAnsiChar;\r
- i, n: Integer;\r
-begin\r
- inherited Create(Owner);\r
-\r
- // Set the logger\r
- cmsSetLogErrorHandler(ErrorLogger);\r
-\r
- ScrollBar1.Min := 0;\r
- ScrollBar1.Max := 100;\r
-\r
- FillCombo(ComboBoxInput, IS_INPUT OR IS_COLORSPACE OR IS_DISPLAY);\r
- FillCombo(ComboBoxOutput, $FFFF );\r
-\r
-\r
- // Get the supported intents\r
- n := cmsGetSupportedIntents(20, @IntentCodes, @IntentNames);\r
-\r
-\r
- ComboBoxIntent.Items.BeginUpdate;\r
- ComboBoxIntent.Items.Clear;\r
- for i:= 0 TO n - 1 DO\r
- ComboBoxIntent.Items.Add(String(IntentNames[i]));\r
-\r
- ComboBoxIntent.ItemIndex := 0;\r
- ComboBoxIntent.Items.EndUpdate;\r
-end;\r
-\r
-\r
-\r
-procedure TForm1.ScrollBar1Change(Sender: TObject);\r
-var d: Integer;\r
- s: String;\r
-begin\r
- d := ScrollBar1.Position;\r
- Str(d, s);\r
- Label4.Caption := 'Adaptation state '+s + '% (Abs. col only)';\r
-end;\r
-\r
-procedure TForm1.Button2Click(Sender: TObject);\r
-begin\r
- if OpenPictureDialog1.Execute then\r
- begin\r
- Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);\r
- Image1.Picture.Bitmap.PixelFormat := pf24bit;\r
-\r
- Image2.Picture.LoadFromFile(OpenPictureDialog1.FileName);\r
- Image2.Picture.Bitmap.PixelFormat := pf24bit;\r
-\r
- end\r
-end;\r
-\r
-function SelectedFile(var Combo: TComboBox): string;\r
-var\r
- List: TStringList;\r
- n: Integer;\r
-begin\r
-\r
- List := TStringList(Combo.Tag);\r
- n := Combo.ItemIndex;\r
- if (n >= 0) then\r
- SelectedFile := List.Strings[n]\r
- else\r
- SelectedFile := Combo.Text;\r
-end;\r
-\r
-procedure TForm1.ComboBoxIntentChange(Sender: TObject);\r
-begin\r
- ScrollBar1.Enabled := (ComboBoxIntent.itemIndex = 3);\r
-end;\r
-\r
-function TForm1.ComputeFlags: DWORD;\r
-var\r
- dwFlags: DWORD;\r
-begin\r
- dwFlags := 0;\r
- if (WBCompensation.Checked) then\r
- begin\r
- dwFlags := dwFlags OR cmsFLAGS_BLACKPOINTCOMPENSATION\r
- end;\r
-\r
- if (NoTransform.Checked) then\r
- begin\r
- dwFlags := dwFlags OR cmsFLAGS_NULLTRANSFORM\r
- end;\r
-\r
- case RadioGroup1.ItemIndex of\r
- 0:\r
- dwFlags := dwFlags OR cmsFLAGS_NOOPTIMIZE;\r
- 1:\r
- dwFlags := dwFlags OR cmsFLAGS_HIGHRESPRECALC;\r
- 3:\r
- dwFlags := dwFlags OR cmsFLAGS_LOWRESPRECALC;\r
- end;\r
-\r
- ComputeFlags := dwFlags\r
-end;\r
-\r
-procedure TForm1.Button1Click(Sender: TObject);\r
-var\r
- Source, Dest: String;\r
- hSrc, hDest: cmsHPROFILE;\r
- xform: cmsHTRANSFORM;\r
- i, PicW, PicH: Integer;\r
- Intent: Integer;\r
- dwFlags: DWORD;\r
-begin\r
-\r
- Source := SelectedFile(ComboBoxInput);\r
- Dest := SelectedFile(ComboBoxOutput);\r
-\r
- dwFlags := ComputeFlags;\r
-\r
- Intent := IntentCodes[ComboBoxIntent.ItemIndex];\r
-\r
- cmsSetAdaptationState( ScrollBar1.Position / 100.0 );\r
-\r
- if (Source <> '') AND (Dest <> '') then\r
- begin\r
- hSrc := cmsOpenProfileFromFile(PAnsiChar(AnsiString(Source)), 'r');\r
- hDest := cmsOpenProfileFromFile(PAnsiChar(AnsiString(Dest)), 'r');\r
-\r
- if (hSrc <> Nil) and (hDest <> Nil) then\r
- begin\r
- xform := cmsCreateTransform(hSrc, TYPE_BGR_8, hDest, TYPE_BGR_8, Intent,\r
- dwFlags);\r
- end\r
- else\r
- begin\r
- xform := nil;\r
- end;\r
-\r
- if hSrc <> nil then\r
- begin\r
- cmsCloseProfile(hSrc);\r
- end;\r
-\r
- if hDest <> Nil then\r
- begin\r
- cmsCloseProfile(hDest);\r
- end;\r
-\r
- if (xform <> nil) then\r
- begin\r
-\r
- PicW := Image2.Picture.width;\r
- PicH := Image2.Picture.height;\r
- ProgressBar1.Min := 0;\r
- ProgressBar1.Max := PicH;\r
- ProgressBar1.Step := 1;\r
-\r
- for i := 0 TO (PicH - 1) do\r
- begin\r
- if ((i MOD 100) = 0) then\r
- ProgressBar1.Position := i;\r
-\r
- cmsDoTransform(xform, Image1.Picture.Bitmap.Scanline[i],\r
- Image2.Picture.Bitmap.Scanline[i], PicW);\r
-\r
- end;\r
- ProgressBar1.Position := PicH;\r
-\r
- cmsDeleteTransform(xform);\r
-\r
- end;\r
-\r
- Image2.Repaint;\r
- ProgressBar1.Position := 0;\r
- end\r
-end;\r
-\r
-procedure TForm1.Button3Click(Sender: TObject);\r
-begin\r
- if OpenDialog1.Execute then\r
- ComboBoxInput.Text := OpenDialog1.FileName;\r
-end;\r
-\r
-procedure TForm1.Button4Click(Sender: TObject);\r
-begin\r
- if OpenDialog1.Execute then\r
- ComboBoxOutput.Text := OpenDialog1.FileName;\r
-end;\r
-\r
-end.\r
+unit demo1;
+
+interface
+
+uses
+ Windows, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
+ ExtCtrls, StdCtrls, ExtDlgs, lcms2dll, ComCtrls;
+
+type
+ TForm1 = class(TForm)
+
+ Image1: TImage;
+ Image2: TImage;
+ Panel1: TPanel;
+ Splitter1: TSplitter;
+ Button2: TButton;
+ ComboBoxInput: TComboBox;
+ ComboBoxOutput: TComboBox;
+ Label1: TLabel;
+ Label2: TLabel;
+ WBCompensation: TCheckBox;
+ NoTransform: TCheckBox;
+ RadioGroup1: TRadioGroup;
+ OpenPictureDialog1: TOpenPictureDialog;
+ Button1: TButton;
+ ProgressBar1: TProgressBar;
+ ComboBoxIntent: TComboBox;
+ Label3: TLabel;
+ Button3: TButton;
+ Button4: TButton;
+ OpenDialog1: TOpenDialog;
+ Label4: TLabel;
+ ScrollBar1: TScrollBar;
+
+ procedure Button2Click(Sender: TObject);
+ procedure Button1Click(Sender: TObject);
+ procedure Button3Click(Sender: TObject);
+ procedure Button4Click(Sender: TObject);
+ procedure ComboBoxIntentChange(Sender: TObject);
+ procedure ScrollBar1Change(Sender: TObject);
+ private
+ { Private declarations }
+ function ComputeFlags: DWORD;
+
+ public
+ constructor Create(Owner: TComponent); Override;
+ { Public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.DFM}
+
+CONST
+ IS_INPUT = $1;
+ IS_DISPLAY = $2;
+ IS_COLORSPACE = $4;
+ IS_OUTPUT = $8;
+ IS_ABSTRACT = $10;
+
+VAR
+ IntentCodes: array [0 .. 20] of cmsUInt32Number;
+
+FUNCTION InSignatures(Signature: cmsProfileClassSignature; dwFlags: DWORD): Boolean;
+BEGIN
+
+ if (((dwFlags AND IS_DISPLAY) <> 0) AND (Signature = cmsSigDisplayClass)) then
+ InSignatures := TRUE
+ else if (((dwFlags AND IS_OUTPUT) <> 0) AND (Signature = cmsSigOutputClass))
+ then
+ InSignatures := TRUE
+ else if (((dwFlags AND IS_INPUT) <> 0) AND (Signature = cmsSigInputClass))
+ then
+ InSignatures := TRUE
+ else if (((dwFlags AND IS_COLORSPACE) <> 0) AND
+ (Signature = cmsSigColorSpaceClass)) then
+ InSignatures := TRUE
+ else if (((dwFlags AND IS_ABSTRACT) <> 0) AND
+ (Signature = cmsSigAbstractClass)) then
+ InSignatures := TRUE
+ else
+ InSignatures := FALSE
+END;
+
+PROCEDURE FillCombo(var Combo: TComboBox; Signatures: DWORD);
+var
+ Files, Descriptions: TStringList;
+ Found: Integer;
+ SearchRec: TSearchRec;
+ Path, Profile: String;
+ Dir: ARRAY [0 .. 1024] OF Char;
+ hProfile: cmsHPROFILE;
+ Descrip: array [0 .. 256] of Char;
+begin
+ Files := TStringList.Create;
+ Descriptions := TStringList.Create;
+ GetSystemDirectory(Dir, 1023);
+ Path := String(Dir) + '\SPOOL\DRIVERS\COLOR\';
+ Found := FindFirst(Path + '*.ic?', faAnyFile, SearchRec);
+ while Found = 0 do
+ begin
+ Profile := Path + SearchRec.Name;
+ hProfile := cmsOpenProfileFromFile(PAnsiChar(AnsiString(Profile)), 'r');
+ if (hProfile <> NIL) THEN
+ begin
+
+ if ((cmsGetColorSpace(hProfile) = cmsSigRgbData) AND InSignatures
+ (cmsGetDeviceClass(hProfile), Signatures)) then
+ begin
+ cmsGetProfileInfo(hProfile, cmsInfoDescription, 'EN', 'us', Descrip,
+ 256);
+ Descriptions.Add(Descrip);
+ Files.Add(Profile);
+ end;
+ cmsCloseProfile(hProfile);
+ end;
+
+ Found := FindNext(SearchRec);
+
+ end;
+ FindClose(SearchRec);
+ Combo.Items := Descriptions;
+ Combo.Tag := Integer(Files);
+end;
+
+// A rather simple Logger... note the "cdecl" convention
+PROCEDURE ErrorLogger(ContextID: cmsContext; ErrorCode: cmsUInt32Number;
+ Text: PAnsiChar); Cdecl;
+begin
+ MessageBox(0, PWideChar(WideString(Text)), 'Something is going wrong...',
+ MB_OK OR MB_ICONWARNING or MB_TASKMODAL);
+end;
+
+constructor TForm1.Create(Owner: TComponent);
+var
+ IntentNames: array [0 .. 20] of PAnsiChar;
+ i, n: Integer;
+begin
+ inherited Create(Owner);
+
+ // Set the logger
+ cmsSetLogErrorHandler(ErrorLogger);
+
+ ScrollBar1.Min := 0;
+ ScrollBar1.Max := 100;
+
+ FillCombo(ComboBoxInput, IS_INPUT OR IS_COLORSPACE OR IS_DISPLAY);
+ FillCombo(ComboBoxOutput, $FFFF );
+
+
+ // Get the supported intents
+ n := cmsGetSupportedIntents(20, @IntentCodes, @IntentNames);
+
+
+ ComboBoxIntent.Items.BeginUpdate;
+ ComboBoxIntent.Items.Clear;
+ for i:= 0 TO n - 1 DO
+ ComboBoxIntent.Items.Add(String(IntentNames[i]));
+
+ ComboBoxIntent.ItemIndex := 0;
+ ComboBoxIntent.Items.EndUpdate;
+end;
+
+
+
+procedure TForm1.ScrollBar1Change(Sender: TObject);
+var d: Integer;
+ s: String;
+begin
+ d := ScrollBar1.Position;
+ Str(d, s);
+ Label4.Caption := 'Adaptation state '+s + '% (Abs. col only)';
+end;
+
+procedure TForm1.Button2Click(Sender: TObject);
+begin
+ if OpenPictureDialog1.Execute then
+ begin
+ Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
+ Image1.Picture.Bitmap.PixelFormat := pf24bit;
+
+ Image2.Picture.LoadFromFile(OpenPictureDialog1.FileName);
+ Image2.Picture.Bitmap.PixelFormat := pf24bit;
+
+ end
+end;
+
+function SelectedFile(var Combo: TComboBox): string;
+var
+ List: TStringList;
+ n: Integer;
+begin
+
+ List := TStringList(Combo.Tag);
+ n := Combo.ItemIndex;
+ if (n >= 0) then
+ SelectedFile := List.Strings[n]
+ else
+ SelectedFile := Combo.Text;
+end;
+
+procedure TForm1.ComboBoxIntentChange(Sender: TObject);
+begin
+ ScrollBar1.Enabled := (ComboBoxIntent.itemIndex = 3);
+end;
+
+function TForm1.ComputeFlags: DWORD;
+var
+ dwFlags: DWORD;
+begin
+ dwFlags := 0;
+ if (WBCompensation.Checked) then
+ begin
+ dwFlags := dwFlags OR cmsFLAGS_BLACKPOINTCOMPENSATION
+ end;
+
+ if (NoTransform.Checked) then
+ begin
+ dwFlags := dwFlags OR cmsFLAGS_NULLTRANSFORM
+ end;
+
+ case RadioGroup1.ItemIndex of
+ 0:
+ dwFlags := dwFlags OR cmsFLAGS_NOOPTIMIZE;
+ 1:
+ dwFlags := dwFlags OR cmsFLAGS_HIGHRESPRECALC;
+ 3:
+ dwFlags := dwFlags OR cmsFLAGS_LOWRESPRECALC;
+ end;
+
+ ComputeFlags := dwFlags
+end;
+
+procedure TForm1.Button1Click(Sender: TObject);
+var
+ Source, Dest: String;
+ hSrc, hDest: cmsHPROFILE;
+ xform: cmsHTRANSFORM;
+ i, PicW, PicH: Integer;
+ Intent: Integer;
+ dwFlags: DWORD;
+begin
+
+ Source := SelectedFile(ComboBoxInput);
+ Dest := SelectedFile(ComboBoxOutput);
+
+ dwFlags := ComputeFlags;
+
+ Intent := IntentCodes[ComboBoxIntent.ItemIndex];
+
+ cmsSetAdaptationState( ScrollBar1.Position / 100.0 );
+
+ if (Source <> '') AND (Dest <> '') then
+ begin
+ hSrc := cmsOpenProfileFromFile(PAnsiChar(AnsiString(Source)), 'r');
+ hDest := cmsOpenProfileFromFile(PAnsiChar(AnsiString(Dest)), 'r');
+
+ if (hSrc <> Nil) and (hDest <> Nil) then
+ begin
+ xform := cmsCreateTransform(hSrc, TYPE_BGR_8, hDest, TYPE_BGR_8, Intent,
+ dwFlags);
+ end
+ else
+ begin
+ xform := nil;
+ end;
+
+ if hSrc <> nil then
+ begin
+ cmsCloseProfile(hSrc);
+ end;
+
+ if hDest <> Nil then
+ begin
+ cmsCloseProfile(hDest);
+ end;
+
+ if (xform <> nil) then
+ begin
+
+ PicW := Image2.Picture.width;
+ PicH := Image2.Picture.height;
+ ProgressBar1.Min := 0;
+ ProgressBar1.Max := PicH;
+ ProgressBar1.Step := 1;
+
+ for i := 0 TO (PicH - 1) do
+ begin
+ if ((i MOD 100) = 0) then
+ ProgressBar1.Position := i;
+
+ cmsDoTransform(xform, Image1.Picture.Bitmap.Scanline[i],
+ Image2.Picture.Bitmap.Scanline[i], PicW);
+
+ end;
+ ProgressBar1.Position := PicH;
+
+ cmsDeleteTransform(xform);
+
+ end;
+
+ Image2.Repaint;
+ ProgressBar1.Position := 0;
+ end
+end;
+
+procedure TForm1.Button3Click(Sender: TObject);
+begin
+ if OpenDialog1.Execute then
+ ComboBoxInput.Text := OpenDialog1.FileName;
+end;
+
+procedure TForm1.Button4Click(Sender: TObject);
+begin
+ if OpenDialog1.Execute then
+ ComboBoxOutput.Text := OpenDialog1.FileName;
+end;
+
+end.
-//\r
-// Little cms DELPHI wrapper\r
-//---------------------------------------------------------------------------------\r
-//\r
-// Little Color Management System\r
-// Copyright (c) 1998-2010 Marti Maria Saguer\r
-//\r
-// Permission is hereby granted, free of charge, to any person obtaining\r
-// a copy of this software and associated documentation files (the "Software"),\r
-// to deal in the Software without restriction, including without limitation\r
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
-// and/or sell copies of the Software, and to permit persons to whom the Software\r
-// is furnished to do so, subject to the following conditions:\r
-//\r
-// The above copyright notice and this permission notice shall be included in\r
-// all copies or substantial portions of the Software.\r
-//\r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r
-// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-//\r
-//---------------------------------------------------------------------------------\r
-//\r
-// Version 2.1\r
-//\r
-\r
-UNIT lcms2dll;\r
-\r
-INTERFACE\r
-\r
-USES Windows;\r
-\r
- TYPE \r
-\r
- Uint8 = Byte;\r
- Int8 = Shortint;\r
- UInt16 = Word;\r
- Int16 = Smallint;\r
- UInt32 = LongWord;\r
- Int32 = Longint;\r
-\r
- TYPE \r
- cmsUInt8Number = Uint8;\r
- cmsInt8Number = Int8;\r
- cmsUInt16Number = UInt16;\r
- cmsInt16Number = Int16;\r
-\r
- cmsUInt32Number = UInt32;\r
- cmsInt32Number = Int32;\r
- cmsInt64Number = Int64;\r
- cmsUInt64Number = UInt64;\r
-\r
- cmsFloat32Number = Single;\r
- cmsFloat64Number = Double;\r
-\r
- LPcmsUInt8Number = ^cmsUInt8Number;\r
- LPcmsInt8Number = ^cmsInt8Number; \r
- LPcmsUInt16Number = ^cmsUInt16Number; \r
- LPcmsInt16Number = ^cmsInt16Number; \r
- \r
- LPcmsUInt32Number = ^cmsUInt32Number; \r
- LPcmsInt32Number = ^cmsInt32Number; \r
- LPcmsInt64Number = ^cmsInt64Number; \r
- LPcmsUInt64Number = ^cmsUInt64Number; \r
- \r
- LPcmsFloat32Number = ^cmsFloat32Number; \r
- LPcmsFloat64Number = ^cmsFloat64Number; \r
-\r
-\r
- // Derivative types\r
- cmsSignature = cmsUInt32Number;\r
- cmsU8Fixed8Number = cmsUInt16Number;\r
- cmsS15Fixed16Number = cmsInt32Number;\r
- cmsU16Fixed16Number = cmsUInt32Number;\r
-\r
- // Boolean type, which will be using the native integer\r
- cmsBool = Boolean;\r
-\r
- CONST\r
-\r
- // Some common definitions\r
- cmsMAX_PATH = 256;\r
-\r
- // D50 XYZ normalized to Y=1.0\r
- cmsD50X = 0.9642;\r
- cmsD50Y = 1.0;\r
- cmsD50Z = 0.8249;\r
-\r
- // V4 perceptual black\r
- cmsPERCEPTUAL_BLACK_X = 0.00336;\r
- cmsPERCEPTUAL_BLACK_Y = 0.0034731;\r
- cmsPERCEPTUAL_BLACK_Z = 0.00287;\r
-\r
- // Definitions in ICC spec\r
- cmsMagicNumber = $61637370; // 'acsp'\r
- lcmsSignature = $6c636d73; // 'lcms'\r
-\r
-\r
-TYPE\r
-\r
-// Base ICC type definitions\r
-cmsTagTypeSignature = (\r
- cmsSigChromaticityType = $6368726D, // 'chrm'\r
- cmsSigColorantOrderType = $636C726F, // 'clro'\r
- cmsSigColorantTableType = $636C7274, // 'clrt'\r
- cmsSigCrdInfoType = $63726469, // 'crdi'\r
- cmsSigCurveType = $63757276, // 'curv'\r
- cmsSigDataType = $64617461, // 'data'\r
- cmsSigDictType = $64696374, // 'dict'\r
- cmsSigDateTimeType = $6474696D, // 'dtim'\r
- cmsSigDeviceSettingsType = $64657673, // 'devs'\r
- cmsSigLut16Type = $6d667432, // 'mft2'\r
- cmsSigLut8Type = $6d667431, // 'mft1'\r
- cmsSigLutAtoBType = $6d414220, // 'mAB '\r
- cmsSigLutBtoAType = $6d424120, // 'mBA '\r
- cmsSigMeasurementType = $6D656173, // 'meas'\r
- cmsSigMultiLocalizedUnicodeType = $6D6C7563, // 'mluc'\r
- cmsSigMultiProcessElementType = $6D706574, // 'mpet'\r
- cmsSigNamedColorType = $6E636f6C, // 'ncol' -- DEPRECATED!\r
- cmsSigNamedColor2Type = $6E636C32, // 'ncl2'\r
- cmsSigParametricCurveType = $70617261, // 'para'\r
- cmsSigProfileSequenceDescType = $70736571, // 'pseq'\r
- cmsSigProfileSequenceIdType = $70736964, // 'psid'\r
- cmsSigResponseCurveSet16Type = $72637332, // 'rcs2'\r
- cmsSigS15Fixed16ArrayType = $73663332, // 'sf32'\r
- cmsSigScreeningType = $7363726E, // 'scrn'\r
- cmsSigSignatureType = $73696720, // 'sig '\r
- cmsSigTextType = $74657874, // 'text'\r
- cmsSigTextDescriptionType = $64657363, // 'desc'\r
- cmsSigU16Fixed16ArrayType = $75663332, // 'uf32'\r
- cmsSigUcrBgType = $62666420, // 'bfd '\r
- cmsSigUInt16ArrayType = $75693136, // 'ui16'\r
- cmsSigUInt32ArrayType = $75693332, // 'ui32'\r
- cmsSigUInt64ArrayType = $75693634, // 'ui64'\r
- cmsSigUInt8ArrayType = $75693038, // 'ui08'\r
- cmsSigViewingConditionsType = $76696577, // 'view'\r
- cmsSigXYZType = $58595A20, // 'XYZ '\r
- cmsSigVcgtType = $76636774 // 'vcgt'\r
- );\r
-\r
-// Base ICC tag definitions\r
-cmsTagSignature = (\r
- cmsSigAToB0Tag = $41324230, // 'A2B0'\r
- cmsSigAToB1Tag = $41324231, // 'A2B1'\r
- cmsSigAToB2Tag = $41324232, // 'A2B2'\r
- cmsSigBlueColorantTag = $6258595A, // 'bXYZ'\r
- cmsSigBlueMatrixColumnTag = $6258595A, // 'bXYZ'\r
- cmsSigBlueTRCTag = $62545243, // 'bTRC'\r
- cmsSigBToA0Tag = $42324130, // 'B2A0'\r
- cmsSigBToA1Tag = $42324131, // 'B2A1'\r
- cmsSigBToA2Tag = $42324132, // 'B2A2'\r
- cmsSigCalibrationDateTimeTag = $63616C74, // 'calt'\r
- cmsSigCharTargetTag = $74617267, // 'targ'\r
- cmsSigChromaticAdaptationTag = $63686164, // 'chad'\r
- cmsSigChromaticityTag = $6368726D, // 'chrm'\r
- cmsSigColorantOrderTag = $636C726F, // 'clro'\r
- cmsSigColorantTableTag = $636C7274, // 'clrt'\r
- cmsSigColorantTableOutTag = $636C6F74, // 'clot'\r
- cmsSigColorimetricIntentImageStateTag = $63696973, // 'ciis'\r
- cmsSigCopyrightTag = $63707274, // 'cprt'\r
- cmsSigCrdInfoTag = $63726469, // 'crdi'\r
- cmsSigDataTag = $64617461, // 'data'\r
- cmsSigDateTimeTag = $6474696D, // 'dtim'\r
- cmsSigDeviceMfgDescTag = $646D6E64, // 'dmnd'\r
- cmsSigDeviceModelDescTag = $646D6464, // 'dmdd'\r
- cmsSigDeviceSettingsTag = $64657673, // 'devs'\r
- cmsSigDToB0Tag = $44324230, // 'D2B0'\r
- cmsSigDToB1Tag = $44324231, // 'D2B1'\r
- cmsSigDToB2Tag = $44324232, // 'D2B2'\r
- cmsSigDToB3Tag = $44324233, // 'D2B3'\r
- cmsSigBToD0Tag = $42324430, // 'B2D0'\r
- cmsSigBToD1Tag = $42324431, // 'B2D1'\r
- cmsSigBToD2Tag = $42324432, // 'B2D2'\r
- cmsSigBToD3Tag = $42324433, // 'B2D3'\r
- cmsSigGamutTag = $67616D74, // 'gamt'\r
- cmsSigGrayTRCTag = $6b545243, // 'kTRC'\r
- cmsSigGreenColorantTag = $6758595A, // 'gXYZ'\r
- cmsSigGreenMatrixColumnTag = $6758595A, // 'gXYZ'\r
- cmsSigGreenTRCTag = $67545243, // 'gTRC'\r
- cmsSigLuminanceTag = $6C756d69, // 'lumi'\r
- cmsSigMeasurementTag = $6D656173, // 'meas'\r
- cmsSigMediaBlackPointTag = $626B7074, // 'bkpt'\r
- cmsSigMediaWhitePointTag = $77747074, // 'wtpt'\r
- cmsSigNamedColorTag = $6E636f6C, // 'ncol' // Deprecated by the ICC\r
- cmsSigNamedColor2Tag = $6E636C32, // 'ncl2'\r
- cmsSigOutputResponseTag = $72657370, // 'resp'\r
- cmsSigPerceptualRenderingIntentGamutTag = $72696730, // 'rig0'\r
- cmsSigPreview0Tag = $70726530, // 'pre0'\r
- cmsSigPreview1Tag = $70726531, // 'pre1'\r
- cmsSigPreview2Tag = $70726532, // 'pre2'\r
- cmsSigProfileDescriptionTag = $64657363, // 'desc'\r
- cmsSigProfileSequenceDescTag = $70736571, // 'pseq'\r
- cmsSigProfileSequenceIdTag = $70736964, // 'psid'\r
- cmsSigPs2CRD0Tag = $70736430, // 'psd0'\r
- cmsSigPs2CRD1Tag = $70736431, // 'psd1'\r
- cmsSigPs2CRD2Tag = $70736432, // 'psd2'\r
- cmsSigPs2CRD3Tag = $70736433, // 'psd3'\r
- cmsSigPs2CSATag = $70733273, // 'ps2s'\r
- cmsSigPs2RenderingIntentTag = $70733269, // 'ps2i'\r
- cmsSigRedColorantTag = $7258595A, // 'rXYZ'\r
- cmsSigRedMatrixColumnTag = $7258595A, // 'rXYZ'\r
- cmsSigRedTRCTag = $72545243, // 'rTRC'\r
- cmsSigSaturationRenderingIntentGamutTag = $72696732, // 'rig2'\r
- cmsSigScreeningDescTag = $73637264, // 'scrd'\r
- cmsSigScreeningTag = $7363726E, // 'scrn'\r
- cmsSigTechnologyTag = $74656368, // 'tech'\r
- cmsSigUcrBgTag = $62666420, // 'bfd '\r
- cmsSigViewingCondDescTag = $76756564, // 'vued'\r
- cmsSigViewingConditionsTag = $76696577, // 'view'\r
- cmsSigVcgtTag = $76636774, // 'vcgt'\r
- cmsSigMetaTag = $6D657461 // 'meta'\r
-);\r
-\r
-// ICC Technology tag\r
-cmsTechnologySignature = (\r
- cmsSigDigitalCamera = $6463616D, // 'dcam'\r
- cmsSigFilmScanner = $6673636E, // 'fscn'\r
- cmsSigReflectiveScanner = $7273636E, // 'rscn'\r
- cmsSigInkJetPrinter = $696A6574, // 'ijet'\r
- cmsSigThermalWaxPrinter = $74776178, // 'twax'\r
- cmsSigElectrophotographicPrinter = $6570686F, // 'epho'\r
- cmsSigElectrostaticPrinter = $65737461, // 'esta'\r
- cmsSigDyeSublimationPrinter = $64737562, // 'dsub'\r
- cmsSigPhotographicPaperPrinter = $7270686F, // 'rpho'\r
- cmsSigFilmWriter = $6670726E, // 'fprn'\r
- cmsSigVideoMonitor = $7669646D, // 'vidm'\r
- cmsSigVideoCamera = $76696463, // 'vidc'\r
- cmsSigProjectionTelevision = $706A7476, // 'pjtv'\r
- cmsSigCRTDisplay = $43525420, // 'CRT '\r
- cmsSigPMDisplay = $504D4420, // 'PMD '\r
- cmsSigAMDisplay = $414D4420, // 'AMD '\r
- cmsSigPhotoCD = $4B504344, // 'KPCD'\r
- cmsSigPhotoImageSetter = $696D6773, // 'imgs'\r
- cmsSigGravure = $67726176, // 'grav'\r
- cmsSigOffsetLithography = $6F666673, // 'offs'\r
- cmsSigSilkscreen = $73696C6B, // 'silk'\r
- cmsSigFlexography = $666C6578, // 'flex'\r
- cmsSigMotionPictureFilmScanner = $6D706673, // 'mpfs'\r
- cmsSigMotionPictureFilmRecorder = $6D706672, // 'mpfr'\r
- cmsSigDigitalMotionPictureCamera = $646D7063, // 'dmpc'\r
- cmsSigDigitalCinemaProjector = $64636A70 // 'dcpj'\r
-);\r
-\r
-\r
-// ICC Color spaces\r
-cmsColorSpaceSignature = (\r
- cmsSigXYZData = $58595A20, // 'XYZ '\r
- cmsSigLabData = $4C616220, // 'Lab '\r
- cmsSigLuvData = $4C757620, // 'Luv '\r
- cmsSigYCbCrData = $59436272, // 'YCbr'\r
- cmsSigYxyData = $59787920, // 'Yxy '\r
- cmsSigRgbData = $52474220, // 'RGB '\r
- cmsSigGrayData = $47524159, // 'GRAY'\r
- cmsSigHsvData = $48535620, // 'HSV '\r
- cmsSigHlsData = $484C5320, // 'HLS '\r
- cmsSigCmykData = $434D594B, // 'CMYK'\r
- cmsSigCmyData = $434D5920, // 'CMY '\r
- cmsSigMCH1Data = $4D434831, // 'MCH1'\r
- cmsSigMCH2Data = $4D434832, // 'MCH2'\r
- cmsSigMCH3Data = $4D434833, // 'MCH3'\r
- cmsSigMCH4Data = $4D434834, // 'MCH4'\r
- cmsSigMCH5Data = $4D434835, // 'MCH5'\r
- cmsSigMCH6Data = $4D434836, // 'MCH6'\r
- cmsSigMCH7Data = $4D434837, // 'MCH7'\r
- cmsSigMCH8Data = $4D434838, // 'MCH8'\r
- cmsSigMCH9Data = $4D434839, // 'MCH9'\r
- cmsSigMCHAData = $4D43483A, // 'MCHA'\r
- cmsSigMCHBData = $4D43483B, // 'MCHB'\r
- cmsSigMCHCData = $4D43483C, // 'MCHC'\r
- cmsSigMCHDData = $4D43483D, // 'MCHD'\r
- cmsSigMCHEData = $4D43483E, // 'MCHE'\r
- cmsSigMCHFData = $4D43483F, // 'MCHF'\r
- cmsSigNamedData = $6e6d636c, // 'nmcl'\r
- cmsSig1colorData = $31434C52, // '1CLR'\r
- cmsSig2colorData = $32434C52, // '2CLR'\r
- cmsSig3colorData = $33434C52, // '3CLR'\r
- cmsSig4colorData = $34434C52, // '4CLR'\r
- cmsSig5colorData = $35434C52, // '5CLR'\r
- cmsSig6colorData = $36434C52, // '6CLR'\r
- cmsSig7colorData = $37434C52, // '7CLR'\r
- cmsSig8colorData = $38434C52, // '8CLR'\r
- cmsSig9colorData = $39434C52, // '9CLR'\r
- cmsSig10colorData = $41434C52, // 'ACLR'\r
- cmsSig11colorData = $42434C52, // 'BCLR'\r
- cmsSig12colorData = $43434C52, // 'CCLR'\r
- cmsSig13colorData = $44434C52, // 'DCLR'\r
- cmsSig14colorData = $45434C52, // 'ECLR'\r
- cmsSig15colorData = $46434C52, // 'FCLR'\r
- cmsSigLuvKData = $4C75764B // 'LuvK'\r
-);\r
-\r
-// ICC Profile Class\r
-cmsProfileClassSignature = (\r
- cmsSigInputClass = $73636E72, // 'scnr'\r
- cmsSigDisplayClass = $6D6E7472, // 'mntr'\r
- cmsSigOutputClass = $70727472, // 'prtr'\r
- cmsSigLinkClass = $6C696E6B, // 'link'\r
- cmsSigAbstractClass = $61627374, // 'abst'\r
- cmsSigColorSpaceClass = $73706163, // 'spac'\r
- cmsSigNamedColorClass = $6e6d636c // 'nmcl'\r
-);\r
-\r
-\r
-// ICC Platforms\r
-cmsPlatformSignature = (\r
- cmsSigMacintosh = $4150504C, // 'APPL'\r
- cmsSigMicrosoft = $4D534654, // 'MSFT'\r
- cmsSigSolaris = $53554E57, // 'SUNW'\r
- cmsSigSGI = $53474920, // 'SGI '\r
- cmsSigTaligent = $54474E54, // 'TGNT'\r
- cmsSigUnices = $2A6E6978 // '*nix' // From argyll -- Not official\r
-);\r
-\r
-CONST \r
-\r
- // Reference gamut\r
- cmsSigPerceptualReferenceMediumGamut = $70726d67; //'prmg'\r
-\r
- // For cmsSigColorimetricIntentImageStateTag\r
- cmsSigSceneColorimetryEstimates = $73636F65; //'scoe'\r
- cmsSigSceneAppearanceEstimates = $73617065; //'sape'\r
- cmsSigFocalPlaneColorimetryEstimates = $66706365; //'fpce'\r
- cmsSigReflectionHardcopyOriginalColorimetry = $72686F63; //'rhoc'\r
- cmsSigReflectionPrintOutputColorimetry = $72706F63; //'rpoc'\r
-\r
-TYPE\r
-\r
-// Multi process elements types\r
-cmsStageSignature = (\r
- cmsSigCurveSetElemType = $63767374, //'cvst'\r
- cmsSigMatrixElemType = $6D617466, //'matf'\r
- cmsSigCLutElemType = $636C7574, //'clut'\r
-\r
- cmsSigBAcsElemType = $62414353, // 'bACS'\r
- cmsSigEAcsElemType = $65414353, // 'eACS'\r
-\r
- // Custom from here, not in the ICC Spec\r
- cmsSigXYZ2LabElemType = $6C327820, // 'l2x '\r
- cmsSigLab2XYZElemType = $78326C20, // 'x2l '\r
- cmsSigNamedColorElemType = $6E636C20, // 'ncl '\r
- cmsSigLabV2toV4 = $32203420, // '2 4 '\r
- cmsSigLabV4toV2 = $34203220, // '4 2 '\r
-\r
- // Identities\r
- cmsSigIdentityElemType = $69646E20 // 'idn '\r
-);\r
-\r
-// Types of CurveElements\r
-cmsCurveSegSignature = (\r
-\r
- cmsSigFormulaCurveSeg = $70617266, // 'parf'\r
- cmsSigSampledCurveSeg = $73616D66, // 'samf'\r
- cmsSigSegmentedCurve = $63757266 // 'curf'\r
-);\r
-\r
-CONST \r
-\r
- // Used in ResponseCurveType\r
- cmsSigStatusA = $53746141; //'StaA'\r
- cmsSigStatusE = $53746145; //'StaE'\r
- cmsSigStatusI = $53746149; //'StaI'\r
- cmsSigStatusT = $53746154; //'StaT'\r
- cmsSigStatusM = $5374614D; //'StaM'\r
- cmsSigDN = $444E2020; //'DN '\r
- cmsSigDNP = $444E2050; //'DN P'\r
- cmsSigDNN = $444E4E20; //'DNN '\r
- cmsSigDNNP = $444E4E50; //'DNNP'\r
-\r
- // Device attributes, currently defined values correspond to the low 4 bytes\r
- // of the 8 byte attribute quantity\r
- cmsReflective = 0;\r
- cmsTransparency = 1;\r
- cmsGlossy = 0;\r
- cmsMatte = 2;\r
-\r
-TYPE\r
-\r
-// Common structures in ICC tags\r
-cmsICCData = PACKED RECORD\r
- len : cmsUInt32Number;\r
- flag : cmsUInt32Number;\r
- data : Array [0..1] of cmsUInt8Number;\r
- END;\r
-\r
-// ICC date time\r
-cmsDateTimeNumber = PACKED RECORD\r
- year: cmsUInt16Number; \r
- month: cmsUInt16Number; \r
- day: cmsUInt16Number; \r
- hours: cmsUInt16Number; \r
- minutes: cmsUInt16Number; \r
- seconds: cmsUInt16Number; \r
-END;\r
-\r
-// ICC XYZ\r
-\r
-cmsEncodedXYZNumber = PACKED RECORD\r
- X: cmsS15Fixed16Number;\r
- Y: cmsS15Fixed16Number;\r
- Z: cmsS15Fixed16Number;\r
-END;\r
-\r
-\r
-// Profile ID as computed by MD5 algorithm\r
-cmsProfileID = PACKED RECORD\r
- CASE Integer OF\r
- 1: (ID8: Array[0..15] OF cmsUInt8Number);\r
- 2: (ID16: Array[0..7] OF cmsUInt16Number);\r
- 3: (ID32: Array[0..3] OF cmsUInt32Number);\r
-END;\r
-\r
-\r
-\r
-// ----------------------------------------------------------------------------------------------\r
-// ICC profile internal base types. Strictly, shouldn't be declared in this unit, but maybe\r
-// somebody want to use this info for accessing profile header directly, so here it is.\r
-\r
-// Profile header -- it is 32-bit aligned, so no issues are expected on alignment\r
-cmsICCHeader = PACKED RECORD\r
- size: cmsUInt32Number; // Profile size in bytes\r
- cmmId: cmsSignature; // CMM for this profile\r
- version: cmsUInt32Number; // Format version number\r
- deviceClass: cmsProfileClassSignature; // Type of profile\r
- colorSpace: cmsColorSpaceSignature; // Color space of data\r
- pcs: cmsColorSpaceSignature; // PCS, XYZ or Lab only\r
- date: cmsDateTimeNumber; // Date profile was created\r
- magic: cmsSignature; // Magic Number to identify an ICC profile\r
- platform: cmsPlatformSignature; // Primary Platform\r
- flags: cmsUInt32Number; // Various bit settings\r
- manufacturer: cmsSignature; // Device manufacturer\r
- model: cmsUInt32Number; // Device model number\r
- attributes: cmsUInt64Number; // Device attributes\r
- renderingIntent:cmsUInt32Number; // Rendering intent\r
- illuminant: cmsEncodedXYZNumber; // Profile illuminant\r
- creator: cmsSignature; // Profile creator\r
- profileID: cmsProfileID; // Profile ID using MD5\r
- reserved: array [0..27] of cmsInt8Number; // Reserved for future use\r
-END;\r
-\r
-// ICC base tag\r
-cmsTagBase = PACKED RECORD\r
- sig: cmsTagTypeSignature; \r
- reserved: array[0..3] of cmsInt8Number; \r
-END;\r
-\r
-// A tag entry in directory\r
-cmsTagEntry = PACKED RECORD\r
- sig: cmsTagSignature; // The tag signature\r
- offset: cmsUInt32Number; // Start of tag\r
- size: cmsUInt32Number; // Size in bytes\r
-END;\r
-\r
-\r
-cmsContext = Pointer; // Context identifier for multithreaded environments\r
-cmsHANDLE = Pointer; // Generic handle\r
-cmsHPROFILE = Pointer; // Opaque typedefs to hide internals\r
-cmsHTRANSFORM = Pointer;\r
-\r
-\r
-CONST\r
-\r
- cmsMAXCHANNELS = 16; // Maximum number of channels in ICC profiles\r
-\r
-// Format of pixel is defined by one cmsUInt32Number, using bit fields as follows\r
-//\r
-// A O TTTTT U Y F P X S EEE CCCC BBB\r
-//\r
-// A: Floating point -- With this flag we can differentiate 16 bits as float and as int\r
-// O: Optimized -- previous optimization already returns the final 8-bit value\r
-// T: Pixeltype\r
-// F: Flavor 0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)\r
-// P: Planar? 0=Chunky, 1=Planar\r
-// X: swap 16 bps endianess?\r
-// S: Do swap? ie, BGR, KYMC\r
-// E: Extra samples\r
-// C: Channels (Samples per pixel)\r
-// B: bytes per sample\r
-// Y: Swap first - changes ABGR to BGRA and KCMY to CMYK\r
-\r
- FUNCTION FLOAT_SH(a: cmsUInt32Number): cmsUInt32Number;\r
- FUNCTION OPTIMIZED_SH(s: cmsUInt32Number): cmsUInt32Number;\r
- FUNCTION COLORSPACE_SH(s: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION SWAPFIRST_SH(s: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION FLAVOR_SH(s: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION PLANAR_SH(p: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION ENDIAN16_SH(e: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION DOSWAP_SH(e: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION EXTRA_SH(e: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION CHANNELS_SH(c: cmsUInt32Number):cmsUInt32Number;\r
- FUNCTION BYTES_SH(b: cmsUInt32Number):cmsUInt32Number;\r
-\r
-\r
- FUNCTION T_FLOAT(a: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_OPTIMIZED(o: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_COLORSPACE(s: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_SWAPFIRST(s: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_FLAVOR(s: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_PLANAR(p: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_ENDIAN16(e: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_DOSWAP(e: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_EXTRA(e: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_CHANNELS(c: cmsUInt32Number): cmsUInt32Number; \r
- FUNCTION T_BYTES(b: cmsUInt32Number): cmsUInt32Number; \r
-\r
-CONST\r
-\r
-\r
-// Pixel types\r
-\r
- PT_ANY = 0; // Don't check colorspace\r
- // 1 & 2 are reserved\r
- PT_GRAY = 3;\r
- PT_RGB = 4;\r
- PT_CMY = 5;\r
- PT_CMYK = 6;\r
- PT_YCbCr = 7;\r
- PT_YUV = 8; // Lu'v'\r
- PT_XYZ = 9;\r
- PT_Lab = 10;\r
- PT_YUVK = 11; // Lu'v'K\r
- PT_HSV = 12;\r
- PT_HLS = 13;\r
- PT_Yxy = 14;\r
- \r
- PT_MCH1 = 15;\r
- PT_MCH2 = 16;\r
- PT_MCH3 = 17;\r
- PT_MCH4 = 18;\r
- PT_MCH5 = 19;\r
- PT_MCH6 = 20;\r
- PT_MCH7 = 21;\r
- PT_MCH8 = 22;\r
- PT_MCH9 = 23;\r
- PT_MCH10 = 24;\r
- PT_MCH11 = 25;\r
- PT_MCH12 = 26;\r
- PT_MCH13 = 27;\r
- PT_MCH14 = 28;\r
- PT_MCH15 = 29;\r
-\r
- PT_LabV2 = 30; // Identical to PT_Lab, but using the V2 old encoding\r
-\r
- \r
- // Format descriptors\r
- TYPE_GRAY_8 = $030009;\r
- TYPE_GRAY_8_REV = $032009;\r
- TYPE_GRAY_16 = $03000a;\r
- TYPE_GRAY_16_REV = $03200a;\r
- TYPE_GRAY_16_SE = $03080a;\r
- TYPE_GRAYA_8 = $030089;\r
- TYPE_GRAYA_16 = $03008a;\r
- TYPE_GRAYA_16_SE = $03088a;\r
- TYPE_GRAYA_8_PLANAR = $031089;\r
- TYPE_GRAYA_16_PLANAR = $03108a;\r
- TYPE_RGB_8 = $040019;\r
- TYPE_RGB_8_PLANAR = $041019;\r
- TYPE_BGR_8 = $040419;\r
- TYPE_BGR_8_PLANAR = $041419;\r
- TYPE_RGB_16 = $04001a;\r
- TYPE_RGB_16_PLANAR = $04101a;\r
- TYPE_RGB_16_SE = $04081a;\r
- TYPE_BGR_16 = $04041a;\r
- TYPE_BGR_16_PLANAR = $04141a;\r
- TYPE_BGR_16_SE = $040c1a;\r
- TYPE_RGBA_8 = $040099;\r
- TYPE_RGBA_8_PLANAR = $041099;\r
- TYPE_RGBA_16 = $04009a;\r
- TYPE_RGBA_16_PLANAR = $04109a;\r
- TYPE_RGBA_16_SE = $04089a;\r
- TYPE_ARGB_8 = $044099;\r
- TYPE_ARGB_16 = $04409a;\r
- TYPE_ABGR_8 = $040499;\r
- TYPE_ABGR_16 = $04049a;\r
- TYPE_ABGR_16_PLANAR = $04149a;\r
- TYPE_ABGR_16_SE = $040c9a;\r
- TYPE_BGRA_8 = $044499;\r
- TYPE_BGRA_16 = $04449a;\r
- TYPE_BGRA_16_SE = $04489a;\r
- TYPE_CMY_8 = $050019;\r
- TYPE_CMY_8_PLANAR = $051019;\r
- TYPE_CMY_16 = $05001a;\r
- TYPE_CMY_16_PLANAR = $05101a;\r
- TYPE_CMY_16_SE = $05081a;\r
- TYPE_CMYK_8 = $060021;\r
- TYPE_CMYKA_8 = $0600a1;\r
- TYPE_CMYK_8_REV = $062021;\r
- TYPE_YUVK_8 = $062021;\r
- TYPE_CMYK_8_PLANAR = $061021;\r
- TYPE_CMYK_16 = $060022;\r
- TYPE_CMYK_16_REV = $062022;\r
- TYPE_YUVK_16 = $062022;\r
- TYPE_CMYK_16_PLANAR = $061022;\r
- TYPE_CMYK_16_SE = $060822;\r
- TYPE_KYMC_8 = $060421;\r
- TYPE_KYMC_16 = $060422;\r
- TYPE_KYMC_16_SE = $060c22;\r
- TYPE_KCMY_8 = $064021;\r
- TYPE_KCMY_8_REV = $066021;\r
- TYPE_KCMY_16 = $064022;\r
- TYPE_KCMY_16_REV = $066022;\r
- TYPE_KCMY_16_SE = $064822;\r
- TYPE_CMYK5_8 = $130029;\r
- TYPE_CMYK5_16 = $13002a;\r
- TYPE_CMYK5_16_SE = $13082a;\r
- TYPE_KYMC5_8 = $130429;\r
- TYPE_KYMC5_16 = $13042a;\r
- TYPE_KYMC5_16_SE = $130c2a;\r
- TYPE_CMYK6_8 = $140031;\r
- TYPE_CMYK6_8_PLANAR = $141031;\r
- TYPE_CMYK6_16 = $140032;\r
- TYPE_CMYK6_16_PLANAR = $141032;\r
- TYPE_CMYK6_16_SE = $140832;\r
- TYPE_CMYK7_8 = $150039;\r
- TYPE_CMYK7_16 = $15003a;\r
- TYPE_CMYK7_16_SE = $15083a;\r
- TYPE_KYMC7_8 = $150439;\r
- TYPE_KYMC7_16 = $15043a;\r
- TYPE_KYMC7_16_SE = $150c3a;\r
- TYPE_CMYK8_8 = $160041;\r
- TYPE_CMYK8_16 = $160042;\r
- TYPE_CMYK8_16_SE = $160842;\r
- TYPE_KYMC8_8 = $160441;\r
- TYPE_KYMC8_16 = $160442;\r
- TYPE_KYMC8_16_SE = $160c42;\r
- TYPE_CMYK9_8 = $170049;\r
- TYPE_CMYK9_16 = $17004a;\r
- TYPE_CMYK9_16_SE = $17084a;\r
- TYPE_KYMC9_8 = $170449;\r
- TYPE_KYMC9_16 = $17044a;\r
- TYPE_KYMC9_16_SE = $170c4a;\r
- TYPE_CMYK10_8 = $180051;\r
- TYPE_CMYK10_16 = $180052;\r
- TYPE_CMYK10_16_SE = $180852;\r
- TYPE_KYMC10_8 = $180451;\r
- TYPE_KYMC10_16 = $180452;\r
- TYPE_KYMC10_16_SE = $180c52;\r
- TYPE_CMYK11_8 = $190059;\r
- TYPE_CMYK11_16 = $19005a;\r
- TYPE_CMYK11_16_SE = $19085a;\r
- TYPE_KYMC11_8 = $190459;\r
- TYPE_KYMC11_16 = $19045a;\r
- TYPE_KYMC11_16_SE = $190c5a;\r
- TYPE_CMYK12_8 = $1a0061;\r
- TYPE_CMYK12_16 = $1a0062;\r
- TYPE_CMYK12_16_SE = $1a0862;\r
- TYPE_KYMC12_8 = $1a0461;\r
- TYPE_KYMC12_16 = $1a0462;\r
- TYPE_KYMC12_16_SE = $1a0c62;\r
- TYPE_XYZ_16 = $09001a;\r
- TYPE_Lab_8 = $0a0019;\r
- TYPE_ALab_8 = $0a0499;\r
- TYPE_Lab_16 = $0a001a;\r
- TYPE_Yxy_16 = $0e001a;\r
- TYPE_YCbCr_8 = $070019;\r
- TYPE_YCbCr_8_PLANAR = $071019;\r
- TYPE_YCbCr_16 = $07001a;\r
- TYPE_YCbCr_16_PLANAR = $07101a;\r
- TYPE_YCbCr_16_SE = $07081a;\r
- TYPE_YUV_8 = $080019;\r
- TYPE_YUV_8_PLANAR = $081019;\r
- TYPE_YUV_16 = $08001a;\r
- TYPE_YUV_16_PLANAR = $08101a;\r
- TYPE_YUV_16_SE = $08081a;\r
- TYPE_HLS_8 = $0d0019;\r
- TYPE_HLS_8_PLANAR = $0d1019;\r
- TYPE_HLS_16 = $0d001a;\r
- TYPE_HLS_16_PLANAR = $0d101a;\r
- TYPE_HLS_16_SE = $0d081a;\r
- TYPE_HSV_8 = $0c0019;\r
- TYPE_HSV_8_PLANAR = $0c1019;\r
- TYPE_HSV_16 = $0c001a;\r
- TYPE_HSV_16_PLANAR = $0c101a;\r
- TYPE_HSV_16_SE = $0c081a;\r
-\r
- TYPE_NAMED_COLOR_INDEX = $000A;\r
-\r
- TYPE_XYZ_FLT = $49001c;\r
- TYPE_Lab_FLT = $4a001c;\r
- TYPE_GRAY_FLT = $43000c;\r
- TYPE_RGB_FLT = $44001c;\r
- TYPE_CMYK_FLT = $460024;\r
- TYPE_XYZA_FLT = $49009c;\r
- TYPE_LabA_FLT = $4a009c;\r
- TYPE_RGBA_FLT = $44009c;\r
- TYPE_XYZ_DBL = $490018;\r
- TYPE_Lab_DBL = $4a0018;\r
- TYPE_GRAY_DBL = $430008;\r
- TYPE_RGB_DBL = $440018;\r
- TYPE_CMYK_DBL = $460020;\r
- TYPE_LabV2_8 = $1e0019;\r
- TYPE_ALabV2_8 = $1e0499;\r
- TYPE_LabV2_16 = $1e001a;\r
-\r
- \r
-TYPE\r
-\r
-\r
- // Colorimetric spaces\r
-\r
- cmsCIEXYZ = PACKED RECORD\r
- X, Y, Z : cmsFloat64Number;\r
- END;\r
- LPcmsCIEXYZ = ^cmsCIEXYZ;\r
-\r
- cmsCIExyY = PACKED RECORD\r
- x, y, YY : cmsFloat64Number\r
- END;\r
- LPcmsCIExyY = ^cmsCIEXYY;\r
-\r
- cmsCIELab = PACKED RECORD\r
- L, a, b: cmsFloat64Number\r
- END;\r
- LPcmsCIELab = ^cmsCIELab;\r
-\r
- cmsCIELCh = PACKED RECORD\r
- L, C, h : cmsFloat64Number\r
- END;\r
- LPcmsCIELCh = ^cmsCIELCh;\r
-\r
- cmsJCh = PACKED RECORD\r
- J, C, h : cmsFloat64Number\r
- END;\r
- LPcmsJCh = ^cmsJCH;\r
-\r
-\r
- cmsCIEXYZTRIPLE = PACKED RECORD\r
- Red, Green, Blue : cmsCIEXYZ\r
- END;\r
- LPcmsCIEXYZTRIPLE = ^cmsCIEXYZTRIPLE;\r
-\r
-\r
- cmsCIExyYTRIPLE = PACKED RECORD\r
- Red, Green, Blue : cmsCIExyY\r
- END;\r
- LPcmsCIExyYTRIPLE = ^cmsCIExyYTRIPLE;\r
-\r
-\r
-CONST\r
-\r
- // Illuminant types for structs below\r
- cmsILLUMINANT_TYPE_UNKNOWN = $0000000;\r
- cmsILLUMINANT_TYPE_D50 = $0000001;\r
- cmsILLUMINANT_TYPE_D65 = $0000002;\r
- cmsILLUMINANT_TYPE_D93 = $0000003;\r
- cmsILLUMINANT_TYPE_F2 = $0000004;\r
- cmsILLUMINANT_TYPE_D55 = $0000005;\r
- cmsILLUMINANT_TYPE_A = $0000006;\r
- cmsILLUMINANT_TYPE_E = $0000007;\r
- cmsILLUMINANT_TYPE_F8 = $0000008;\r
- \r
-TYPE\r
-\r
- cmsICCMeasurementConditions = PACKED RECORD\r
-\r
- Observer: cmsUInt32Number; // 0 = unknown, 1=CIE 1931, 2=CIE 1964\r
- Backing: cmsCIEXYZ; // Value of backing\r
- Geometry: cmsUInt32Number; // 0=unknown, 1=45/0, 0/45 2=0d, d/0\r
- Flare: cmsFloat64Number; // 0..1.0\r
- IlluminantType: cmsUInt32Number;\r
-\r
- END;\r
-\r
- cmsICCViewingConditions = PACKED RECORD\r
- IlluminantXYZ: cmsCIEXYZ; // Not the same struct as CAM02,\r
- SurroundXYZ: cmsCIEXYZ; // This is for storing the tag\r
- IlluminantType: cmsUInt32Number; // viewing condition\r
- END;\r
-\r
-\r
-// Plug-In registering ---------------------------------------------------------------------------------------------------\r
-\r
-FUNCTION cmsPlugin(Plugin: Pointer): cmsBool; StdCall;\r
-PROCEDURE cmsUnregisterPlugins; StdCall;\r
-\r
-// Error logging ----------------------------------------------------------------------------------------------------------\r
-\r
-// There is no error handling at all. When a function fails, it returns proper value.\r
-// For example, all create functions does return NULL on failure. Other may return FALSE.\r
-// It may be interesting, for the developer, to know why the function is failing.\r
-// for that reason, lcms2 does offer a logging function. This function will get\r
-// an ENGLISH string with some clues on what is going wrong. You can show this\r
-// info to the end user if you wish, or just create some sort of log on disk.\r
-// The logging function should NOT terminate the program, as this obviously can leave\r
-// unfreed resources. It is the programmer's responsibility to check each function\r
-// return code to make sure it didn't fail.\r
-\r
-CONST\r
-\r
- cmsERROR_UNDEFINED = 0;\r
- cmsERROR_FILE = 1;\r
- cmsERROR_RANGE = 2;\r
- cmsERROR_INTERNAL = 3;\r
- cmsERROR_NULL = 4;\r
- cmsERROR_READ = 5;\r
- cmsERROR_SEEK = 6;\r
- cmsERROR_WRITE = 7;\r
- cmsERROR_UNKNOWN_EXTENSION = 8;\r
- cmsERROR_COLORSPACE_CHECK = 9;\r
- cmsERROR_ALREADY_DEFINED = 10;\r
- cmsERROR_BAD_SIGNATURE = 11;\r
- cmsERROR_CORRUPTION_DETECTED = 12;\r
- cmsERROR_NOT_SUITABLE = 13;\r
-\r
-// Error logger is called with the ContextID when a message is raised. This gives the\r
-// chance to know which thread is responsible of the warning and any environment associated\r
-// with it. Non-multithreading applications may safely ignore this parameter.\r
-// Note that under certain special circumstances, ContextID may be NULL.\r
-\r
-TYPE\r
-\r
- cmsLogErrorHandlerFunction = PROCEDURE( ContextID: cmsContext; ErrorCode: cmsUInt32Number; Text: PAnsiChar); CDecl;\r
-\r
- // Allows user to set any specific logger\r
- PROCEDURE cmsSetLogErrorHandler(Fn: cmsLogErrorHandlerFunction); StdCall;\r
-\r
-\r
-// Conversions --------------------------------------------------------------------------------------------------------------\r
-\r
-\r
-// Returns pointers to constant structs\r
-FUNCTION cmsD50_XYZ: LPcmsCIEXYZ; StdCall;\r
-FUNCTION cmsD50_xyY: LPcmsCIExyY; StdCall;\r
-\r
-// Colorimetric space conversions\r
-PROCEDURE cmsXYZ2xyY(Dest: LPcmsCIExyY; Source: LPcmsCIEXYZ); StdCall;\r
-PROCEDURE cmsxyY2XYZ(Dest: LPcmsCIEXYZ; Source: LPcmsCIExyY); StdCall;\r
-PROCEDURE cmsLab2XYZ(WhitePoint: LPcmsCIEXYZ; xyz: LPcmsCIEXYZ; Lab: LPcmsCIELab); StdCall;\r
-PROCEDURE cmsXYZ2Lab(WhitePoint: LPcmsCIEXYZ; Lab: LPcmsCIELab; xyz: LPcmsCIEXYZ); StdCall;\r
-PROCEDURE cmsLab2LCh(LCh: LPcmsCIELCh; Lab: LPcmsCIELab); StdCall;\r
-PROCEDURE cmsLCh2Lab(Lab: LPcmsCIELab; LCh: LPcmsCIELCh); StdCall;\r
-\r
-// Encoding /Decoding on PCS\r
-PROCEDURE cmsLabEncoded2Float(Lab: LPcmsCIELab; wLab: Pointer); StdCall;\r
-PROCEDURE cmsLabEncoded2FloatV2(Lab: LPcmsCIELab; wLab: Pointer); StdCall;\r
-PROCEDURE cmsFloat2LabEncoded(wLab: Pointer; Lab: LPcmsCIELab); StdCall;\r
-PROCEDURE cmsFloat2LabEncodedV2(wLab: Pointer; Lab: LPcmsCIELab); StdCall;\r
-PROCEDURE cmsXYZEncoded2Float(fxyz : LPcmsCIEXYZ; XYZ: Pointer); StdCall;\r
-PROCEDURE cmsFloat2XYZEncoded(XYZ: Pointer; fXYZ: LPcmsCIEXYZ); StdCall;\r
-\r
-\r
-// DeltaE metrics\r
-FUNCTION cmsDeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;\r
-FUNCTION cmsCIE94DeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;\r
-FUNCTION cmsBFDdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;\r
-FUNCTION cmsCMCdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;\r
-FUNCTION cmsCIE2000DeltaE(Lab1, Lab2: LPcmsCIELab; Kl, Kc, Kh: Double): Double; StdCall;\r
-\r
-\r
-// Temperature <-> Chromaticity (Black body)\r
-FUNCTION cmsWhitePointFromTemp(var WhitePoint: cmsCIExyY; TempK: cmsFloat64Number) : cmsBool; StdCall;\r
-FUNCTION cmsTempFromWhitePoint(var TeampK: cmsFloat64Number; var WhitePoint: cmsCIExyY) : cmsBool; StdCall;\r
-\r
-\r
-// Chromatic adaptation\r
-FUNCTION cmsAdaptToIlluminant(Result: LPcmsCIEXYZ; SourceWhitePt: LPcmsCIEXYZ;\r
- Illuminant: LPcmsCIEXYZ; Value: LPcmsCIEXYZ): cmsBool; StdCall;\r
-\r
-\r
-// CIECAM02 ---------------------------------------------------------------------------------------------------\r
-\r
-// Viewing conditions. Please note those are CAM model viewing conditions, and not the ICC tag viewing\r
-// conditions, which I'm naming cmsICCViewingConditions to make differences evident. Unfortunately, the tag\r
-// cannot deal with surround La, Yb and D value so is basically useless to store CAM02 viewing conditions.\r
-\r
- CONST\r
-\r
- AVG_SURROUND = 1;\r
- DIM_SURROUND = 2;\r
- DARK_SURROUND = 3;\r
- CUTSHEET_SURROUND = 4;\r
-\r
- D_CALCULATE = -1;\r
-\r
- TYPE\r
-\r
- cmsViewingConditions = PACKED RECORD\r
-\r
- WhitePoint: cmsCIEXYZ;\r
- Yb : cmsFloat64Number;\r
- La : cmsFloat64Number;\r
- surround : Integer;\r
- D_value : cmsFloat64Number\r
- END;\r
-\r
-\r
- LPcmsViewingConditions = ^cmsViewingConditions;\r
- \r
-FUNCTION cmsCIECAM02Init(pVC : LPcmsViewingConditions ) : Pointer; StdCall;\r
-PROCEDURE cmsCIECAM02Done(hModel : Pointer); StdCall;\r
-PROCEDURE cmsCIECAM02Forward(hModel: Pointer; pIn: LPcmsCIEXYZ; pOut: LPcmsJCh ); StdCall;\r
-PROCEDURE cmsCIECAM02Reverse(hModel: Pointer; pIn: LPcmsJCh; pOut: LPcmsCIEXYZ ); StdCall;\r
-\r
-// Tone curves -----------------------------------------------------------------------------------------\r
-\r
-// This describes a curve segment. For a table of supported types, see the manual. User can increase the number of\r
-// available types by using a proper plug-in. Parametric segments allow 10 parameters at most\r
-\r
-TYPE \r
-cmsCurveSegment = PACKED RECORD\r
- x0, x1: cmsFloat32Number; // Domain; for x0 < x <= x1\r
- PType: cmsInt32Number; // Parametric type, Type == 0 means sampled segment. Negative values are reserved\r
- Params: array [0..9] of cmsFloat64Number; // Parameters if Type != 0\r
- nGridPoints: cmsUInt32Number; // Number of grid points if Type == 0\r
- SampledPoints: LPcmsFloat32Number; // Points to an array of floats if Type == 0\r
-END;\r
-\r
-LPcmsToneCurve = Pointer;\r
-LPcmsCurveSegmentArray = ^cmsCurveSegmentArray;\r
-cmsCurveSegmentArray = array[0..0] of cmsCurveSegment;\r
-\r
-LPcmsFloat64NumberArray = ^cmsFloat64NumberArray;\r
-cmsFloat64NumberArray = array[0..0] of cmsFloat64Number;\r
-\r
-LPcmsUInt16NumberArray = ^cmsUInt16NumberArray;\r
-cmsUInt16NumberArray = array[0..0] of cmsUInt16Number;\r
-\r
-LPcmsFloat32NumberArray = ^cmsFloat32NumberArray;\r
-cmsFloat32NumberArray = array[0..0] of cmsFloat32Number;\r
-\r
-LPLPcmsToneCurveArray = ^LPcmsToneCurveArray;\r
-LPcmsToneCurveArray = array[0..0] of LPcmsToneCurve;\r
-\r
-LPcmsUInt32NumberArray = ^cmsUInt32NumberArray;\r
-cmsUInt32NumberArray = array[0..0] of cmsUInt32Number;\r
-\r
-FUNCTION cmsBuildSegmentedToneCurve(ContextID: cmsContext; nSegments: cmsInt32Number; Segments: LPcmsCurveSegmentArray): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsBuildParametricToneCurve(ContextID: cmsContext; CType: cmsInt32Number; Params: LPcmsFloat64NumberArray): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsBuildGamma(ContextID: cmsContext; Gamma: cmsFloat64Number): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsBuildTabulatedToneCurve16(ContextID: cmsContext; nEntries: cmsInt32Number; values: LPcmsUInt16NumberArray): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsBuildTabulatedToneCurveFloat(ContextID: cmsContext; nEntries: cmsUInt32Number; values: LPcmsFloat32NumberArray): LPcmsToneCurve; StdCall;\r
-PROCEDURE cmsFreeToneCurve(Curve: LPcmsToneCurve); StdCall;\r
-PROCEDURE cmsFreeToneCurveTriple(Curve: LPLPcmsToneCurveArray); StdCall;\r
-FUNCTION cmsDupToneCurve(Src: LPcmsToneCurve): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsReverseToneCurve(InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsReverseToneCurveEx(nResultSamples: cmsInt32Number; InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsJoinToneCurve(ContextID: cmsContext; X, Y: LPcmsToneCurve; nPoints: cmsUInt32Number ): LPcmsToneCurve; StdCall;\r
-FUNCTION cmsSmoothToneCurve(Tab: LPcmsToneCurve; lambda: cmsFloat64Number): cmsBool; StdCall;\r
-FUNCTION cmsEvalToneCurveFloat(Curve: LPcmsToneCurve; v: cmsFloat32Number):cmsFloat32Number; StdCall;\r
-FUNCTION cmsEvalToneCurve16(Curve: LPcmsToneCurve; v:cmsUInt16Number):cmsUInt16Number; StdCall;\r
-FUNCTION cmsIsToneCurveMultisegment(InGamma: LPcmsToneCurve):cmsBool; StdCall;\r
-FUNCTION cmsIsToneCurveLinear(Curve: LPcmsToneCurve):cmsBool; StdCall;\r
-FUNCTION cmsIsToneCurveMonotonic(t: LPcmsToneCurve):cmsBool; StdCall;\r
-FUNCTION cmsIsToneCurveDescending(t: LPcmsToneCurve):cmsBool; StdCall;\r
-FUNCTION cmsGetToneCurveParametricType(t: LPcmsToneCurve):cmsInt32Number; StdCall;\r
-FUNCTION cmsEstimateGamma(t: LPcmsToneCurve; Precision:cmsFloat64Number):cmsFloat64Number; StdCall;\r
-\r
-\r
-// Implements pipelines of multi-processing elements -------------------------------------------------------------\r
-\r
-TYPE\r
- LPcmsPipeline = Pointer;\r
- LPcmsStage = Pointer;\r
- LPLPcmsStage = ^LPcmsStage;\r
- \r
-// Those are hi-level pipelines\r
-FUNCTION cmsPipelineAlloc(ContextID: cmsContext; InputChannels, OutputChannels: cmsUInt32Number): LPcmsPipeline; StdCall;\r
-PROCEDURE cmsPipelineFree(lut: LPcmsPipeline); StdCall;\r
-FUNCTION cmsPipelineDup(Orig: LPcmsPipeline): LPcmsPipeline; StdCall; \r
-FUNCTION cmsPipelineInputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall;\r
-FUNCTION cmsPipelineOutputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall;\r
-\r
-FUNCTION cmsPipelineStageCount(lut: LPcmsPipeline): cmsUInt32Number; StdCall;\r
-FUNCTION cmsPipelineGetPtrToFirstStage(lut: LPcmsPipeline): LPcmsStage; StdCall;\r
-FUNCTION cmsPipelineGetPtrToLastStage(lut: LPcmsPipeline): LPcmsStage; StdCall;\r
-\r
-PROCEDURE cmsPipelineEval16(Inv, Outv: LPcmsUInt16NumberArray; lut: LPcmsPipeline); StdCall;\r
-PROCEDURE cmsPipelineEvalFloat(Inv, Outv: LPcmsFloat32NumberArray; lut: LPcmsPipeline); StdCall;\r
-\r
-FUNCTION cmsPipelineEvalReverseFloat(Target, Result, Hint: LPcmsFloat32NumberArray; lut: LPcmsPipeline): cmsBool; StdCall;\r
-FUNCTION cmsPipelineCat(l1, l2: LPcmsPipeline): cmsBool; StdCall;\r
-FUNCTION cmsPipelineSetSaveAs8bitsFlag(lut: LPcmsPipeline; On: cmsBool): cmsBool; StdCall;\r
-\r
-// Where to place/locate the stages in the pipeline chain\r
-TYPE\r
- cmsStageLoc = (cmsAT_BEGIN = 0, cmsAT_END = 1 );\r
-\r
-PROCEDURE cmsPipelineInsertStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPcmsStage); StdCall;\r
-PROCEDURE cmsPipelineUnlinkStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPLPcmsStage); StdCall;\r
-\r
-// This function is quite useful to analyze the structure of a Pipeline and retrieve the Stage elements\r
-// that conform the Pipeline. It should be called with the Pipeline, the number of expected elements and\r
-// then a list of expected types followed with a list of double pointers to Stage elements. If\r
-// the function founds a match with current pipeline, it fills the pointers and returns TRUE\r
-// if not, returns FALSE without touching anything.\r
-// FUNCTION cmsPipelineCheckAndRetreiveStages(const cmsPipeline* Lut, n: cmsUInt32Number, ...): cmsBool; StdCall;\r
-\r
-// Matrix has double precision and CLUT has only float precision. That is because an ICC profile can encode\r
-// matrices with far more precision that CLUTS\r
-FUNCTION cmsStageAllocIdentity(ContextID: cmsContext; nChannels: cmsUInt32Number): LPcmsStage; StdCall;\r
-FUNCTION cmsStageAllocToneCurves(ContextID: cmsContext; nChannels: cmsUInt32Number; Curves: LPLPcmsToneCurveArray): LPcmsStage; StdCall;\r
-FUNCTION cmsStageAllocMatrix(ContextID: cmsContext; Rows, Cols: cmsUInt32Number; Matrix, Offset: LPcmsFloat64NumberArray): LPcmsStage; StdCall;\r
-\r
-FUNCTION cmsStageAllocCLut16bit(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall;\r
-FUNCTION cmsStageAllocCLutFloat(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall;\r
-\r
-FUNCTION cmsStageAllocCLut16bitGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall;\r
-FUNCTION cmsStageAllocCLutFloatGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall;\r
-\r
-\r
-FUNCTION cmsStageDup(mpe: LPcmsStage): LPcmsStage; StdCall;\r
-PROCEDURE cmsStageFree(mpe: LPcmsStage); StdCall;\r
-FUNCTION cmsStageNext(mpe: LPcmsStage): LPcmsStage; StdCall;\r
-\r
-FUNCTION cmsStageInputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall;\r
-FUNCTION cmsStageOutputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall;\r
-FUNCTION cmsStageType(mpe: LPcmsStage): cmsStageSignature; StdCall;\r
-FUNCTION cmsStageData(mpe: LPcmsStage): Pointer; StdCall;\r
-\r
-// Sampling\r
- \r
-Type\r
- cmsSAMPLER16 = FUNCTION (Inp, Outp: LPcmsUInt16NumberArray; Cargo: Pointer): cmsInt32Number; CDecl;\r
- cmsSAMPLERFLOAT = FUNCTION (Inp, Outp: LPcmsFloat32NumberArray; Cargo: Pointer): cmsInt32Number; CDecl;\r
-\r
-// Use this flag to prevent changes being written to destination\r
-\r
-Const\r
-\r
-SAMPLER_INSPECT = $01000000;\r
-\r
-\r
-// For CLUT only\r
-FUNCTION cmsStageSampleCLut16bit(mpe: LPcmsStage; Sampler: cmsSAMPLER16; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall;\r
-FUNCTION cmsStageSampleCLutFloat(mpe: LPcmsStage; Sampler: cmsSAMPLERFLOAT; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall;\r
-\r
-\r
-// Slicers\r
-FUNCTION cmsSliceSpace16(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;\r
- Sampler: cmsSAMPLER16; Cargo: Pointer): cmsBool; StdCall;\r
-\r
-FUNCTION cmsSliceSpaceFloat(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;\r
- Sampler: cmsSAMPLERFLOAT; Cargo: Pointer): cmsBool; StdCall;\r
-\r
-// Multilocalized Unicode management ---------------------------------------------------------------------------------------\r
-\r
-Type\r
- LPcmsMLU = Pointer;\r
-\r
-Const\r
-\r
-cmsNoLanguage = #0#0#0;\r
-cmsNoCountry = #0#0#0;\r
-\r
-\r
-FUNCTION cmsMLUalloc(ContextID: cmsContext; nItems: cmsUInt32Number): LPcmsMLU; StdCall; \r
-PROCEDURE cmsMLUfree(mlu: LPcmsMLU); StdCall;\r
-FUNCTION cmsMLUdup(mlu: LPcmsMLU): LPcmsMLU; StdCall; \r
-\r
-FUNCTION cmsMLUsetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode, ASCIIString: PAnsiChar): cmsBool; StdCall;\r
-FUNCTION cmsMLUsetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; WideString: PWChar): cmsBool; StdCall;\r
-\r
-FUNCTION cmsMLUgetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;\r
-\r
-FUNCTION cmsMLUgetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;\r
- \r
-FUNCTION cmsMLUgetTranslation(mlu: LPcmsMLU; LanguageCode, CountryCode, ObtainedLanguage, ObtainedCountry: PAnsiChar): cmsBool; StdCall;\r
-\r
-// Undercolorremoval & black generation -------------------------------------------------------------------------------------\r
-\r
-Type\r
-\r
-cmsUcrBg = PACKED RECORD\r
- Ucr, Bg: LPcmsToneCurve;\r
- Desc: LPcmsMLU;\r
- END;\r
-\r
-\r
-// Screening ----------------------------------------------------------------------------------------------------------------\r
-\r
-Const\r
-\r
- cmsPRINTER_DEFAULT_SCREENS = $0001;\r
- cmsFREQUENCE_UNITS_LINES_CM = $0000;\r
- cmsFREQUENCE_UNITS_LINES_INCH = $0002;\r
-\r
- cmsSPOT_UNKNOWN = 0;\r
- cmsSPOT_PRINTER_DEFAULT = 1;\r
- cmsSPOT_ROUND = 2;\r
- cmsSPOT_DIAMOND = 3;\r
- cmsSPOT_ELLIPSE = 4;\r
- cmsSPOT_LINE = 5;\r
- cmsSPOT_SQUARE = 6;\r
- cmsSPOT_CROSS = 7;\r
- \r
-\r
-Type\r
-\r
-cmsScreeningChannel = PACKED RECORD\r
-\r
- Frequency, \r
- ScreenAngle: cmsFloat64Number;\r
- SpotShape: cmsUInt32Number;\r
-\r
-END;\r
-\r
-cmsScreening = PACKED RECORD\r
-\r
- Flag,\r
- nChannels : cmsUInt32Number;\r
- Channels: Array [0..cmsMAXCHANNELS-1] OF cmsScreeningChannel;\r
-END;\r
-\r
-\r
-// Named color -----------------------------------------------------------------------------------------------------------------\r
-\r
-\r
-LPcmsNAMEDCOLORLIST = Pointer;\r
-\r
-FUNCTION cmsAllocNamedColorList(ContextID: cmsContext; n, ColorantCount :cmsUInt32Number;\r
- Prefix, Suffix: PAnsiChar): LPcmsNAMEDCOLORLIST; StdCall;\r
-\r
-PROCEDURE cmsFreeNamedColorList(v: LPcmsNAMEDCOLORLIST); StdCall;\r
-FUNCTION cmsDupNamedColorList(v: LPcmsNAMEDCOLORLIST): LPcmsNAMEDCOLORLIST; StdCall;\r
-FUNCTION cmsAppendNamedColor(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar;\r
- PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall;\r
-\r
-FUNCTION cmsNamedColorCount(v: LPcmsNAMEDCOLORLIST): cmsUInt32Number; StdCall;\r
-FUNCTION cmsNamedColorIndex(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar): cmsInt32Number; StdCall;\r
-\r
-FUNCTION cmsNamedColorInfo(v: LPcmsNAMEDCOLORLIST; nColor : cmsUInt32Number;\r
- Name,Prefix, Suffix : PAnsiChar;\r
- PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall;\r
-\r
-// Retrieve named color list from transform\r
-FUNCTION cmsGetNamedColorList(xform: cmsHTRANSFORM ): LPcmsNAMEDCOLORLIST; StdCall;\r
-\r
-// Profile sequence -----------------------------------------------------------------------------------------------------\r
-\r
-Type\r
-\r
-// Profile sequence descriptor. Some fields come from profile sequence descriptor tag, others\r
-// come from Profile Sequence Identifier Tag\r
-\r
-cmsPSEQDESC = PACKED RECORD\r
- deviceMfg, deviceModel: cmsSignature;\r
- \r
- attributes: cmsUInt64Number;\r
- technology: cmsTechnologySignature;\r
- ProfileID: cmsProfileID;\r
- Manufacturer, \r
- Model, \r
- Description : LPcmsMLU;\r
- END;\r
-\r
- LPcmsSEQDESC = ^cmsPSEQDESC;\r
-\r
-cmsSEQ = PACKED RECORD\r
-\r
- n: cmsUInt32Number;\r
- ContextID: cmsContext;\r
- seq: LPcmsSEQDESC;\r
-END;\r
-\r
-LPcmsSEQ = ^cmsSEQ;\r
-\r
-FUNCTION cmsAllocProfileSequenceDescription(ContextID: cmsContext; n: cmsUInt32Number):LPcmsSEQ; StdCall;\r
-FUNCTION cmsDupProfileSequenceDescription(pseq: LPcmsSEQ):LPcmsSEQ; StdCall;\r
-PROCEDURE cmsFreeProfileSequenceDescription(pseq: LPcmsSEQ); StdCall;\r
-\r
-// Dictionaries --------------------------------------------------------------------------------------------------------\r
-\r
-TYPE\r
-\r
- LPcmsDICTentry = ^cmsDICTentry;\r
-\r
-cmsDICTentry = PACKED RECORD \r
-\r
- Next: LPcmsDICTentry;\r
-\r
- DisplayName, DisplayValue: LPcmsMLU; \r
- Name, Value : PWChar;\r
-END;\r
-\r
-FUNCTION cmsDictAlloc(ContextID: cmsContext): cmsHANDLE; StdCall;\r
-PROCEDURE cmsDictFree(hDict: cmsHANDLE); StdCall;\r
-FUNCTION cmsDictDup(hDict: cmsHANDLE): cmsHANDLE; StdCall;\r
-\r
-FUNCTION cmsDictAddEntry(hDict: cmsHANDLE; Name, Value: PWChar; DisplayName, DisplayValue : LPcmsMLU): cmsBool; StdCall;\r
-FUNCTION cmsDictGetEntryList(hDict: cmsHANDLE): LPcmsDICTentry; StdCall;\r
-FUNCTION cmsDictNextEntry(e : LPcmsDICTentry): LPcmsDICTentry; StdCall;\r
-\r
-// Access to Profile data ----------------------------------------------------------------------------------------------\r
-FUNCTION cmsCreateProfilePlaceholder(ContextID: cmsContext): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsGetProfileContextID(hProfile: cmsHPROFILE):cmsContext; StdCall;\r
-FUNCTION cmsGetTagCount(hProfile: cmsHPROFILE): cmsInt32Number; StdCall;\r
-FUNCTION cmsGetTagSignature(hProfile: cmsHPROFILE; n: cmsUInt32Number): cmsTagSignature; StdCall;\r
-FUNCTION cmsIsTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): cmsBool; StdCall;\r
-\r
-// Read and write pre-formatted data\r
-FUNCTION cmsReadTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): Pointer; StdCall;\r
-FUNCTION cmsWriteTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer): cmsBool; StdCall;\r
-FUNCTION cmsLinkTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; dest: cmsTagSignature): cmsBool; StdCall;\r
-FUNCTION cmsTagLinkedTo(hProfile: cmsHPROFILE; sig: cmsTagSignature):cmsTagSignature; StdCall;\r
-\r
-// Read and write raw data\r
-FUNCTION cmsReadRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; Buffer: Pointer; BufferSize: cmsUInt32Number): cmsInt32Number; StdCall;\r
-FUNCTION cmsWriteRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer; Size: cmsUInt32Number): cmsBool; StdCall;\r
-\r
-// Access header data\r
-Const\r
-\r
- cmsEmbeddedProfileFalse = $00000000;\r
- cmsEmbeddedProfileTrue = $00000001;\r
- cmsUseAnywhere = $00000000;\r
- cmsUseWithEmbeddedDataOnly = $00000002;\r
-\r
-FUNCTION cmsGetHeaderFlags(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;\r
-PROCEDURE cmsGetHeaderAttributes(hProfile: cmsHPROFILE; Flags: LPcmsUInt64Number); StdCall;\r
-PROCEDURE cmsGetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall;\r
-\r
-// TODO:\r
-// FUNCTION cmsGetHeaderCreationDateTime(hProfile: cmsHPROFILE; struct tm *Dest): cmsBool; StdCall;\r
-\r
-FUNCTION cmsGetHeaderRenderingIntent(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;\r
-PROCEDURE cmsSetHeaderFlags(hProfile: cmsHPROFILE; Flags: cmsUInt32Number); StdCall;\r
-FUNCTION cmsGetHeaderManufacturer(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;\r
-PROCEDURE cmsSetHeaderManufacturer(hProfile: cmsHPROFILE; manufacturer: cmsUInt32Number ); StdCall;\r
-FUNCTION cmsGetHeaderModel(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;\r
-PROCEDURE cmsSetHeaderModel(hProfile: cmsHPROFILE; model: cmsUInt32Number ); StdCall;\r
-PROCEDURE cmsSetHeaderAttributes(hProfile: cmsHPROFILE; Flags: cmsUInt64Number); StdCall;\r
-PROCEDURE cmsSetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall;\r
-PROCEDURE cmsSetHeaderRenderingIntent(hProfile: cmsHPROFILE; RenderingIntent: cmsUInt32Number ); StdCall;\r
-\r
-FUNCTION cmsGetPCS(hProfile: cmsHPROFILE):cmsColorSpaceSignature; StdCall;\r
-PROCEDURE cmsSetPCS(hProfile: cmsHPROFILE; pcs: cmsColorSpaceSignature); StdCall;\r
-FUNCTION cmsGetColorSpace(hProfile: cmsHPROFILE): cmsColorSpaceSignature; StdCall;\r
-PROCEDURE cmsSetColorSpace(hProfile: cmsHPROFILE; sig: cmsColorSpaceSignature); StdCall;\r
-FUNCTION cmsGetDeviceClass(hProfile: cmsHPROFILE): cmsProfileClassSignature; StdCall;\r
-PROCEDURE cmsSetDeviceClass(hProfile: cmsHPROFILE; sig: cmsProfileClassSignature); StdCall;\r
-PROCEDURE cmsSetProfileVersion(hProfile: cmsHPROFILE; Version: cmsFloat64Number); StdCall;\r
-FUNCTION cmsGetProfileVersion(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall;\r
-\r
-FUNCTION cmsGetEncodedICCversion(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;\r
-PROCEDURE cmsSetEncodedICCversion(hProfile: cmsHPROFILE; Version: cmsUInt32Number); StdCall;\r
-\r
-\r
-Const\r
-\r
- // How profiles may be used\r
- LCMS_USED_AS_INPUT = 0;\r
- LCMS_USED_AS_OUTPUT = 1;\r
- LCMS_USED_AS_PROOF = 2;\r
-\r
-FUNCTION cmsIsIntentSupported(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall;\r
-FUNCTION cmsIsMatrixShaper(hProfile: cmsHPROFILE): cmsBool; StdCall;\r
-FUNCTION cmsIsCLUT(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall;\r
-\r
-// Translate form/to our notation to ICC\r
-FUNCTION _cmsICCcolorSpace(OurNotation: Integer): cmsColorSpaceSignature; StdCall;\r
-FUNCTION _cmsLCMScolorSpace(ProfileSpace: cmsColorSpaceSignature): Integer; StdCall;\r
-\r
-FUNCTION cmsChannelsOf( ColorSpace: cmsColorSpaceSignature): cmsUInt32Number; StdCall;\r
-\r
-// Build a suitable formatter for the colorspace of this profile\r
-FUNCTION cmsFormatterForColorspaceOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall;\r
-FUNCTION cmsFormatterForPCSOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall;\r
-\r
-Type\r
-\r
-// Localized info\r
-cmsInfoType = (\r
- cmsInfoDescription = 0,\r
- cmsInfoManufacturer = 1,\r
- cmsInfoModel = 2,\r
- cmsInfoCopyright = 3\r
-);\r
-\r
-FUNCTION cmsGetProfileInfo(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;\r
- Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;\r
-\r
-FUNCTION cmsGetProfileInfoASCII(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;\r
- Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;\r
-\r
-// IO handlers ----------------------------------------------------------------------------------------------------------\r
-\r
-Type\r
-\r
-LPcmsIOHANDLER = Pointer;\r
-\r
-FUNCTION cmsOpenIOhandlerFromFile(ContextID: cmsContext; FileName, AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall;\r
-// FUNCTION cmsOpenIOhandlerFromStream(ContextID: cmsContext; FILE* Stream): LPcmsIOHANDLER; StdCall;\r
-FUNCTION cmsOpenIOhandlerFromMem(ContextID: cmsContext; Buffer: Pointer; size: cmsUInt32Number; AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall;\r
-FUNCTION cmsOpenIOhandlerFromNULL(ContextID: cmsContext): LPcmsIOHANDLER; StdCall;\r
-FUNCTION cmsCloseIOhandler(io: LPcmsIOHANDLER): cmsBool; StdCall;\r
-\r
-// MD5 message digest --------------------------------------------------------------------------------------------------\r
-\r
-FUNCTION cmsMD5computeID(hProfile: cmsHPROFILE): cmsBool; StdCall;\r
-\r
-// Profile high level funtions ------------------------------------------------------------------------------------------\r
-\r
-FUNCTION cmsOpenProfileFromFile(ICCProfile : PAnsiChar; sAccess: PAnsiChar): cmsHPROFILE; StdCall;\r
-FUNCTION cmsOpenProfileFromFileTHR(ContextID: cmsContext; ICCProfile, sAccess: PAnsiChar): cmsHPROFILE; StdCall;\r
-// FUNCTION CMSEXPORT cmsOpenProfileFromStream(FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall;\r
-// FUNCTION CMSEXPORT cmsOpenProfileFromStreamTHR(ContextID: cmsContext; FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall;\r
-FUNCTION cmsOpenProfileFromMem(MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall;\r
-FUNCTION cmsOpenProfileFromMemTHR(ContextID: cmsContext; MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall;\r
-FUNCTION cmsOpenProfileFromIOhandlerTHR(ContextID: cmsContext; io: LPcmsIOHANDLER): cmsHPROFILE; StdCall;\r
-FUNCTION cmsCloseProfile(hProfile: cmsHPROFILE): cmsBool; StdCall;\r
-\r
-FUNCTION cmsSaveProfileToFile(hProfile: cmsHPROFILE; FileName: PAnsiChar): cmsBool; StdCall;\r
-// FUNCTION CMSEXPORT cmsSaveProfileToStream(hProfile: cmsHPROFILE, FILE* Stream): cmsBool; StdCall;\r
-FUNCTION cmsSaveProfileToMem(hProfile: cmsHPROFILE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall;\r
-FUNCTION cmsSaveProfileToIOhandler(hProfile: cmsHPROFILE; io: LPcmsIOHANDLER):cmsUInt32Number; StdCall;\r
-\r
-// Predefined virtual profiles ------------------------------------------------------------------------------------------\r
-\r
-FUNCTION cmsCreateRGBProfileTHR(ContextID: cmsContext;\r
- WhitePoint: LPcmsCIExyY;\r
- Primaries: LPcmsCIExyYTRIPLE;\r
- TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateRGBProfile(WhitePoint: LPcmsCIExyY;\r
- Primaries: LPcmsCIExyYTRIPLE;\r
- TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateGrayProfileTHR(ContextID: cmsContext;\r
- WhitePoint: LPcmsCIExyY;\r
- TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateGrayProfile(WhitePoint: LPcmsCIExyY;\r
- TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateLinearizationDeviceLinkTHR(ContextID: cmsContext;\r
- ColorSpace: cmsColorSpaceSignature;\r
- TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateLinearizationDeviceLink(ColorSpace: cmsColorSpaceSignature;\r
- TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateInkLimitingDeviceLinkTHR(ContextID: cmsContext;\r
- ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateInkLimitingDeviceLink(ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall;\r
-\r
-\r
-FUNCTION cmsCreateLab2ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;\r
-FUNCTION cmsCreateLab2Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;\r
-FUNCTION cmsCreateLab4ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;\r
-FUNCTION cmsCreateLab4Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateXYZProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall;\r
-FUNCTION cmsCreateXYZProfile: cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreate_sRGBProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall;\r
-FUNCTION cmsCreate_sRGBProfile: cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateBCHSWabstractProfileTHR(ContextID: cmsContext;\r
- nLUTPoints: Integer;\r
- Bright,\r
- Contrast,\r
- Hue,\r
- Saturation: cmsFloat64Number;\r
- TempSrc,\r
- TempDest: Integer): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateBCHSWabstractProfile( nLUTPoints: Integer;\r
- Bright,\r
- Contrast,\r
- Hue,\r
- Saturation: cmsFloat64Number;\r
- TempSrc,\r
- TempDest: Integer): cmsHPROFILE; StdCall;\r
-\r
-FUNCTION cmsCreateNULLProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall;\r
-FUNCTION cmsCreateNULLProfile: cmsHPROFILE; StdCall;\r
-\r
-// Converts a transform to a devicelink profile\r
-FUNCTION cmsTransform2DeviceLink(hTransform: cmsHTRANSFORM; Version: cmsFloat64Number; dwFlags: cmsUInt32Number): cmsHPROFILE; StdCall;\r
-\r
-// Intents ----------------------------------------------------------------------------------------------\r
-\r
-Const\r
-\r
-// ICC Intents\r
-INTENT_PERCEPTUAL = 0;\r
-INTENT_RELATIVE_COLORIMETRIC = 1;\r
-INTENT_SATURATION = 2;\r
-INTENT_ABSOLUTE_COLORIMETRIC = 3;\r
-\r
-// Non-ICC intents\r
-INTENT_PRESERVE_K_ONLY_PERCEPTUAL = 10;\r
-INTENT_PRESERVE_K_ONLY_RELATIVE_COLORIMETRIC = 11;\r
-INTENT_PRESERVE_K_ONLY_SATURATION = 12;\r
-INTENT_PRESERVE_K_PLANE_PERCEPTUAL = 13;\r
-INTENT_PRESERVE_K_PLANE_RELATIVE_COLORIMETRIC = 14;\r
-INTENT_PRESERVE_K_PLANE_SATURATION = 15;\r
- \r
-Type\r
-LPPAnsiChar = ^PAnsiChar;\r
-\r
-// Call with NULL as parameters to get the intent count\r
-FUNCTION cmsGetSupportedIntents(nMax: cmsUInt32Number; Codes: LPcmsUInt32Number; Descriptions: LPPAnsiChar): cmsUInt32Number; StdCall;\r
-\r
-Const\r
-\r
-// Flags\r
-\r
-cmsFLAGS_NOCACHE = $0040; // Inhibit 1-pixel cache\r
-cmsFLAGS_NOOPTIMIZE = $0100; // Inhibit optimizations\r
-cmsFLAGS_NULLTRANSFORM = $0200; // Don't transform anyway\r
-\r
-// Proofing flags\r
-cmsFLAGS_GAMUTCHECK = $1000; // Out of Gamut alarm\r
-cmsFLAGS_SOFTPROOFING = $4000; // Do softproofing\r
-\r
-// Misc\r
-cmsFLAGS_BLACKPOINTCOMPENSATION = $2000;\r
-cmsFLAGS_NOWHITEONWHITEFIXUP = $0004; // Don't fix scum dot\r
-cmsFLAGS_HIGHRESPRECALC = $0400; // Use more memory to give better accurancy\r
-cmsFLAGS_LOWRESPRECALC = $0800; // Use less memory to minimize resouces\r
-\r
-// For devicelink creation\r
-cmsFLAGS_8BITS_DEVICELINK = $0008; // Create 8 bits devicelinks\r
-cmsFLAGS_GUESSDEVICECLASS = $0020; // Guess device class (for transform2devicelink)\r
-cmsFLAGS_KEEP_SEQUENCE = $0080; // Keep profile sequence for devicelink creation\r
-\r
-// Specific to a particular optimizations\r
-cmsFLAGS_FORCE_CLUT = $0002; // Force CLUT optimization\r
-cmsFLAGS_CLUT_POST_LINEARIZATION = $0001; // create postlinearization tables if possible\r
-cmsFLAGS_CLUT_PRE_LINEARIZATION = $0010; // create prelinearization tables if possible\r
-\r
-// CRD special\r
-cmsFLAGS_NODEFAULTRESOURCEDEF = $01000000;\r
-\r
-// Fine-tune control over number of gridpoints\r
-FUNCTION cmsFLAGS_GRIDPOINTS(n: Integer): Integer;\r
-\r
-\r
-// Transforms ---------------------------------------------------------------------------------------------------\r
-\r
-type\r
- LPcmsHPROFILEArray = ^cmsHPROFILEArray;\r
- cmsHPROFILEArray = array[0..0] of cmsHPROFILE;\r
-\r
- LPcmsBoolArray = ^cmsBoolArray;\r
- cmsBoolArray = array[0..0] of cmsBool;\r
-\r
-FUNCTION cmsCreateTransformTHR(ContextID: cmsContext;\r
- Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;\r
-\r
-FUNCTION cmsCreateTransform(Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;\r
-\r
-FUNCTION cmsCreateProofingTransformTHR(ContextID: cmsContext;\r
- Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Proofing: cmsHPROFILE;\r
- Intent: cmsUInt32Number;\r
- ProofingIntent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;\r
-\r
-FUNCTION cmsCreateProofingTransform(Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Proofing: cmsHPROFILE;\r
- Intent: cmsUInt32Number;\r
- ProofingIntent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;\r
-\r
-FUNCTION cmsCreateMultiprofileTransformTHR(ContextID: cmsContext;\r
- hProfiles: LPcmsHPROFILEArray;\r
- nProfiles: cmsUInt32Number;\r
- InputFormat: cmsUInt32Number;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;\r
-\r
-\r
-FUNCTION cmsCreateMultiprofileTransform( hProfiles: LPcmsHPROFILEArray;\r
- nProfiles: cmsUInt32Number;\r
- InputFormat: cmsUInt32Number;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;\r
-\r
-\r
-FUNCTION cmsCreateExtendedTransform(ContextID: cmsContext;\r
- nProfiles: cmsUInt32Number;\r
- hProfiles: LPcmsHPROFILEArray;\r
- BPC: LPcmsBoolArray;\r
- Intents: LPcmsUInt32NumberArray;\r
- AdaptationStates: LPcmsFloat64NumberArray;\r
- hGamutProfile: cmsHPROFILE;\r
- nGamutPCSposition: cmsUInt32Number;\r
- InputFormat,\r
- OutputFormat: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;\r
-\r
-PROCEDURE cmsDeleteTransform(hTransform: cmsHTRANSFORM); StdCall;\r
-\r
-PROCEDURE cmsDoTransform(Transform: cmsHTRANSFORM; InputBuffer, OutputBuffer: Pointer; size: cmsUInt32Number); StdCall;\r
-\r
-PROCEDURE cmsSetAlarmCodes( NewAlarm: LPcmsUInt16NumberArray); StdCall;\r
-PROCEDURE cmsGetAlarmCodes(NewAlarm: LPcmsUInt16NumberArray); StdCall;\r
-\r
-// Adaptation state for absolute colorimetric intent\r
-FUNCTION cmsSetAdaptationState(d: cmsFloat64Number):cmsFloat64Number; StdCall;\r
-\r
-// Grab the ContextID from an open transform. Returns NULL if a NULL transform is passed\r
-FUNCTION cmsGetTransformContextID(hTransform: cmsHTRANSFORM):cmsContext; StdCall;\r
-\r
-// For backwards compatibility\r
-FUNCTION cmsChangeBuffersFormat(hTransform: cmsHTRANSFORM; InputFormat, OutputFormat: cmsUInt32Number): cmsBool; StdCall;\r
-\r
-\r
-\r
-// PostScript ColorRenderingDictionary and ColorSpaceArray ----------------------------------------------------\r
-\r
-Type\r
-\r
-cmsPSResourceType = (cmsPS_RESOURCE_CSA, cmsPS_RESOURCE_CRD ) ;\r
-\r
-// lcms2 unified method to access postscript color resources\r
-FUNCTION cmsGetPostScriptColorResource(ContextID: cmsContext; RType: cmsPSResourceType;\r
- hProfile: cmsHPROFILE;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number;\r
- io: LPcmsIOHANDLER): cmsUInt32Number; StdCall;\r
-\r
-FUNCTION cmsGetPostScriptCSA(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number ): cmsUInt32Number; StdCall;\r
-FUNCTION cmsGetPostScriptCRD(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number): cmsUInt32Number; StdCall;\r
-\r
-\r
-// IT8.7 / CGATS.17-20$ handling -----------------------------------------------------------------------------\r
-\r
-\r
-// CGATS.13 parser\r
-\r
-FUNCTION cmsIT8Alloc: cmsHANDLE; StdCall;\r
-PROCEDURE cmsIT8Free(hIT8: cmsHANDLE); StdCall;\r
-\r
-// Tables\r
-\r
-FUNCTION cmsIT8TableCount(hIT8: cmsHANDLE): Integer; StdCall;\r
-FUNCTION cmsIT8SetTable(hIT8: cmsHANDLE; nTable: Integer): Integer; StdCall;\r
-\r
-// Persistence\r
-FUNCTION cmsIT8LoadFromFile(cFileName: PAnsiChar): cmsHANDLE; StdCall;\r
-FUNCTION cmsIT8LoadFromMem(Ptr: Pointer; size :DWord): cmsHANDLE; StdCall;\r
-\r
-FUNCTION cmsIT8SaveToFile(hIT8: cmsHANDLE; cFileName: PAnsiChar): cmsBool; StdCall;\r
-FUNCTION cmsIT8SaveToMem(hIT8: cmsHANDLE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall;\r
-// Properties\r
-\r
-FUNCTION cmsIT8GetSheetType(hIT8: cmsHANDLE): PAnsiChar; StdCall;\r
-FUNCTION cmsIT8SetSheetType(hIT8: cmsHANDLE; TheType: PAnsiChar): cmsBool; StdCall;\r
-\r
-FUNCTION cmsIT8SetComment(hIT8: cmsHANDLE; cComment: PAnsiChar): cmsBool; StdCall;\r
-\r
-FUNCTION cmsIT8SetPropertyStr(hIT8: cmsHANDLE; cProp, Str: PAnsiChar): cmsBool; StdCall;\r
-FUNCTION cmsIT8SetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Double): cmsBool; StdCall;\r
-FUNCTION cmsIT8SetPropertyHex(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Integer): cmsBool; StdCall;\r
-FUNCTION cmsIT8SetPropertyUncooked(hIT8: cmsHANDLE; Key, Buffer: PAnsiChar): cmsBool; StdCall;\r
-\r
-\r
-FUNCTION cmsIT8GetProperty(hIT8: cmsHANDLE; cProp: PAnsiChar): PAnsiChar; StdCall;\r
-FUNCTION cmsIT8GetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar): Double; StdCall;\r
-FUNCTION cmsIT8EnumProperties(hIT8: cmsHANDLE; var PropertyNames: LPPAnsiChar): Integer; StdCall;\r
-\r
-// Datasets\r
-\r
-FUNCTION cmsIT8GetDataRowCol(hIT8: cmsHANDLE; row, col: Integer): PAnsiChar; StdCall;\r
-FUNCTION cmsIT8GetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer): Double; StdCall;\r
-\r
-FUNCTION cmsIT8SetDataRowCol(hIT8: cmsHANDLE; row, col: Integer; Val: PAnsiChar): cmsBool; StdCall;\r
-FUNCTION cmsIT8SetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer; Val: Double): cmsBool; StdCall;\r
-\r
-FUNCTION cmsIT8GetData(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar): PAnsiChar; StdCall;\r
-\r
-FUNCTION cmsIT8GetDataDbl(hIT8: cmsHANDLE;cPatch, cSample: PAnsiChar): Double; StdCall;\r
-\r
-FUNCTION cmsIT8SetData(hIT8: cmsHANDLE; cPatch, cSample, Val: PAnsiChar): cmsBool; StdCall;\r
-\r
-FUNCTION cmsIT8SetDataDbl(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar; Val: Double): cmsBool; StdCall;\r
-\r
-FUNCTION cmsIT8SetDataFormat(hIT8: cmsHANDLE; n: Integer; Sample: PAnsiChar): cmsBool; StdCall;\r
-FUNCTION cmsIT8EnumDataFormat(hIT8: cmsHANDLE; var SampleNames: LPPAnsiChar): Integer; StdCall;\r
-FUNCTION cmsIT8GetPatchName(hIT8: cmsHANDLE; nPatch: Integer; Buffer: PAnsiChar): PAnsiChar; StdCall;\r
-\r
-// The LABEL extension\r
-FUNCTION cmsIT8SetTableByLabel(hIT8: cmsHANDLE; cSet, cField, ExpectedType: PAnsiChar): Integer; StdCall;\r
-\r
-FUNCTION cmsIT8FindDataFormat(hIT8: cmsHANDLE; cSample: PAnsiChar): Integer; StdCall;\r
-\r
-// Formatter for double\r
-PROCEDURE cmsIT8DefineDblFormat(hIT8: cmsHANDLE; Formatter: PAnsiChar); StdCall;\r
-\r
-// Gamut boundary description routines ------------------------------------------------------------------------------\r
-\r
-FUNCTION cmsGBDAlloc(ContextID: cmsContext):cmsHANDLE; StdCall;\r
-PROCEDURE cmsGBDFree(hGBD: cmsHANDLE); StdCall;\r
-FUNCTION cmsGDBAddPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall;\r
-FUNCTION cmsGDBCompute(hGDB: cmsHANDLE; dwFlags: cmsUInt32Number): cmsBool; StdCall;\r
-FUNCTION cmsGDBCheckPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall;\r
-\r
-// Feature detection ----------------------------------------------------------------------------------------------\r
-\r
-// Estimate the black point\r
-FUNCTION cmsDetectBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall;\r
-FUNCTION cmsDetectDestinationBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall;\r
-\r
-\r
-// Estimate total area coverage\r
-FUNCTION cmsDetectTAC(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall;\r
-\r
-\r
-// Poor man's gamut mapping\r
-FUNCTION cmsDesaturateLab(Lab: LPcmsCIELab; amax, amin, bmax, bmin: cmsFloat64Number): cmsBool; StdCall;\r
- \r
-\r
-IMPLEMENTATION\r
-\r
-\r
-\r
- FUNCTION FLOAT_SH(a: cmsUInt32Number): cmsUInt32Number; begin FLOAT_SH := ((a) shl 22) end;\r
- FUNCTION OPTIMIZED_SH(s: cmsUInt32Number): cmsUInt32Number; begin OPTIMIZED_SH := ((s) shl 21) end;\r
- FUNCTION COLORSPACE_SH(s: cmsUInt32Number):cmsUInt32Number; begin COLORSPACE_SH := ((s) shl 16) end;\r
- FUNCTION SWAPFIRST_SH(s: cmsUInt32Number):cmsUInt32Number; begin SWAPFIRST_SH := ((s) shl 14) end;\r
- FUNCTION FLAVOR_SH(s: cmsUInt32Number):cmsUInt32Number; begin FLAVOR_SH := ((s) shl 13) end;\r
- FUNCTION PLANAR_SH(p: cmsUInt32Number):cmsUInt32Number; begin PLANAR_SH := ((p) shl 12) end;\r
- FUNCTION ENDIAN16_SH(e: cmsUInt32Number):cmsUInt32Number; begin ENDIAN16_SH := ((e) shl 11) end;\r
- FUNCTION DOSWAP_SH(e: cmsUInt32Number):cmsUInt32Number; begin DOSWAP_SH := ((e) shl 10) end;\r
- FUNCTION EXTRA_SH(e: cmsUInt32Number):cmsUInt32Number; begin EXTRA_SH := ((e) shl 7) end;\r
- FUNCTION CHANNELS_SH(c: cmsUInt32Number):cmsUInt32Number; begin CHANNELS_SH := ((c) shl 3) end;\r
- FUNCTION BYTES_SH(b: cmsUInt32Number):cmsUInt32Number; begin BYTES_SH := (b) end;\r
-\r
-\r
- FUNCTION T_FLOAT(a: cmsUInt32Number): cmsUInt32Number; begin T_FLOAT := (((a) shr 22) and 1) end; \r
- FUNCTION T_OPTIMIZED(o: cmsUInt32Number): cmsUInt32Number; begin T_OPTIMIZED := (((o) shr 21) and 1) end; \r
- FUNCTION T_COLORSPACE(s: cmsUInt32Number): cmsUInt32Number; begin T_COLORSPACE := (((s) shr 16) and 31) end; \r
- FUNCTION T_SWAPFIRST(s: cmsUInt32Number): cmsUInt32Number; begin T_SWAPFIRST := (((s) shr 14) and 1) end; \r
- FUNCTION T_FLAVOR(s: cmsUInt32Number): cmsUInt32Number; begin T_FLAVOR := (((s) shr 13) and 1) end;\r
- FUNCTION T_PLANAR(p: cmsUInt32Number): cmsUInt32Number; begin T_PLANAR := (((p) shr 12) and 1) end; \r
- FUNCTION T_ENDIAN16(e: cmsUInt32Number): cmsUInt32Number; begin T_ENDIAN16 := (((e) shr 11) and 1) end; \r
- FUNCTION T_DOSWAP(e: cmsUInt32Number): cmsUInt32Number; begin T_DOSWAP := (((e) shr 10) and 1) end; \r
- FUNCTION T_EXTRA(e: cmsUInt32Number): cmsUInt32Number; begin T_EXTRA := (((e) shr 7) and 7) end; \r
- FUNCTION T_CHANNELS(c: cmsUInt32Number): cmsUInt32Number; begin T_CHANNELS := (((c) shr 3) and 15) end; \r
- FUNCTION T_BYTES(b: cmsUInt32Number): cmsUInt32Number; begin T_BYTES := ((b) and 7) end;\r
-\r
-\r
-\r
-// \r
-\r
-\r
-FUNCTION cmsPlugin(Plugin: Pointer): cmsBool; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsUnregisterPlugins; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetLogErrorHandler(Fn: cmsLogErrorHandlerFunction); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsD50_XYZ: LPcmsCIEXYZ; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsD50_xyY: LPcmsCIExyY; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsXYZ2xyY(Dest: LPcmsCIExyY; Source: LPcmsCIEXYZ); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsxyY2XYZ(Dest: LPcmsCIEXYZ; Source: LPcmsCIExyY); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsLab2XYZ(WhitePoint: LPcmsCIEXYZ; xyz: LPcmsCIEXYZ; Lab: LPcmsCIELab); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsXYZ2Lab(WhitePoint: LPcmsCIEXYZ; Lab: LPcmsCIELab; xyz: LPcmsCIEXYZ); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsLab2LCh(LCh: LPcmsCIELCh; Lab: LPcmsCIELab); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsLCh2Lab(Lab: LPcmsCIELab; LCh: LPcmsCIELCh); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsLabEncoded2Float(Lab: LPcmsCIELab; wLab: Pointer); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsLabEncoded2FloatV2(Lab: LPcmsCIELab; wLab: Pointer); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsFloat2LabEncoded(wLab: Pointer; Lab: LPcmsCIELab); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsFloat2LabEncodedV2(wLab: Pointer; Lab: LPcmsCIELab); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsXYZEncoded2Float(fxyz : LPcmsCIEXYZ; XYZ: Pointer); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsFloat2XYZEncoded(XYZ: Pointer; fXYZ: LPcmsCIEXYZ); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCIE94DeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsBFDdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCMCdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCIE2000DeltaE(Lab1, Lab2: LPcmsCIELab; Kl, Kc, Kh: Double): Double; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsWhitePointFromTemp(var WhitePoint: cmsCIExyY; TempK: cmsFloat64Number) : cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsTempFromWhitePoint(var TeampK: cmsFloat64Number; var WhitePoint: cmsCIExyY) : cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsAdaptToIlluminant(Result: LPcmsCIEXYZ; SourceWhitePt: LPcmsCIEXYZ;\r
- Illuminant: LPcmsCIEXYZ; Value: LPcmsCIEXYZ): cmsBool; StdCall; external 'lcms2.dll'; \r
-FUNCTION cmsCIECAM02Init(pVC : LPcmsViewingConditions ) : Pointer; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsCIECAM02Done(hModel : Pointer); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsCIECAM02Forward(hModel: Pointer; pIn: LPcmsCIEXYZ; pOut: LPcmsJCh ); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsCIECAM02Reverse(hModel: Pointer; pIn: LPcmsJCh; pOut: LPcmsCIEXYZ ); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsBuildSegmentedToneCurve(ContextID: cmsContext; nSegments: cmsInt32Number; Segments: LPcmsCurveSegmentArray): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsBuildParametricToneCurve(ContextID: cmsContext; CType: cmsInt32Number; Params: LPcmsFloat64NumberArray): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsBuildGamma(ContextID: cmsContext; Gamma: cmsFloat64Number): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsBuildTabulatedToneCurve16(ContextID: cmsContext; nEntries: cmsInt32Number; values: LPcmsUInt16NumberArray): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsBuildTabulatedToneCurveFloat(ContextID: cmsContext; nEntries: cmsUInt32Number; values: LPcmsFloat32NumberArray): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsFreeToneCurve(Curve: LPcmsToneCurve); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsFreeToneCurveTriple(Curve: LPLPcmsToneCurveArray); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDupToneCurve(Src: LPcmsToneCurve): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsReverseToneCurve(InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsReverseToneCurveEx(nResultSamples: cmsInt32Number; InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsJoinToneCurve(ContextID: cmsContext; X, Y: LPcmsToneCurve; nPoints: cmsUInt32Number ): LPcmsToneCurve; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsSmoothToneCurve(Tab: LPcmsToneCurve; lambda: cmsFloat64Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsEvalToneCurveFloat(Curve: LPcmsToneCurve; v: cmsFloat32Number):cmsFloat32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsEvalToneCurve16(Curve: LPcmsToneCurve; v:cmsUInt16Number):cmsUInt16Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIsToneCurveMultisegment(InGamma: LPcmsToneCurve):cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIsToneCurveLinear(Curve: LPcmsToneCurve):cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIsToneCurveMonotonic(t: LPcmsToneCurve):cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIsToneCurveDescending(t: LPcmsToneCurve):cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetToneCurveParametricType(t: LPcmsToneCurve):cmsInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsEstimateGamma(t: LPcmsToneCurve; Precision:cmsFloat64Number):cmsFloat64Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineAlloc(ContextID: cmsContext; InputChannels, OutputChannels: cmsUInt32Number): LPcmsPipeline; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsPipelineFree(lut: LPcmsPipeline); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineDup(Orig: LPcmsPipeline): LPcmsPipeline; StdCall; external 'lcms2.dll'; \r
-FUNCTION cmsPipelineInputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineOutputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineStageCount(lut: LPcmsPipeline): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineGetPtrToFirstStage(lut: LPcmsPipeline): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineGetPtrToLastStage(lut: LPcmsPipeline): LPcmsStage; StdCall; external 'lcms2.dll';\r
-\r
-PROCEDURE cmsPipelineEval16(Inv, Outv: LPcmsUInt16NumberArray; lut: LPcmsPipeline); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsPipelineEvalFloat(Inv, Outv: LPcmsFloat32NumberArray; lut: LPcmsPipeline); StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsPipelineEvalReverseFloat(Target, Result, Hint: LPcmsFloat32NumberArray; lut: LPcmsPipeline): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineCat(l1, l2: LPcmsPipeline): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsPipelineSetSaveAs8bitsFlag(lut: LPcmsPipeline; On: cmsBool): cmsBool; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsPipelineInsertStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPcmsStage); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsPipelineUnlinkStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPLPcmsStage); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageAllocIdentity(ContextID: cmsContext; nChannels: cmsUInt32Number): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageAllocToneCurves(ContextID: cmsContext; nChannels: cmsUInt32Number; Curves: LPLPcmsToneCurveArray): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageAllocMatrix(ContextID: cmsContext; Rows, Cols: cmsUInt32Number; Matrix, Offset: LPcmsFloat64NumberArray): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageAllocCLut16bit(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageAllocCLutFloat(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageAllocCLut16bitGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageAllocCLutFloatGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageDup(mpe: LPcmsStage): LPcmsStage; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsStageFree(mpe: LPcmsStage); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageNext(mpe: LPcmsStage): LPcmsStage; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageInputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageOutputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageType(mpe: LPcmsStage): cmsStageSignature; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageData(mpe: LPcmsStage): Pointer; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageSampleCLut16bit(mpe: LPcmsStage; Sampler: cmsSAMPLER16; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsStageSampleCLutFloat(mpe: LPcmsStage; Sampler: cmsSAMPLERFLOAT; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsSliceSpace16(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;\r
- Sampler: cmsSAMPLER16; Cargo: Pointer): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsSliceSpaceFloat(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;\r
- Sampler: cmsSAMPLERFLOAT; Cargo: Pointer): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsMLUalloc(ContextID: cmsContext; nItems: cmsUInt32Number): LPcmsMLU; StdCall; external 'lcms2.dll'; \r
-PROCEDURE cmsMLUfree(mlu: LPcmsMLU); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsMLUdup(mlu: LPcmsMLU): LPcmsMLU; StdCall; external 'lcms2.dll'; \r
-\r
-FUNCTION cmsMLUsetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode, ASCIIString: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsMLUsetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; WideString: PWChar): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsMLUgetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsMLUgetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
- \r
-FUNCTION cmsMLUgetTranslation(mlu: LPcmsMLU; LanguageCode, CountryCode, ObtainedLanguage, ObtainedCountry: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsAllocNamedColorList(ContextID: cmsContext; n, ColorantCount :cmsUInt32Number;\r
- Prefix, Suffix: PAnsiChar): LPcmsNAMEDCOLORLIST; StdCall; external 'lcms2.dll';\r
-\r
-PROCEDURE cmsFreeNamedColorList(v: LPcmsNAMEDCOLORLIST); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDupNamedColorList(v: LPcmsNAMEDCOLORLIST): LPcmsNAMEDCOLORLIST; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsAppendNamedColor(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar;\r
- PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsNamedColorCount(v: LPcmsNAMEDCOLORLIST): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsNamedColorIndex(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar): cmsInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsNamedColorInfo(v: LPcmsNAMEDCOLORLIST; nColor : cmsUInt32Number;\r
- Name,Prefix, Suffix : PAnsiChar;\r
- PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetNamedColorList(xform: cmsHTRANSFORM ): LPcmsNAMEDCOLORLIST; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsAllocProfileSequenceDescription(ContextID: cmsContext; n: cmsUInt32Number):LPcmsSEQ; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDupProfileSequenceDescription(pseq: LPcmsSEQ):LPcmsSEQ; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsFreeProfileSequenceDescription(pseq: LPcmsSEQ); StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsDictAlloc(ContextID: cmsContext): cmsHANDLE; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsDictFree(hDict: cmsHANDLE); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDictDup(hDict: cmsHANDLE): cmsHANDLE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsDictAddEntry(hDict: cmsHANDLE; Name, Value: PWChar; DisplayName, DisplayValue : LPcmsMLU): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDictGetEntryList(hDict: cmsHANDLE): LPcmsDICTentry; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDictNextEntry(e : LPcmsDICTentry): LPcmsDICTentry; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateProfilePlaceholder(ContextID: cmsContext): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetProfileContextID(hProfile: cmsHPROFILE):cmsContext; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetTagCount(hProfile: cmsHPROFILE): cmsInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetTagSignature(hProfile: cmsHPROFILE; n: cmsUInt32Number): cmsTagSignature; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIsTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsReadTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): Pointer; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsWriteTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsLinkTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; dest: cmsTagSignature): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsTagLinkedTo(hProfile: cmsHPROFILE; sig: cmsTagSignature):cmsTagSignature; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsReadRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; Buffer: Pointer; BufferSize: cmsUInt32Number): cmsInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsWriteRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer; Size: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetHeaderFlags(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsGetHeaderAttributes(hProfile: cmsHPROFILE; Flags: LPcmsUInt64Number); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsGetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetHeaderRenderingIntent(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetHeaderFlags(hProfile: cmsHPROFILE; Flags: cmsUInt32Number); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetHeaderManufacturer(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetHeaderManufacturer(hProfile: cmsHPROFILE; manufacturer: cmsUInt32Number ); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetHeaderModel(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetHeaderModel(hProfile: cmsHPROFILE; model: cmsUInt32Number ); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetHeaderAttributes(hProfile: cmsHPROFILE; Flags: cmsUInt64Number); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetHeaderRenderingIntent(hProfile: cmsHPROFILE; RenderingIntent: cmsUInt32Number ); StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetPCS(hProfile: cmsHPROFILE):cmsColorSpaceSignature; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetPCS(hProfile: cmsHPROFILE; pcs: cmsColorSpaceSignature); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetColorSpace(hProfile: cmsHPROFILE): cmsColorSpaceSignature; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetColorSpace(hProfile: cmsHPROFILE; sig: cmsColorSpaceSignature); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetDeviceClass(hProfile: cmsHPROFILE): cmsProfileClassSignature; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetDeviceClass(hProfile: cmsHPROFILE; sig: cmsProfileClassSignature); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetProfileVersion(hProfile: cmsHPROFILE; Version: cmsFloat64Number); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetProfileVersion(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetEncodedICCversion(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsSetEncodedICCversion(hProfile: cmsHPROFILE; Version: cmsUInt32Number); StdCall; external 'lcms2.dll';\r
-\r
-\r
-FUNCTION cmsIsIntentSupported(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIsMatrixShaper(hProfile: cmsHPROFILE): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIsCLUT(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION _cmsICCcolorSpace(OurNotation: Integer): cmsColorSpaceSignature; StdCall; external 'lcms2.dll';\r
-FUNCTION _cmsLCMScolorSpace(ProfileSpace: cmsColorSpaceSignature): Integer; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsChannelsOf( ColorSpace: cmsColorSpaceSignature): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsFormatterForColorspaceOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsFormatterForPCSOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-\r
-FUNCTION cmsGetProfileInfo(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;\r
- Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetProfileInfoASCII(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;\r
- Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-\r
-FUNCTION cmsOpenIOhandlerFromFile(ContextID: cmsContext; FileName, AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall; external 'lcms2.dll';\r
-// FUNCTION cmsOpenIOhandlerFromStream(ContextID: cmsContext; FILE* Stream): LPcmsIOHANDLER; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsOpenIOhandlerFromMem(ContextID: cmsContext; Buffer: Pointer; size: cmsUInt32Number; AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsOpenIOhandlerFromNULL(ContextID: cmsContext): LPcmsIOHANDLER; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCloseIOhandler(io: LPcmsIOHANDLER): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsMD5computeID(hProfile: cmsHPROFILE): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsOpenProfileFromFile(ICCProfile : PAnsiChar; sAccess: PAnsiChar): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsOpenProfileFromFileTHR(ContextID: cmsContext; ICCProfile, sAccess: PAnsiChar): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-// FUNCTION CMSEXPORT cmsOpenProfileFromStream(FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-// FUNCTION CMSEXPORT cmsOpenProfileFromStreamTHR(ContextID: cmsContext; FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsOpenProfileFromMem(MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsOpenProfileFromMemTHR(ContextID: cmsContext; MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsOpenProfileFromIOhandlerTHR(ContextID: cmsContext; io: LPcmsIOHANDLER): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCloseProfile(hProfile: cmsHPROFILE): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsSaveProfileToFile(hProfile: cmsHPROFILE; FileName: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-// FUNCTION CMSEXPORT cmsSaveProfileToStream(hProfile: cmsHPROFILE, FILE* Stream): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsSaveProfileToMem(hProfile: cmsHPROFILE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsSaveProfileToIOhandler(hProfile: cmsHPROFILE; io: LPcmsIOHANDLER):cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateRGBProfileTHR(ContextID: cmsContext;\r
- WhitePoint: LPcmsCIExyY;\r
- Primaries: LPcmsCIExyYTRIPLE;\r
- TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateRGBProfile(WhitePoint: LPcmsCIExyY;\r
- Primaries: LPcmsCIExyYTRIPLE;\r
- TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateGrayProfileTHR(ContextID: cmsContext;\r
- WhitePoint: LPcmsCIExyY;\r
- TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateGrayProfile(WhitePoint: LPcmsCIExyY;\r
- TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateLinearizationDeviceLinkTHR(ContextID: cmsContext;\r
- ColorSpace: cmsColorSpaceSignature;\r
- TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateLinearizationDeviceLink(ColorSpace: cmsColorSpaceSignature;\r
- TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateInkLimitingDeviceLinkTHR(ContextID: cmsContext;\r
- ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateInkLimitingDeviceLink(ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-\r
-FUNCTION cmsCreateLab2ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCreateLab2Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCreateLab4ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCreateLab4Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateXYZProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCreateXYZProfile: cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreate_sRGBProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCreate_sRGBProfile: cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateBCHSWabstractProfileTHR(ContextID: cmsContext;\r
- nLUTPoints: Integer;\r
- Bright,\r
- Contrast,\r
- Hue,\r
- Saturation: cmsFloat64Number;\r
- TempSrc,\r
- TempDest: Integer): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateBCHSWabstractProfile( nLUTPoints: Integer;\r
- Bright,\r
- Contrast,\r
- Hue,\r
- Saturation: cmsFloat64Number;\r
- TempSrc,\r
- TempDest: Integer): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateNULLProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsCreateNULLProfile: cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-// Converts a transform to a devicelink profile\r
-FUNCTION cmsTransform2DeviceLink(hTransform: cmsHTRANSFORM; Version: cmsFloat64Number; dwFlags: cmsUInt32Number): cmsHPROFILE; StdCall; external 'lcms2.dll';\r
-\r
-// Call with NULL as parameters to get the intent count\r
-FUNCTION cmsGetSupportedIntents(nMax: cmsUInt32Number; Codes: LPcmsUInt32Number; Descriptions: LPPAnsiChar): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsFLAGS_GRIDPOINTS(n: Integer): Integer; begin cmsFLAGS_GRIDPOINTS := (((n) and $FF) shl 16) end;\r
-\r
-\r
-FUNCTION cmsCreateTransformTHR(ContextID: cmsContext;\r
- Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateTransform(Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateProofingTransformTHR(ContextID: cmsContext;\r
- Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Proofing: cmsHPROFILE;\r
- Intent: cmsUInt32Number;\r
- ProofingIntent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateProofingTransform(Input: cmsHPROFILE;\r
- InputFormat: cmsUInt32Number;\r
- Output: cmsHPROFILE;\r
- OutputFormat: cmsUInt32Number;\r
- Proofing: cmsHPROFILE;\r
- Intent: cmsUInt32Number;\r
- ProofingIntent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsCreateMultiprofileTransformTHR(ContextID: cmsContext;\r
- hProfiles: LPcmsHPROFILEArray;\r
- nProfiles: cmsUInt32Number;\r
- InputFormat: cmsUInt32Number;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external 'lcms2.dll';\r
-\r
-\r
-FUNCTION cmsCreateMultiprofileTransform( hProfiles: LPcmsHPROFILEArray;\r
- nProfiles: cmsUInt32Number;\r
- InputFormat: cmsUInt32Number;\r
- OutputFormat: cmsUInt32Number;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external 'lcms2.dll';\r
-\r
-\r
-FUNCTION cmsCreateExtendedTransform(ContextID: cmsContext;\r
- nProfiles: cmsUInt32Number;\r
- hProfiles: LPcmsHPROFILEArray;\r
- BPC: LPcmsBoolArray;\r
- Intents: LPcmsUInt32NumberArray;\r
- AdaptationStates: LPcmsFloat64NumberArray;\r
- hGamutProfile: cmsHPROFILE;\r
- nGamutPCSposition: cmsUInt32Number;\r
- InputFormat,\r
- OutputFormat: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external 'lcms2.dll';\r
-\r
-PROCEDURE cmsDeleteTransform(hTransform: cmsHTRANSFORM); StdCall; external 'lcms2.dll';\r
-\r
-PROCEDURE cmsDoTransform(Transform: cmsHTRANSFORM; InputBuffer, OutputBuffer: Pointer; size: cmsUInt32Number); StdCall; external 'lcms2.dll';\r
-\r
-PROCEDURE cmsSetAlarmCodes( NewAlarm: LPcmsUInt16NumberArray); StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsGetAlarmCodes(NewAlarm: LPcmsUInt16NumberArray); StdCall; external 'lcms2.dll';\r
-\r
-// Adaptation state for absolute colorimetric intent\r
-FUNCTION cmsSetAdaptationState(d: cmsFloat64Number):cmsFloat64Number; StdCall; external 'lcms2.dll';\r
-\r
-// Grab the ContextID from an open transform. Returns NULL if a NULL transform is passed\r
-FUNCTION cmsGetTransformContextID(hTransform: cmsHTRANSFORM):cmsContext; StdCall; external 'lcms2.dll';\r
-\r
-// For backwards compatibility\r
-FUNCTION cmsChangeBuffersFormat(hTransform: cmsHTRANSFORM; InputFormat, OutputFormat: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-\r
-// lcms2 unified method to access postscript color resources\r
-FUNCTION cmsGetPostScriptColorResource(ContextID: cmsContext; RType: cmsPSResourceType;\r
- hProfile: cmsHPROFILE;\r
- Intent: cmsUInt32Number;\r
- dwFlags: cmsUInt32Number;\r
- io: LPcmsIOHANDLER): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGetPostScriptCSA(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number ): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGetPostScriptCRD(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number): cmsUInt32Number; StdCall; external 'lcms2.dll';\r
-\r
-\r
-// CGATS.13 parser\r
-\r
-FUNCTION cmsIT8Alloc: cmsHANDLE; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsIT8Free(hIT8: cmsHANDLE); StdCall; external 'lcms2.dll';\r
-\r
-// Tables\r
-\r
-FUNCTION cmsIT8TableCount(hIT8: cmsHANDLE): Integer; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8SetTable(hIT8: cmsHANDLE; nTable: Integer): Integer; StdCall; external 'lcms2.dll';\r
-\r
-// Persistence\r
-FUNCTION cmsIT8LoadFromFile(cFileName: PAnsiChar): cmsHANDLE; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8LoadFromMem(Ptr: Pointer; size :DWord): cmsHANDLE; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8SaveToFile(hIT8: cmsHANDLE; cFileName: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8SaveToMem(hIT8: cmsHANDLE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-// Properties\r
-\r
-FUNCTION cmsIT8GetSheetType(hIT8: cmsHANDLE): PAnsiChar; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8SetSheetType(hIT8: cmsHANDLE; TheType: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8SetComment(hIT8: cmsHANDLE; cComment: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8SetPropertyStr(hIT8: cmsHANDLE; cProp, Str: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8SetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Double): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8SetPropertyHex(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Integer): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8SetPropertyUncooked(hIT8: cmsHANDLE; Key, Buffer: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-\r
-FUNCTION cmsIT8GetProperty(hIT8: cmsHANDLE; cProp: PAnsiChar): PAnsiChar; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8GetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar): Double; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8EnumProperties(hIT8: cmsHANDLE; var PropertyNames: LPPAnsiChar): Integer; StdCall; external 'lcms2.dll';\r
-\r
-// Datasets\r
-\r
-FUNCTION cmsIT8GetDataRowCol(hIT8: cmsHANDLE; row, col: Integer): PAnsiChar; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8GetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer): Double; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8SetDataRowCol(hIT8: cmsHANDLE; row, col: Integer; Val: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8SetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer; Val: Double): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8GetData(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar): PAnsiChar; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8GetDataDbl(hIT8: cmsHANDLE;cPatch, cSample: PAnsiChar): Double; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8SetData(hIT8: cmsHANDLE; cPatch, cSample, Val: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8SetDataDbl(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar; Val: Double): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8SetDataFormat(hIT8: cmsHANDLE; n: Integer; Sample: PAnsiChar): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8EnumDataFormat(hIT8: cmsHANDLE; var SampleNames: LPPAnsiChar): Integer; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsIT8GetPatchName(hIT8: cmsHANDLE; nPatch: Integer; Buffer: PAnsiChar): PAnsiChar; StdCall; external 'lcms2.dll';\r
-\r
-// The LABEL extension\r
-\r
-FUNCTION cmsIT8SetTableByLabel(hIT8: cmsHANDLE; cSet, cField, ExpectedType: PAnsiChar): Integer; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsIT8FindDataFormat(hIT8: cmsHANDLE; cSample: PAnsiChar): Integer; StdCall; external 'lcms2.dll';\r
-\r
-// Formatter for double\r
-PROCEDURE cmsIT8DefineDblFormat(hIT8: cmsHANDLE; Formatter: PAnsiChar); StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsGBDAlloc(ContextID: cmsContext):cmsHANDLE; StdCall; external 'lcms2.dll';\r
-PROCEDURE cmsGBDFree(hGBD: cmsHANDLE); StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGDBAddPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGDBCompute(hGDB: cmsHANDLE; dwFlags: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsGDBCheckPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsDetectBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-FUNCTION cmsDetectDestinationBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsDetectTAC(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall; external 'lcms2.dll';\r
-\r
-FUNCTION cmsDesaturateLab(Lab: LPcmsCIELab; amax, amin, bmax, bmin: cmsFloat64Number): cmsBool; StdCall; external 'lcms2.dll';\r
- \r
-END.\r
+//
+// Little cms DELPHI wrapper
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2014 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+//---------------------------------------------------------------------------------
+//
+// Version 2.6
+//
+
+UNIT lcms2dll;
+
+{$IFDEF FPC}
+ {$MODE Delphi}
+{$ENDIF}
+
+INTERFACE
+
+{$IFNDEF MSWINDOWS}
+ USES LCLType, types;
+ Type PWChar = PWideChar;
+{$ELSE}
+ USES Windows;
+{$ENDIF}
+
+ CONST
+
+ LCMS2_SO = {$IFDEF DARWIN} 'liblcms2.2.dylib'; {$ELSE} 'lcms2.dll'; {$ENDIF}
+
+ TYPE
+
+ Uint8 = Byte;
+ Int8 = Shortint;
+ UInt16 = Word;
+ Int16 = Smallint;
+ UInt32 = LongWord;
+ Int32 = Longint;
+
+ TYPE
+ cmsUInt8Number = Uint8;
+ cmsInt8Number = Int8;
+ cmsUInt16Number = UInt16;
+ cmsInt16Number = Int16;
+
+ cmsUInt32Number = UInt32;
+ cmsInt32Number = Int32;
+ cmsInt64Number = Int64;
+ cmsUInt64Number = UInt64;
+
+ cmsFloat32Number = Single;
+ cmsFloat64Number = Double;
+
+ LPcmsUInt8Number = ^cmsUInt8Number;
+ LPcmsInt8Number = ^cmsInt8Number;
+ LPcmsUInt16Number = ^cmsUInt16Number;
+ LPcmsInt16Number = ^cmsInt16Number;
+
+ LPcmsUInt32Number = ^cmsUInt32Number;
+ LPcmsInt32Number = ^cmsInt32Number;
+ LPcmsInt64Number = ^cmsInt64Number;
+ LPcmsUInt64Number = ^cmsUInt64Number;
+
+ LPcmsFloat32Number = ^cmsFloat32Number;
+ LPcmsFloat64Number = ^cmsFloat64Number;
+
+
+ // Derivative types
+ cmsSignature = cmsUInt32Number;
+ cmsU8Fixed8Number = cmsUInt16Number;
+ cmsS15Fixed16Number = cmsInt32Number;
+ cmsU16Fixed16Number = cmsUInt32Number;
+
+ // Boolean type, which will be using the native integer
+ cmsBool = Boolean;
+
+ CONST
+
+ // Some common definitions
+ cmsMAX_PATH = 256;
+
+ // D50 XYZ normalized to Y=1.0
+ cmsD50X = 0.9642;
+ cmsD50Y = 1.0;
+ cmsD50Z = 0.8249;
+
+ // V4 perceptual black
+ cmsPERCEPTUAL_BLACK_X = 0.00336;
+ cmsPERCEPTUAL_BLACK_Y = 0.0034731;
+ cmsPERCEPTUAL_BLACK_Z = 0.00287;
+
+ // Definitions in ICC spec
+ cmsMagicNumber = $61637370; // 'acsp'
+ lcmsSignature = $6c636d73; // 'lcms'
+
+
+TYPE
+
+// Base ICC type definitions
+cmsTagTypeSignature = (
+ cmsSigChromaticityType = $6368726D, // 'chrm'
+ cmsSigColorantOrderType = $636C726F, // 'clro'
+ cmsSigColorantTableType = $636C7274, // 'clrt'
+ cmsSigCrdInfoType = $63726469, // 'crdi'
+ cmsSigCurveType = $63757276, // 'curv'
+ cmsSigDataType = $64617461, // 'data'
+ cmsSigDictType = $64696374, // 'dict'
+ cmsSigDateTimeType = $6474696D, // 'dtim'
+ cmsSigDeviceSettingsType = $64657673, // 'devs'
+ cmsSigLut16Type = $6d667432, // 'mft2'
+ cmsSigLut8Type = $6d667431, // 'mft1'
+ cmsSigLutAtoBType = $6d414220, // 'mAB '
+ cmsSigLutBtoAType = $6d424120, // 'mBA '
+ cmsSigMeasurementType = $6D656173, // 'meas'
+ cmsSigMultiLocalizedUnicodeType = $6D6C7563, // 'mluc'
+ cmsSigMultiProcessElementType = $6D706574, // 'mpet'
+ cmsSigNamedColorType = $6E636f6C, // 'ncol' -- DEPRECATED!
+ cmsSigNamedColor2Type = $6E636C32, // 'ncl2'
+ cmsSigParametricCurveType = $70617261, // 'para'
+ cmsSigProfileSequenceDescType = $70736571, // 'pseq'
+ cmsSigProfileSequenceIdType = $70736964, // 'psid'
+ cmsSigResponseCurveSet16Type = $72637332, // 'rcs2'
+ cmsSigS15Fixed16ArrayType = $73663332, // 'sf32'
+ cmsSigScreeningType = $7363726E, // 'scrn'
+ cmsSigSignatureType = $73696720, // 'sig '
+ cmsSigTextType = $74657874, // 'text'
+ cmsSigTextDescriptionType = $64657363, // 'desc'
+ cmsSigU16Fixed16ArrayType = $75663332, // 'uf32'
+ cmsSigUcrBgType = $62666420, // 'bfd '
+ cmsSigUInt16ArrayType = $75693136, // 'ui16'
+ cmsSigUInt32ArrayType = $75693332, // 'ui32'
+ cmsSigUInt64ArrayType = $75693634, // 'ui64'
+ cmsSigUInt8ArrayType = $75693038, // 'ui08'
+ cmsSigViewingConditionsType = $76696577, // 'view'
+ cmsSigXYZType = $58595A20, // 'XYZ '
+ cmsSigVcgtType = $76636774 // 'vcgt'
+ );
+
+// Base ICC tag definitions
+cmsTagSignature = (
+ cmsSigAToB0Tag = $41324230, // 'A2B0'
+ cmsSigAToB1Tag = $41324231, // 'A2B1'
+ cmsSigAToB2Tag = $41324232, // 'A2B2'
+ cmsSigBlueColorantTag = $6258595A, // 'bXYZ'
+ cmsSigBlueMatrixColumnTag = $6258595A, // 'bXYZ'
+ cmsSigBlueTRCTag = $62545243, // 'bTRC'
+ cmsSigBToA0Tag = $42324130, // 'B2A0'
+ cmsSigBToA1Tag = $42324131, // 'B2A1'
+ cmsSigBToA2Tag = $42324132, // 'B2A2'
+ cmsSigCalibrationDateTimeTag = $63616C74, // 'calt'
+ cmsSigCharTargetTag = $74617267, // 'targ'
+ cmsSigChromaticAdaptationTag = $63686164, // 'chad'
+ cmsSigChromaticityTag = $6368726D, // 'chrm'
+ cmsSigColorantOrderTag = $636C726F, // 'clro'
+ cmsSigColorantTableTag = $636C7274, // 'clrt'
+ cmsSigColorantTableOutTag = $636C6F74, // 'clot'
+ cmsSigColorimetricIntentImageStateTag = $63696973, // 'ciis'
+ cmsSigCopyrightTag = $63707274, // 'cprt'
+ cmsSigCrdInfoTag = $63726469, // 'crdi'
+ cmsSigDataTag = $64617461, // 'data'
+ cmsSigDateTimeTag = $6474696D, // 'dtim'
+ cmsSigDeviceMfgDescTag = $646D6E64, // 'dmnd'
+ cmsSigDeviceModelDescTag = $646D6464, // 'dmdd'
+ cmsSigDeviceSettingsTag = $64657673, // 'devs'
+ cmsSigDToB0Tag = $44324230, // 'D2B0'
+ cmsSigDToB1Tag = $44324231, // 'D2B1'
+ cmsSigDToB2Tag = $44324232, // 'D2B2'
+ cmsSigDToB3Tag = $44324233, // 'D2B3'
+ cmsSigBToD0Tag = $42324430, // 'B2D0'
+ cmsSigBToD1Tag = $42324431, // 'B2D1'
+ cmsSigBToD2Tag = $42324432, // 'B2D2'
+ cmsSigBToD3Tag = $42324433, // 'B2D3'
+ cmsSigGamutTag = $67616D74, // 'gamt'
+ cmsSigGrayTRCTag = $6b545243, // 'kTRC'
+ cmsSigGreenColorantTag = $6758595A, // 'gXYZ'
+ cmsSigGreenMatrixColumnTag = $6758595A, // 'gXYZ'
+ cmsSigGreenTRCTag = $67545243, // 'gTRC'
+ cmsSigLuminanceTag = $6C756d69, // 'lumi'
+ cmsSigMeasurementTag = $6D656173, // 'meas'
+ cmsSigMediaBlackPointTag = $626B7074, // 'bkpt'
+ cmsSigMediaWhitePointTag = $77747074, // 'wtpt'
+ cmsSigNamedColorTag = $6E636f6C, // 'ncol' // Deprecated by the ICC
+ cmsSigNamedColor2Tag = $6E636C32, // 'ncl2'
+ cmsSigOutputResponseTag = $72657370, // 'resp'
+ cmsSigPerceptualRenderingIntentGamutTag = $72696730, // 'rig0'
+ cmsSigPreview0Tag = $70726530, // 'pre0'
+ cmsSigPreview1Tag = $70726531, // 'pre1'
+ cmsSigPreview2Tag = $70726532, // 'pre2'
+ cmsSigProfileDescriptionTag = $64657363, // 'desc'
+ cmsSigProfileSequenceDescTag = $70736571, // 'pseq'
+ cmsSigProfileSequenceIdTag = $70736964, // 'psid'
+ cmsSigPs2CRD0Tag = $70736430, // 'psd0'
+ cmsSigPs2CRD1Tag = $70736431, // 'psd1'
+ cmsSigPs2CRD2Tag = $70736432, // 'psd2'
+ cmsSigPs2CRD3Tag = $70736433, // 'psd3'
+ cmsSigPs2CSATag = $70733273, // 'ps2s'
+ cmsSigPs2RenderingIntentTag = $70733269, // 'ps2i'
+ cmsSigRedColorantTag = $7258595A, // 'rXYZ'
+ cmsSigRedMatrixColumnTag = $7258595A, // 'rXYZ'
+ cmsSigRedTRCTag = $72545243, // 'rTRC'
+ cmsSigSaturationRenderingIntentGamutTag = $72696732, // 'rig2'
+ cmsSigScreeningDescTag = $73637264, // 'scrd'
+ cmsSigScreeningTag = $7363726E, // 'scrn'
+ cmsSigTechnologyTag = $74656368, // 'tech'
+ cmsSigUcrBgTag = $62666420, // 'bfd '
+ cmsSigViewingCondDescTag = $76756564, // 'vued'
+ cmsSigViewingConditionsTag = $76696577, // 'view'
+ cmsSigVcgtTag = $76636774, // 'vcgt'
+ cmsSigMetaTag = $6D657461 // 'meta'
+);
+
+// ICC Technology tag
+cmsTechnologySignature = (
+ cmsSigDigitalCamera = $6463616D, // 'dcam'
+ cmsSigFilmScanner = $6673636E, // 'fscn'
+ cmsSigReflectiveScanner = $7273636E, // 'rscn'
+ cmsSigInkJetPrinter = $696A6574, // 'ijet'
+ cmsSigThermalWaxPrinter = $74776178, // 'twax'
+ cmsSigElectrophotographicPrinter = $6570686F, // 'epho'
+ cmsSigElectrostaticPrinter = $65737461, // 'esta'
+ cmsSigDyeSublimationPrinter = $64737562, // 'dsub'
+ cmsSigPhotographicPaperPrinter = $7270686F, // 'rpho'
+ cmsSigFilmWriter = $6670726E, // 'fprn'
+ cmsSigVideoMonitor = $7669646D, // 'vidm'
+ cmsSigVideoCamera = $76696463, // 'vidc'
+ cmsSigProjectionTelevision = $706A7476, // 'pjtv'
+ cmsSigCRTDisplay = $43525420, // 'CRT '
+ cmsSigPMDisplay = $504D4420, // 'PMD '
+ cmsSigAMDisplay = $414D4420, // 'AMD '
+ cmsSigPhotoCD = $4B504344, // 'KPCD'
+ cmsSigPhotoImageSetter = $696D6773, // 'imgs'
+ cmsSigGravure = $67726176, // 'grav'
+ cmsSigOffsetLithography = $6F666673, // 'offs'
+ cmsSigSilkscreen = $73696C6B, // 'silk'
+ cmsSigFlexography = $666C6578, // 'flex'
+ cmsSigMotionPictureFilmScanner = $6D706673, // 'mpfs'
+ cmsSigMotionPictureFilmRecorder = $6D706672, // 'mpfr'
+ cmsSigDigitalMotionPictureCamera = $646D7063, // 'dmpc'
+ cmsSigDigitalCinemaProjector = $64636A70 // 'dcpj'
+);
+
+
+// ICC Color spaces
+cmsColorSpaceSignature = (
+ cmsSigXYZData = $58595A20, // 'XYZ '
+ cmsSigLabData = $4C616220, // 'Lab '
+ cmsSigLuvData = $4C757620, // 'Luv '
+ cmsSigYCbCrData = $59436272, // 'YCbr'
+ cmsSigYxyData = $59787920, // 'Yxy '
+ cmsSigRgbData = $52474220, // 'RGB '
+ cmsSigGrayData = $47524159, // 'GRAY'
+ cmsSigHsvData = $48535620, // 'HSV '
+ cmsSigHlsData = $484C5320, // 'HLS '
+ cmsSigCmykData = $434D594B, // 'CMYK'
+ cmsSigCmyData = $434D5920, // 'CMY '
+ cmsSigMCH1Data = $4D434831, // 'MCH1'
+ cmsSigMCH2Data = $4D434832, // 'MCH2'
+ cmsSigMCH3Data = $4D434833, // 'MCH3'
+ cmsSigMCH4Data = $4D434834, // 'MCH4'
+ cmsSigMCH5Data = $4D434835, // 'MCH5'
+ cmsSigMCH6Data = $4D434836, // 'MCH6'
+ cmsSigMCH7Data = $4D434837, // 'MCH7'
+ cmsSigMCH8Data = $4D434838, // 'MCH8'
+ cmsSigMCH9Data = $4D434839, // 'MCH9'
+ cmsSigMCHAData = $4D43483A, // 'MCHA'
+ cmsSigMCHBData = $4D43483B, // 'MCHB'
+ cmsSigMCHCData = $4D43483C, // 'MCHC'
+ cmsSigMCHDData = $4D43483D, // 'MCHD'
+ cmsSigMCHEData = $4D43483E, // 'MCHE'
+ cmsSigMCHFData = $4D43483F, // 'MCHF'
+ cmsSigNamedData = $6e6d636c, // 'nmcl'
+ cmsSig1colorData = $31434C52, // '1CLR'
+ cmsSig2colorData = $32434C52, // '2CLR'
+ cmsSig3colorData = $33434C52, // '3CLR'
+ cmsSig4colorData = $34434C52, // '4CLR'
+ cmsSig5colorData = $35434C52, // '5CLR'
+ cmsSig6colorData = $36434C52, // '6CLR'
+ cmsSig7colorData = $37434C52, // '7CLR'
+ cmsSig8colorData = $38434C52, // '8CLR'
+ cmsSig9colorData = $39434C52, // '9CLR'
+ cmsSig10colorData = $41434C52, // 'ACLR'
+ cmsSig11colorData = $42434C52, // 'BCLR'
+ cmsSig12colorData = $43434C52, // 'CCLR'
+ cmsSig13colorData = $44434C52, // 'DCLR'
+ cmsSig14colorData = $45434C52, // 'ECLR'
+ cmsSig15colorData = $46434C52, // 'FCLR'
+ cmsSigLuvKData = $4C75764B // 'LuvK'
+);
+
+// ICC Profile Class
+cmsProfileClassSignature = (
+ cmsSigInputClass = $73636E72, // 'scnr'
+ cmsSigDisplayClass = $6D6E7472, // 'mntr'
+ cmsSigOutputClass = $70727472, // 'prtr'
+ cmsSigLinkClass = $6C696E6B, // 'link'
+ cmsSigAbstractClass = $61627374, // 'abst'
+ cmsSigColorSpaceClass = $73706163, // 'spac'
+ cmsSigNamedColorClass = $6e6d636c // 'nmcl'
+);
+
+
+// ICC Platforms
+cmsPlatformSignature = (
+ cmsSigMacintosh = $4150504C, // 'APPL'
+ cmsSigMicrosoft = $4D534654, // 'MSFT'
+ cmsSigSolaris = $53554E57, // 'SUNW'
+ cmsSigSGI = $53474920, // 'SGI '
+ cmsSigTaligent = $54474E54, // 'TGNT'
+ cmsSigUnices = $2A6E6978 // '*nix' // From argyll -- Not official
+);
+
+CONST
+
+ // Reference gamut
+ cmsSigPerceptualReferenceMediumGamut = $70726d67; //'prmg'
+
+ // For cmsSigColorimetricIntentImageStateTag
+ cmsSigSceneColorimetryEstimates = $73636F65; //'scoe'
+ cmsSigSceneAppearanceEstimates = $73617065; //'sape'
+ cmsSigFocalPlaneColorimetryEstimates = $66706365; //'fpce'
+ cmsSigReflectionHardcopyOriginalColorimetry = $72686F63; //'rhoc'
+ cmsSigReflectionPrintOutputColorimetry = $72706F63; //'rpoc'
+
+TYPE
+
+// Multi process elements types
+cmsStageSignature = (
+ cmsSigCurveSetElemType = $63767374, //'cvst'
+ cmsSigMatrixElemType = $6D617466, //'matf'
+ cmsSigCLutElemType = $636C7574, //'clut'
+
+ cmsSigBAcsElemType = $62414353, // 'bACS'
+ cmsSigEAcsElemType = $65414353, // 'eACS'
+
+ // Custom from here, not in the ICC Spec
+ cmsSigXYZ2LabElemType = $6C327820, // 'l2x '
+ cmsSigLab2XYZElemType = $78326C20, // 'x2l '
+ cmsSigNamedColorElemType = $6E636C20, // 'ncl '
+ cmsSigLabV2toV4 = $32203420, // '2 4 '
+ cmsSigLabV4toV2 = $34203220, // '4 2 '
+
+ // Identities
+ cmsSigIdentityElemType = $69646E20 // 'idn '
+);
+
+// Types of CurveElements
+cmsCurveSegSignature = (
+
+ cmsSigFormulaCurveSeg = $70617266, // 'parf'
+ cmsSigSampledCurveSeg = $73616D66, // 'samf'
+ cmsSigSegmentedCurve = $63757266 // 'curf'
+);
+
+CONST
+
+ // Used in ResponseCurveType
+ cmsSigStatusA = $53746141; //'StaA'
+ cmsSigStatusE = $53746145; //'StaE'
+ cmsSigStatusI = $53746149; //'StaI'
+ cmsSigStatusT = $53746154; //'StaT'
+ cmsSigStatusM = $5374614D; //'StaM'
+ cmsSigDN = $444E2020; //'DN '
+ cmsSigDNP = $444E2050; //'DN P'
+ cmsSigDNN = $444E4E20; //'DNN '
+ cmsSigDNNP = $444E4E50; //'DNNP'
+
+ // Device attributes, currently defined values correspond to the low 4 bytes
+ // of the 8 byte attribute quantity
+ cmsReflective = 0;
+ cmsTransparency = 1;
+ cmsGlossy = 0;
+ cmsMatte = 2;
+
+TYPE
+
+// Common structures in ICC tags
+cmsICCData = PACKED RECORD
+ len : cmsUInt32Number;
+ flag : cmsUInt32Number;
+ data : Array [0..1] of cmsUInt8Number;
+ END;
+
+// ICC date time
+cmsDateTimeNumber = PACKED RECORD
+ year: cmsUInt16Number;
+ month: cmsUInt16Number;
+ day: cmsUInt16Number;
+ hours: cmsUInt16Number;
+ minutes: cmsUInt16Number;
+ seconds: cmsUInt16Number;
+END;
+
+// ICC XYZ
+
+cmsEncodedXYZNumber = PACKED RECORD
+ X: cmsS15Fixed16Number;
+ Y: cmsS15Fixed16Number;
+ Z: cmsS15Fixed16Number;
+END;
+
+
+// Profile ID as computed by MD5 algorithm
+cmsProfileID = PACKED RECORD
+ CASE Integer OF
+ 1: (ID8: Array[0..15] OF cmsUInt8Number);
+ 2: (ID16: Array[0..7] OF cmsUInt16Number);
+ 3: (ID32: Array[0..3] OF cmsUInt32Number);
+END;
+
+
+
+// ----------------------------------------------------------------------------------------------
+// ICC profile internal base types. Strictly, shouldn't be declared in this unit, but maybe
+// somebody want to use this info for accessing profile header directly, so here it is.
+
+// Profile header -- it is 32-bit aligned, so no issues are expected on alignment
+cmsICCHeader = PACKED RECORD
+ size: cmsUInt32Number; // Profile size in bytes
+ cmmId: cmsSignature; // CMM for this profile
+ version: cmsUInt32Number; // Format version number
+ deviceClass: cmsProfileClassSignature; // Type of profile
+ colorSpace: cmsColorSpaceSignature; // Color space of data
+ pcs: cmsColorSpaceSignature; // PCS, XYZ or Lab only
+ date: cmsDateTimeNumber; // Date profile was created
+ magic: cmsSignature; // Magic Number to identify an ICC profile
+ platform: cmsPlatformSignature; // Primary Platform
+ flags: cmsUInt32Number; // Various bit settings
+ manufacturer: cmsSignature; // Device manufacturer
+ model: cmsUInt32Number; // Device model number
+ attributes: cmsUInt64Number; // Device attributes
+ renderingIntent:cmsUInt32Number; // Rendering intent
+ illuminant: cmsEncodedXYZNumber; // Profile illuminant
+ creator: cmsSignature; // Profile creator
+ profileID: cmsProfileID; // Profile ID using MD5
+ reserved: array [0..27] of cmsInt8Number; // Reserved for future use
+END;
+
+// ICC base tag
+cmsTagBase = PACKED RECORD
+ sig: cmsTagTypeSignature;
+ reserved: array[0..3] of cmsInt8Number;
+END;
+
+// A tag entry in directory
+cmsTagEntry = PACKED RECORD
+ sig: cmsTagSignature; // The tag signature
+ offset: cmsUInt32Number; // Start of tag
+ size: cmsUInt32Number; // Size in bytes
+END;
+
+
+cmsContext = Pointer; // Context identifier for multithreaded environments
+cmsHANDLE = Pointer; // Generic handle
+cmsHPROFILE = Pointer; // Opaque typedefs to hide internals
+cmsHTRANSFORM = Pointer;
+
+
+CONST
+
+ cmsMAXCHANNELS = 16; // Maximum number of channels in ICC profiles
+
+// Format of pixel is defined by one cmsUInt32Number, using bit fields as follows
+//
+// A O TTTTT U Y F P X S EEE CCCC BBB
+//
+// A: Floating point -- With this flag we can differentiate 16 bits as float and as int
+// O: Optimized -- previous optimization already returns the final 8-bit value
+// T: Pixeltype
+// F: Flavor 0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)
+// P: Planar? 0=Chunky, 1=Planar
+// X: swap 16 bps endianness?
+// S: Do swap? ie, BGR, KYMC
+// E: Extra samples
+// C: Channels (Samples per pixel)
+// B: bytes per sample
+// Y: Swap first - changes ABGR to BGRA and KCMY to CMYK
+
+ FUNCTION FLOAT_SH(a: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION OPTIMIZED_SH(s: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION COLORSPACE_SH(s: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION SWAPFIRST_SH(s: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION FLAVOR_SH(s: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION PLANAR_SH(p: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION ENDIAN16_SH(e: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION DOSWAP_SH(e: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION EXTRA_SH(e: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION CHANNELS_SH(c: cmsUInt32Number):cmsUInt32Number;
+ FUNCTION BYTES_SH(b: cmsUInt32Number):cmsUInt32Number;
+
+
+ FUNCTION T_FLOAT(a: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_OPTIMIZED(o: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_COLORSPACE(s: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_SWAPFIRST(s: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_FLAVOR(s: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_PLANAR(p: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_ENDIAN16(e: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_DOSWAP(e: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_EXTRA(e: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_CHANNELS(c: cmsUInt32Number): cmsUInt32Number;
+ FUNCTION T_BYTES(b: cmsUInt32Number): cmsUInt32Number;
+
+CONST
+
+
+// Pixel types
+
+ PT_ANY = 0; // Don't check colorspace
+ // 1 & 2 are reserved
+ PT_GRAY = 3;
+ PT_RGB = 4;
+ PT_CMY = 5;
+ PT_CMYK = 6;
+ PT_YCbCr = 7;
+ PT_YUV = 8; // Lu'v'
+ PT_XYZ = 9;
+ PT_Lab = 10;
+ PT_YUVK = 11; // Lu'v'K
+ PT_HSV = 12;
+ PT_HLS = 13;
+ PT_Yxy = 14;
+
+ PT_MCH1 = 15;
+ PT_MCH2 = 16;
+ PT_MCH3 = 17;
+ PT_MCH4 = 18;
+ PT_MCH5 = 19;
+ PT_MCH6 = 20;
+ PT_MCH7 = 21;
+ PT_MCH8 = 22;
+ PT_MCH9 = 23;
+ PT_MCH10 = 24;
+ PT_MCH11 = 25;
+ PT_MCH12 = 26;
+ PT_MCH13 = 27;
+ PT_MCH14 = 28;
+ PT_MCH15 = 29;
+
+ PT_LabV2 = 30; // Identical to PT_Lab, but using the V2 old encoding
+
+
+ // Format descriptors
+ TYPE_GRAY_8 = $030009;
+ TYPE_GRAY_8_REV = $032009;
+ TYPE_GRAY_16 = $03000a;
+ TYPE_GRAY_16_REV = $03200a;
+ TYPE_GRAY_16_SE = $03080a;
+ TYPE_GRAYA_8 = $030089;
+ TYPE_GRAYA_16 = $03008a;
+ TYPE_GRAYA_16_SE = $03088a;
+ TYPE_GRAYA_8_PLANAR = $031089;
+ TYPE_GRAYA_16_PLANAR = $03108a;
+ TYPE_RGB_8 = $040019;
+ TYPE_RGB_8_PLANAR = $041019;
+ TYPE_BGR_8 = $040419;
+ TYPE_BGR_8_PLANAR = $041419;
+ TYPE_RGB_16 = $04001a;
+ TYPE_RGB_16_PLANAR = $04101a;
+ TYPE_RGB_16_SE = $04081a;
+ TYPE_BGR_16 = $04041a;
+ TYPE_BGR_16_PLANAR = $04141a;
+ TYPE_BGR_16_SE = $040c1a;
+ TYPE_RGBA_8 = $040099;
+ TYPE_RGBA_8_PLANAR = $041099;
+ TYPE_ARGB_8_PLANAR = $045099;
+ TYPE_ABGR_8_PLANAR = $041499;
+ TYPE_BGRA_8_PLANAR = $045499;
+ TYPE_RGBA_16 = $04009a;
+ TYPE_RGBA_16_PLANAR = $04109a;
+ TYPE_RGBA_16_SE = $04089a;
+ TYPE_ARGB_8 = $044099;
+ TYPE_ARGB_16 = $04409a;
+ TYPE_ABGR_8 = $040499;
+ TYPE_ABGR_16 = $04049a;
+ TYPE_ABGR_16_PLANAR = $04149a;
+ TYPE_ABGR_16_SE = $040c9a;
+ TYPE_BGRA_8 = $044499;
+ TYPE_BGRA_16 = $04449a;
+ TYPE_BGRA_16_SE = $04489a;
+ TYPE_CMY_8 = $050019;
+ TYPE_CMY_8_PLANAR = $051019;
+ TYPE_CMY_16 = $05001a;
+ TYPE_CMY_16_PLANAR = $05101a;
+ TYPE_CMY_16_SE = $05081a;
+ TYPE_CMYK_8 = $060021;
+ TYPE_CMYKA_8 = $0600a1;
+ TYPE_CMYK_8_REV = $062021;
+ TYPE_YUVK_8 = $062021;
+ TYPE_CMYK_8_PLANAR = $061021;
+ TYPE_CMYK_16 = $060022;
+ TYPE_CMYK_16_REV = $062022;
+ TYPE_YUVK_16 = $062022;
+ TYPE_CMYK_16_PLANAR = $061022;
+ TYPE_CMYK_16_SE = $060822;
+ TYPE_KYMC_8 = $060421;
+ TYPE_KYMC_16 = $060422;
+ TYPE_KYMC_16_SE = $060c22;
+ TYPE_KCMY_8 = $064021;
+ TYPE_KCMY_8_REV = $066021;
+ TYPE_KCMY_16 = $064022;
+ TYPE_KCMY_16_REV = $066022;
+ TYPE_KCMY_16_SE = $064822;
+ TYPE_CMYK5_8 = $130029;
+ TYPE_CMYK5_16 = $13002a;
+ TYPE_CMYK5_16_SE = $13082a;
+ TYPE_KYMC5_8 = $130429;
+ TYPE_KYMC5_16 = $13042a;
+ TYPE_KYMC5_16_SE = $130c2a;
+ TYPE_CMYK6_8 = $140031;
+ TYPE_CMYK6_8_PLANAR = $141031;
+ TYPE_CMYK6_16 = $140032;
+ TYPE_CMYK6_16_PLANAR = $141032;
+ TYPE_CMYK6_16_SE = $140832;
+ TYPE_CMYK7_8 = $150039;
+ TYPE_CMYK7_16 = $15003a;
+ TYPE_CMYK7_16_SE = $15083a;
+ TYPE_KYMC7_8 = $150439;
+ TYPE_KYMC7_16 = $15043a;
+ TYPE_KYMC7_16_SE = $150c3a;
+ TYPE_CMYK8_8 = $160041;
+ TYPE_CMYK8_16 = $160042;
+ TYPE_CMYK8_16_SE = $160842;
+ TYPE_KYMC8_8 = $160441;
+ TYPE_KYMC8_16 = $160442;
+ TYPE_KYMC8_16_SE = $160c42;
+ TYPE_CMYK9_8 = $170049;
+ TYPE_CMYK9_16 = $17004a;
+ TYPE_CMYK9_16_SE = $17084a;
+ TYPE_KYMC9_8 = $170449;
+ TYPE_KYMC9_16 = $17044a;
+ TYPE_KYMC9_16_SE = $170c4a;
+ TYPE_CMYK10_8 = $180051;
+ TYPE_CMYK10_16 = $180052;
+ TYPE_CMYK10_16_SE = $180852;
+ TYPE_KYMC10_8 = $180451;
+ TYPE_KYMC10_16 = $180452;
+ TYPE_KYMC10_16_SE = $180c52;
+ TYPE_CMYK11_8 = $190059;
+ TYPE_CMYK11_16 = $19005a;
+ TYPE_CMYK11_16_SE = $19085a;
+ TYPE_KYMC11_8 = $190459;
+ TYPE_KYMC11_16 = $19045a;
+ TYPE_KYMC11_16_SE = $190c5a;
+ TYPE_CMYK12_8 = $1a0061;
+ TYPE_CMYK12_16 = $1a0062;
+ TYPE_CMYK12_16_SE = $1a0862;
+ TYPE_KYMC12_8 = $1a0461;
+ TYPE_KYMC12_16 = $1a0462;
+ TYPE_KYMC12_16_SE = $1a0c62;
+ TYPE_XYZ_16 = $09001a;
+ TYPE_Lab_8 = $0a0019;
+ TYPE_ALab_8 = $0a0499;
+ TYPE_Lab_16 = $0a001a;
+ TYPE_Yxy_16 = $0e001a;
+ TYPE_YCbCr_8 = $070019;
+ TYPE_YCbCr_8_PLANAR = $071019;
+ TYPE_YCbCr_16 = $07001a;
+ TYPE_YCbCr_16_PLANAR = $07101a;
+ TYPE_YCbCr_16_SE = $07081a;
+ TYPE_YUV_8 = $080019;
+ TYPE_YUV_8_PLANAR = $081019;
+ TYPE_YUV_16 = $08001a;
+ TYPE_YUV_16_PLANAR = $08101a;
+ TYPE_YUV_16_SE = $08081a;
+ TYPE_HLS_8 = $0d0019;
+ TYPE_HLS_8_PLANAR = $0d1019;
+ TYPE_HLS_16 = $0d001a;
+ TYPE_HLS_16_PLANAR = $0d101a;
+ TYPE_HLS_16_SE = $0d081a;
+ TYPE_HSV_8 = $0c0019;
+ TYPE_HSV_8_PLANAR = $0c1019;
+ TYPE_HSV_16 = $0c001a;
+ TYPE_HSV_16_PLANAR = $0c101a;
+ TYPE_HSV_16_SE = $0c081a;
+
+ TYPE_NAMED_COLOR_INDEX = $000A;
+
+ TYPE_XYZ_FLT = $49001c;
+ TYPE_Lab_FLT = $4a001c;
+ TYPE_GRAY_FLT = $43000c;
+ TYPE_RGB_FLT = $44001c;
+ TYPE_CMYK_FLT = $460024;
+ TYPE_XYZA_FLT = $49009c;
+ TYPE_LabA_FLT = $4a009c;
+ TYPE_RGBA_FLT = $44009c;
+
+ TYPE_XYZ_DBL = $490018;
+ TYPE_Lab_DBL = $4a0018;
+ TYPE_GRAY_DBL = $430008;
+ TYPE_RGB_DBL = $440018;
+ TYPE_CMYK_DBL = $460020;
+ TYPE_LabV2_8 = $1e0019;
+ TYPE_ALabV2_8 = $1e0499;
+ TYPE_LabV2_16 = $1e001a;
+
+ TYPE_GRAY_HALF_FLT = $43000a;
+ TYPE_RGB_HALF_FLT = $44001a;
+ TYPE_RGBA_HALF_FLT = $44009a;
+ TYPE_CMYK_HALF_FLT = $460022;
+
+ TYPE_ARGB_HALF_FLT = $44409a;
+ TYPE_BGR_HALF_FLT = $44041a;
+ TYPE_BGRA_HALF_FLT = $44449a;
+ TYPE_ABGR_HALF_FLT = $44041a;
+
+TYPE
+
+
+ // Colorimetric spaces
+
+ cmsCIEXYZ = PACKED RECORD
+ X, Y, Z : cmsFloat64Number;
+ END;
+ LPcmsCIEXYZ = ^cmsCIEXYZ;
+
+ cmsCIExyY = PACKED RECORD
+ x, y, YY : cmsFloat64Number
+ END;
+ LPcmsCIExyY = ^cmsCIEXYY;
+
+ cmsCIELab = PACKED RECORD
+ L, a, b: cmsFloat64Number
+ END;
+ LPcmsCIELab = ^cmsCIELab;
+
+ cmsCIELCh = PACKED RECORD
+ L, C, h : cmsFloat64Number
+ END;
+ LPcmsCIELCh = ^cmsCIELCh;
+
+ cmsJCh = PACKED RECORD
+ J, C, h : cmsFloat64Number
+ END;
+ LPcmsJCh = ^cmsJCH;
+
+
+ cmsCIEXYZTRIPLE = PACKED RECORD
+ Red, Green, Blue : cmsCIEXYZ
+ END;
+ LPcmsCIEXYZTRIPLE = ^cmsCIEXYZTRIPLE;
+
+
+ cmsCIExyYTRIPLE = PACKED RECORD
+ Red, Green, Blue : cmsCIExyY
+ END;
+ LPcmsCIExyYTRIPLE = ^cmsCIExyYTRIPLE;
+
+
+CONST
+
+ // Illuminant types for structs below
+ cmsILLUMINANT_TYPE_UNKNOWN = $0000000;
+ cmsILLUMINANT_TYPE_D50 = $0000001;
+ cmsILLUMINANT_TYPE_D65 = $0000002;
+ cmsILLUMINANT_TYPE_D93 = $0000003;
+ cmsILLUMINANT_TYPE_F2 = $0000004;
+ cmsILLUMINANT_TYPE_D55 = $0000005;
+ cmsILLUMINANT_TYPE_A = $0000006;
+ cmsILLUMINANT_TYPE_E = $0000007;
+ cmsILLUMINANT_TYPE_F8 = $0000008;
+
+TYPE
+
+ cmsICCMeasurementConditions = PACKED RECORD
+
+ Observer: cmsUInt32Number; // 0 = unknown, 1=CIE 1931, 2=CIE 1964
+ Backing: cmsCIEXYZ; // Value of backing
+ Geometry: cmsUInt32Number; // 0=unknown, 1=45/0, 0/45 2=0d, d/0
+ Flare: cmsFloat64Number; // 0..1.0
+ IlluminantType: cmsUInt32Number;
+
+ END;
+
+ cmsICCViewingConditions = PACKED RECORD
+ IlluminantXYZ: cmsCIEXYZ; // Not the same struct as CAM02,
+ SurroundXYZ: cmsCIEXYZ; // This is for storing the tag
+ IlluminantType: cmsUInt32Number; // viewing condition
+ END;
+
+
+// Context --------------------------------------------------------------------------------------------------------------
+
+FUNCTION cmsCreateContext(Plugin : Pointer; UserData : Pointer) : cmsContext; StdCall;
+PROCEDURE cmsDeleteContext(ContextID: cmsContext); StdCall;
+FUNCTION cmsDupContext(ContextID: cmsContext; NewUserData: Pointer): cmsContext; StdCall;
+FUNCTION cmsGetContextUserData(ContextID: cmsContext): Pointer; StdCall;
+
+// Plug-In registering ---------------------------------------------------------------------------------------------------
+
+FUNCTION cmsPlugin(Plugin: Pointer): cmsBool; StdCall;
+PROCEDURE cmsUnregisterPlugins; StdCall;
+
+// Error logging ----------------------------------------------------------------------------------------------------------
+
+// There is no error handling at all. When a function fails, it returns proper value.
+// For example, all create functions does return NULL on failure. Other may return FALSE.
+// It may be interesting, for the developer, to know why the function is failing.
+// for that reason, lcms2 does offer a logging function. This function will get
+// an ENGLISH string with some clues on what is going wrong. You can show this
+// info to the end user if you wish, or just create some sort of log on disk.
+// The logging function should NOT terminate the program, as this obviously can leave
+// unfreed resources. It is the programmer's responsibility to check each function
+// return code to make sure it didn't fail.
+
+CONST
+
+ cmsERROR_UNDEFINED = 0;
+ cmsERROR_FILE = 1;
+ cmsERROR_RANGE = 2;
+ cmsERROR_INTERNAL = 3;
+ cmsERROR_NULL = 4;
+ cmsERROR_READ = 5;
+ cmsERROR_SEEK = 6;
+ cmsERROR_WRITE = 7;
+ cmsERROR_UNKNOWN_EXTENSION = 8;
+ cmsERROR_COLORSPACE_CHECK = 9;
+ cmsERROR_ALREADY_DEFINED = 10;
+ cmsERROR_BAD_SIGNATURE = 11;
+ cmsERROR_CORRUPTION_DETECTED = 12;
+ cmsERROR_NOT_SUITABLE = 13;
+
+// Error logger is called with the ContextID when a message is raised. This gives the
+// chance to know which thread is responsible of the warning and any environment associated
+// with it. Non-multithreading applications may safely ignore this parameter.
+// Note that under certain special circumstances, ContextID may be NULL.
+
+TYPE
+
+ cmsLogErrorHandlerFunction = PROCEDURE( ContextID: cmsContext; ErrorCode: cmsUInt32Number; Text: PAnsiChar); CDecl;
+
+ // Allows user to set any specific logger
+ PROCEDURE cmsSetLogErrorHandler(Fn: cmsLogErrorHandlerFunction); StdCall;
+
+
+// Conversions --------------------------------------------------------------------------------------------------------------
+
+
+// Returns pointers to constant structs
+FUNCTION cmsD50_XYZ: LPcmsCIEXYZ; StdCall;
+FUNCTION cmsD50_xyY: LPcmsCIExyY; StdCall;
+
+// Colorimetric space conversions
+PROCEDURE cmsXYZ2xyY(Dest: LPcmsCIExyY; Source: LPcmsCIEXYZ); StdCall;
+PROCEDURE cmsxyY2XYZ(Dest: LPcmsCIEXYZ; Source: LPcmsCIExyY); StdCall;
+PROCEDURE cmsLab2XYZ(WhitePoint: LPcmsCIEXYZ; xyz: LPcmsCIEXYZ; Lab: LPcmsCIELab); StdCall;
+PROCEDURE cmsXYZ2Lab(WhitePoint: LPcmsCIEXYZ; Lab: LPcmsCIELab; xyz: LPcmsCIEXYZ); StdCall;
+PROCEDURE cmsLab2LCh(LCh: LPcmsCIELCh; Lab: LPcmsCIELab); StdCall;
+PROCEDURE cmsLCh2Lab(Lab: LPcmsCIELab; LCh: LPcmsCIELCh); StdCall;
+
+// Encoding /Decoding on PCS
+PROCEDURE cmsLabEncoded2Float(Lab: LPcmsCIELab; wLab: Pointer); StdCall;
+PROCEDURE cmsLabEncoded2FloatV2(Lab: LPcmsCIELab; wLab: Pointer); StdCall;
+PROCEDURE cmsFloat2LabEncoded(wLab: Pointer; Lab: LPcmsCIELab); StdCall;
+PROCEDURE cmsFloat2LabEncodedV2(wLab: Pointer; Lab: LPcmsCIELab); StdCall;
+PROCEDURE cmsXYZEncoded2Float(fxyz : LPcmsCIEXYZ; XYZ: Pointer); StdCall;
+PROCEDURE cmsFloat2XYZEncoded(XYZ: Pointer; fXYZ: LPcmsCIEXYZ); StdCall;
+
+
+// DeltaE metrics
+FUNCTION cmsDeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;
+FUNCTION cmsCIE94DeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;
+FUNCTION cmsBFDdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;
+FUNCTION cmsCMCdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall;
+FUNCTION cmsCIE2000DeltaE(Lab1, Lab2: LPcmsCIELab; Kl, Kc, Kh: Double): Double; StdCall;
+
+
+// Temperature <-> Chromaticity (Black body)
+FUNCTION cmsWhitePointFromTemp(var WhitePoint: cmsCIExyY; TempK: cmsFloat64Number) : cmsBool; StdCall;
+FUNCTION cmsTempFromWhitePoint(var TeampK: cmsFloat64Number; var WhitePoint: cmsCIExyY) : cmsBool; StdCall;
+
+
+// Chromatic adaptation
+FUNCTION cmsAdaptToIlluminant(Result: LPcmsCIEXYZ; SourceWhitePt: LPcmsCIEXYZ;
+ Illuminant: LPcmsCIEXYZ; Value: LPcmsCIEXYZ): cmsBool; StdCall;
+
+
+// CIECAM02 ---------------------------------------------------------------------------------------------------
+
+// Viewing conditions. Please note those are CAM model viewing conditions, and not the ICC tag viewing
+// conditions, which I'm naming cmsICCViewingConditions to make differences evident. Unfortunately, the tag
+// cannot deal with surround La, Yb and D value so is basically useless to store CAM02 viewing conditions.
+
+ CONST
+
+ AVG_SURROUND = 1;
+ DIM_SURROUND = 2;
+ DARK_SURROUND = 3;
+ CUTSHEET_SURROUND = 4;
+
+ D_CALCULATE = -1;
+
+ TYPE
+
+ cmsViewingConditions = PACKED RECORD
+
+ WhitePoint: cmsCIEXYZ;
+ Yb : cmsFloat64Number;
+ La : cmsFloat64Number;
+ surround : Integer;
+ D_value : cmsFloat64Number
+ END;
+
+
+ LPcmsViewingConditions = ^cmsViewingConditions;
+
+FUNCTION cmsCIECAM02Init(pVC : LPcmsViewingConditions ) : Pointer; StdCall;
+PROCEDURE cmsCIECAM02Done(hModel : Pointer); StdCall;
+PROCEDURE cmsCIECAM02Forward(hModel: Pointer; pIn: LPcmsCIEXYZ; pOut: LPcmsJCh ); StdCall;
+PROCEDURE cmsCIECAM02Reverse(hModel: Pointer; pIn: LPcmsJCh; pOut: LPcmsCIEXYZ ); StdCall;
+
+// Tone curves -----------------------------------------------------------------------------------------
+
+// This describes a curve segment. For a table of supported types, see the manual. User can increase the number of
+// available types by using a proper plug-in. Parametric segments allow 10 parameters at most
+
+TYPE
+cmsCurveSegment = PACKED RECORD
+ x0, x1: cmsFloat32Number; // Domain; for x0 < x <= x1
+ PType: cmsInt32Number; // Parametric type, Type == 0 means sampled segment. Negative values are reserved
+ Params: array [0..9] of cmsFloat64Number; // Parameters if Type != 0
+ nGridPoints: cmsUInt32Number; // Number of grid points if Type == 0
+ SampledPoints: LPcmsFloat32Number; // Points to an array of floats if Type == 0
+END;
+
+LPcmsToneCurve = Pointer;
+LPcmsCurveSegmentArray = ^cmsCurveSegmentArray;
+cmsCurveSegmentArray = array[0..0] of cmsCurveSegment;
+
+LPcmsFloat64NumberArray = ^cmsFloat64NumberArray;
+cmsFloat64NumberArray = array[0..0] of cmsFloat64Number;
+
+LPcmsUInt16NumberArray = ^cmsUInt16NumberArray;
+cmsUInt16NumberArray = array[0..0] of cmsUInt16Number;
+
+LPcmsFloat32NumberArray = ^cmsFloat32NumberArray;
+cmsFloat32NumberArray = array[0..0] of cmsFloat32Number;
+
+LPLPcmsToneCurveArray = ^LPcmsToneCurveArray;
+LPcmsToneCurveArray = array[0..0] of LPcmsToneCurve;
+
+LPcmsUInt32NumberArray = ^cmsUInt32NumberArray;
+cmsUInt32NumberArray = array[0..0] of cmsUInt32Number;
+
+FUNCTION cmsBuildSegmentedToneCurve(ContextID: cmsContext; nSegments: cmsInt32Number; Segments: LPcmsCurveSegmentArray): LPcmsToneCurve; StdCall;
+FUNCTION cmsBuildParametricToneCurve(ContextID: cmsContext; CType: cmsInt32Number; Params: LPcmsFloat64NumberArray): LPcmsToneCurve; StdCall;
+FUNCTION cmsBuildGamma(ContextID: cmsContext; Gamma: cmsFloat64Number): LPcmsToneCurve; StdCall;
+FUNCTION cmsBuildTabulatedToneCurve16(ContextID: cmsContext; nEntries: cmsInt32Number; values: LPcmsUInt16NumberArray): LPcmsToneCurve; StdCall;
+FUNCTION cmsBuildTabulatedToneCurveFloat(ContextID: cmsContext; nEntries: cmsUInt32Number; values: LPcmsFloat32NumberArray): LPcmsToneCurve; StdCall;
+PROCEDURE cmsFreeToneCurve(Curve: LPcmsToneCurve); StdCall;
+PROCEDURE cmsFreeToneCurveTriple(Curve: LPLPcmsToneCurveArray); StdCall;
+FUNCTION cmsDupToneCurve(Src: LPcmsToneCurve): LPcmsToneCurve; StdCall;
+FUNCTION cmsReverseToneCurve(InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall;
+FUNCTION cmsReverseToneCurveEx(nResultSamples: cmsInt32Number; InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall;
+FUNCTION cmsJoinToneCurve(ContextID: cmsContext; X, Y: LPcmsToneCurve; nPoints: cmsUInt32Number ): LPcmsToneCurve; StdCall;
+FUNCTION cmsSmoothToneCurve(Tab: LPcmsToneCurve; lambda: cmsFloat64Number): cmsBool; StdCall;
+FUNCTION cmsEvalToneCurveFloat(Curve: LPcmsToneCurve; v: cmsFloat32Number):cmsFloat32Number; StdCall;
+FUNCTION cmsEvalToneCurve16(Curve: LPcmsToneCurve; v:cmsUInt16Number):cmsUInt16Number; StdCall;
+FUNCTION cmsIsToneCurveMultisegment(InGamma: LPcmsToneCurve):cmsBool; StdCall;
+FUNCTION cmsIsToneCurveLinear(Curve: LPcmsToneCurve):cmsBool; StdCall;
+FUNCTION cmsIsToneCurveMonotonic(t: LPcmsToneCurve):cmsBool; StdCall;
+FUNCTION cmsIsToneCurveDescending(t: LPcmsToneCurve):cmsBool; StdCall;
+FUNCTION cmsGetToneCurveParametricType(t: LPcmsToneCurve):cmsInt32Number; StdCall;
+FUNCTION cmsEstimateGamma(t: LPcmsToneCurve; Precision:cmsFloat64Number):cmsFloat64Number; StdCall;
+FUNCTION cmsGetToneCurveEstimatedTableEntries(t: LPcmsToneCurve): cmsUInt32Number; StdCall;
+FUNCTION cmsGetToneCurveEstimatedTable(t: LPcmsToneCurve): LPcmsUInt16Number; StdCall;
+
+
+// Implements pipelines of multi-processing elements -------------------------------------------------------------
+
+TYPE
+ LPcmsPipeline = Pointer;
+ LPcmsStage = Pointer;
+ LPLPcmsStage = ^LPcmsStage;
+
+// Those are hi-level pipelines
+FUNCTION cmsPipelineAlloc(ContextID: cmsContext; InputChannels, OutputChannels: cmsUInt32Number): LPcmsPipeline; StdCall;
+PROCEDURE cmsPipelineFree(lut: LPcmsPipeline); StdCall;
+FUNCTION cmsPipelineDup(Orig: LPcmsPipeline): LPcmsPipeline; StdCall;
+FUNCTION cmsGetPipelineContextID(lut: LPcmsPipeline) : cmsContext; StdCall;
+FUNCTION cmsPipelineInputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall;
+FUNCTION cmsPipelineOutputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall;
+
+FUNCTION cmsPipelineStageCount(lut: LPcmsPipeline): cmsUInt32Number; StdCall;
+FUNCTION cmsPipelineGetPtrToFirstStage(lut: LPcmsPipeline): LPcmsStage; StdCall;
+FUNCTION cmsPipelineGetPtrToLastStage(lut: LPcmsPipeline): LPcmsStage; StdCall;
+
+PROCEDURE cmsPipelineEval16(Inv, Outv: LPcmsUInt16NumberArray; lut: LPcmsPipeline); StdCall;
+PROCEDURE cmsPipelineEvalFloat(Inv, Outv: LPcmsFloat32NumberArray; lut: LPcmsPipeline); StdCall;
+
+FUNCTION cmsPipelineEvalReverseFloat(Target, Result, Hint: LPcmsFloat32NumberArray; lut: LPcmsPipeline): cmsBool; StdCall;
+FUNCTION cmsPipelineCat(l1, l2: LPcmsPipeline): cmsBool; StdCall;
+FUNCTION cmsPipelineSetSaveAs8bitsFlag(lut: LPcmsPipeline; On: cmsBool): cmsBool; StdCall;
+
+// Where to place/locate the stages in the pipeline chain
+TYPE
+ cmsStageLoc = (cmsAT_BEGIN = 0, cmsAT_END = 1 );
+
+PROCEDURE cmsPipelineInsertStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPcmsStage); StdCall;
+PROCEDURE cmsPipelineUnlinkStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPLPcmsStage); StdCall;
+
+// This function is quite useful to analyze the structure of a Pipeline and retrieve the Stage elements
+// that conform the Pipeline. It should be called with the Pipeline, the number of expected elements and
+// then a list of expected types followed with a list of double pointers to Stage elements. If
+// the function founds a match with current pipeline, it fills the pointers and returns TRUE
+// if not, returns FALSE without touching anything.
+// FUNCTION cmsPipelineCheckAndRetreiveStages(const cmsPipeline* Lut, n: cmsUInt32Number, ...): cmsBool; StdCall;
+
+// Matrix has double precision and CLUT has only float precision. That is because an ICC profile can encode
+// matrices with far more precision that CLUTS
+FUNCTION cmsStageAllocIdentity(ContextID: cmsContext; nChannels: cmsUInt32Number): LPcmsStage; StdCall;
+FUNCTION cmsStageAllocToneCurves(ContextID: cmsContext; nChannels: cmsUInt32Number; Curves: LPLPcmsToneCurveArray): LPcmsStage; StdCall;
+FUNCTION cmsStageAllocMatrix(ContextID: cmsContext; Rows, Cols: cmsUInt32Number; Matrix, Offset: LPcmsFloat64NumberArray): LPcmsStage; StdCall;
+
+FUNCTION cmsStageAllocCLut16bit(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall;
+FUNCTION cmsStageAllocCLutFloat(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall;
+
+FUNCTION cmsStageAllocCLut16bitGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall;
+FUNCTION cmsStageAllocCLutFloatGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall;
+
+
+FUNCTION cmsStageDup(mpe: LPcmsStage): LPcmsStage; StdCall;
+PROCEDURE cmsStageFree(mpe: LPcmsStage); StdCall;
+FUNCTION cmsStageNext(mpe: LPcmsStage): LPcmsStage; StdCall;
+
+FUNCTION cmsStageInputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall;
+FUNCTION cmsStageOutputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall;
+FUNCTION cmsStageType(mpe: LPcmsStage): cmsStageSignature; StdCall;
+FUNCTION cmsStageData(mpe: LPcmsStage): Pointer; StdCall;
+
+// Sampling
+
+Type
+ cmsSAMPLER16 = FUNCTION (Inp, Outp: LPcmsUInt16NumberArray; Cargo: Pointer): cmsInt32Number; CDecl;
+ cmsSAMPLERFLOAT = FUNCTION (Inp, Outp: LPcmsFloat32NumberArray; Cargo: Pointer): cmsInt32Number; CDecl;
+
+// Use this flag to prevent changes being written to destination
+
+Const
+
+SAMPLER_INSPECT = $01000000;
+
+
+// For CLUT only
+FUNCTION cmsStageSampleCLut16bit(mpe: LPcmsStage; Sampler: cmsSAMPLER16; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall;
+FUNCTION cmsStageSampleCLutFloat(mpe: LPcmsStage; Sampler: cmsSAMPLERFLOAT; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall;
+
+
+// Slicers
+FUNCTION cmsSliceSpace16(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;
+ Sampler: cmsSAMPLER16; Cargo: Pointer): cmsBool; StdCall;
+
+FUNCTION cmsSliceSpaceFloat(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;
+ Sampler: cmsSAMPLERFLOAT; Cargo: Pointer): cmsBool; StdCall;
+
+// Multilocalized Unicode management ---------------------------------------------------------------------------------------
+
+Type
+ LPcmsMLU = Pointer;
+
+Const
+
+cmsNoLanguage = #0#0#0;
+cmsNoCountry = #0#0#0;
+
+
+FUNCTION cmsMLUalloc(ContextID: cmsContext; nItems: cmsUInt32Number): LPcmsMLU; StdCall;
+PROCEDURE cmsMLUfree(mlu: LPcmsMLU); StdCall;
+FUNCTION cmsMLUdup(mlu: LPcmsMLU): LPcmsMLU; StdCall;
+
+FUNCTION cmsMLUsetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode, ASCIIString: PAnsiChar): cmsBool; StdCall;
+FUNCTION cmsMLUsetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; WideString: PWChar): cmsBool; StdCall;
+
+FUNCTION cmsMLUgetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;
+
+FUNCTION cmsMLUgetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;
+
+FUNCTION cmsMLUgetTranslation(mlu: LPcmsMLU; LanguageCode, CountryCode, ObtainedLanguage, ObtainedCountry: PAnsiChar): cmsBool; StdCall;
+
+// Undercolorremoval & black generation -------------------------------------------------------------------------------------
+
+Type
+
+cmsUcrBg = PACKED RECORD
+ Ucr, Bg: LPcmsToneCurve;
+ Desc: LPcmsMLU;
+ END;
+
+
+// Screening ----------------------------------------------------------------------------------------------------------------
+
+Const
+
+ cmsPRINTER_DEFAULT_SCREENS = $0001;
+ cmsFREQUENCE_UNITS_LINES_CM = $0000;
+ cmsFREQUENCE_UNITS_LINES_INCH = $0002;
+
+ cmsSPOT_UNKNOWN = 0;
+ cmsSPOT_PRINTER_DEFAULT = 1;
+ cmsSPOT_ROUND = 2;
+ cmsSPOT_DIAMOND = 3;
+ cmsSPOT_ELLIPSE = 4;
+ cmsSPOT_LINE = 5;
+ cmsSPOT_SQUARE = 6;
+ cmsSPOT_CROSS = 7;
+
+
+Type
+
+cmsScreeningChannel = PACKED RECORD
+
+ Frequency,
+ ScreenAngle: cmsFloat64Number;
+ SpotShape: cmsUInt32Number;
+
+END;
+
+cmsScreening = PACKED RECORD
+
+ Flag,
+ nChannels : cmsUInt32Number;
+ Channels: Array [0..cmsMAXCHANNELS-1] OF cmsScreeningChannel;
+END;
+
+
+// Named color -----------------------------------------------------------------------------------------------------------------
+
+
+LPcmsNAMEDCOLORLIST = Pointer;
+
+FUNCTION cmsAllocNamedColorList(ContextID: cmsContext; n, ColorantCount :cmsUInt32Number;
+ Prefix, Suffix: PAnsiChar): LPcmsNAMEDCOLORLIST; StdCall;
+
+PROCEDURE cmsFreeNamedColorList(v: LPcmsNAMEDCOLORLIST); StdCall;
+FUNCTION cmsDupNamedColorList(v: LPcmsNAMEDCOLORLIST): LPcmsNAMEDCOLORLIST; StdCall;
+FUNCTION cmsAppendNamedColor(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar;
+ PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall;
+
+FUNCTION cmsNamedColorCount(v: LPcmsNAMEDCOLORLIST): cmsUInt32Number; StdCall;
+FUNCTION cmsNamedColorIndex(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar): cmsInt32Number; StdCall;
+
+FUNCTION cmsNamedColorInfo(v: LPcmsNAMEDCOLORLIST; nColor : cmsUInt32Number;
+ Name,Prefix, Suffix : PAnsiChar;
+ PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall;
+
+// Retrieve named color list from transform
+FUNCTION cmsGetNamedColorList(xform: cmsHTRANSFORM ): LPcmsNAMEDCOLORLIST; StdCall;
+
+// Profile sequence -----------------------------------------------------------------------------------------------------
+
+Type
+
+// Profile sequence descriptor. Some fields come from profile sequence descriptor tag, others
+// come from Profile Sequence Identifier Tag
+
+cmsPSEQDESC = PACKED RECORD
+ deviceMfg, deviceModel: cmsSignature;
+
+ attributes: cmsUInt64Number;
+ technology: cmsTechnologySignature;
+ ProfileID: cmsProfileID;
+ Manufacturer,
+ Model,
+ Description : LPcmsMLU;
+ END;
+
+ LPcmsSEQDESC = ^cmsPSEQDESC;
+
+cmsSEQ = PACKED RECORD
+
+ n: cmsUInt32Number;
+ ContextID: cmsContext;
+ seq: LPcmsSEQDESC;
+END;
+
+LPcmsSEQ = ^cmsSEQ;
+
+FUNCTION cmsAllocProfileSequenceDescription(ContextID: cmsContext; n: cmsUInt32Number):LPcmsSEQ; StdCall;
+FUNCTION cmsDupProfileSequenceDescription(pseq: LPcmsSEQ):LPcmsSEQ; StdCall;
+PROCEDURE cmsFreeProfileSequenceDescription(pseq: LPcmsSEQ); StdCall;
+
+// Dictionaries --------------------------------------------------------------------------------------------------------
+
+TYPE
+
+ LPcmsDICTentry = ^cmsDICTentry;
+
+cmsDICTentry = PACKED RECORD
+
+ Next: LPcmsDICTentry;
+
+ DisplayName, DisplayValue: LPcmsMLU;
+ Name, Value : PWChar;
+END;
+
+FUNCTION cmsDictAlloc(ContextID: cmsContext): cmsHANDLE; StdCall;
+PROCEDURE cmsDictFree(hDict: cmsHANDLE); StdCall;
+FUNCTION cmsDictDup(hDict: cmsHANDLE): cmsHANDLE; StdCall;
+
+FUNCTION cmsDictAddEntry(hDict: cmsHANDLE; Name, Value: PWChar; DisplayName, DisplayValue : LPcmsMLU): cmsBool; StdCall;
+FUNCTION cmsDictGetEntryList(hDict: cmsHANDLE): LPcmsDICTentry; StdCall;
+FUNCTION cmsDictNextEntry(e : LPcmsDICTentry): LPcmsDICTentry; StdCall;
+
+// Access to Profile data ----------------------------------------------------------------------------------------------
+FUNCTION cmsCreateProfilePlaceholder(ContextID: cmsContext): cmsHPROFILE; StdCall;
+
+FUNCTION cmsGetProfileContextID(hProfile: cmsHPROFILE):cmsContext; StdCall;
+FUNCTION cmsGetTagCount(hProfile: cmsHPROFILE): cmsInt32Number; StdCall;
+FUNCTION cmsGetTagSignature(hProfile: cmsHPROFILE; n: cmsUInt32Number): cmsTagSignature; StdCall;
+FUNCTION cmsIsTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): cmsBool; StdCall;
+
+// Read and write pre-formatted data
+FUNCTION cmsReadTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): Pointer; StdCall;
+FUNCTION cmsWriteTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer): cmsBool; StdCall;
+FUNCTION cmsLinkTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; dest: cmsTagSignature): cmsBool; StdCall;
+FUNCTION cmsTagLinkedTo(hProfile: cmsHPROFILE; sig: cmsTagSignature):cmsTagSignature; StdCall;
+
+// Read and write raw data
+FUNCTION cmsReadRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; Buffer: Pointer; BufferSize: cmsUInt32Number): cmsInt32Number; StdCall;
+FUNCTION cmsWriteRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer; Size: cmsUInt32Number): cmsBool; StdCall;
+
+// Access header data
+Const
+
+ cmsEmbeddedProfileFalse = $00000000;
+ cmsEmbeddedProfileTrue = $00000001;
+ cmsUseAnywhere = $00000000;
+ cmsUseWithEmbeddedDataOnly = $00000002;
+
+FUNCTION cmsGetHeaderFlags(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;
+PROCEDURE cmsGetHeaderAttributes(hProfile: cmsHPROFILE; Flags: LPcmsUInt64Number); StdCall;
+PROCEDURE cmsGetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall;
+
+// TODO:
+// FUNCTION cmsGetHeaderCreationDateTime(hProfile: cmsHPROFILE; struct tm *Dest): cmsBool; StdCall;
+
+FUNCTION cmsGetHeaderRenderingIntent(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;
+PROCEDURE cmsSetHeaderFlags(hProfile: cmsHPROFILE; Flags: cmsUInt32Number); StdCall;
+FUNCTION cmsGetHeaderManufacturer(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;
+PROCEDURE cmsSetHeaderManufacturer(hProfile: cmsHPROFILE; manufacturer: cmsUInt32Number ); StdCall;
+FUNCTION cmsGetHeaderModel(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;
+PROCEDURE cmsSetHeaderModel(hProfile: cmsHPROFILE; model: cmsUInt32Number ); StdCall;
+PROCEDURE cmsSetHeaderAttributes(hProfile: cmsHPROFILE; Flags: cmsUInt64Number); StdCall;
+PROCEDURE cmsSetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall;
+PROCEDURE cmsSetHeaderRenderingIntent(hProfile: cmsHPROFILE; RenderingIntent: cmsUInt32Number ); StdCall;
+
+FUNCTION cmsGetPCS(hProfile: cmsHPROFILE):cmsColorSpaceSignature; StdCall;
+PROCEDURE cmsSetPCS(hProfile: cmsHPROFILE; pcs: cmsColorSpaceSignature); StdCall;
+FUNCTION cmsGetColorSpace(hProfile: cmsHPROFILE): cmsColorSpaceSignature; StdCall;
+PROCEDURE cmsSetColorSpace(hProfile: cmsHPROFILE; sig: cmsColorSpaceSignature); StdCall;
+FUNCTION cmsGetDeviceClass(hProfile: cmsHPROFILE): cmsProfileClassSignature; StdCall;
+PROCEDURE cmsSetDeviceClass(hProfile: cmsHPROFILE; sig: cmsProfileClassSignature); StdCall;
+PROCEDURE cmsSetProfileVersion(hProfile: cmsHPROFILE; Version: cmsFloat64Number); StdCall;
+FUNCTION cmsGetProfileVersion(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall;
+
+FUNCTION cmsGetEncodedICCversion(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall;
+PROCEDURE cmsSetEncodedICCversion(hProfile: cmsHPROFILE; Version: cmsUInt32Number); StdCall;
+
+
+Const
+
+ // How profiles may be used
+ LCMS_USED_AS_INPUT = 0;
+ LCMS_USED_AS_OUTPUT = 1;
+ LCMS_USED_AS_PROOF = 2;
+
+FUNCTION cmsIsIntentSupported(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall;
+FUNCTION cmsIsMatrixShaper(hProfile: cmsHPROFILE): cmsBool; StdCall;
+FUNCTION cmsIsCLUT(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall;
+
+// Translate form/to our notation to ICC
+FUNCTION _cmsICCcolorSpace(OurNotation: Integer): cmsColorSpaceSignature; StdCall;
+FUNCTION _cmsLCMScolorSpace(ProfileSpace: cmsColorSpaceSignature): Integer; StdCall;
+
+FUNCTION cmsChannelsOf( ColorSpace: cmsColorSpaceSignature): cmsUInt32Number; StdCall;
+
+// Build a suitable formatter for the colorspace of this profile
+FUNCTION cmsFormatterForColorspaceOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall;
+FUNCTION cmsFormatterForPCSOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall;
+
+Type
+
+// Localized info
+cmsInfoType = (
+ cmsInfoDescription = 0,
+ cmsInfoManufacturer = 1,
+ cmsInfoModel = 2,
+ cmsInfoCopyright = 3
+);
+
+FUNCTION cmsGetProfileInfo(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;
+ Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;
+
+FUNCTION cmsGetProfileInfoASCII(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;
+ Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall;
+
+// IO handlers ----------------------------------------------------------------------------------------------------------
+
+Type
+
+LPcmsIOHANDLER = Pointer;
+
+FUNCTION cmsOpenIOhandlerFromFile(ContextID: cmsContext; FileName, AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall;
+// FUNCTION cmsOpenIOhandlerFromStream(ContextID: cmsContext; FILE* Stream): LPcmsIOHANDLER; StdCall;
+FUNCTION cmsOpenIOhandlerFromMem(ContextID: cmsContext; Buffer: Pointer; size: cmsUInt32Number; AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall;
+FUNCTION cmsOpenIOhandlerFromNULL(ContextID: cmsContext): LPcmsIOHANDLER; StdCall;
+FUNCTION cmsCloseIOhandler(io: LPcmsIOHANDLER): cmsBool; StdCall;
+
+// MD5 message digest --------------------------------------------------------------------------------------------------
+
+FUNCTION cmsMD5computeID(hProfile: cmsHPROFILE): cmsBool; StdCall;
+
+// Profile high level functions ------------------------------------------------------------------------------------------
+
+FUNCTION cmsOpenProfileFromFile(ICCProfile : PAnsiChar; sAccess: PAnsiChar): cmsHPROFILE; StdCall;
+FUNCTION cmsOpenProfileFromFileTHR(ContextID: cmsContext; ICCProfile, sAccess: PAnsiChar): cmsHPROFILE; StdCall;
+// FUNCTION CMSEXPORT cmsOpenProfileFromStream(FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall;
+// FUNCTION CMSEXPORT cmsOpenProfileFromStreamTHR(ContextID: cmsContext; FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall;
+FUNCTION cmsOpenProfileFromMem(MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall;
+FUNCTION cmsOpenProfileFromMemTHR(ContextID: cmsContext; MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall;
+FUNCTION cmsOpenProfileFromIOhandlerTHR(ContextID: cmsContext; io: LPcmsIOHANDLER): cmsHPROFILE; StdCall;
+FUNCTION cmsCloseProfile(hProfile: cmsHPROFILE): cmsBool; StdCall;
+
+FUNCTION cmsSaveProfileToFile(hProfile: cmsHPROFILE; FileName: PAnsiChar): cmsBool; StdCall;
+// FUNCTION CMSEXPORT cmsSaveProfileToStream(hProfile: cmsHPROFILE, FILE* Stream): cmsBool; StdCall;
+FUNCTION cmsSaveProfileToMem(hProfile: cmsHPROFILE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall;
+FUNCTION cmsSaveProfileToIOhandler(hProfile: cmsHPROFILE; io: LPcmsIOHANDLER):cmsUInt32Number; StdCall;
+
+// Predefined virtual profiles ------------------------------------------------------------------------------------------
+
+FUNCTION cmsCreateRGBProfileTHR(ContextID: cmsContext;
+ WhitePoint: LPcmsCIExyY;
+ Primaries: LPcmsCIExyYTRIPLE;
+ TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateRGBProfile(WhitePoint: LPcmsCIExyY;
+ Primaries: LPcmsCIExyYTRIPLE;
+ TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateGrayProfileTHR(ContextID: cmsContext;
+ WhitePoint: LPcmsCIExyY;
+ TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateGrayProfile(WhitePoint: LPcmsCIExyY;
+ TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateLinearizationDeviceLinkTHR(ContextID: cmsContext;
+ ColorSpace: cmsColorSpaceSignature;
+ TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateLinearizationDeviceLink(ColorSpace: cmsColorSpaceSignature;
+ TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateInkLimitingDeviceLinkTHR(ContextID: cmsContext;
+ ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateInkLimitingDeviceLink(ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall;
+
+
+FUNCTION cmsCreateLab2ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;
+FUNCTION cmsCreateLab2Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;
+FUNCTION cmsCreateLab4ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;
+FUNCTION cmsCreateLab4Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateXYZProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall;
+FUNCTION cmsCreateXYZProfile: cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreate_sRGBProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall;
+FUNCTION cmsCreate_sRGBProfile: cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateBCHSWabstractProfileTHR(ContextID: cmsContext;
+ nLUTPoints: Integer;
+ Bright,
+ Contrast,
+ Hue,
+ Saturation: cmsFloat64Number;
+ TempSrc,
+ TempDest: Integer): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateBCHSWabstractProfile( nLUTPoints: Integer;
+ Bright,
+ Contrast,
+ Hue,
+ Saturation: cmsFloat64Number;
+ TempSrc,
+ TempDest: Integer): cmsHPROFILE; StdCall;
+
+FUNCTION cmsCreateNULLProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall;
+FUNCTION cmsCreateNULLProfile: cmsHPROFILE; StdCall;
+
+// Converts a transform to a devicelink profile
+FUNCTION cmsTransform2DeviceLink(hTransform: cmsHTRANSFORM; Version: cmsFloat64Number; dwFlags: cmsUInt32Number): cmsHPROFILE; StdCall;
+
+// Intents ----------------------------------------------------------------------------------------------
+
+Const
+
+// ICC Intents
+INTENT_PERCEPTUAL = 0;
+INTENT_RELATIVE_COLORIMETRIC = 1;
+INTENT_SATURATION = 2;
+INTENT_ABSOLUTE_COLORIMETRIC = 3;
+
+// Non-ICC intents
+INTENT_PRESERVE_K_ONLY_PERCEPTUAL = 10;
+INTENT_PRESERVE_K_ONLY_RELATIVE_COLORIMETRIC = 11;
+INTENT_PRESERVE_K_ONLY_SATURATION = 12;
+INTENT_PRESERVE_K_PLANE_PERCEPTUAL = 13;
+INTENT_PRESERVE_K_PLANE_RELATIVE_COLORIMETRIC = 14;
+INTENT_PRESERVE_K_PLANE_SATURATION = 15;
+
+Type
+LPPAnsiChar = ^PAnsiChar;
+
+// Call with NULL as parameters to get the intent count
+FUNCTION cmsGetSupportedIntents(nMax: cmsUInt32Number; Codes: LPcmsUInt32Number; Descriptions: LPPAnsiChar): cmsUInt32Number; StdCall;
+
+Const
+
+// Flags
+
+cmsFLAGS_NOCACHE = $0040; // Inhibit 1-pixel cache
+cmsFLAGS_NOOPTIMIZE = $0100; // Inhibit optimizations
+cmsFLAGS_NULLTRANSFORM = $0200; // Don't transform anyway
+
+// Proofing flags
+cmsFLAGS_GAMUTCHECK = $1000; // Out of Gamut alarm
+cmsFLAGS_SOFTPROOFING = $4000; // Do softproofing
+
+// Misc
+cmsFLAGS_BLACKPOINTCOMPENSATION = $2000;
+cmsFLAGS_NOWHITEONWHITEFIXUP = $0004; // Don't fix scum dot
+cmsFLAGS_HIGHRESPRECALC = $0400; // Use more memory to give better accuracy
+cmsFLAGS_LOWRESPRECALC = $0800; // Use less memory to minimize resouces
+
+// For devicelink creation
+cmsFLAGS_8BITS_DEVICELINK = $0008; // Create 8 bits devicelinks
+cmsFLAGS_GUESSDEVICECLASS = $0020; // Guess device class (for transform2devicelink)
+cmsFLAGS_KEEP_SEQUENCE = $0080; // Keep profile sequence for devicelink creation
+
+// Specific to a particular optimizations
+cmsFLAGS_FORCE_CLUT = $0002; // Force CLUT optimization
+cmsFLAGS_CLUT_POST_LINEARIZATION = $0001; // create postlinearization tables if possible
+cmsFLAGS_CLUT_PRE_LINEARIZATION = $0010; // create prelinearization tables if possible
+
+// CRD special
+cmsFLAGS_NODEFAULTRESOURCEDEF = $01000000;
+
+// Fine-tune control over number of gridpoints
+FUNCTION cmsFLAGS_GRIDPOINTS(n: Integer): Integer;
+
+
+// Transforms ---------------------------------------------------------------------------------------------------
+
+type
+ LPcmsHPROFILEArray = ^cmsHPROFILEArray;
+ cmsHPROFILEArray = array[0..0] of cmsHPROFILE;
+
+ LPcmsBoolArray = ^cmsBoolArray;
+ cmsBoolArray = array[0..0] of cmsBool;
+
+FUNCTION cmsCreateTransformTHR(ContextID: cmsContext;
+ Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;
+
+FUNCTION cmsCreateTransform(Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;
+
+FUNCTION cmsCreateProofingTransformTHR(ContextID: cmsContext;
+ Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Proofing: cmsHPROFILE;
+ Intent: cmsUInt32Number;
+ ProofingIntent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;
+
+FUNCTION cmsCreateProofingTransform(Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Proofing: cmsHPROFILE;
+ Intent: cmsUInt32Number;
+ ProofingIntent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;
+
+FUNCTION cmsCreateMultiprofileTransformTHR(ContextID: cmsContext;
+ hProfiles: LPcmsHPROFILEArray;
+ nProfiles: cmsUInt32Number;
+ InputFormat: cmsUInt32Number;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;
+
+
+FUNCTION cmsCreateMultiprofileTransform( hProfiles: LPcmsHPROFILEArray;
+ nProfiles: cmsUInt32Number;
+ InputFormat: cmsUInt32Number;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;
+
+
+FUNCTION cmsCreateExtendedTransform(ContextID: cmsContext;
+ nProfiles: cmsUInt32Number;
+ hProfiles: LPcmsHPROFILEArray;
+ BPC: LPcmsBoolArray;
+ Intents: LPcmsUInt32NumberArray;
+ AdaptationStates: LPcmsFloat64NumberArray;
+ hGamutProfile: cmsHPROFILE;
+ nGamutPCSposition: cmsUInt32Number;
+ InputFormat,
+ OutputFormat: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall;
+
+PROCEDURE cmsDeleteTransform(hTransform: cmsHTRANSFORM); StdCall;
+
+PROCEDURE cmsDoTransform(Transform: cmsHTRANSFORM; InputBuffer, OutputBuffer: Pointer; size: cmsUInt32Number); StdCall;
+PROCEDURE cmsDoTransformStride(Transform: cmsHTRANSFORM; InputBuffer, OutputBuffer: Pointer; size: cmsUInt32Number; stride: cmsUInt32Number); StdCall;
+
+
+PROCEDURE cmsSetAlarmCodes( NewAlarm: LPcmsUInt16NumberArray); StdCall;
+PROCEDURE cmsGetAlarmCodes(NewAlarm: LPcmsUInt16NumberArray); StdCall;
+
+// Adaptation state for absolute colorimetric intent
+FUNCTION cmsSetAdaptationState(d: cmsFloat64Number):cmsFloat64Number; StdCall;
+
+// Grab the ContextID from an open transform. Returns NULL if a NULL transform is passed
+FUNCTION cmsGetTransformContextID(hTransform: cmsHTRANSFORM):cmsContext; StdCall;
+
+// For backwards compatibility
+FUNCTION cmsChangeBuffersFormat(hTransform: cmsHTRANSFORM; InputFormat, OutputFormat: cmsUInt32Number): cmsBool; StdCall;
+
+
+
+// PostScript ColorRenderingDictionary and ColorSpaceArray ----------------------------------------------------
+
+Type
+
+cmsPSResourceType = (cmsPS_RESOURCE_CSA, cmsPS_RESOURCE_CRD ) ;
+
+// lcms2 unified method to access postscript color resources
+FUNCTION cmsGetPostScriptColorResource(ContextID: cmsContext; RType: cmsPSResourceType;
+ hProfile: cmsHPROFILE;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number;
+ io: LPcmsIOHANDLER): cmsUInt32Number; StdCall;
+
+FUNCTION cmsGetPostScriptCSA(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number ): cmsUInt32Number; StdCall;
+FUNCTION cmsGetPostScriptCRD(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number): cmsUInt32Number; StdCall;
+
+
+// IT8.7 / CGATS.17-20$ handling -----------------------------------------------------------------------------
+
+
+// CGATS.13 parser
+
+FUNCTION cmsIT8Alloc: cmsHANDLE; StdCall;
+PROCEDURE cmsIT8Free(hIT8: cmsHANDLE); StdCall;
+
+// Tables
+
+FUNCTION cmsIT8TableCount(hIT8: cmsHANDLE): Integer; StdCall;
+FUNCTION cmsIT8SetTable(hIT8: cmsHANDLE; nTable: Integer): Integer; StdCall;
+
+// Persistence
+FUNCTION cmsIT8LoadFromFile(cFileName: PAnsiChar): cmsHANDLE; StdCall;
+FUNCTION cmsIT8LoadFromMem(Ptr: Pointer; size :DWord): cmsHANDLE; StdCall;
+
+FUNCTION cmsIT8SaveToFile(hIT8: cmsHANDLE; cFileName: PAnsiChar): cmsBool; StdCall;
+FUNCTION cmsIT8SaveToMem(hIT8: cmsHANDLE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall;
+// Properties
+
+FUNCTION cmsIT8GetSheetType(hIT8: cmsHANDLE): PAnsiChar; StdCall;
+FUNCTION cmsIT8SetSheetType(hIT8: cmsHANDLE; TheType: PAnsiChar): cmsBool; StdCall;
+
+FUNCTION cmsIT8SetComment(hIT8: cmsHANDLE; cComment: PAnsiChar): cmsBool; StdCall;
+
+FUNCTION cmsIT8SetPropertyStr(hIT8: cmsHANDLE; cProp, Str: PAnsiChar): cmsBool; StdCall;
+FUNCTION cmsIT8SetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Double): cmsBool; StdCall;
+FUNCTION cmsIT8SetPropertyHex(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Integer): cmsBool; StdCall;
+FUNCTION cmsIT8SetPropertyUncooked(hIT8: cmsHANDLE; Key, Buffer: PAnsiChar): cmsBool; StdCall;
+
+
+FUNCTION cmsIT8GetProperty(hIT8: cmsHANDLE; cProp: PAnsiChar): PAnsiChar; StdCall;
+FUNCTION cmsIT8GetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar): Double; StdCall;
+FUNCTION cmsIT8EnumProperties(hIT8: cmsHANDLE; var PropertyNames: LPPAnsiChar): Integer; StdCall;
+
+// Datasets
+
+FUNCTION cmsIT8GetDataRowCol(hIT8: cmsHANDLE; row, col: Integer): PAnsiChar; StdCall;
+FUNCTION cmsIT8GetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer): Double; StdCall;
+
+FUNCTION cmsIT8SetDataRowCol(hIT8: cmsHANDLE; row, col: Integer; Val: PAnsiChar): cmsBool; StdCall;
+FUNCTION cmsIT8SetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer; Val: Double): cmsBool; StdCall;
+
+FUNCTION cmsIT8GetData(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar): PAnsiChar; StdCall;
+
+FUNCTION cmsIT8GetDataDbl(hIT8: cmsHANDLE;cPatch, cSample: PAnsiChar): Double; StdCall;
+
+FUNCTION cmsIT8SetData(hIT8: cmsHANDLE; cPatch, cSample, Val: PAnsiChar): cmsBool; StdCall;
+
+FUNCTION cmsIT8SetDataDbl(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar; Val: Double): cmsBool; StdCall;
+
+FUNCTION cmsIT8SetDataFormat(hIT8: cmsHANDLE; n: Integer; Sample: PAnsiChar): cmsBool; StdCall;
+FUNCTION cmsIT8EnumDataFormat(hIT8: cmsHANDLE; var SampleNames: LPPAnsiChar): Integer; StdCall;
+FUNCTION cmsIT8GetPatchName(hIT8: cmsHANDLE; nPatch: Integer; Buffer: PAnsiChar): PAnsiChar; StdCall;
+
+// The LABEL extension
+FUNCTION cmsIT8SetTableByLabel(hIT8: cmsHANDLE; cSet, cField, ExpectedType: PAnsiChar): Integer; StdCall;
+
+FUNCTION cmsIT8FindDataFormat(hIT8: cmsHANDLE; cSample: PAnsiChar): Integer; StdCall;
+
+// Formatter for double
+PROCEDURE cmsIT8DefineDblFormat(hIT8: cmsHANDLE; Formatter: PAnsiChar); StdCall;
+
+// Gamut boundary description routines ------------------------------------------------------------------------------
+
+FUNCTION cmsGBDAlloc(ContextID: cmsContext):cmsHANDLE; StdCall;
+PROCEDURE cmsGBDFree(hGBD: cmsHANDLE); StdCall;
+FUNCTION cmsGDBAddPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall;
+FUNCTION cmsGDBCompute(hGDB: cmsHANDLE; dwFlags: cmsUInt32Number): cmsBool; StdCall;
+FUNCTION cmsGDBCheckPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall;
+
+// Feature detection ----------------------------------------------------------------------------------------------
+
+// Estimate the black point
+FUNCTION cmsDetectBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall;
+FUNCTION cmsDetectDestinationBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall;
+
+
+// Estimate total area coverage
+FUNCTION cmsDetectTAC(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall;
+
+
+// Poor man's gamut mapping
+FUNCTION cmsDesaturateLab(Lab: LPcmsCIELab; amax, amin, bmax, bmin: cmsFloat64Number): cmsBool; StdCall;
+
+
+IMPLEMENTATION
+
+
+
+ FUNCTION FLOAT_SH(a: cmsUInt32Number): cmsUInt32Number; begin FLOAT_SH := ((a) shl 22) end;
+ FUNCTION OPTIMIZED_SH(s: cmsUInt32Number): cmsUInt32Number; begin OPTIMIZED_SH := ((s) shl 21) end;
+ FUNCTION COLORSPACE_SH(s: cmsUInt32Number):cmsUInt32Number; begin COLORSPACE_SH := ((s) shl 16) end;
+ FUNCTION SWAPFIRST_SH(s: cmsUInt32Number):cmsUInt32Number; begin SWAPFIRST_SH := ((s) shl 14) end;
+ FUNCTION FLAVOR_SH(s: cmsUInt32Number):cmsUInt32Number; begin FLAVOR_SH := ((s) shl 13) end;
+ FUNCTION PLANAR_SH(p: cmsUInt32Number):cmsUInt32Number; begin PLANAR_SH := ((p) shl 12) end;
+ FUNCTION ENDIAN16_SH(e: cmsUInt32Number):cmsUInt32Number; begin ENDIAN16_SH := ((e) shl 11) end;
+ FUNCTION DOSWAP_SH(e: cmsUInt32Number):cmsUInt32Number; begin DOSWAP_SH := ((e) shl 10) end;
+ FUNCTION EXTRA_SH(e: cmsUInt32Number):cmsUInt32Number; begin EXTRA_SH := ((e) shl 7) end;
+ FUNCTION CHANNELS_SH(c: cmsUInt32Number):cmsUInt32Number; begin CHANNELS_SH := ((c) shl 3) end;
+ FUNCTION BYTES_SH(b: cmsUInt32Number):cmsUInt32Number; begin BYTES_SH := (b) end;
+
+
+ FUNCTION T_FLOAT(a: cmsUInt32Number): cmsUInt32Number; begin T_FLOAT := (((a) shr 22) and 1) end;
+ FUNCTION T_OPTIMIZED(o: cmsUInt32Number): cmsUInt32Number; begin T_OPTIMIZED := (((o) shr 21) and 1) end;
+ FUNCTION T_COLORSPACE(s: cmsUInt32Number): cmsUInt32Number; begin T_COLORSPACE := (((s) shr 16) and 31) end;
+ FUNCTION T_SWAPFIRST(s: cmsUInt32Number): cmsUInt32Number; begin T_SWAPFIRST := (((s) shr 14) and 1) end;
+ FUNCTION T_FLAVOR(s: cmsUInt32Number): cmsUInt32Number; begin T_FLAVOR := (((s) shr 13) and 1) end;
+ FUNCTION T_PLANAR(p: cmsUInt32Number): cmsUInt32Number; begin T_PLANAR := (((p) shr 12) and 1) end;
+ FUNCTION T_ENDIAN16(e: cmsUInt32Number): cmsUInt32Number; begin T_ENDIAN16 := (((e) shr 11) and 1) end;
+ FUNCTION T_DOSWAP(e: cmsUInt32Number): cmsUInt32Number; begin T_DOSWAP := (((e) shr 10) and 1) end;
+ FUNCTION T_EXTRA(e: cmsUInt32Number): cmsUInt32Number; begin T_EXTRA := (((e) shr 7) and 7) end;
+ FUNCTION T_CHANNELS(c: cmsUInt32Number): cmsUInt32Number; begin T_CHANNELS := (((c) shr 3) and 15) end;
+ FUNCTION T_BYTES(b: cmsUInt32Number): cmsUInt32Number; begin T_BYTES := ((b) and 7) end;
+
+
+
+//
+
+FUNCTION cmsCreateContext(Plugin : Pointer; UserData : Pointer) : cmsContext; StdCall; external LCMS2_SO;
+PROCEDURE cmsDeleteContext(ContextID: cmsContext); StdCall; external LCMS2_SO;
+FUNCTION cmsDupContext(ContextID: cmsContext; NewUserData: Pointer): cmsContext; StdCall; external LCMS2_SO;
+FUNCTION cmsGetContextUserData(ContextID: cmsContext): Pointer; StdCall; external LCMS2_SO;
+
+FUNCTION cmsPlugin(Plugin: Pointer): cmsBool; StdCall; external LCMS2_SO;
+PROCEDURE cmsUnregisterPlugins; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetLogErrorHandler(Fn: cmsLogErrorHandlerFunction); StdCall; external LCMS2_SO;
+FUNCTION cmsD50_XYZ: LPcmsCIEXYZ; StdCall; external LCMS2_SO;
+FUNCTION cmsD50_xyY: LPcmsCIExyY; StdCall; external LCMS2_SO;
+PROCEDURE cmsXYZ2xyY(Dest: LPcmsCIExyY; Source: LPcmsCIEXYZ); StdCall; external LCMS2_SO;
+PROCEDURE cmsxyY2XYZ(Dest: LPcmsCIEXYZ; Source: LPcmsCIExyY); StdCall; external LCMS2_SO;
+PROCEDURE cmsLab2XYZ(WhitePoint: LPcmsCIEXYZ; xyz: LPcmsCIEXYZ; Lab: LPcmsCIELab); StdCall; external LCMS2_SO;
+PROCEDURE cmsXYZ2Lab(WhitePoint: LPcmsCIEXYZ; Lab: LPcmsCIELab; xyz: LPcmsCIEXYZ); StdCall; external LCMS2_SO;
+PROCEDURE cmsLab2LCh(LCh: LPcmsCIELCh; Lab: LPcmsCIELab); StdCall; external LCMS2_SO;
+PROCEDURE cmsLCh2Lab(Lab: LPcmsCIELab; LCh: LPcmsCIELCh); StdCall; external LCMS2_SO;
+PROCEDURE cmsLabEncoded2Float(Lab: LPcmsCIELab; wLab: Pointer); StdCall; external LCMS2_SO;
+PROCEDURE cmsLabEncoded2FloatV2(Lab: LPcmsCIELab; wLab: Pointer); StdCall; external LCMS2_SO;
+PROCEDURE cmsFloat2LabEncoded(wLab: Pointer; Lab: LPcmsCIELab); StdCall; external LCMS2_SO;
+PROCEDURE cmsFloat2LabEncodedV2(wLab: Pointer; Lab: LPcmsCIELab); StdCall; external LCMS2_SO;
+PROCEDURE cmsXYZEncoded2Float(fxyz : LPcmsCIEXYZ; XYZ: Pointer); StdCall; external LCMS2_SO;
+PROCEDURE cmsFloat2XYZEncoded(XYZ: Pointer; fXYZ: LPcmsCIEXYZ); StdCall; external LCMS2_SO;
+FUNCTION cmsDeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external LCMS2_SO;
+FUNCTION cmsCIE94DeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external LCMS2_SO;
+FUNCTION cmsBFDdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external LCMS2_SO;
+FUNCTION cmsCMCdeltaE(Lab1, Lab2: LPcmsCIELab): Double; StdCall; external LCMS2_SO;
+FUNCTION cmsCIE2000DeltaE(Lab1, Lab2: LPcmsCIELab; Kl, Kc, Kh: Double): Double; StdCall; external LCMS2_SO;
+FUNCTION cmsWhitePointFromTemp(var WhitePoint: cmsCIExyY; TempK: cmsFloat64Number) : cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsTempFromWhitePoint(var TeampK: cmsFloat64Number; var WhitePoint: cmsCIExyY) : cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsAdaptToIlluminant(Result: LPcmsCIEXYZ; SourceWhitePt: LPcmsCIEXYZ;
+ Illuminant: LPcmsCIEXYZ; Value: LPcmsCIEXYZ): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsCIECAM02Init(pVC : LPcmsViewingConditions ) : Pointer; StdCall; external LCMS2_SO;
+PROCEDURE cmsCIECAM02Done(hModel : Pointer); StdCall; external LCMS2_SO;
+PROCEDURE cmsCIECAM02Forward(hModel: Pointer; pIn: LPcmsCIEXYZ; pOut: LPcmsJCh ); StdCall; external LCMS2_SO;
+PROCEDURE cmsCIECAM02Reverse(hModel: Pointer; pIn: LPcmsJCh; pOut: LPcmsCIEXYZ ); StdCall; external LCMS2_SO;
+FUNCTION cmsBuildSegmentedToneCurve(ContextID: cmsContext; nSegments: cmsInt32Number; Segments: LPcmsCurveSegmentArray): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsBuildParametricToneCurve(ContextID: cmsContext; CType: cmsInt32Number; Params: LPcmsFloat64NumberArray): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsBuildGamma(ContextID: cmsContext; Gamma: cmsFloat64Number): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsBuildTabulatedToneCurve16(ContextID: cmsContext; nEntries: cmsInt32Number; values: LPcmsUInt16NumberArray): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsBuildTabulatedToneCurveFloat(ContextID: cmsContext; nEntries: cmsUInt32Number; values: LPcmsFloat32NumberArray): LPcmsToneCurve; StdCall; external LCMS2_SO;
+PROCEDURE cmsFreeToneCurve(Curve: LPcmsToneCurve); StdCall; external LCMS2_SO;
+PROCEDURE cmsFreeToneCurveTriple(Curve: LPLPcmsToneCurveArray); StdCall; external LCMS2_SO;
+FUNCTION cmsDupToneCurve(Src: LPcmsToneCurve): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsReverseToneCurve(InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsReverseToneCurveEx(nResultSamples: cmsInt32Number; InGamma: LPcmsToneCurve): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsJoinToneCurve(ContextID: cmsContext; X, Y: LPcmsToneCurve; nPoints: cmsUInt32Number ): LPcmsToneCurve; StdCall; external LCMS2_SO;
+FUNCTION cmsSmoothToneCurve(Tab: LPcmsToneCurve; lambda: cmsFloat64Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsEvalToneCurveFloat(Curve: LPcmsToneCurve; v: cmsFloat32Number):cmsFloat32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsEvalToneCurve16(Curve: LPcmsToneCurve; v:cmsUInt16Number):cmsUInt16Number; StdCall; external LCMS2_SO;
+FUNCTION cmsIsToneCurveMultisegment(InGamma: LPcmsToneCurve):cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIsToneCurveLinear(Curve: LPcmsToneCurve):cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIsToneCurveMonotonic(t: LPcmsToneCurve):cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIsToneCurveDescending(t: LPcmsToneCurve):cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsGetToneCurveParametricType(t: LPcmsToneCurve):cmsInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsEstimateGamma(t: LPcmsToneCurve; Precision:cmsFloat64Number):cmsFloat64Number; StdCall; external LCMS2_SO;
+FUNCTION cmsGetToneCurveEstimatedTableEntries(t: LPcmsToneCurve): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsGetToneCurveEstimatedTable(t: LPcmsToneCurve): LPcmsUInt16Number; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineAlloc(ContextID: cmsContext; InputChannels, OutputChannels: cmsUInt32Number): LPcmsPipeline; StdCall; external LCMS2_SO;
+PROCEDURE cmsPipelineFree(lut: LPcmsPipeline); StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineDup(Orig: LPcmsPipeline): LPcmsPipeline; StdCall; external LCMS2_SO;
+FUNCTION cmsGetPipelineContextID(lut: LPcmsPipeline) : cmsContext; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineInputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineOutputChannels(lut: LPcmsPipeline): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineStageCount(lut: LPcmsPipeline): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineGetPtrToFirstStage(lut: LPcmsPipeline): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineGetPtrToLastStage(lut: LPcmsPipeline): LPcmsStage; StdCall; external LCMS2_SO;
+
+PROCEDURE cmsPipelineEval16(Inv, Outv: LPcmsUInt16NumberArray; lut: LPcmsPipeline); StdCall; external LCMS2_SO;
+PROCEDURE cmsPipelineEvalFloat(Inv, Outv: LPcmsFloat32NumberArray; lut: LPcmsPipeline); StdCall; external LCMS2_SO;
+
+FUNCTION cmsPipelineEvalReverseFloat(Target, Result, Hint: LPcmsFloat32NumberArray; lut: LPcmsPipeline): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineCat(l1, l2: LPcmsPipeline): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsPipelineSetSaveAs8bitsFlag(lut: LPcmsPipeline; On: cmsBool): cmsBool; StdCall; external LCMS2_SO;
+PROCEDURE cmsPipelineInsertStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPcmsStage); StdCall; external LCMS2_SO;
+PROCEDURE cmsPipelineUnlinkStage(lut: LPcmsPipeline; loc: cmsStageLoc; mpe: LPLPcmsStage); StdCall; external LCMS2_SO;
+FUNCTION cmsStageAllocIdentity(ContextID: cmsContext; nChannels: cmsUInt32Number): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageAllocToneCurves(ContextID: cmsContext; nChannels: cmsUInt32Number; Curves: LPLPcmsToneCurveArray): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageAllocMatrix(ContextID: cmsContext; Rows, Cols: cmsUInt32Number; Matrix, Offset: LPcmsFloat64NumberArray): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageAllocCLut16bit(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageAllocCLutFloat(ContextID: cmsContext; nGridPoints: cmsUInt32Number; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageAllocCLut16bitGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsUInt16NumberArray): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageAllocCLutFloatGranular(ContextID: cmsContext; nGridPoints: LPcmsUInt32NumberArray; inputChan, outputChan: cmsUInt32Number; Table: LPcmsFloat32NumberArray): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageDup(mpe: LPcmsStage): LPcmsStage; StdCall; external LCMS2_SO;
+PROCEDURE cmsStageFree(mpe: LPcmsStage); StdCall; external LCMS2_SO;
+FUNCTION cmsStageNext(mpe: LPcmsStage): LPcmsStage; StdCall; external LCMS2_SO;
+FUNCTION cmsStageInputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsStageOutputChannels(mpe: LPcmsStage): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsStageType(mpe: LPcmsStage): cmsStageSignature; StdCall; external LCMS2_SO;
+FUNCTION cmsStageData(mpe: LPcmsStage): Pointer; StdCall; external LCMS2_SO;
+FUNCTION cmsStageSampleCLut16bit(mpe: LPcmsStage; Sampler: cmsSAMPLER16; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsStageSampleCLutFloat(mpe: LPcmsStage; Sampler: cmsSAMPLERFLOAT; Cargo: Pointer; dwFlags: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsSliceSpace16(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;
+ Sampler: cmsSAMPLER16; Cargo: Pointer): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsSliceSpaceFloat(nInputs: cmsUInt32Number; clutPoints: LPcmsUInt32NumberArray;
+ Sampler: cmsSAMPLERFLOAT; Cargo: Pointer): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsMLUalloc(ContextID: cmsContext; nItems: cmsUInt32Number): LPcmsMLU; StdCall; external LCMS2_SO;
+PROCEDURE cmsMLUfree(mlu: LPcmsMLU); StdCall; external LCMS2_SO;
+FUNCTION cmsMLUdup(mlu: LPcmsMLU): LPcmsMLU; StdCall; external LCMS2_SO;
+
+FUNCTION cmsMLUsetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode, ASCIIString: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsMLUsetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; WideString: PWChar): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsMLUgetASCII(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsMLUgetWide(mlu: LPcmsMLU; LanguageCode, CountryCode: PAnsiChar; Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsMLUgetTranslation(mlu: LPcmsMLU; LanguageCode, CountryCode, ObtainedLanguage, ObtainedCountry: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsAllocNamedColorList(ContextID: cmsContext; n, ColorantCount :cmsUInt32Number;
+ Prefix, Suffix: PAnsiChar): LPcmsNAMEDCOLORLIST; StdCall; external LCMS2_SO;
+
+PROCEDURE cmsFreeNamedColorList(v: LPcmsNAMEDCOLORLIST); StdCall; external LCMS2_SO;
+FUNCTION cmsDupNamedColorList(v: LPcmsNAMEDCOLORLIST): LPcmsNAMEDCOLORLIST; StdCall; external LCMS2_SO;
+FUNCTION cmsAppendNamedColor(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar;
+ PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsNamedColorCount(v: LPcmsNAMEDCOLORLIST): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsNamedColorIndex(v: LPcmsNAMEDCOLORLIST; Name: PAnsiChar): cmsInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsNamedColorInfo(v: LPcmsNAMEDCOLORLIST; nColor : cmsUInt32Number;
+ Name,Prefix, Suffix : PAnsiChar;
+ PCS, Colorant : LPcmsUInt16NumberArray): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetNamedColorList(xform: cmsHTRANSFORM ): LPcmsNAMEDCOLORLIST; StdCall; external LCMS2_SO;
+
+FUNCTION cmsAllocProfileSequenceDescription(ContextID: cmsContext; n: cmsUInt32Number):LPcmsSEQ; StdCall; external LCMS2_SO;
+FUNCTION cmsDupProfileSequenceDescription(pseq: LPcmsSEQ):LPcmsSEQ; StdCall; external LCMS2_SO;
+PROCEDURE cmsFreeProfileSequenceDescription(pseq: LPcmsSEQ); StdCall; external LCMS2_SO;
+
+FUNCTION cmsDictAlloc(ContextID: cmsContext): cmsHANDLE; StdCall; external LCMS2_SO;
+PROCEDURE cmsDictFree(hDict: cmsHANDLE); StdCall; external LCMS2_SO;
+FUNCTION cmsDictDup(hDict: cmsHANDLE): cmsHANDLE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsDictAddEntry(hDict: cmsHANDLE; Name, Value: PWChar; DisplayName, DisplayValue : LPcmsMLU): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsDictGetEntryList(hDict: cmsHANDLE): LPcmsDICTentry; StdCall; external LCMS2_SO;
+FUNCTION cmsDictNextEntry(e : LPcmsDICTentry): LPcmsDICTentry; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateProfilePlaceholder(ContextID: cmsContext): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetProfileContextID(hProfile: cmsHPROFILE):cmsContext; StdCall; external LCMS2_SO;
+FUNCTION cmsGetTagCount(hProfile: cmsHPROFILE): cmsInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsGetTagSignature(hProfile: cmsHPROFILE; n: cmsUInt32Number): cmsTagSignature; StdCall; external LCMS2_SO;
+FUNCTION cmsIsTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsReadTag(hProfile: cmsHPROFILE; sig: cmsTagSignature ): Pointer; StdCall; external LCMS2_SO;
+FUNCTION cmsWriteTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsLinkTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; dest: cmsTagSignature): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsTagLinkedTo(hProfile: cmsHPROFILE; sig: cmsTagSignature):cmsTagSignature; StdCall; external LCMS2_SO;
+
+FUNCTION cmsReadRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; Buffer: Pointer; BufferSize: cmsUInt32Number): cmsInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsWriteRawTag(hProfile: cmsHPROFILE; sig: cmsTagSignature; data: Pointer; Size: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetHeaderFlags(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external LCMS2_SO;
+PROCEDURE cmsGetHeaderAttributes(hProfile: cmsHPROFILE; Flags: LPcmsUInt64Number); StdCall; external LCMS2_SO;
+PROCEDURE cmsGetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetHeaderRenderingIntent(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetHeaderFlags(hProfile: cmsHPROFILE; Flags: cmsUInt32Number); StdCall; external LCMS2_SO;
+FUNCTION cmsGetHeaderManufacturer(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetHeaderManufacturer(hProfile: cmsHPROFILE; manufacturer: cmsUInt32Number ); StdCall; external LCMS2_SO;
+FUNCTION cmsGetHeaderModel(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetHeaderModel(hProfile: cmsHPROFILE; model: cmsUInt32Number ); StdCall; external LCMS2_SO;
+PROCEDURE cmsSetHeaderAttributes(hProfile: cmsHPROFILE; Flags: cmsUInt64Number); StdCall; external LCMS2_SO;
+PROCEDURE cmsSetHeaderProfileID(hProfile: cmsHPROFILE; ProfileID: LPcmsUInt8Number); StdCall; external LCMS2_SO;
+PROCEDURE cmsSetHeaderRenderingIntent(hProfile: cmsHPROFILE; RenderingIntent: cmsUInt32Number ); StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetPCS(hProfile: cmsHPROFILE):cmsColorSpaceSignature; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetPCS(hProfile: cmsHPROFILE; pcs: cmsColorSpaceSignature); StdCall; external LCMS2_SO;
+FUNCTION cmsGetColorSpace(hProfile: cmsHPROFILE): cmsColorSpaceSignature; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetColorSpace(hProfile: cmsHPROFILE; sig: cmsColorSpaceSignature); StdCall; external LCMS2_SO;
+FUNCTION cmsGetDeviceClass(hProfile: cmsHPROFILE): cmsProfileClassSignature; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetDeviceClass(hProfile: cmsHPROFILE; sig: cmsProfileClassSignature); StdCall; external LCMS2_SO;
+PROCEDURE cmsSetProfileVersion(hProfile: cmsHPROFILE; Version: cmsFloat64Number); StdCall; external LCMS2_SO;
+FUNCTION cmsGetProfileVersion(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetEncodedICCversion(hProfile: cmsHPROFILE): cmsUInt32Number; StdCall; external LCMS2_SO;
+PROCEDURE cmsSetEncodedICCversion(hProfile: cmsHPROFILE; Version: cmsUInt32Number); StdCall; external LCMS2_SO;
+
+
+FUNCTION cmsIsIntentSupported(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIsMatrixShaper(hProfile: cmsHPROFILE): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIsCLUT(hProfile: cmsHPROFILE; Intent: cmsUInt32Number; UsedDirection: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION _cmsICCcolorSpace(OurNotation: Integer): cmsColorSpaceSignature; StdCall; external LCMS2_SO;
+FUNCTION _cmsLCMScolorSpace(ProfileSpace: cmsColorSpaceSignature): Integer; StdCall; external LCMS2_SO;
+
+FUNCTION cmsChannelsOf( ColorSpace: cmsColorSpaceSignature): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsFormatterForColorspaceOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsFormatterForPCSOfProfile(hProfile: cmsHPROFILE; nBytes: cmsUInt32Number; lIsFloat: cmsBool): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+
+FUNCTION cmsGetProfileInfo(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;
+ Buffer: PWChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetProfileInfoASCII(hProfile: cmsHPROFILE; Info: cmsInfoType; LanguageCode, CountryCode: PAnsiChar;
+ Buffer: PAnsiChar; BufferSize: cmsUInt32Number): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+
+FUNCTION cmsOpenIOhandlerFromFile(ContextID: cmsContext; FileName, AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall; external LCMS2_SO;
+// FUNCTION cmsOpenIOhandlerFromStream(ContextID: cmsContext; FILE* Stream): LPcmsIOHANDLER; StdCall; external LCMS2_SO;
+FUNCTION cmsOpenIOhandlerFromMem(ContextID: cmsContext; Buffer: Pointer; size: cmsUInt32Number; AccessMode: PAnsiChar): LPcmsIOHANDLER; StdCall; external LCMS2_SO;
+FUNCTION cmsOpenIOhandlerFromNULL(ContextID: cmsContext): LPcmsIOHANDLER; StdCall; external LCMS2_SO;
+FUNCTION cmsCloseIOhandler(io: LPcmsIOHANDLER): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsMD5computeID(hProfile: cmsHPROFILE): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsOpenProfileFromFile(ICCProfile : PAnsiChar; sAccess: PAnsiChar): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsOpenProfileFromFileTHR(ContextID: cmsContext; ICCProfile, sAccess: PAnsiChar): cmsHPROFILE; StdCall; external LCMS2_SO;
+// FUNCTION CMSEXPORT cmsOpenProfileFromStream(FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall; external LCMS2_SO;
+// FUNCTION CMSEXPORT cmsOpenProfileFromStreamTHR(ContextID: cmsContext; FILE* ICCProfile, const char* sAccess): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsOpenProfileFromMem(MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsOpenProfileFromMemTHR(ContextID: cmsContext; MemPtr: Pointer; dwSize: cmsUInt32Number): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsOpenProfileFromIOhandlerTHR(ContextID: cmsContext; io: LPcmsIOHANDLER): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsCloseProfile(hProfile: cmsHPROFILE): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsSaveProfileToFile(hProfile: cmsHPROFILE; FileName: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+// FUNCTION CMSEXPORT cmsSaveProfileToStream(hProfile: cmsHPROFILE, FILE* Stream): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsSaveProfileToMem(hProfile: cmsHPROFILE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsSaveProfileToIOhandler(hProfile: cmsHPROFILE; io: LPcmsIOHANDLER):cmsUInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateRGBProfileTHR(ContextID: cmsContext;
+ WhitePoint: LPcmsCIExyY;
+ Primaries: LPcmsCIExyYTRIPLE;
+ TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateRGBProfile(WhitePoint: LPcmsCIExyY;
+ Primaries: LPcmsCIExyYTRIPLE;
+ TransferFunction: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateGrayProfileTHR(ContextID: cmsContext;
+ WhitePoint: LPcmsCIExyY;
+ TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateGrayProfile(WhitePoint: LPcmsCIExyY;
+ TransferFunction: LPcmsToneCurve): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateLinearizationDeviceLinkTHR(ContextID: cmsContext;
+ ColorSpace: cmsColorSpaceSignature;
+ TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateLinearizationDeviceLink(ColorSpace: cmsColorSpaceSignature;
+ TransferFunctions: LPLPcmsToneCurveArray): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateInkLimitingDeviceLinkTHR(ContextID: cmsContext;
+ ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateInkLimitingDeviceLink(ColorSpace: cmsColorSpaceSignature; Limit: cmsFloat64Number): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+
+FUNCTION cmsCreateLab2ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsCreateLab2Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsCreateLab4ProfileTHR(ContextID: cmsContext; WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsCreateLab4Profile(WhitePoint: LPcmsCIExyY): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateXYZProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsCreateXYZProfile: cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreate_sRGBProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsCreate_sRGBProfile: cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateBCHSWabstractProfileTHR(ContextID: cmsContext;
+ nLUTPoints: Integer;
+ Bright,
+ Contrast,
+ Hue,
+ Saturation: cmsFloat64Number;
+ TempSrc,
+ TempDest: Integer): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateBCHSWabstractProfile( nLUTPoints: Integer;
+ Bright,
+ Contrast,
+ Hue,
+ Saturation: cmsFloat64Number;
+ TempSrc,
+ TempDest: Integer): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateNULLProfileTHR(ContextID: cmsContext): cmsHPROFILE; StdCall; external LCMS2_SO;
+FUNCTION cmsCreateNULLProfile: cmsHPROFILE; StdCall; external LCMS2_SO;
+
+// Converts a transform to a devicelink profile
+FUNCTION cmsTransform2DeviceLink(hTransform: cmsHTRANSFORM; Version: cmsFloat64Number; dwFlags: cmsUInt32Number): cmsHPROFILE; StdCall; external LCMS2_SO;
+
+// Call with NULL as parameters to get the intent count
+FUNCTION cmsGetSupportedIntents(nMax: cmsUInt32Number; Codes: LPcmsUInt32Number; Descriptions: LPPAnsiChar): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsFLAGS_GRIDPOINTS(n: Integer): Integer; begin cmsFLAGS_GRIDPOINTS := (((n) and $FF) shl 16) end;
+
+
+FUNCTION cmsCreateTransformTHR(ContextID: cmsContext;
+ Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateTransform(Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateProofingTransformTHR(ContextID: cmsContext;
+ Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Proofing: cmsHPROFILE;
+ Intent: cmsUInt32Number;
+ ProofingIntent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateProofingTransform(Input: cmsHPROFILE;
+ InputFormat: cmsUInt32Number;
+ Output: cmsHPROFILE;
+ OutputFormat: cmsUInt32Number;
+ Proofing: cmsHPROFILE;
+ Intent: cmsUInt32Number;
+ ProofingIntent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external LCMS2_SO;
+
+FUNCTION cmsCreateMultiprofileTransformTHR(ContextID: cmsContext;
+ hProfiles: LPcmsHPROFILEArray;
+ nProfiles: cmsUInt32Number;
+ InputFormat: cmsUInt32Number;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external LCMS2_SO;
+
+
+FUNCTION cmsCreateMultiprofileTransform( hProfiles: LPcmsHPROFILEArray;
+ nProfiles: cmsUInt32Number;
+ InputFormat: cmsUInt32Number;
+ OutputFormat: cmsUInt32Number;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external LCMS2_SO;
+
+
+FUNCTION cmsCreateExtendedTransform(ContextID: cmsContext;
+ nProfiles: cmsUInt32Number;
+ hProfiles: LPcmsHPROFILEArray;
+ BPC: LPcmsBoolArray;
+ Intents: LPcmsUInt32NumberArray;
+ AdaptationStates: LPcmsFloat64NumberArray;
+ hGamutProfile: cmsHPROFILE;
+ nGamutPCSposition: cmsUInt32Number;
+ InputFormat,
+ OutputFormat: cmsUInt32Number;
+ dwFlags: cmsUInt32Number): cmsHTRANSFORM; StdCall; external LCMS2_SO;
+
+PROCEDURE cmsDeleteTransform(hTransform: cmsHTRANSFORM); StdCall; external LCMS2_SO;
+
+PROCEDURE cmsDoTransform(Transform: cmsHTRANSFORM; InputBuffer, OutputBuffer: Pointer; size: cmsUInt32Number); StdCall; external LCMS2_SO;
+PROCEDURE cmsDoTransformStride(Transform: cmsHTRANSFORM; InputBuffer, OutputBuffer: Pointer; size: cmsUInt32Number; stride: cmsUInt32Number); StdCall; external LCMS2_SO;
+PROCEDURE cmsSetAlarmCodes( NewAlarm: LPcmsUInt16NumberArray); StdCall; external LCMS2_SO;
+PROCEDURE cmsGetAlarmCodes(NewAlarm: LPcmsUInt16NumberArray); StdCall; external LCMS2_SO;
+
+// Adaptation state for absolute colorimetric intent
+FUNCTION cmsSetAdaptationState(d: cmsFloat64Number):cmsFloat64Number; StdCall; external LCMS2_SO;
+
+// Grab the ContextID from an open transform. Returns NULL if a NULL transform is passed
+FUNCTION cmsGetTransformContextID(hTransform: cmsHTRANSFORM):cmsContext; StdCall; external LCMS2_SO;
+
+// For backwards compatibility
+FUNCTION cmsChangeBuffersFormat(hTransform: cmsHTRANSFORM; InputFormat, OutputFormat: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+
+
+// lcms2 unified method to access postscript color resources
+FUNCTION cmsGetPostScriptColorResource(ContextID: cmsContext; RType: cmsPSResourceType;
+ hProfile: cmsHPROFILE;
+ Intent: cmsUInt32Number;
+ dwFlags: cmsUInt32Number;
+ io: LPcmsIOHANDLER): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsGetPostScriptCSA(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number ): cmsUInt32Number; StdCall; external LCMS2_SO;
+FUNCTION cmsGetPostScriptCRD(ContextID: cmsContext; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number; Buffer: Pointer; dwBufferLen: cmsUInt32Number): cmsUInt32Number; StdCall; external LCMS2_SO;
+
+
+// CGATS.13 parser
+
+FUNCTION cmsIT8Alloc: cmsHANDLE; StdCall; external LCMS2_SO;
+PROCEDURE cmsIT8Free(hIT8: cmsHANDLE); StdCall; external LCMS2_SO;
+
+// Tables
+
+FUNCTION cmsIT8TableCount(hIT8: cmsHANDLE): Integer; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8SetTable(hIT8: cmsHANDLE; nTable: Integer): Integer; StdCall; external LCMS2_SO;
+
+// Persistence
+FUNCTION cmsIT8LoadFromFile(cFileName: PAnsiChar): cmsHANDLE; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8LoadFromMem(Ptr: Pointer; size :DWord): cmsHANDLE; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8SaveToFile(hIT8: cmsHANDLE; cFileName: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8SaveToMem(hIT8: cmsHANDLE; MemPtr: Pointer; BytesNeeded: LPcmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+// Properties
+
+FUNCTION cmsIT8GetSheetType(hIT8: cmsHANDLE): PAnsiChar; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8SetSheetType(hIT8: cmsHANDLE; TheType: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8SetComment(hIT8: cmsHANDLE; cComment: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8SetPropertyStr(hIT8: cmsHANDLE; cProp, Str: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8SetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Double): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8SetPropertyHex(hIT8: cmsHANDLE; cProp: PAnsiChar; Val: Integer): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8SetPropertyUncooked(hIT8: cmsHANDLE; Key, Buffer: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+
+
+FUNCTION cmsIT8GetProperty(hIT8: cmsHANDLE; cProp: PAnsiChar): PAnsiChar; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8GetPropertyDbl(hIT8: cmsHANDLE; cProp: PAnsiChar): Double; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8EnumProperties(hIT8: cmsHANDLE; var PropertyNames: LPPAnsiChar): Integer; StdCall; external LCMS2_SO;
+
+// Datasets
+
+FUNCTION cmsIT8GetDataRowCol(hIT8: cmsHANDLE; row, col: Integer): PAnsiChar; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8GetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer): Double; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8SetDataRowCol(hIT8: cmsHANDLE; row, col: Integer; Val: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8SetDataRowColDbl(hIT8: cmsHANDLE; row, col: Integer; Val: Double): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8GetData(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar): PAnsiChar; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8GetDataDbl(hIT8: cmsHANDLE;cPatch, cSample: PAnsiChar): Double; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8SetData(hIT8: cmsHANDLE; cPatch, cSample, Val: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8SetDataDbl(hIT8: cmsHANDLE; cPatch, cSample: PAnsiChar; Val: Double): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8SetDataFormat(hIT8: cmsHANDLE; n: Integer; Sample: PAnsiChar): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8EnumDataFormat(hIT8: cmsHANDLE; var SampleNames: LPPAnsiChar): Integer; StdCall; external LCMS2_SO;
+FUNCTION cmsIT8GetPatchName(hIT8: cmsHANDLE; nPatch: Integer; Buffer: PAnsiChar): PAnsiChar; StdCall; external LCMS2_SO;
+
+// The LABEL extension
+
+FUNCTION cmsIT8SetTableByLabel(hIT8: cmsHANDLE; cSet, cField, ExpectedType: PAnsiChar): Integer; StdCall; external LCMS2_SO;
+
+FUNCTION cmsIT8FindDataFormat(hIT8: cmsHANDLE; cSample: PAnsiChar): Integer; StdCall; external LCMS2_SO;
+
+// Formatter for double
+PROCEDURE cmsIT8DefineDblFormat(hIT8: cmsHANDLE; Formatter: PAnsiChar); StdCall; external LCMS2_SO;
+
+FUNCTION cmsGBDAlloc(ContextID: cmsContext):cmsHANDLE; StdCall; external LCMS2_SO;
+PROCEDURE cmsGBDFree(hGBD: cmsHANDLE); StdCall; external LCMS2_SO;
+FUNCTION cmsGDBAddPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsGDBCompute(hGDB: cmsHANDLE; dwFlags: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsGDBCheckPoint(hGBD: cmsHANDLE; Lab: LPcmsCIELab): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsDetectBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+FUNCTION cmsDetectDestinationBlackPoint( BlackPoint: LPcmsCIEXYZ; hProfile: cmsHPROFILE; Intent: cmsUInt32Number; dwFlags: cmsUInt32Number): cmsBool; StdCall; external LCMS2_SO;
+
+FUNCTION cmsDetectTAC(hProfile: cmsHPROFILE): cmsFloat64Number; StdCall; external LCMS2_SO;
+
+FUNCTION cmsDesaturateLab(Lab: LPcmsCIELab; amax, amin, bmax, bmin: cmsFloat64Number): cmsBool; StdCall; external LCMS2_SO;
+
+END.
--- /dev/null
+\r
+THIS LICENSE APPLIES ONLY TO iccjpeg.c file\r
+-----\r
+In plain English:\r
+\r
+1. We don't promise that this software works. (But if you find any bugs,\r
+ please let us know!)\r
+2. You can use this software for whatever you want. You don't have to pay us.\r
+3. You may not pretend that you wrote this software. If you use it in a\r
+ program, you must acknowledge somewhere in your documentation that\r
+ you've used the IJG code.\r
+\r
+In legalese:\r
+\r
+The authors make NO WARRANTY or representation, either express or implied,\r
+with respect to this software, its quality, accuracy, merchantability, or\r
+fitness for a particular purpose. This software is provided "AS IS", and you,\r
+its user, assume the entire risk as to its quality and accuracy.\r
+\r
+This software is copyright (C) 1991-2013, Thomas G. Lane, Guido Vollbeding.\r
+All Rights Reserved except as specified below.\r
+\r
+Permission is hereby granted to use, copy, modify, and distribute this\r
+software (or portions thereof) for any purpose, without fee, subject to these\r
+conditions:\r
+(1) If any part of the source code for this software is distributed, then this\r
+README file must be included, with this copyright and no-warranty notice\r
+unaltered; and any additions, deletions, or changes to the original files\r
+must be clearly indicated in accompanying documentation.\r
+(2) If only executable code is distributed, then the accompanying\r
+documentation must state that "this software is based in part on the work of\r
+the Independent JPEG Group".\r
+(3) Permission for use of this software is granted only if the user accepts\r
+full responsibility for any undesirable consequences; the authors accept\r
+NO LIABILITY for damages of any kind.\r
+\r
+These conditions apply to any software derived from or based on the IJG code,\r
+not just to the unmodified library. If you use our work, you ought to\r
+acknowledge us.\r
+\r
+Permission is NOT granted for the use of any IJG author's name or company name\r
+in advertising or publicity relating to this software or products derived from\r
+it. This software may be referred to only as "the Independent JPEG Group's\r
+software".\r
+\r
+We specifically permit and encourage the use of this software as the basis of\r
+commercial products, provided that all warranty or liability claims are\r
+assumed by the product vendor.\r
+\r
+\r
+The Unix configuration script "configure" was produced with GNU Autoconf.\r
+It is copyright by the Free Software Foundation but is freely distributable.\r
+The same holds for its supporting scripts (config.guess, config.sub,\r
+ltmain.sh). Another support script, install-sh, is copyright by X Consortium\r
+but is also freely distributable.\r
+\r
+The IJG distribution formerly included code to read and write GIF files.\r
+To avoid entanglement with the Unisys LZW patent, GIF reading support has\r
+been removed altogether, and the GIF writer has been simplified to produce\r
+"uncompressed GIFs". This technique does not use the LZW algorithm; the\r
+resulting GIF files are larger than usual, but are readable by all standard\r
+GIF decoders.\r
+\r
+We are required to state that\r
+ "The Graphics Interchange Format(c) is the Copyright property of\r
+ CompuServe Incorporated. GIF(sm) is a Service Mark property of\r
+ CompuServe Incorporated."\r
# Bugs introduced by Marti Maria on October 2004
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
# Bugs introduced by Marti Maria on October 2004
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
host_triplet = @host@
@HasJPEG_TRUE@bin_PROGRAMS = jpgicc$(EXEEXT)
subdir = utils/jpgicc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
+am__dirstamp = $(am__leading_dot)dirstamp
am_jpgicc_OBJECTS = jpgicc.$(OBJEXT) iccjpeg.$(OBJEXT) \
- xgetopt.$(OBJEXT) vprf.$(OBJEXT)
+ ../common/xgetopt.$(OBJEXT) ../common/vprf.$(OBJEXT)
jpgicc_OBJECTS = $(am_jpgicc_OBJECTS)
jpgicc_DEPENDENCIES = $(top_builddir)/src/liblcms2.la
-jpgicc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(jpgicc_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 =
+jpgicc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(jpgicc_LDFLAGS) $(LDFLAGS) -o $@
+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@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
+depcomp =
+am__maybe_remake_depfiles =
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)
+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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 = $(jpgicc_SOURCES)
DIST_SOURCES = $(jpgicc_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man_MANS)
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utils/jpgicc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign utils/jpgicc/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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@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; \
+ 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|.*|.|' \
+ 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 } \
@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)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+../common/$(am__dirstamp):
+ @$(MKDIR_P) ../common
+ @: > ../common/$(am__dirstamp)
+../common/xgetopt.$(OBJEXT): ../common/$(am__dirstamp)
+../common/vprf.$(OBJEXT): ../common/$(am__dirstamp)
+
jpgicc$(EXEEXT): $(jpgicc_OBJECTS) $(jpgicc_DEPENDENCIES) $(EXTRA_jpgicc_DEPENDENCIES)
@rm -f jpgicc$(EXEEXT)
- $(jpgicc_LINK) $(jpgicc_OBJECTS) $(jpgicc_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(jpgicc_LINK) $(jpgicc_OBJECTS) $(jpgicc_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f ../common/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iccjpeg.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpgicc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vprf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetopt.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 $<
+ $(AM_V_CC)$(COMPILE) -c -o $@ $<
.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) '$<'`
+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(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 $@ $<
-
-xgetopt.o: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.o -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-
-xgetopt.obj: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.obj -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-
-vprf.o: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.o -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-
-vprf.obj: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.obj -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
+ $(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
-rm -rf .libs _libs
install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man1dir)'; $(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)
+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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
- @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
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
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 ../common/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic 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-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-man \
- uninstall-man1
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ 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-man1 \
+ 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 tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
total_length += data_length[seq_no];
}
- if (total_length <= 0)
+ if (total_length == 0)
return FALSE; /* found only empty markers? */
/* Allocate space for assembled data */
.\"Shiju P. Nair September 30, 2004
-.TH JPEGICC 1 "September 30, 2004"
+.\"Thomas Weber <tweber@debian.org> April 23, 2014
+.TH JPGICC 1 "September 30, 2004"
.SH NAME
-jpegicc - little cms ICC profile applier for JPEG.
+jpgicc - little cms ICC profile applier for JPEG.
.SH SYNOPSIS
-.B jpegicc
+.B jpgicc
.RI [ options ] " input.jpg output.jpg"
.SH DESCRIPTION
lcms is a standalone CMM engine, which deals with the color management.
It implements a fast transformation between ICC profiles.
-.B jpegicc
-is little cms ICC profile applier for JPEG.
+.B jpgicc
+is a little cms ICC profile applier for JPEG.
.SH OPTIONS
.TP
-.B \-b
+.B \-b
Black point compensation.
-.TP
-.B \-c <0,1,2,3>
-Precalculates transform. (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1]
+.TP
+.BI \-c\ NUM
+Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1].
+.TP
+.BI \-d\ NUM
+Observer adaptation state (abs.col. only), (0..1.0, float value) [defaults to 0.0].
+.TP
+.B \-e
+Embed destination profile.
.TP
.B \-g
Marks out-of-gamut colors on softproof.
.TP
-.B \-h <0,1,2>
-Show summary of options and examples.
+.BI \-h\ NUM
+Show summary of options and examples (0=help, 1=Examples, 2=Built-in profiles, 3=Contact information)
.TP
.BI \-i\ profile
Input profile (defaults to sRGB).
.TP
-.B \-m <0,1,2,3>
-SoftProof intent.
+.BI \-l\ link
+TODO: explain this option.
+.TP
+.BI \-m\ NUM
+SoftProof intent (0,1,2,3) [defaults to 0].
.TP
.B \-n
Ignore embedded profile.
.TP
-.BI \-p\ profile
-Soft proof profile
-.TP
.BI \-o\ profile
-.p
Output profile (defaults to sRGB).
.TP
-.B \-q <0..100>
-Output JPEG quality.
+.BI \-p\ profile
+Soft proof profile.
+.TP
+.BI \-q\ NUM
+Output JPEG quality, (0..100) [defaults to 75].
.TP
-.B \-t <0,1,2,3>
-Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute).
+.BI \-s\ newprofile
+Save embedded profile as \fInewprofile\fR.
+.TP
+.BI \-t\ NUM
+Rendering intent
+.nf
+.RS
+0=Perceptual [default]
+1=Relative colorimetric
+2=Saturation
+3=Absolute colorimetric
+10=Perceptual preserving black ink
+11=Relative colorimetric preserving black ink
+12=Saturation preserving black ink
+13=Perceptual preserving black plane
+14=Relative colorimetric preserving black plane
+15=Saturation preserving black plane
+.RE
+.fi
.TP
.B \-v
Verbose.
+.TP
+.BI \-!\ NUM,NUM,NUM
+Out-of-gamut marker channel values (r,g,b) [defaults: 128,128,128].
+.SH BUILT-IN PROFILES
+.nf
+ *Lab2 -- D50-based v2 CIEL*a*b
+ *Lab4 -- D50-based v4 CIEL*a*b
+ *Lab -- D50-based v4 CIEL*a*b
+ *XYZ -- CIE XYZ (PCS)
+ *sRGB -- sRGB color space
+ *Gray22 - Monochrome of Gamma 2.2
+ *Gray30 - Monochrome of Gamma 3.0
+ *null - Monochrome black for all input
+ *Lin2222- CMYK linearization of gamma 2.2 on each channel
+.fi
.SH EXAMPLES
.nf
To color correct from scanner to sRGB:
- jpegicc -iscanner.icm in.jpg out.jpg
-
+ jpgicc -iscanner.icm in.jpg out.jpg
+
To convert from monitor1 to monitor2:
- jpegicc -imon1.icm -omon2.icm in.jpg out.jpg
+ jpgicc -imon1.icm -omon2.icm in.jpg out.jpg
To make a CMYK separation:
- jpegicc -oprinter.icm inrgb.jpg outcmyk.jpg
+ jpgicc -oprinter.icm inrgb.jpg outcmyk.jpg
To recover sRGB from a CMYK separation:
- jpegicc -iprinter.icm incmyk.jpg outrgb.jpg
+ jpgicc -iprinter.icm incmyk.jpg outrgb.jpg
+
+To convert from CIELab ITU/Fax JPEG to sRGB
+ jpgicc -iitufax.icm in.jpg out.jpg
To convert from CIELab ITU/Fax JPEG to sRGB
- jpegicc -iitufax.icm in.jpg out.jpg
-.fi
+ jpgicc in.jpg out.jpg
+.fi
.SH NOTES
For suggestions, comments, bug reports etc. send mail to
info@littlecms.com.
.SH SEE ALSO
-.BR tifficc (1),
-.BR icc2ps (1),
-.BR icclink (1),
-.BR icctrans (1),
-.BR wtpt (1)
+.BR linkicc (1),
+.BR psicc (1),
+.BR tificc (1),
+.BR transicc (1)
.SH AUTHOR
This manual page was written by Shiju p. Nair <shiju.p@gmail.com>,
for the Debian project.
-//---------------------------------------------------------------------------------\r
-//\r
-// Little Color Management System\r
-// Copyright (c) 1998-2010 Marti Maria Saguer\r
-//\r
-// Permission is hereby granted, free of charge, to any person obtaining\r
-// a copy of this software and associated documentation files (the "Software"),\r
-// to deal in the Software without restriction, including without limitation\r
-// the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
-// and/or sell copies of the Software, and to permit persons to whom the Software\r
-// is furnished to do so, subject to the following conditions:\r
-//\r
-// The above copyright notice and this permission notice shall be included in\r
-// all copies or substantial portions of the Software.\r
-//\r
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\r
-// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-//\r
-\r
-// This program does apply profiles to (some) JPEG files\r
-\r
-\r
-#include "utils.h"\r
-\r
-#include "jpeglib.h"\r
-#include "iccjpeg.h"\r
-\r
-// Flags\r
-static cmsBool BlackPointCompensation = FALSE;\r
-static cmsBool IgnoreEmbedded = FALSE;\r
-static cmsBool GamutCheck = FALSE;\r
-static cmsBool lIsITUFax = FALSE;\r
-static cmsBool lIsPhotoshopApp13 = FALSE;\r
-static cmsBool lIsEXIF;\r
-static cmsBool lIsDeviceLink = FALSE;\r
-static cmsBool EmbedProfile = FALSE;\r
-\r
-static const char* SaveEmbedded = NULL;\r
-\r
-static int Intent = INTENT_PERCEPTUAL;\r
-static int ProofingIntent = INTENT_PERCEPTUAL;\r
-static int PrecalcMode = 1;\r
-\r
-static int jpegQuality = 75;\r
-\r
-static cmsFloat64Number ObserverAdaptationState = 0;\r
-\r
-\r
-static char *cInpProf = NULL;\r
-static char *cOutProf = NULL;\r
-static char *cProofing = NULL;\r
-\r
-static FILE * InFile;\r
-static FILE * OutFile;\r
-\r
-static struct jpeg_decompress_struct Decompressor;\r
-static struct jpeg_compress_struct Compressor;\r
-\r
-\r
-static struct my_error_mgr {\r
-\r
- struct jpeg_error_mgr pub; // "public" fields\r
- void* Cargo; // "private" fields\r
-\r
-} ErrorHandler;\r
-\r
-\r
-cmsUInt16Number Alarm[4] = {128,128,128,0};\r
-\r
-// Out of mem\r
-static\r
-void OutOfMem(size_t size)\r
-{\r
- FatalError("Out of memory on allocating %d bytes.", size);\r
-}\r
-\r
-\r
-static\r
-void my_error_exit (j_common_ptr cinfo)\r
-{\r
- char buffer[JMSG_LENGTH_MAX];\r
-\r
- (*cinfo->err->format_message) (cinfo, buffer);\r
- FatalError(buffer);\r
-}\r
-\r
-/*\r
-Definition of the APPn Markers Defined for continuous-tone G3FAX\r
-\r
-The application code APP1 initiates identification of the image as\r
-a G3FAX application and defines the spatial resolution and subsampling.\r
-This marker directly follows the SOI marker. The data format will be as follows:\r
-\r
-X'FFE1' (APP1), length, FAX identifier, version, spatial resolution.\r
-\r
-The above terms are defined as follows:\r
-\r
-Length: (Two octets) Total APP1 field octet count including the octet count itself, but excluding the APP1\r
-marker.\r
-\r
-FAX identifier: (Six octets) X'47', X'33', X'46', X'41', X'58', X'00'. This X'00'-terminated string "G3FAX"\r
-uniquely identifies this APP1 marker.\r
-\r
-Version: (Two octets) X'07CA'. This string specifies the year of approval of the standard, for identification\r
-in the case of future revision (for example, 1994).\r
-\r
-Spatial Resolution: (Two octets) Lightness pixel density in pels/25.4 mm. The basic value is 200. Allowed values are\r
-100, 200, 300, 400, 600 and 1200 pels/25.4 mm, with square (or equivalent) pels.\r
-\r
-NOTE \96 The functional equivalence of inch-based and mm-based resolutions is maintained. For example, the 200 × 200\r
-*/\r
-\r
-static\r
-cmsBool IsITUFax(jpeg_saved_marker_ptr ptr)\r
-{\r
- while (ptr)\r
- {\r
- if (ptr -> marker == (JPEG_APP0 + 1) && ptr -> data_length > 5) {\r
-\r
- const char* data = (const char*) ptr -> data;\r
-\r
- if (strcmp(data, "G3FAX") == 0) return TRUE;\r
- }\r
-\r
- ptr = ptr -> next;\r
- }\r
-\r
- return FALSE;\r
-}\r
-\r
-// Save a ITU T.42/Fax marker with defaults on boundaries. This is the only mode we support right now.\r
-static\r
-void SetITUFax(j_compress_ptr cinfo)\r
-{\r
- unsigned char Marker[] = "G3FAX\x00\0x07\xCA\x00\xC8";\r
-\r
- jpeg_write_marker(cinfo, (JPEG_APP0 + 1), Marker, 10);\r
-}\r
-\r
-\r
-// Build a profile for decoding ITU T.42/Fax JPEG streams.\r
-// The profile has an additional ability in the input direction of\r
-// gamut compress values between 85 < a < -85 and -75 < b < 125. This conforms\r
-// the default range for ITU/T.42 -- See RFC 2301, section 6.2.3 for details\r
-\r
-// L* = [0, 100]\r
-// a* = [\9685, 85]\r
-// b* = [\9675, 125]\r
-\r
-\r
-// These functions does convert the encoding of ITUFAX to floating point\r
-// and vice-versa. No gamut mapping is performed yet.\r
-\r
-static\r
-void ITU2Lab(const cmsUInt16Number In[3], cmsCIELab* Lab)\r
-{\r
- Lab -> L = (double) In[0] / 655.35;\r
- Lab -> a = (double) 170.* (In[1] - 32768.) / 65535.;\r
- Lab -> b = (double) 200.* (In[2] - 24576.) / 65535.;\r
-}\r
-\r
-static\r
-void Lab2ITU(const cmsCIELab* Lab, cmsUInt16Number Out[3])\r
-{\r
- Out[0] = (cmsUInt16Number) floor((double) (Lab -> L / 100.)* 65535. );\r
- Out[1] = (cmsUInt16Number) floor((double) (Lab -> a / 170.)* 65535. + 32768. );\r
- Out[2] = (cmsUInt16Number) floor((double) (Lab -> b / 200.)* 65535. + 24576. );\r
-}\r
-\r
-// These are the samplers-- They are passed as callbacks to cmsStageSampleCLut16bit()\r
-// then, cmsSample3DGrid() will sweel whole Lab gamut calling these functions\r
-// once for each node. In[] will contain the Lab PCS value to convert to ITUFAX\r
-// on PCS2ITU, or the ITUFAX value to convert to Lab in ITU2PCS\r
-// You can change the number of sample points if desired, the algorithm will\r
-// remain same. 33 points gives good accurancy, but you can reduce to 22 or less\r
-// is space is critical\r
-\r
-#define GRID_POINTS 33\r
-\r
-static\r
-int PCS2ITU(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)\r
-{\r
- cmsCIELab Lab;\r
-\r
- cmsLabEncoded2Float(&Lab, In);\r
- cmsDesaturateLab(&Lab, 85, -85, 125, -75); // This function does the necessary gamut remapping\r
- Lab2ITU(&Lab, Out);\r
- return TRUE;\r
-\r
- UTILS_UNUSED_PARAMETER(Cargo);\r
-}\r
-\r
-\r
-static\r
-int ITU2PCS( register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)\r
-{\r
- cmsCIELab Lab;\r
-\r
- ITU2Lab(In, &Lab);\r
- cmsFloat2LabEncoded(Out, &Lab);\r
- return TRUE;\r
-\r
- UTILS_UNUSED_PARAMETER(Cargo);\r
-}\r
-\r
-// This function does create the virtual input profile, which decodes ITU to the profile connection space\r
-static\r
-cmsHPROFILE CreateITU2PCS_ICC(void)\r
-{\r
- cmsHPROFILE hProfile;\r
- cmsPipeline* AToB0;\r
- cmsStage* ColorMap;\r
-\r
- AToB0 = cmsPipelineAlloc(0, 3, 3);\r
- if (AToB0 == NULL) return NULL;\r
-\r
- ColorMap = cmsStageAllocCLut16bit(0, GRID_POINTS, 3, 3, NULL);\r
- if (ColorMap == NULL) return NULL;\r
-\r
- cmsPipelineInsertStage(AToB0, cmsAT_BEGIN, ColorMap);\r
- cmsStageSampleCLut16bit(ColorMap, ITU2PCS, NULL, 0);\r
-\r
- hProfile = cmsCreateProfilePlaceholder(0);\r
- if (hProfile == NULL) {\r
- cmsPipelineFree(AToB0);\r
- return NULL;\r
- }\r
-\r
- cmsWriteTag(hProfile, cmsSigAToB0Tag, AToB0);\r
- cmsSetColorSpace(hProfile, cmsSigLabData);\r
- cmsSetPCS(hProfile, cmsSigLabData);\r
- cmsSetDeviceClass(hProfile, cmsSigColorSpaceClass);\r
- cmsPipelineFree(AToB0);\r
-\r
- return hProfile;\r
-}\r
-\r
-\r
-// This function does create the virtual output profile, with the necessary gamut mapping\r
-static\r
-cmsHPROFILE CreatePCS2ITU_ICC(void)\r
-{\r
- cmsHPROFILE hProfile;\r
- cmsPipeline* BToA0;\r
- cmsStage* ColorMap;\r
-\r
- BToA0 = cmsPipelineAlloc(0, 3, 3);\r
- if (BToA0 == NULL) return NULL;\r
-\r
- ColorMap = cmsStageAllocCLut16bit(0, GRID_POINTS, 3, 3, NULL);\r
- if (ColorMap == NULL) return NULL;\r
-\r
- cmsPipelineInsertStage(BToA0, cmsAT_BEGIN, ColorMap);\r
- cmsStageSampleCLut16bit(ColorMap, PCS2ITU, NULL, 0);\r
-\r
- hProfile = cmsCreateProfilePlaceholder(0);\r
- if (hProfile == NULL) {\r
- cmsPipelineFree(BToA0);\r
- return NULL;\r
- }\r
-\r
- cmsWriteTag(hProfile, cmsSigBToA0Tag, BToA0);\r
- cmsSetColorSpace(hProfile, cmsSigLabData);\r
- cmsSetPCS(hProfile, cmsSigLabData);\r
- cmsSetDeviceClass(hProfile, cmsSigColorSpaceClass);\r
-\r
- cmsPipelineFree(BToA0);\r
-\r
- return hProfile;\r
-}\r
-\r
-\r
-\r
-#define PS_FIXED_TO_FLOAT(h, l) ((float) (h) + ((float) (l)/(1<<16)))\r
-\r
-static\r
-cmsBool ProcessPhotoshopAPP13(JOCTET FAR *data, int datalen)\r
-{\r
- int i;\r
-\r
- for (i = 14; i < datalen; )\r
- {\r
- long len;\r
- unsigned int type;\r
-\r
- if (!(GETJOCTET(data[i] ) == 0x38 &&\r
- GETJOCTET(data[i+1]) == 0x42 &&\r
- GETJOCTET(data[i+2]) == 0x49 &&\r
- GETJOCTET(data[i+3]) == 0x4D)) break; // Not recognized\r
-\r
- i += 4; // identifying string\r
-\r
- type = (unsigned int) (GETJOCTET(data[i]<<8) + GETJOCTET(data[i+1]));\r
-\r
- i += 2; // resource type\r
-\r
- i += GETJOCTET(data[i]) + ((GETJOCTET(data[i]) & 1) ? 1 : 2); // resource name\r
-\r
- len = ((((GETJOCTET(data[i]<<8) + GETJOCTET(data[i+1]))<<8) +\r
- GETJOCTET(data[i+2]))<<8) + GETJOCTET(data[i+3]);\r
-\r
- i += 4; // Size\r
-\r
- if (type == 0x03ED && len >= 16) {\r
-\r
- Decompressor.X_density = (UINT16) PS_FIXED_TO_FLOAT(GETJOCTET(data[i]<<8) + GETJOCTET(data[i+1]),\r
- GETJOCTET(data[i+2]<<8) + GETJOCTET(data[i+3]));\r
- Decompressor.Y_density = (UINT16) PS_FIXED_TO_FLOAT(GETJOCTET(data[i+8]<<8) + GETJOCTET(data[i+9]),\r
- GETJOCTET(data[i+10]<<8) + GETJOCTET(data[i+11]));\r
-\r
- // Set the density unit to 1 since the\r
- // Vertical and Horizontal resolutions\r
- // are specified in Pixels per inch\r
-\r
- Decompressor.density_unit = 0x01;\r
- return TRUE;\r
-\r
- }\r
-\r
- i += len + ((len & 1) ? 1 : 0); // Alignment\r
- }\r
- return FALSE;\r
-}\r
-\r
-\r
-static\r
-cmsBool HandlePhotoshopAPP13(jpeg_saved_marker_ptr ptr)\r
-{\r
- while (ptr) {\r
-\r
- if (ptr -> marker == (JPEG_APP0 + 13) && ptr -> data_length > 9)\r
- {\r
- JOCTET FAR* data = ptr -> data;\r
-\r
- if(GETJOCTET(data[0]) == 0x50 &&\r
- GETJOCTET(data[1]) == 0x68 &&\r
- GETJOCTET(data[2]) == 0x6F &&\r
- GETJOCTET(data[3]) == 0x74 &&\r
- GETJOCTET(data[4]) == 0x6F &&\r
- GETJOCTET(data[5]) == 0x73 &&\r
- GETJOCTET(data[6]) == 0x68 &&\r
- GETJOCTET(data[7]) == 0x6F &&\r
- GETJOCTET(data[8]) == 0x70) {\r
-\r
- ProcessPhotoshopAPP13(data, ptr -> data_length);\r
- return TRUE;\r
- }\r
- }\r
-\r
- ptr = ptr -> next;\r
- }\r
-\r
- return FALSE;\r
-}\r
-\r
-\r
-typedef unsigned short uint16_t;\r
-typedef unsigned char uint8_t;\r
-typedef unsigned int uint32_t;\r
-\r
-#define INTEL_BYTE_ORDER 0x4949\r
-#define XRESOLUTION 0x011a\r
-#define YRESOLUTION 0x011b\r
-#define RESOLUTION_UNIT 0x128\r
-\r
-// Read a 16-bit word\r
-static\r
-uint16_t read16(uint8_t* arr, int pos, int swapBytes)\r
-{\r
- uint8_t b1 = arr[pos];\r
- uint8_t b2 = arr[pos+1];\r
-\r
- return (swapBytes) ? ((b2 << 8) | b1) : ((b1 << 8) | b2);\r
-}\r
-\r
-\r
-// Read a 32-bit word\r
-static\r
-uint32_t read32(uint8_t* arr, int pos, int swapBytes)\r
-{\r
-\r
- if(!swapBytes) {\r
-\r
- return (arr[pos] << 24) |\r
- (arr[pos+1] << 16) |\r
- (arr[pos+2] << 8) |\r
- arr[pos+3];\r
- }\r
-\r
- return arr[pos] |\r
- (arr[pos+1] << 8) |\r
- (arr[pos+2] << 16) |\r
- (arr[pos+3] << 24);\r
-}\r
-\r
-\r
-\r
-static\r
-int read_tag(uint8_t* arr, int pos, int swapBytes, void* dest)\r
-{\r
- // Format should be 5 over here (rational)\r
- uint32_t format = read16(arr, pos + 2, swapBytes);\r
- // Components should be 1\r
- uint32_t components = read32(arr, pos + 4, swapBytes);\r
- // Points to the value\r
- uint32_t offset;\r
-\r
- // sanity\r
- if (components != 1) return 0;\r
-\r
- if (format == 3)\r
- offset = pos + 8;\r
- else\r
- offset = read32(arr, pos + 8, swapBytes);\r
-\r
- switch (format) {\r
-\r
- case 5: // Rational\r
- {\r
- double num = read32(arr, offset, swapBytes);\r
- double den = read32(arr, offset + 4, swapBytes);\r
- *(double *) dest = num / den;\r
- }\r
- break;\r
-\r
- case 3: // uint 16\r
- *(int*) dest = read16(arr, offset, swapBytes);\r
- break;\r
-\r
- default: return 0;\r
- }\r
-\r
- return 1;\r
-}\r
-\r
-\r
-\r
-// Handler for EXIF data\r
-static\r
- cmsBool HandleEXIF(struct jpeg_decompress_struct* cinfo)\r
-{\r
- jpeg_saved_marker_ptr ptr;\r
- uint32_t ifd_ofs;\r
- int pos = 0, swapBytes = 0;\r
- uint32_t i, numEntries;\r
- double XRes = -1, YRes = -1;\r
- int Unit = 2; // Inches\r
-\r
-\r
- for (ptr = cinfo ->marker_list; ptr; ptr = ptr ->next) {\r
-\r
- if ((ptr ->marker == JPEG_APP0+1) && ptr ->data_length > 6) {\r
- JOCTET FAR* data = ptr -> data;\r
-\r
- if (memcmp(data, "Exif\0\0", 6) == 0) {\r
-\r
- data += 6; // Skip EXIF marker\r
-\r
- // 8 byte TIFF header\r
- // first two determine byte order\r
- pos = 0;\r
- if (read16(data, pos, 0) == INTEL_BYTE_ORDER) {\r
- swapBytes = 1;\r
- }\r
-\r
- pos += 2;\r
-\r
- // next two bytes are always 0x002A (TIFF version)\r
- pos += 2;\r
-\r
- // offset to Image File Directory (includes the previous 8 bytes)\r
- ifd_ofs = read32(data, pos, swapBytes);\r
-\r
- // Search the directory for resolution tags\r
- numEntries = read16(data, ifd_ofs, swapBytes);\r
-\r
- for (i=0; i < numEntries; i++) {\r
-\r
- uint32_t entryOffset = ifd_ofs + 2 + (12 * i);\r
- uint32_t tag = read16(data, entryOffset, swapBytes);\r
-\r
- switch (tag) {\r
-\r
- case RESOLUTION_UNIT:\r
- if (!read_tag(data, entryOffset, swapBytes, &Unit)) return FALSE;\r
- break;\r
-\r
- case XRESOLUTION:\r
- if (!read_tag(data, entryOffset, swapBytes, &XRes)) return FALSE;\r
- break;\r
-\r
- case YRESOLUTION:\r
- if (!read_tag(data, entryOffset, swapBytes, &YRes)) return FALSE;\r
- break;\r
-\r
- default:;\r
- }\r
-\r
- }\r
-\r
- // Proceed if all found\r
-\r
- if (XRes != -1 && YRes != -1)\r
- {\r
-\r
- // 1 = None\r
- // 2 = inches\r
- // 3 = cm\r
-\r
- switch (Unit) {\r
-\r
- case 2:\r
-\r
- cinfo ->X_density = (UINT16) floor(XRes + 0.5);\r
- cinfo ->Y_density = (UINT16) floor(YRes + 0.5);\r
- break;\r
-\r
- case 1:\r
-\r
- cinfo ->X_density = (UINT16) floor(XRes * 2.54 + 0.5);\r
- cinfo ->Y_density = (UINT16) floor(YRes * 2.54 + 0.5);\r
- break;\r
-\r
- default: return FALSE;\r
- }\r
-\r
- cinfo ->density_unit = 1; /* 1 for dots/inch, or 2 for dots/cm.*/\r
-\r
- }\r
-\r
-\r
- }\r
- }\r
- }\r
- return FALSE;\r
-}\r
-\r
-\r
-static\r
-cmsBool OpenInput(const char* FileName)\r
-{\r
- int m;\r
-\r
- lIsITUFax = FALSE;\r
- InFile = fopen(FileName, "rb");\r
- if (InFile == NULL) {\r
- FatalError("Cannot open '%s'", FileName);\r
- }\r
-\r
- // Now we can initialize the JPEG decompression object.\r
- Decompressor.err = jpeg_std_error(&ErrorHandler.pub);\r
- ErrorHandler.pub.error_exit = my_error_exit;\r
- ErrorHandler.pub.output_message = my_error_exit;\r
-\r
- jpeg_create_decompress(&Decompressor);\r
- jpeg_stdio_src(&Decompressor, InFile);\r
-\r
- for (m = 0; m < 16; m++)\r
- jpeg_save_markers(&Decompressor, JPEG_APP0 + m, 0xFFFF);\r
-\r
- // setup_read_icc_profile(&Decompressor);\r
-\r
- fseek(InFile, 0, SEEK_SET);\r
- jpeg_read_header(&Decompressor, TRUE);\r
-\r
- return TRUE;\r
-}\r
-\r
-\r
-static\r
-cmsBool OpenOutput(const char* FileName)\r
-{\r
-\r
- OutFile = fopen(FileName, "wb");\r
- if (OutFile == NULL) {\r
- FatalError("Cannot create '%s'", FileName);\r
-\r
- }\r
-\r
- Compressor.err = jpeg_std_error(&ErrorHandler.pub);\r
- ErrorHandler.pub.error_exit = my_error_exit;\r
- ErrorHandler.pub.output_message = my_error_exit;\r
-\r
- Compressor.input_components = Compressor.num_components = 4;\r
-\r
- jpeg_create_compress(&Compressor);\r
- jpeg_stdio_dest(&Compressor, OutFile);\r
- return TRUE;\r
-}\r
-\r
-static\r
-cmsBool Done(void)\r
-{\r
- jpeg_destroy_decompress(&Decompressor);\r
- jpeg_destroy_compress(&Compressor);\r
- return fclose(InFile) + fclose(OutFile);\r
-\r
-}\r
-\r
-\r
-// Build up the pixeltype descriptor\r
-\r
-static\r
-cmsUInt32Number GetInputPixelType(void)\r
-{\r
- int space, bps, extra, ColorChannels, Flavor;\r
-\r
- lIsITUFax = IsITUFax(Decompressor.marker_list);\r
- lIsPhotoshopApp13 = HandlePhotoshopAPP13(Decompressor.marker_list);\r
- lIsEXIF = HandleEXIF(&Decompressor);\r
-\r
- ColorChannels = Decompressor.num_components;\r
- extra = 0; // Alpha = None\r
- bps = 1; // 8 bits\r
- Flavor = 0; // Vanilla\r
-\r
- if (lIsITUFax) {\r
-\r
- space = PT_Lab;\r
- Decompressor.out_color_space = JCS_YCbCr; // Fake to don't touch\r
- }\r
- else\r
- switch (Decompressor.jpeg_color_space) {\r
-\r
- case JCS_GRAYSCALE: // monochrome\r
- space = PT_GRAY;\r
- Decompressor.out_color_space = JCS_GRAYSCALE;\r
- break;\r
-\r
- case JCS_RGB: // red/green/blue\r
- space = PT_RGB;\r
- Decompressor.out_color_space = JCS_RGB;\r
- break;\r
-\r
- case JCS_YCbCr: // Y/Cb/Cr (also known as YUV)\r
- space = PT_RGB; // Let IJG code to do the conversion\r
- Decompressor.out_color_space = JCS_RGB;\r
- break;\r
-\r
- case JCS_CMYK: // C/M/Y/K\r
- space = PT_CMYK;\r
- Decompressor.out_color_space = JCS_CMYK;\r
- if (Decompressor.saw_Adobe_marker) // Adobe keeps CMYK inverted, so change flavor\r
- Flavor = 1; // from vanilla to chocolate\r
- break;\r
-\r
- case JCS_YCCK: // Y/Cb/Cr/K\r
- space = PT_CMYK;\r
- Decompressor.out_color_space = JCS_CMYK;\r
- if (Decompressor.saw_Adobe_marker) // ditto\r
- Flavor = 1;\r
- break;\r
-\r
- default:\r
- FatalError("Unsupported color space (0x%x)", Decompressor.jpeg_color_space);\r
- return 0;\r
- }\r
-\r
- return (EXTRA_SH(extra)|CHANNELS_SH(ColorChannels)|BYTES_SH(bps)|COLORSPACE_SH(space)|FLAVOR_SH(Flavor));\r
-}\r
-\r
-\r
-// Rearrange pixel type to build output descriptor\r
-static\r
-cmsUInt32Number ComputeOutputFormatDescriptor(cmsUInt32Number dwInput, int OutColorSpace)\r
-{\r
- int IsPlanar = T_PLANAR(dwInput);\r
- int Channels = 0;\r
- int Flavor = 0;\r
-\r
- switch (OutColorSpace) {\r
-\r
- case PT_GRAY:\r
- Channels = 1;\r
- break;\r
- case PT_RGB:\r
- case PT_CMY:\r
- case PT_Lab:\r
- case PT_YUV:\r
- case PT_YCbCr:\r
- Channels = 3;\r
- break;\r
-\r
- case PT_CMYK:\r
- if (Compressor.write_Adobe_marker) // Adobe keeps CMYK inverted, so change flavor to chocolate\r
- Flavor = 1;\r
- Channels = 4;\r
- break;\r
- default:\r
- FatalError("Unsupported output color space");\r
- }\r
-\r
- return (COLORSPACE_SH(OutColorSpace)|PLANAR_SH(IsPlanar)|CHANNELS_SH(Channels)|BYTES_SH(1)|FLAVOR_SH(Flavor));\r
-}\r
-\r
-\r
-// Equivalence between ICC color spaces and lcms color spaces\r
-static\r
-int GetProfileColorSpace(cmsHPROFILE hProfile)\r
-{\r
- cmsColorSpaceSignature ProfileSpace = cmsGetColorSpace(hProfile);\r
-\r
- return _cmsLCMScolorSpace(ProfileSpace);\r
-}\r
-\r
-static\r
-int GetDevicelinkColorSpace(cmsHPROFILE hProfile)\r
-{\r
- cmsColorSpaceSignature ProfileSpace = cmsGetPCS(hProfile);\r
-\r
- return _cmsLCMScolorSpace(ProfileSpace);\r
-}\r
-\r
-\r
-// From TRANSUPP\r
-\r
-static\r
-void jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo)\r
-{\r
- jpeg_saved_marker_ptr marker;\r
-\r
- /* In the current implementation, we don't actually need to examine the\r
- * option flag here; we just copy everything that got saved.\r
- * But to avoid confusion, we do not output JFIF and Adobe APP14 markers\r
- * if the encoder library already wrote one.\r
- */\r
- for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) {\r
-\r
- if (dstinfo->write_JFIF_header &&\r
- marker->marker == JPEG_APP0 &&\r
- marker->data_length >= 5 &&\r
- GETJOCTET(marker->data[0]) == 0x4A &&\r
- GETJOCTET(marker->data[1]) == 0x46 &&\r
- GETJOCTET(marker->data[2]) == 0x49 &&\r
- GETJOCTET(marker->data[3]) == 0x46 &&\r
- GETJOCTET(marker->data[4]) == 0)\r
- continue; /* reject duplicate JFIF */\r
-\r
- if (dstinfo->write_Adobe_marker &&\r
- marker->marker == JPEG_APP0+14 &&\r
- marker->data_length >= 5 &&\r
- GETJOCTET(marker->data[0]) == 0x41 &&\r
- GETJOCTET(marker->data[1]) == 0x64 &&\r
- GETJOCTET(marker->data[2]) == 0x6F &&\r
- GETJOCTET(marker->data[3]) == 0x62 &&\r
- GETJOCTET(marker->data[4]) == 0x65)\r
- continue; /* reject duplicate Adobe */\r
-\r
- jpeg_write_marker(dstinfo, marker->marker,\r
- marker->data, marker->data_length);\r
- }\r
-}\r
-\r
-static\r
-void WriteOutputFields(int OutputColorSpace)\r
-{\r
- J_COLOR_SPACE in_space, jpeg_space;\r
- int components;\r
-\r
- switch (OutputColorSpace) {\r
-\r
- case PT_GRAY: in_space = jpeg_space = JCS_GRAYSCALE;\r
- components = 1;\r
- break;\r
-\r
- case PT_RGB: in_space = JCS_RGB;\r
- jpeg_space = JCS_YCbCr;\r
- components = 3;\r
- break; // red/green/blue\r
-\r
- case PT_YCbCr: in_space = jpeg_space = JCS_YCbCr;\r
- components = 3;\r
- break; // Y/Cb/Cr (also known as YUV)\r
-\r
- case PT_CMYK: in_space = JCS_CMYK;\r
- jpeg_space = JCS_YCCK;\r
- components = 4;\r
- break; // C/M/Y/components\r
-\r
- case PT_Lab: in_space = jpeg_space = JCS_YCbCr;\r
- components = 3;\r
- break; // Fake to don't touch\r
- default:\r
- FatalError("Unsupported output color space");\r
- return;\r
- }\r
-\r
-\r
- if (jpegQuality >= 100) {\r
-\r
- // avoid destructive conversion when asking for lossless compression\r
- jpeg_space = in_space;\r
- }\r
-\r
- Compressor.in_color_space = in_space;\r
- Compressor.jpeg_color_space = jpeg_space;\r
- Compressor.input_components = Compressor.num_components = components;\r
- jpeg_set_defaults(&Compressor);\r
- jpeg_set_colorspace(&Compressor, jpeg_space);\r
-\r
-\r
- // Make sure to pass resolution through\r
- if (OutputColorSpace == PT_CMYK)\r
- Compressor.write_JFIF_header = 1;\r
-\r
- // Avoid subsampling on high quality factor\r
- jpeg_set_quality(&Compressor, jpegQuality, 1);\r
- if (jpegQuality >= 70) {\r
-\r
- int i;\r
- for(i=0; i < Compressor.num_components; i++) {\r
-\r
- Compressor.comp_info[i].h_samp_factor = 1;\r
- Compressor.comp_info[i].v_samp_factor = 1;\r
- }\r
-\r
- }\r
-\r
-}\r
-\r
-\r
-static\r
-void DoEmbedProfile(const char* ProfileFile)\r
-{\r
- FILE* f;\r
- size_t size, EmbedLen;\r
- cmsUInt8Number* EmbedBuffer;\r
-\r
- f = fopen(ProfileFile, "rb");\r
- if (f == NULL) return;\r
-\r
- size = cmsfilelength(f);\r
- EmbedBuffer = (cmsUInt8Number*) malloc(size + 1);\r
- EmbedLen = fread(EmbedBuffer, 1, size, f);\r
- fclose(f);\r
- EmbedBuffer[EmbedLen] = 0;\r
-\r
- write_icc_profile (&Compressor, EmbedBuffer, EmbedLen);\r
- free(EmbedBuffer);\r
-}\r
-\r
-\r
-\r
-static\r
-int DoTransform(cmsHTRANSFORM hXForm, int OutputColorSpace)\r
-{\r
- JSAMPROW ScanLineIn;\r
- JSAMPROW ScanLineOut;\r
-\r
-\r
- //Preserve resolution values from the original\r
- // (Thanks to Robert Bergs for finding out this bug)\r
- Compressor.density_unit = Decompressor.density_unit;\r
- Compressor.X_density = Decompressor.X_density;\r
- Compressor.Y_density = Decompressor.Y_density;\r
-\r
- // Compressor.write_JFIF_header = 1;\r
-\r
- jpeg_start_decompress(&Decompressor);\r
- jpeg_start_compress(&Compressor, TRUE);\r
-\r
- if (OutputColorSpace == PT_Lab)\r
- SetITUFax(&Compressor);\r
-\r
- // Embed the profile if needed\r
- if (EmbedProfile && cOutProf)\r
- DoEmbedProfile(cOutProf);\r
-\r
- ScanLineIn = (JSAMPROW) malloc(Decompressor.output_width * Decompressor.num_components);\r
- ScanLineOut = (JSAMPROW) malloc(Compressor.image_width * Compressor.num_components);\r
-\r
- while (Decompressor.output_scanline <\r
- Decompressor.output_height) {\r
-\r
- jpeg_read_scanlines(&Decompressor, &ScanLineIn, 1);\r
-\r
- cmsDoTransform(hXForm, ScanLineIn, ScanLineOut, Decompressor.output_width);\r
-\r
- jpeg_write_scanlines(&Compressor, &ScanLineOut, 1);\r
- }\r
-\r
- free(ScanLineIn);\r
- free(ScanLineOut);\r
-\r
- jpeg_finish_decompress(&Decompressor);\r
- jpeg_finish_compress(&Compressor);\r
-\r
- return TRUE;\r
-}\r
-\r
-\r
-\r
-// Transform one image\r
-\r
-static\r
-int TransformImage(char *cDefInpProf, char *cOutProf)\r
-{\r
- cmsHPROFILE hIn, hOut, hProof;\r
- cmsHTRANSFORM xform;\r
- cmsUInt32Number wInput, wOutput;\r
- int OutputColorSpace;\r
- cmsUInt32Number dwFlags = 0;\r
- cmsUInt32Number EmbedLen;\r
- cmsUInt8Number* EmbedBuffer;\r
-\r
-\r
- cmsSetAdaptationState(ObserverAdaptationState);\r
-\r
- if (BlackPointCompensation) {\r
-\r
- dwFlags |= cmsFLAGS_BLACKPOINTCOMPENSATION;\r
- }\r
-\r
-\r
- switch (PrecalcMode) {\r
-\r
- case 0: dwFlags |= cmsFLAGS_NOOPTIMIZE; break;\r
- case 2: dwFlags |= cmsFLAGS_HIGHRESPRECALC; break;\r
- case 3: dwFlags |= cmsFLAGS_LOWRESPRECALC; break;\r
- default:;\r
- }\r
-\r
-\r
- if (GamutCheck) {\r
- dwFlags |= cmsFLAGS_GAMUTCHECK;\r
- cmsSetAlarmCodes(Alarm);\r
- }\r
-\r
- // Take input color space\r
- wInput = GetInputPixelType();\r
-\r
- if (lIsDeviceLink) {\r
-\r
- hIn = cmsOpenProfileFromFile(cDefInpProf, "r");\r
- hOut = NULL;\r
- hProof = NULL;\r
- }\r
- else {\r
-\r
- if (!IgnoreEmbedded && read_icc_profile(&Decompressor, &EmbedBuffer, &EmbedLen))\r
- {\r
- hIn = cmsOpenProfileFromMem(EmbedBuffer, EmbedLen);\r
-\r
- if (Verbose) {\r
-\r
- fprintf(stdout, " (Embedded profile found)\n");\r
- PrintProfileInformation(hIn);\r
- fflush(stdout);\r
- }\r
-\r
- if (hIn != NULL && SaveEmbedded != NULL)\r
- SaveMemoryBlock(EmbedBuffer, EmbedLen, SaveEmbedded);\r
-\r
- free(EmbedBuffer);\r
- }\r
- else\r
- {\r
- // Default for ITU/Fax\r
- if (cDefInpProf == NULL && T_COLORSPACE(wInput) == PT_Lab)\r
- cDefInpProf = "*Lab";\r
-\r
- if (cDefInpProf != NULL && cmsstrcasecmp(cDefInpProf, "*lab") == 0)\r
- hIn = CreateITU2PCS_ICC();\r
- else\r
- hIn = OpenStockProfile(0, cDefInpProf);\r
- }\r
-\r
- if (cOutProf != NULL && cmsstrcasecmp(cOutProf, "*lab") == 0)\r
- hOut = CreatePCS2ITU_ICC();\r
- else\r
- hOut = OpenStockProfile(0, cOutProf);\r
-\r
- hProof = NULL;\r
- if (cProofing != NULL) {\r
-\r
- hProof = OpenStockProfile(0, cProofing);\r
- if (hProof == NULL) {\r
- FatalError("Proofing profile couldn't be read.");\r
- }\r
- dwFlags |= cmsFLAGS_SOFTPROOFING;\r
- }\r
- }\r
-\r
- if (!hIn)\r
- FatalError("Input profile couldn't be read.");\r
- if (!hOut)\r
- FatalError("Output profile couldn't be read.");\r
-\r
- // Assure both, input profile and input JPEG are on same colorspace\r
- if (cmsGetColorSpace(hIn) != _cmsICCcolorSpace(T_COLORSPACE(wInput)))\r
- FatalError("Input profile is not operating in proper color space");\r
-\r
-\r
- // Output colorspace is given by output profile\r
-\r
- if (lIsDeviceLink) {\r
- OutputColorSpace = GetDevicelinkColorSpace(hIn);\r
- }\r
- else {\r
- OutputColorSpace = GetProfileColorSpace(hOut);\r
- }\r
-\r
- jpeg_copy_critical_parameters(&Decompressor, &Compressor);\r
-\r
- WriteOutputFields(OutputColorSpace);\r
-\r
- wOutput = ComputeOutputFormatDescriptor(wInput, OutputColorSpace);\r
-\r
-\r
- xform = cmsCreateProofingTransform(hIn, wInput,\r
- hOut, wOutput,\r
- hProof, Intent,\r
- ProofingIntent, dwFlags);\r
- if (xform == NULL)\r
- FatalError("Cannot transform by using the profiles");\r
-\r
- DoTransform(xform, OutputColorSpace);\r
-\r
-\r
- jcopy_markers_execute(&Decompressor, &Compressor);\r
-\r
- cmsDeleteTransform(xform);\r
- cmsCloseProfile(hIn);\r
- cmsCloseProfile(hOut);\r
- if (hProof) cmsCloseProfile(hProof);\r
-\r
- return 1;\r
-}\r
-\r
-\r
-// Simply print help\r
-\r
-static\r
-void Help(int level)\r
-{\r
- fprintf(stderr, "little cms ICC profile applier for JPEG - v3.2 [LittleCMS %2.2f]\n\n", LCMS_VERSION / 1000.0);\r
-\r
- switch(level) {\r
-\r
- default:\r
- case 0:\r
-\r
- fprintf(stderr, "usage: jpgicc [flags] input.jpg output.jpg\n");\r
-\r
- fprintf(stderr, "\nflags:\n\n");\r
- fprintf(stderr, "%cv - Verbose\n", SW);\r
- fprintf(stderr, "%ci<profile> - Input profile (defaults to sRGB)\n", SW);\r
- fprintf(stderr, "%co<profile> - Output profile (defaults to sRGB)\n", SW);\r
-\r
- PrintRenderingIntents();\r
-\r
-\r
- fprintf(stderr, "%cb - Black point compensation\n", SW);\r
- fprintf(stderr, "%cd<0..1> - Observer adaptation state (abs.col. only)\n", SW);\r
- fprintf(stderr, "%cn - Ignore embedded profile\n", SW);\r
- fprintf(stderr, "%ce - Embed destination profile\n", SW);\r
- fprintf(stderr, "%cs<new profile> - Save embedded profile as <new profile>\n", SW);\r
-\r
- fprintf(stderr, "\n");\r
-\r
- fprintf(stderr, "%cc<0,1,2,3> - Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1]\n", SW);\r
- fprintf(stderr, "\n");\r
-\r
- fprintf(stderr, "%cp<profile> - Soft proof profile\n", SW);\r
- fprintf(stderr, "%cm<0,1,2,3> - SoftProof intent\n", SW);\r
- fprintf(stderr, "%cg - Marks out-of-gamut colors on softproof\n", SW);\r
- fprintf(stderr, "%c!<r>,<g>,<b> - Out-of-gamut marker channel values\n", SW);\r
-\r
- fprintf(stderr, "\n");\r
- fprintf(stderr, "%cq<0..100> - Output JPEG quality\n", SW);\r
-\r
- fprintf(stderr, "\n");\r
- fprintf(stderr, "%ch<0,1,2,3> - More help\n", SW);\r
- break;\r
-\r
- case 1:\r
-\r
- fprintf(stderr, "Examples:\n\n"\r
- "To color correct from scanner to sRGB:\n"\r
- "\tjpgicc %ciscanner.icm in.jpg out.jpg\n"\r
- "To convert from monitor1 to monitor2:\n"\r
- "\tjpgicc %cimon1.icm %comon2.icm in.jpg out.jpg\n"\r
- "To make a CMYK separation:\n"\r
- "\tjpgicc %coprinter.icm inrgb.jpg outcmyk.jpg\n"\r
- "To recover sRGB from a CMYK separation:\n"\r
- "\tjpgicc %ciprinter.icm incmyk.jpg outrgb.jpg\n"\r
- "To convert from CIELab ITU/Fax JPEG to sRGB\n"\r
- "\tjpgicc in.jpg out.jpg\n\n",\r
- SW, SW, SW, SW, SW, SW);\r
- break;\r
-\r
- case 2:\r
- PrintBuiltins();\r
- break;\r
-\r
- case 3:\r
-\r
- fprintf(stderr, "This program is intended to be a demo of the little cms\n"\r
- "engine. Both lcms and this program are freeware. You can\n"\r
- "obtain both in source code at http://www.littlecms.com\n"\r
- "For suggestions, comments, bug reports etc. send mail to\n"\r
- "marti@littlecms.com\n\n");\r
- break;\r
- }\r
-\r
- exit(0);\r
-}\r
-\r
-\r
-// The toggles stuff\r
-\r
-static\r
-void HandleSwitches(int argc, char *argv[])\r
-{\r
- int s;\r
-\r
- while ((s=xgetopt(argc,argv,"bBnNvVGgh:H:i:I:o:O:P:p:t:T:c:C:Q:q:M:m:L:l:eEs:S:!:D:d:")) != EOF) {\r
-\r
- switch (s)\r
- {\r
-\r
- case 'b':\r
- case 'B':\r
- BlackPointCompensation = TRUE;\r
- break;\r
-\r
- case 'd':\r
- case 'D': ObserverAdaptationState = atof(xoptarg);\r
- if (ObserverAdaptationState < 0 ||\r
- ObserverAdaptationState > 1.0)\r
- FatalError("Adaptation state should be 0..1");\r
- break;\r
-\r
- case 'v':\r
- case 'V':\r
- Verbose = TRUE;\r
- break;\r
-\r
- case 'i':\r
- case 'I':\r
- if (lIsDeviceLink)\r
- FatalError("Device-link already specified");\r
-\r
- cInpProf = xoptarg;\r
- break;\r
-\r
- case 'o':\r
- case 'O':\r
- if (lIsDeviceLink)\r
- FatalError("Device-link already specified");\r
-\r
- cOutProf = xoptarg;\r
- break;\r
-\r
- case 'l':\r
- case 'L':\r
- if (cInpProf != NULL || cOutProf != NULL)\r
- FatalError("input/output profiles already specified");\r
-\r
- cInpProf = xoptarg;\r
- lIsDeviceLink = TRUE;\r
- break;\r
-\r
- case 'p':\r
- case 'P':\r
- cProofing = xoptarg;\r
- break;\r
-\r
- case 't':\r
- case 'T':\r
- Intent = atoi(xoptarg);\r
- break;\r
-\r
- case 'N':\r
- case 'n':\r
- IgnoreEmbedded = TRUE;\r
- break;\r
-\r
- case 'e':\r
- case 'E':\r
- EmbedProfile = TRUE;\r
- break;\r
-\r
-\r
- case 'g':\r
- case 'G':\r
- GamutCheck = TRUE;\r
- break;\r
-\r
- case 'c':\r
- case 'C':\r
- PrecalcMode = atoi(xoptarg);\r
- if (PrecalcMode < 0 || PrecalcMode > 2)\r
- FatalError("Unknown precalc mode '%d'", PrecalcMode);\r
- break;\r
-\r
- case 'H':\r
- case 'h': {\r
-\r
- int a = atoi(xoptarg);\r
- Help(a);\r
- }\r
- break;\r
-\r
- case 'q':\r
- case 'Q':\r
- jpegQuality = atoi(xoptarg);\r
- if (jpegQuality > 100) jpegQuality = 100;\r
- if (jpegQuality < 0) jpegQuality = 0;\r
- break;\r
-\r
- case 'm':\r
- case 'M':\r
- ProofingIntent = atoi(xoptarg);\r
- break;\r
-\r
- case 's':\r
- case 'S': SaveEmbedded = xoptarg;\r
- break;\r
-\r
- case '!':\r
- if (sscanf(xoptarg, "%hu,%hu,%hu", &Alarm[0], &Alarm[1], &Alarm[2]) == 3) {\r
- int i;\r
- for (i=0; i < 3; i++) {\r
- Alarm[i] = (Alarm[i] << 8) | Alarm[i];\r
- }\r
- }\r
- break;\r
-\r
- default:\r
-\r
- FatalError("Unknown option - run without args to see valid ones");\r
- }\r
-\r
- }\r
-}\r
-\r
-\r
-int main(int argc, char* argv[])\r
-{\r
- InitUtils("jpgicc");\r
-\r
- HandleSwitches(argc, argv);\r
-\r
- if ((argc - xoptind) != 2) {\r
- Help(0);\r
- }\r
-\r
- OpenInput(argv[xoptind]);\r
- OpenOutput(argv[xoptind+1]);\r
-\r
- TransformImage(cInpProf, cOutProf);\r
-\r
-\r
- if (Verbose) { fprintf(stdout, "\n"); fflush(stdout); }\r
-\r
- Done();\r
-\r
- return 0;\r
-}\r
-\r
-\r
-\r
+//---------------------------------------------------------------------------------
+//
+// Little Color Management System
+// Copyright (c) 1998-2020 Marti Maria Saguer
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+// This program does apply profiles to (some) JPEG files
+
+
+#include "utils.h"
+
+#include "jpeglib.h"
+#include "iccjpeg.h"
+
+// Flags
+static cmsBool BlackPointCompensation = FALSE;
+static cmsBool IgnoreEmbedded = FALSE;
+static cmsBool GamutCheck = FALSE;
+static cmsBool lIsITUFax = FALSE;
+static cmsBool lIsPhotoshopApp13 = FALSE;
+static cmsBool lIsEXIF;
+static cmsBool lIsDeviceLink = FALSE;
+static cmsBool EmbedProfile = FALSE;
+
+static const char* SaveEmbedded = NULL;
+
+static int Intent = INTENT_PERCEPTUAL;
+static int ProofingIntent = INTENT_PERCEPTUAL;
+static int PrecalcMode = 1;
+
+static int jpegQuality = 75;
+
+static cmsFloat64Number ObserverAdaptationState = 0;
+
+
+static char *cInpProf = NULL;
+static char *cOutProf = NULL;
+static char *cProofing = NULL;
+
+static FILE * InFile;
+static FILE * OutFile;
+
+static struct jpeg_decompress_struct Decompressor;
+static struct jpeg_compress_struct Compressor;
+
+
+static struct my_error_mgr {
+
+ struct jpeg_error_mgr pub; // "public" fields
+ void* Cargo; // "private" fields
+
+} ErrorHandler;
+
+
+cmsUInt16Number Alarm[4] = {128,128,128,0};
+
+
+static
+void my_error_exit (j_common_ptr cinfo)
+{
+ char buffer[JMSG_LENGTH_MAX];
+
+ (*cinfo->err->format_message) (cinfo, buffer);
+ FatalError(buffer);
+}
+
+/*
+Definition of the APPn Markers Defined for continuous-tone G3FAX
+
+The application code APP1 initiates identification of the image as
+a G3FAX application and defines the spatial resolution and subsampling.
+This marker directly follows the SOI marker. The data format will be as follows:
+
+X'FFE1' (APP1), length, FAX identifier, version, spatial resolution.
+
+The above terms are defined as follows:
+
+Length: (Two octets) Total APP1 field octet count including the octet count itself, but excluding the APP1
+marker.
+
+FAX identifier: (Six octets) X'47', X'33', X'46', X'41', X'58', X'00'. This X'00'-terminated string "G3FAX"
+uniquely identifies this APP1 marker.
+
+Version: (Two octets) X'07CA'. This string specifies the year of approval of the standard, for identification
+in the case of future revision (for example, 1994).
+
+Spatial Resolution: (Two octets) Lightness pixel density in pels/25.4 mm. The basic value is 200. Allowed values are
+100, 200, 300, 400, 600 and 1200 pels/25.4 mm, with square (or equivalent) pels.
+
+NOTE - The functional equivalence of inch-based and mm-based resolutions is maintained. For example, the 200 x 200
+*/
+
+static
+cmsBool IsITUFax(jpeg_saved_marker_ptr ptr)
+{
+ while (ptr)
+ {
+ if (ptr -> marker == (JPEG_APP0 + 1) && ptr -> data_length > 5) {
+
+ const char* data = (const char*) ptr -> data;
+
+ if (strcmp(data, "G3FAX") == 0) return TRUE;
+ }
+
+ ptr = ptr -> next;
+ }
+
+ return FALSE;
+}
+
+// Save a ITU T.42/Fax marker with defaults on boundaries. This is the only mode we support right now.
+static
+void SetITUFax(j_compress_ptr cinfo)
+{
+ unsigned char Marker[] = "G3FAX\x00\0x07\xCA\x00\xC8";
+
+ jpeg_write_marker(cinfo, (JPEG_APP0 + 1), Marker, 10);
+}
+
+
+// Build a profile for decoding ITU T.42/Fax JPEG streams.
+// The profile has an additional ability in the input direction of
+// gamut compress values between 85 < a < -85 and -75 < b < 125. This conforms
+// the default range for ITU/T.42 -- See RFC 2301, section 6.2.3 for details
+
+// L* = [0, 100]
+// a* = [-85, 85]
+// b* = [-75, 125]
+
+
+// These functions does convert the encoding of ITUFAX to floating point
+// and vice-versa. No gamut mapping is performed yet.
+
+static
+void ITU2Lab(const cmsUInt16Number In[3], cmsCIELab* Lab)
+{
+ Lab -> L = (double) In[0] / 655.35;
+ Lab -> a = (double) 170.* (In[1] - 32768.) / 65535.;
+ Lab -> b = (double) 200.* (In[2] - 24576.) / 65535.;
+}
+
+static
+void Lab2ITU(const cmsCIELab* Lab, cmsUInt16Number Out[3])
+{
+ Out[0] = (cmsUInt16Number) floor((double) (Lab -> L / 100.)* 65535. );
+ Out[1] = (cmsUInt16Number) floor((double) (Lab -> a / 170.)* 65535. + 32768. );
+ Out[2] = (cmsUInt16Number) floor((double) (Lab -> b / 200.)* 65535. + 24576. );
+}
+
+// These are the samplers-- They are passed as callbacks to cmsStageSampleCLut16bit()
+// then, cmsSample3DGrid() will sweel whole Lab gamut calling these functions
+// once for each node. In[] will contain the Lab PCS value to convert to ITUFAX
+// on PCS2ITU, or the ITUFAX value to convert to Lab in ITU2PCS
+// You can change the number of sample points if desired, the algorithm will
+// remain same. 33 points gives good accuracy, but you can reduce to 22 or less
+// is space is critical
+
+#define GRID_POINTS 33
+
+static
+int PCS2ITU(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+{
+ cmsCIELab Lab;
+
+ cmsLabEncoded2Float(&Lab, In);
+ cmsDesaturateLab(&Lab, 85, -85, 125, -75); // This function does the necessary gamut remapping
+ Lab2ITU(&Lab, Out);
+ return TRUE;
+
+ UTILS_UNUSED_PARAMETER(Cargo);
+}
+
+
+static
+int ITU2PCS( register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
+{
+ cmsCIELab Lab;
+
+ ITU2Lab(In, &Lab);
+ cmsFloat2LabEncoded(Out, &Lab);
+ return TRUE;
+
+ UTILS_UNUSED_PARAMETER(Cargo);
+}
+
+// This function does create the virtual input profile, which decodes ITU to the profile connection space
+static
+cmsHPROFILE CreateITU2PCS_ICC(void)
+{
+ cmsHPROFILE hProfile;
+ cmsPipeline* AToB0;
+ cmsStage* ColorMap;
+
+ AToB0 = cmsPipelineAlloc(0, 3, 3);
+ if (AToB0 == NULL) return NULL;
+
+ ColorMap = cmsStageAllocCLut16bit(0, GRID_POINTS, 3, 3, NULL);
+ if (ColorMap == NULL) return NULL;
+
+ cmsPipelineInsertStage(AToB0, cmsAT_BEGIN, ColorMap);
+ cmsStageSampleCLut16bit(ColorMap, ITU2PCS, NULL, 0);
+
+ hProfile = cmsCreateProfilePlaceholder(0);
+ if (hProfile == NULL) {
+ cmsPipelineFree(AToB0);
+ return NULL;
+ }
+
+ cmsWriteTag(hProfile, cmsSigAToB0Tag, AToB0);
+ cmsSetColorSpace(hProfile, cmsSigLabData);
+ cmsSetPCS(hProfile, cmsSigLabData);
+ cmsSetDeviceClass(hProfile, cmsSigColorSpaceClass);
+ cmsPipelineFree(AToB0);
+
+ return hProfile;
+}
+
+
+// This function does create the virtual output profile, with the necessary gamut mapping
+static
+cmsHPROFILE CreatePCS2ITU_ICC(void)
+{
+ cmsHPROFILE hProfile;
+ cmsPipeline* BToA0;
+ cmsStage* ColorMap;
+
+ BToA0 = cmsPipelineAlloc(0, 3, 3);
+ if (BToA0 == NULL) return NULL;
+
+ ColorMap = cmsStageAllocCLut16bit(0, GRID_POINTS, 3, 3, NULL);
+ if (ColorMap == NULL) return NULL;
+
+ cmsPipelineInsertStage(BToA0, cmsAT_BEGIN, ColorMap);
+ cmsStageSampleCLut16bit(ColorMap, PCS2ITU, NULL, 0);
+
+ hProfile = cmsCreateProfilePlaceholder(0);
+ if (hProfile == NULL) {
+ cmsPipelineFree(BToA0);
+ return NULL;
+ }
+
+ cmsWriteTag(hProfile, cmsSigBToA0Tag, BToA0);
+ cmsSetColorSpace(hProfile, cmsSigLabData);
+ cmsSetPCS(hProfile, cmsSigLabData);
+ cmsSetDeviceClass(hProfile, cmsSigColorSpaceClass);
+
+ cmsPipelineFree(BToA0);
+
+ return hProfile;
+}
+
+
+
+#define PS_FIXED_TO_FLOAT(h, l) ((float) (h) + ((float) (l)/(1<<16)))
+
+static
+cmsBool ProcessPhotoshopAPP13(JOCTET FAR *data, int datalen)
+{
+ int i;
+
+ for (i = 14; i < datalen; )
+ {
+ long len;
+ unsigned int type;
+
+ if (!(GETJOCTET(data[i] ) == 0x38 &&
+ GETJOCTET(data[i+1]) == 0x42 &&
+ GETJOCTET(data[i+2]) == 0x49 &&
+ GETJOCTET(data[i+3]) == 0x4D)) break; // Not recognized
+
+ i += 4; // identifying string
+
+ type = (unsigned int) (GETJOCTET(data[i]<<8) + GETJOCTET(data[i+1]));
+
+ i += 2; // resource type
+
+ i += GETJOCTET(data[i]) + ((GETJOCTET(data[i]) & 1) ? 1 : 2); // resource name
+
+ len = ((((GETJOCTET(data[i]<<8) + GETJOCTET(data[i+1]))<<8) +
+ GETJOCTET(data[i+2]))<<8) + GETJOCTET(data[i+3]);
+
+ i += 4; // Size
+
+ if (type == 0x03ED && len >= 16) {
+
+ Decompressor.X_density = (UINT16) PS_FIXED_TO_FLOAT(GETJOCTET(data[i]<<8) + GETJOCTET(data[i+1]),
+ GETJOCTET(data[i+2]<<8) + GETJOCTET(data[i+3]));
+ Decompressor.Y_density = (UINT16) PS_FIXED_TO_FLOAT(GETJOCTET(data[i+8]<<8) + GETJOCTET(data[i+9]),
+ GETJOCTET(data[i+10]<<8) + GETJOCTET(data[i+11]));
+
+ // Set the density unit to 1 since the
+ // Vertical and Horizontal resolutions
+ // are specified in Pixels per inch
+
+ Decompressor.density_unit = 0x01;
+ return TRUE;
+
+ }
+
+ i += len + ((len & 1) ? 1 : 0); // Alignment
+ }
+ return FALSE;
+}
+
+
+static
+cmsBool HandlePhotoshopAPP13(jpeg_saved_marker_ptr ptr)
+{
+ while (ptr) {
+
+ if (ptr -> marker == (JPEG_APP0 + 13) && ptr -> data_length > 9)
+ {
+ JOCTET FAR* data = ptr -> data;
+
+ if(GETJOCTET(data[0]) == 0x50 &&
+ GETJOCTET(data[1]) == 0x68 &&
+ GETJOCTET(data[2]) == 0x6F &&
+ GETJOCTET(data[3]) == 0x74 &&
+ GETJOCTET(data[4]) == 0x6F &&
+ GETJOCTET(data[5]) == 0x73 &&
+ GETJOCTET(data[6]) == 0x68 &&
+ GETJOCTET(data[7]) == 0x6F &&
+ GETJOCTET(data[8]) == 0x70) {
+
+ ProcessPhotoshopAPP13(data, ptr -> data_length);
+ return TRUE;
+ }
+ }
+
+ ptr = ptr -> next;
+ }
+
+ return FALSE;
+}
+
+
+typedef unsigned short uint16_t;
+typedef unsigned char uint8_t;
+typedef unsigned int uint32_t;
+
+#define INTEL_BYTE_ORDER 0x4949
+#define XRESOLUTION 0x011a
+#define YRESOLUTION 0x011b
+#define RESOLUTION_UNIT 0x128
+
+// Read a 16-bit word
+static
+uint16_t read16(uint8_t* arr, int pos, int swapBytes)
+{
+ uint8_t b1 = arr[pos];
+ uint8_t b2 = arr[pos+1];
+
+ return (swapBytes) ? ((b2 << 8) | b1) : ((b1 << 8) | b2);
+}
+
+
+// Read a 32-bit word
+static
+uint32_t read32(uint8_t* arr, int pos, int swapBytes)
+{
+
+ if(!swapBytes) {
+
+ return (arr[pos] << 24) |
+ (arr[pos+1] << 16) |
+ (arr[pos+2] << 8) |
+ arr[pos+3];
+ }
+
+ return arr[pos] |
+ (arr[pos+1] << 8) |
+ (arr[pos+2] << 16) |
+ (arr[pos+3] << 24);
+}
+
+
+
+static
+int read_tag(uint8_t* arr, int pos, int swapBytes, void* dest)
+{
+ // Format should be 5 over here (rational)
+ uint32_t format = read16(arr, pos + 2, swapBytes);
+ // Components should be 1
+ uint32_t components = read32(arr, pos + 4, swapBytes);
+ // Points to the value
+ uint32_t offset;
+
+ // sanity
+ if (components != 1) return 0;
+
+ if (format == 3)
+ offset = pos + 8;
+ else
+ offset = read32(arr, pos + 8, swapBytes);
+
+ switch (format) {
+
+ case 5: // Rational
+ {
+ double num = read32(arr, offset, swapBytes);
+ double den = read32(arr, offset + 4, swapBytes);
+ *(double *) dest = num / den;
+ }
+ break;
+
+ case 3: // uint 16
+ *(int*) dest = read16(arr, offset, swapBytes);
+ break;
+
+ default: return 0;
+ }
+
+ return 1;
+}
+
+
+
+// Handler for EXIF data
+static
+ cmsBool HandleEXIF(struct jpeg_decompress_struct* cinfo)
+{
+ jpeg_saved_marker_ptr ptr;
+ uint32_t ifd_ofs;
+ int pos = 0, swapBytes = 0;
+ uint32_t i, numEntries;
+ double XRes = -1, YRes = -1;
+ int Unit = 2; // Inches
+
+
+ for (ptr = cinfo ->marker_list; ptr; ptr = ptr ->next) {
+
+ if ((ptr ->marker == JPEG_APP0+1) && ptr ->data_length > 6) {
+ JOCTET FAR* data = ptr -> data;
+
+ if (memcmp(data, "Exif\0\0", 6) == 0) {
+
+ data += 6; // Skip EXIF marker
+
+ // 8 byte TIFF header
+ // first two determine byte order
+ pos = 0;
+ if (read16(data, pos, 0) == INTEL_BYTE_ORDER) {
+ swapBytes = 1;
+ }
+
+ pos += 2;
+
+ // next two bytes are always 0x002A (TIFF version)
+ pos += 2;
+
+ // offset to Image File Directory (includes the previous 8 bytes)
+ ifd_ofs = read32(data, pos, swapBytes);
+
+ // Search the directory for resolution tags
+ numEntries = read16(data, ifd_ofs, swapBytes);
+
+ for (i=0; i < numEntries; i++) {
+
+ uint32_t entryOffset = ifd_ofs + 2 + (12 * i);
+ uint32_t tag = read16(data, entryOffset, swapBytes);
+
+ switch (tag) {
+
+ case RESOLUTION_UNIT:
+ if (!read_tag(data, entryOffset, swapBytes, &Unit)) return FALSE;
+ break;
+
+ case XRESOLUTION:
+ if (!read_tag(data, entryOffset, swapBytes, &XRes)) return FALSE;
+ break;
+
+ case YRESOLUTION:
+ if (!read_tag(data, entryOffset, swapBytes, &YRes)) return FALSE;
+ break;
+
+ default:;
+ }
+
+ }
+
+ // Proceed if all found
+
+ if (XRes != -1 && YRes != -1)
+ {
+
+ // 1 = None
+ // 2 = inches
+ // 3 = cm
+
+ switch (Unit) {
+
+ case 2:
+
+ cinfo ->X_density = (UINT16) floor(XRes + 0.5);
+ cinfo ->Y_density = (UINT16) floor(YRes + 0.5);
+ break;
+
+ case 1:
+
+ cinfo ->X_density = (UINT16) floor(XRes * 2.54 + 0.5);
+ cinfo ->Y_density = (UINT16) floor(YRes * 2.54 + 0.5);
+ break;
+
+ default: return FALSE;
+ }
+
+ cinfo ->density_unit = 1; /* 1 for dots/inch, or 2 for dots/cm.*/
+
+ }
+
+
+ }
+ }
+ }
+ return FALSE;
+}
+
+
+static
+cmsBool OpenInput(const char* FileName)
+{
+ int m;
+
+ lIsITUFax = FALSE;
+ InFile = fopen(FileName, "rb");
+ if (InFile == NULL) {
+ FatalError("Cannot open '%s'", FileName);
+ }
+
+ // Now we can initialize the JPEG decompression object.
+ Decompressor.err = jpeg_std_error(&ErrorHandler.pub);
+ ErrorHandler.pub.error_exit = my_error_exit;
+ ErrorHandler.pub.output_message = my_error_exit;
+
+ jpeg_create_decompress(&Decompressor);
+ jpeg_stdio_src(&Decompressor, InFile);
+
+ for (m = 0; m < 16; m++)
+ jpeg_save_markers(&Decompressor, JPEG_APP0 + m, 0xFFFF);
+
+ // setup_read_icc_profile(&Decompressor);
+
+ fseek(InFile, 0, SEEK_SET);
+ jpeg_read_header(&Decompressor, TRUE);
+
+ return TRUE;
+}
+
+
+static
+cmsBool OpenOutput(const char* FileName)
+{
+
+ OutFile = fopen(FileName, "wb");
+ if (OutFile == NULL) {
+ FatalError("Cannot create '%s'", FileName);
+
+ }
+
+ Compressor.err = jpeg_std_error(&ErrorHandler.pub);
+ ErrorHandler.pub.error_exit = my_error_exit;
+ ErrorHandler.pub.output_message = my_error_exit;
+
+ Compressor.input_components = Compressor.num_components = 4;
+
+ jpeg_create_compress(&Compressor);
+ jpeg_stdio_dest(&Compressor, OutFile);
+ return TRUE;
+}
+
+static
+cmsBool Done(void)
+{
+ jpeg_destroy_decompress(&Decompressor);
+ jpeg_destroy_compress(&Compressor);
+ return fclose(InFile) + fclose(OutFile);
+
+}
+
+
+// Build up the pixeltype descriptor
+
+static
+cmsUInt32Number GetInputPixelType(void)
+{
+ int space, bps, extra, ColorChannels, Flavor;
+
+ lIsITUFax = IsITUFax(Decompressor.marker_list);
+ lIsPhotoshopApp13 = HandlePhotoshopAPP13(Decompressor.marker_list);
+ lIsEXIF = HandleEXIF(&Decompressor);
+
+ ColorChannels = Decompressor.num_components;
+ extra = 0; // Alpha = None
+ bps = 1; // 8 bits
+ Flavor = 0; // Vanilla
+
+ if (lIsITUFax) {
+
+ space = PT_Lab;
+ Decompressor.out_color_space = JCS_YCbCr; // Fake to don't touch
+ }
+ else
+ switch (Decompressor.jpeg_color_space) {
+
+ case JCS_GRAYSCALE: // monochrome
+ space = PT_GRAY;
+ Decompressor.out_color_space = JCS_GRAYSCALE;
+ break;
+
+ case JCS_RGB: // red/green/blue
+ space = PT_RGB;
+ Decompressor.out_color_space = JCS_RGB;
+ break;
+
+ case JCS_YCbCr: // Y/Cb/Cr (also known as YUV)
+ space = PT_RGB; // Let IJG code to do the conversion
+ Decompressor.out_color_space = JCS_RGB;
+ break;
+
+ case JCS_CMYK: // C/M/Y/K
+ space = PT_CMYK;
+ Decompressor.out_color_space = JCS_CMYK;
+ if (Decompressor.saw_Adobe_marker) // Adobe keeps CMYK inverted, so change flavor
+ Flavor = 1; // from vanilla to chocolate
+ break;
+
+ case JCS_YCCK: // Y/Cb/Cr/K
+ space = PT_CMYK;
+ Decompressor.out_color_space = JCS_CMYK;
+ if (Decompressor.saw_Adobe_marker) // ditto
+ Flavor = 1;
+ break;
+
+ default:
+ FatalError("Unsupported color space (0x%x)", Decompressor.jpeg_color_space);
+ return 0;
+ }
+
+ return (EXTRA_SH(extra)|CHANNELS_SH(ColorChannels)|BYTES_SH(bps)|COLORSPACE_SH(space)|FLAVOR_SH(Flavor));
+}
+
+
+// Rearrange pixel type to build output descriptor
+static
+cmsUInt32Number ComputeOutputFormatDescriptor(cmsUInt32Number dwInput, int OutColorSpace)
+{
+ int IsPlanar = T_PLANAR(dwInput);
+ int Channels = 0;
+ int Flavor = 0;
+
+ switch (OutColorSpace) {
+
+ case PT_GRAY:
+ Channels = 1;
+ break;
+ case PT_RGB:
+ case PT_CMY:
+ case PT_Lab:
+ case PT_YUV:
+ case PT_YCbCr:
+ Channels = 3;
+ break;
+
+ case PT_CMYK:
+ if (Compressor.write_Adobe_marker) // Adobe keeps CMYK inverted, so change flavor to chocolate
+ Flavor = 1;
+ Channels = 4;
+ break;
+ default:
+ FatalError("Unsupported output color space");
+ }
+
+ return (COLORSPACE_SH(OutColorSpace)|PLANAR_SH(IsPlanar)|CHANNELS_SH(Channels)|BYTES_SH(1)|FLAVOR_SH(Flavor));
+}
+
+
+// Equivalence between ICC color spaces and lcms color spaces
+static
+int GetProfileColorSpace(cmsHPROFILE hProfile)
+{
+ cmsColorSpaceSignature ProfileSpace = cmsGetColorSpace(hProfile);
+
+ return _cmsLCMScolorSpace(ProfileSpace);
+}
+
+static
+int GetDevicelinkColorSpace(cmsHPROFILE hProfile)
+{
+ cmsColorSpaceSignature ProfileSpace = cmsGetPCS(hProfile);
+
+ return _cmsLCMScolorSpace(ProfileSpace);
+}
+
+
+// From TRANSUPP
+
+static
+void jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo)
+{
+ jpeg_saved_marker_ptr marker;
+
+ /* In the current implementation, we don't actually need to examine the
+ * option flag here; we just copy everything that got saved.
+ * But to avoid confusion, we do not output JFIF and Adobe APP14 markers
+ * if the encoder library already wrote one.
+ */
+ for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) {
+
+ if (dstinfo->write_JFIF_header &&
+ marker->marker == JPEG_APP0 &&
+ marker->data_length >= 5 &&
+ GETJOCTET(marker->data[0]) == 0x4A &&
+ GETJOCTET(marker->data[1]) == 0x46 &&
+ GETJOCTET(marker->data[2]) == 0x49 &&
+ GETJOCTET(marker->data[3]) == 0x46 &&
+ GETJOCTET(marker->data[4]) == 0)
+ continue; /* reject duplicate JFIF */
+
+ if (dstinfo->write_Adobe_marker &&
+ marker->marker == JPEG_APP0+14 &&
+ marker->data_length >= 5 &&
+ GETJOCTET(marker->data[0]) == 0x41 &&
+ GETJOCTET(marker->data[1]) == 0x64 &&
+ GETJOCTET(marker->data[2]) == 0x6F &&
+ GETJOCTET(marker->data[3]) == 0x62 &&
+ GETJOCTET(marker->data[4]) == 0x65)
+ continue; /* reject duplicate Adobe */
+
+ jpeg_write_marker(dstinfo, marker->marker,
+ marker->data, marker->data_length);
+ }
+}
+
+static
+void WriteOutputFields(int OutputColorSpace)
+{
+ J_COLOR_SPACE in_space, jpeg_space;
+ int components;
+
+ switch (OutputColorSpace) {
+
+ case PT_GRAY: in_space = jpeg_space = JCS_GRAYSCALE;
+ components = 1;
+ break;
+
+ case PT_RGB: in_space = JCS_RGB;
+ jpeg_space = JCS_YCbCr;
+ components = 3;
+ break; // red/green/blue
+
+ case PT_YCbCr: in_space = jpeg_space = JCS_YCbCr;
+ components = 3;
+ break; // Y/Cb/Cr (also known as YUV)
+
+ case PT_CMYK: in_space = JCS_CMYK;
+ jpeg_space = JCS_YCCK;
+ components = 4;
+ break; // C/M/Y/components
+
+ case PT_Lab: in_space = jpeg_space = JCS_YCbCr;
+ components = 3;
+ break; // Fake to don't touch
+ default:
+ FatalError("Unsupported output color space");
+ return;
+ }
+
+
+ if (jpegQuality >= 100) {
+
+ // avoid destructive conversion when asking for lossless compression
+ jpeg_space = in_space;
+ }
+
+ Compressor.in_color_space = in_space;
+ Compressor.jpeg_color_space = jpeg_space;
+ Compressor.input_components = Compressor.num_components = components;
+ jpeg_set_defaults(&Compressor);
+ jpeg_set_colorspace(&Compressor, jpeg_space);
+
+
+ // Make sure to pass resolution through
+ if (OutputColorSpace == PT_CMYK)
+ Compressor.write_JFIF_header = 1;
+
+ // Avoid subsampling on high quality factor
+ jpeg_set_quality(&Compressor, jpegQuality, 1);
+ if (jpegQuality >= 70) {
+
+ int i;
+ for(i=0; i < Compressor.num_components; i++) {
+
+ Compressor.comp_info[i].h_samp_factor = 1;
+ Compressor.comp_info[i].v_samp_factor = 1;
+ }
+
+ }
+
+}
+
+
+static
+void DoEmbedProfile(const char* ProfileFile)
+{
+ FILE* f;
+ size_t size, EmbedLen;
+ cmsUInt8Number* EmbedBuffer;
+
+ f = fopen(ProfileFile, "rb");
+ if (f == NULL) return;
+
+ size = cmsfilelength(f);
+ EmbedBuffer = (cmsUInt8Number*) malloc(size + 1);
+ EmbedLen = fread(EmbedBuffer, 1, size, f);
+ fclose(f);
+ EmbedBuffer[EmbedLen] = 0;
+
+ write_icc_profile (&Compressor, EmbedBuffer, (unsigned int) EmbedLen);
+ free(EmbedBuffer);
+}
+
+
+
+static
+int DoTransform(cmsHTRANSFORM hXForm, int OutputColorSpace)
+{
+ JSAMPROW ScanLineIn;
+ JSAMPROW ScanLineOut;
+
+
+ //Preserve resolution values from the original
+ // (Thanks to Robert Bergs for finding out this bug)
+ Compressor.density_unit = Decompressor.density_unit;
+ Compressor.X_density = Decompressor.X_density;
+ Compressor.Y_density = Decompressor.Y_density;
+
+ // Compressor.write_JFIF_header = 1;
+
+ jpeg_start_decompress(&Decompressor);
+ jpeg_start_compress(&Compressor, TRUE);
+
+ if (OutputColorSpace == PT_Lab)
+ SetITUFax(&Compressor);
+
+ // Embed the profile if needed
+ if (EmbedProfile && cOutProf)
+ DoEmbedProfile(cOutProf);
+
+ ScanLineIn = (JSAMPROW) malloc((size_t) Decompressor.output_width * Decompressor.num_components);
+ ScanLineOut = (JSAMPROW) malloc((size_t) Compressor.image_width * Compressor.num_components);
+
+ while (Decompressor.output_scanline <
+ Decompressor.output_height) {
+
+ jpeg_read_scanlines(&Decompressor, &ScanLineIn, 1);
+
+ cmsDoTransform(hXForm, ScanLineIn, ScanLineOut, Decompressor.output_width);
+
+ jpeg_write_scanlines(&Compressor, &ScanLineOut, 1);
+ }
+
+ free(ScanLineIn);
+ free(ScanLineOut);
+
+ jpeg_finish_decompress(&Decompressor);
+ jpeg_finish_compress(&Compressor);
+
+ return TRUE;
+}
+
+
+
+// Transform one image
+
+static
+int TransformImage(char *cDefInpProf, char *cOutputProf)
+{
+ cmsHPROFILE hIn, hOut, hProof;
+ cmsHTRANSFORM xform;
+ cmsUInt32Number wInput, wOutput;
+ int OutputColorSpace;
+ cmsUInt32Number dwFlags = 0;
+ cmsUInt32Number EmbedLen;
+ cmsUInt8Number* EmbedBuffer;
+
+
+ cmsSetAdaptationState(ObserverAdaptationState);
+
+ if (BlackPointCompensation) {
+
+ dwFlags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
+ }
+
+
+ switch (PrecalcMode) {
+
+ case 0: dwFlags |= cmsFLAGS_NOOPTIMIZE; break;
+ case 2: dwFlags |= cmsFLAGS_HIGHRESPRECALC; break;
+ case 3: dwFlags |= cmsFLAGS_LOWRESPRECALC; break;
+ default:;
+ }
+
+
+ if (GamutCheck) {
+ dwFlags |= cmsFLAGS_GAMUTCHECK;
+ cmsSetAlarmCodes(Alarm);
+ }
+
+ // Take input color space
+ wInput = GetInputPixelType();
+
+ if (lIsDeviceLink) {
+
+ hIn = cmsOpenProfileFromFile(cDefInpProf, "r");
+ hOut = NULL;
+ hProof = NULL;
+ }
+ else {
+
+ if (!IgnoreEmbedded && read_icc_profile(&Decompressor, &EmbedBuffer, &EmbedLen))
+ {
+ hIn = cmsOpenProfileFromMem(EmbedBuffer, EmbedLen);
+
+ if (Verbose) {
+
+ fprintf(stdout, " (Embedded profile found)\n");
+ PrintProfileInformation(hIn);
+ fflush(stdout);
+ }
+
+ if (hIn != NULL && SaveEmbedded != NULL)
+ SaveMemoryBlock(EmbedBuffer, EmbedLen, SaveEmbedded);
+
+ free(EmbedBuffer);
+ }
+ else
+ {
+ // Default for ITU/Fax
+ if (cDefInpProf == NULL && T_COLORSPACE(wInput) == PT_Lab)
+ cDefInpProf = "*Lab";
+
+ if (cDefInpProf != NULL && cmsstrcasecmp(cDefInpProf, "*lab") == 0)
+ hIn = CreateITU2PCS_ICC();
+ else
+ hIn = OpenStockProfile(0, cDefInpProf);
+ }
+
+ if (cOutputProf != NULL && cmsstrcasecmp(cOutputProf, "*lab") == 0)
+ hOut = CreatePCS2ITU_ICC();
+ else
+ hOut = OpenStockProfile(0, cOutputProf);
+
+ hProof = NULL;
+ if (cProofing != NULL) {
+
+ hProof = OpenStockProfile(0, cProofing);
+ if (hProof == NULL) {
+ FatalError("Proofing profile couldn't be read.");
+ }
+ dwFlags |= cmsFLAGS_SOFTPROOFING;
+ }
+ }
+
+ if (!hIn)
+ FatalError("Input profile couldn't be read.");
+ if (!lIsDeviceLink && !hOut)
+ FatalError("Output profile couldn't be read.");
+
+ // Assure both, input profile and input JPEG are on same colorspace
+ if (cmsGetColorSpace(hIn) != _cmsICCcolorSpace(T_COLORSPACE(wInput)))
+ FatalError("Input profile is not operating in proper color space");
+
+
+ // Output colorspace is given by output profile
+
+ if (lIsDeviceLink) {
+ OutputColorSpace = GetDevicelinkColorSpace(hIn);
+ }
+ else {
+ OutputColorSpace = GetProfileColorSpace(hOut);
+ }
+
+ jpeg_copy_critical_parameters(&Decompressor, &Compressor);
+
+ WriteOutputFields(OutputColorSpace);
+
+ wOutput = ComputeOutputFormatDescriptor(wInput, OutputColorSpace);
+
+
+ xform = cmsCreateProofingTransform(hIn, wInput,
+ hOut, wOutput,
+ hProof, Intent,
+ ProofingIntent, dwFlags);
+ if (xform == NULL)
+ FatalError("Cannot transform by using the profiles");
+
+ DoTransform(xform, OutputColorSpace);
+
+
+ jcopy_markers_execute(&Decompressor, &Compressor);
+
+ cmsDeleteTransform(xform);
+ cmsCloseProfile(hIn);
+ cmsCloseProfile(hOut);
+ if (hProof) cmsCloseProfile(hProof);
+
+ return 1;
+}
+
+
+static
+void Help(int level)
+{
+
+ UTILS_UNUSED_PARAMETER(level);
+
+ fprintf(stderr, "usage: jpgicc [flags] input.jpg output.jpg\n");
+
+ fprintf(stderr, "\nflags:\n\n");
+ fprintf(stderr, "-v - Verbose\n");
+ fprintf(stderr, "-i<profile> - Input profile (defaults to sRGB)\n");
+ fprintf(stderr, "-o<profile> - Output profile (defaults to sRGB)\n");
+
+ PrintBuiltins();
+
+ PrintRenderingIntents();
+
+
+ fprintf(stderr, "-b - Black point compensation\n");
+ fprintf(stderr, "-d<0..1> - Observer adaptation state (abs.col. only)\n");
+ fprintf(stderr, "-n - Ignore embedded profile\n");
+ fprintf(stderr, "-e - Embed destination profile\n");
+ fprintf(stderr, "-s<new profile> - Save embedded profile as <new profile>\n");
+
+ fprintf(stderr, "\n");
+
+ fprintf(stderr, "-c<0,1,2,3> - Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1]\n");
+ fprintf(stderr, "\n");
+
+ fprintf(stderr, "-p<profile> - Soft proof profile\n");
+ fprintf(stderr, "-m<0,1,2,3> - SoftProof intent\n");
+ fprintf(stderr, "-g - Marks out-of-gamut colors on softproof\n");
+ fprintf(stderr, "-!<r>,<g>,<b> - Out-of-gamut marker channel values\n");
+
+ fprintf(stderr, "\n");
+ fprintf(stderr, "-q<0..100> - Output JPEG quality\n");
+
+ fprintf(stderr, "Examples:\n\n"
+ "To color correct from scanner to sRGB:\n"
+ "\tjpgicc -iscanner.icm in.jpg out.jpg\n"
+ "To convert from monitor1 to monitor2:\n"
+ "\tjpgicc -imon1.icm -omon2.icm in.jpg out.jpg\n"
+ "To make a CMYK separation:\n"
+ "\tjpgicc -oprinter.icm inrgb.jpg outcmyk.jpg\n"
+ "To recover sRGB from a CMYK separation:\n"
+ "\tjpgicc -iprinter.icm incmyk.jpg outrgb.jpg\n"
+ "To convert from CIELab ITU/Fax JPEG to sRGB\n"
+ "\tjpgicc in.jpg out.jpg\n\n");
+
+
+ fprintf(stderr, "This program is intended to be a demo of the Little CMS\n"
+ "color engine. Both lcms and this program are open source.\n"
+ "You can obtain both in source code at https://www.littlecms.com\n"
+ "For suggestions, comments, bug reports etc. send mail to\n"
+ "info@littlecms.com\n\n");
+
+ exit(0);
+}
+
+
+// The toggles stuff
+
+static
+void HandleSwitches(int argc, char *argv[])
+{
+ int s;
+
+ while ((s=xgetopt(argc,argv,"bBnNvVGgh:H:i:I:o:O:P:p:t:T:c:C:Q:q:M:m:L:l:eEs:S:!:D:d:-:")) != EOF) {
+
+ switch (s)
+ {
+
+ case '-':
+ if (strcmp(xoptarg, "help") == 0)
+ {
+ Help(0);
+ }
+ else
+ {
+ FatalError("Unknown option - run without args to see valid ones.\n");
+ }
+ break;
+
+ case 'b':
+ case 'B':
+ BlackPointCompensation = TRUE;
+ break;
+
+ case 'd':
+ case 'D': ObserverAdaptationState = atof(xoptarg);
+ if (ObserverAdaptationState < 0 ||
+ ObserverAdaptationState > 1.0)
+ FatalError("Adaptation state should be 0..1");
+ break;
+
+ case 'v':
+ case 'V':
+ Verbose = TRUE;
+ break;
+
+ case 'i':
+ case 'I':
+ if (lIsDeviceLink)
+ FatalError("Device-link already specified");
+
+ cInpProf = xoptarg;
+ break;
+
+ case 'o':
+ case 'O':
+ if (lIsDeviceLink)
+ FatalError("Device-link already specified");
+
+ cOutProf = xoptarg;
+ break;
+
+ case 'l':
+ case 'L':
+ if (cInpProf != NULL || cOutProf != NULL)
+ FatalError("input/output profiles already specified");
+
+ cInpProf = xoptarg;
+ lIsDeviceLink = TRUE;
+ break;
+
+ case 'p':
+ case 'P':
+ cProofing = xoptarg;
+ break;
+
+ case 't':
+ case 'T':
+ Intent = atoi(xoptarg);
+ break;
+
+ case 'N':
+ case 'n':
+ IgnoreEmbedded = TRUE;
+ break;
+
+ case 'e':
+ case 'E':
+ EmbedProfile = TRUE;
+ break;
+
+
+ case 'g':
+ case 'G':
+ GamutCheck = TRUE;
+ break;
+
+ case 'c':
+ case 'C':
+ PrecalcMode = atoi(xoptarg);
+ if (PrecalcMode < 0 || PrecalcMode > 2)
+ FatalError("Unknown precalc mode '%d'", PrecalcMode);
+ break;
+
+ case 'H':
+ case 'h': {
+
+ int a = atoi(xoptarg);
+ Help(a);
+ }
+ break;
+
+ case 'q':
+ case 'Q':
+ jpegQuality = atoi(xoptarg);
+ if (jpegQuality > 100) jpegQuality = 100;
+ if (jpegQuality < 0) jpegQuality = 0;
+ break;
+
+ case 'm':
+ case 'M':
+ ProofingIntent = atoi(xoptarg);
+ break;
+
+ case 's':
+ case 'S': SaveEmbedded = xoptarg;
+ break;
+
+ case '!':
+ if (sscanf(xoptarg, "%hu,%hu,%hu", &Alarm[0], &Alarm[1], &Alarm[2]) == 3) {
+ int i;
+ for (i=0; i < 3; i++) {
+ Alarm[i] = (Alarm[i] << 8) | Alarm[i];
+ }
+ }
+ break;
+
+ default:
+
+ FatalError("Unknown option - run without args to see valid ones");
+ }
+
+ }
+}
+
+
+int main(int argc, char* argv[])
+{
+
+ fprintf(stderr, "Little CMS ICC profile applier for JPEG - v3.3 [LittleCMS %2.2f]\n\n", LCMS_VERSION / 1000.0);
+ fprintf(stderr, "Copyright (c) 1998-2020 Marti Maria Saguer. See COPYING file for details.\n");
+ fflush(stderr);
+
+ InitUtils("jpgicc");
+
+ HandleSwitches(argc, argv);
+
+ if ((argc - xoptind) != 2) {
+ Help(0);
+ }
+
+ OpenInput(argv[xoptind]);
+ OpenOutput(argv[xoptind+1]);
+
+ TransformImage(cInpProf, cOutProf);
+
+
+ if (Verbose) { fprintf(stdout, "\n"); fflush(stdout); }
+
+ Done();
+
+ return 0;
+}
+
+
+
# Additions and bugs by Marti Maria
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
linkicc_LDADD = $(top_builddir)/src/liblcms2.la
linkicc_LDFLAGS = @LDFLAGS@
linkicc_SOURCES = linkicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h
-linkicc_MANS = linkicc.1
+man_MANS = linkicc.1
EXTRA_DIST = $(man_MANS)
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
# Additions and bugs by Marti Maria
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
host_triplet = @host@
bin_PROGRAMS = linkicc$(EXEEXT)
subdir = utils/linkicc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_linkicc_OBJECTS = linkicc.$(OBJEXT) xgetopt.$(OBJEXT) \
- vprf.$(OBJEXT)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_linkicc_OBJECTS = linkicc.$(OBJEXT) ../common/xgetopt.$(OBJEXT) \
+ ../common/vprf.$(OBJEXT)
linkicc_OBJECTS = $(am_linkicc_OBJECTS)
linkicc_DEPENDENCIES = $(top_builddir)/src/liblcms2.la
-linkicc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(linkicc_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 =
+linkicc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(linkicc_LDFLAGS) $(LDFLAGS) -o $@
+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@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
+depcomp =
+am__maybe_remake_depfiles =
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)
+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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 = $(linkicc_SOURCES)
DIST_SOURCES = $(linkicc_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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; }; \
+ }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
linkicc_LDADD = $(top_builddir)/src/liblcms2.la
linkicc_LDFLAGS = @LDFLAGS@
linkicc_SOURCES = linkicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h
-linkicc_MANS = linkicc.1
+man_MANS = linkicc.1
EXTRA_DIST = $(man_MANS)
all: all-am
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utils/linkicc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign utils/linkicc/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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@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; \
+ 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|.*|.|' \
+ 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 } \
@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)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+../common/$(am__dirstamp):
+ @$(MKDIR_P) ../common
+ @: > ../common/$(am__dirstamp)
+../common/xgetopt.$(OBJEXT): ../common/$(am__dirstamp)
+../common/vprf.$(OBJEXT): ../common/$(am__dirstamp)
+
linkicc$(EXEEXT): $(linkicc_OBJECTS) $(linkicc_DEPENDENCIES) $(EXTRA_linkicc_DEPENDENCIES)
@rm -f linkicc$(EXEEXT)
- $(linkicc_LINK) $(linkicc_OBJECTS) $(linkicc_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(linkicc_LINK) $(linkicc_OBJECTS) $(linkicc_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f ../common/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkicc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vprf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetopt.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 $<
+ $(AM_V_CC)$(COMPILE) -c -o $@ $<
.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) '$<'`
+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(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 $@ $<
-
-xgetopt.o: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.o -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-
-xgetopt.obj: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.obj -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-
-vprf.o: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.o -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-
-vprf.obj: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.obj -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
+ $(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
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)
+install-man1: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
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 ../common/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
info-am:
-install-data-am:
+install-data-am: install-man
install-dvi: install-dvi-am
install-info-am:
-install-man:
+install-man: install-man1
install-pdf: install-pdf-am
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic 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 \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ 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-man1 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
.\"Shiju P. Nair September 30, 2004
-.TH ICCLINK 1 "September 30, 2004"
+.\"Thomas Weber <tweber@debian.org> April 23, 2014
+.TH LINKICC 1 "September 30, 2004"
.SH NAME
-icclink - little cms device link generator.
+linkicc - little cms device link generator.
.SH SYNOPSIS
-.B icclink
-.RI [ options ] " <profiles>"
+.B linkicc
+.RI [ options ] " profiles"
.SH DESCRIPTION
lcms is a standalone CMM engine, which deals with the color management.
It implements a fast transformation between ICC profiles.
-.B icclink
-is little cms device link generator.
+.B linkicc
+is a little cms device link generator.
.P
Links two or more profiles into a single devicelink profile.
Colorspaces must be paired except Lab/XYZ, that can be interchanged.
.SH OPTIONS
.TP
-.B \-8
-Creates 8-bit devicelink.
+.BR \-a\ NUM
+Observer adaptation state (abs.col. only), (0..1.0, float value) [defaults to 1.0].
.TP
-.B \-b
+.B \-b
Black point compensation.
.TP
-.B \-c <0,1,2,3>
-Precision (0=LowRes, 1=Normal, 2=Hi-res). [defaults to 1]
+.BI \-c\ precision
+Precision (0=LowRes, 1=Normal, 2=Hi-res) [defaults to 1].
.TP
.BI \-d\ description
Description text (quotes can be used).
.TP
-.B \-h <0,1,2,3>
-Show summary of options and examples.
+.BI \-h\ NUM
+Show summary of options and examples (0=help, 1=Built-in profiles, 2=Examples, 3=Contact information)
+.TP
+.BI \-k\ inklimit
+Ink-limiting in % (CMYK only), (0..400.0, float value) [default 400.0].
.TP
-.BI \-i\ profile
-Input profile (defaults to sRGB).
+.B \-l
+Use linearization curves (may affect accuracy).
.TP
-.B -k <0..400>
-Ink-limiting in % (CMYK only)
+.BI \-n\ gridpoints
+Alternate way to set precision, number of CLUT points.
.TP
.BI \-o\ profile
-Output devicelink profile. [defaults to 'devicelink.icm']
+Output devicelink profile [defaults to 'devicelink.icm'].
+.TP
+.BI \-r\ profileversion
+Profile version. (CAUTION: may change the profile implementation), (2.0..4.3, float value) [defaults to 4.3].
+.TP
+.BI \-t\ NUM
+Rendering intent
+.nf
+.RS
+0=Perceptual [default]
+1=Relative colorimetric
+2=Saturation
+3=Absolute colorimetric
+10=Perceptual preserving black ink
+11=Relative colorimetric preserving black ink
+12=Saturation preserving black ink
+13=Perceptual preserving black plane
+14=Relative colorimetric preserving black plane
+15=Saturation preserving black plane
+.RE
+.fi
.TP
-.B \-t <0,1,2,3>
-Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute).
+.BI \-v\ verbosity
+Verbosity level, (0=None, 1=Normal, 2=High, 3=Very High) [defaults to 0].
.TP
-.B \-x
+.B \-x
Creatively, guess deviceclass of resulting profile.
.TP
+.BI \-y\ copyright
+Copyright notice (quotes can be used) ["No copyright, use freely"].
+.TP
+.B \-8
+Creates 8-bit devicelink.
+.SH BUILT-IN PROFILES
.nf
-Built-in profiles:
- *Lab -- D50-based CIEL*a*b (PCS)
- *XYZ -- CIE XYZ (PCS)
- *sRGB -- sRGB color space
- *Gray22- Monochrome of Gamma 2.2
+ *Lab2 -- D50-based v2 CIEL*a*b
+ *Lab4 -- D50-based v4 CIEL*a*b
+ *Lab -- D50-based v4 CIEL*a*b
+ *XYZ -- CIE XYZ (PCS)
+ *sRGB -- sRGB color space
+ *Gray22 - Monochrome of Gamma 2.2
+ *Gray30 - Monochrome of Gamma 3.0
+ *null - Monochrome black for all input
*Lin2222- CMYK linearization of gamma 2.2 on each channel
-.fi
+.fi
.SH EXAMPLES
.nf
To create 'devicelink.icm' from a.icc to b.icc:
- icclink a.icc b.icc
+ linkicc a.icc b.icc
To create 'out.icc' from sRGB to cmyk.icc:
- icclink -o out.icc *sRGB cmyk.icc
+ linkicc -o out.icc *sRGB cmyk.icc
To create a sRGB input profile working in Lab:
- icclink -x -o sRGBLab.icc *sRGB *Lab
+ linkicc -x -o sRGBLab.icc *sRGB *Lab
To create a XYZ -> sRGB output profile:
- icclink -x -o sRGBLab.icc *XYZ *sRGB
+ linkicc -x -o sRGBLab.icc *XYZ *sRGB
To create a abstract profile doing softproof for cmyk.icc:
- icclink -t1 -x -o softproof.icc *Lab cmyk.icc cmyk.icc *Lab
+ linkicc -t1 -x -o softproof.icc *Lab cmyk.icc cmyk.icc *Lab
To create a 'grayer' sRGB input profile:
- icclink -x -o grayer.icc *sRGB gray.icc gray.icc *Lab
+ linkicc -x -o grayer.icc *sRGB gray.icc gray.icc *Lab
To embed ink limiting into a cmyk output profile:
- icclink -x -o cmyklimited.icc -k 250 cmyk.icc *Lab
+ linkicc -x -o cmyklimited.icc -k 250 cmyk.icc *Lab
+
.fi
.SH NOTES
For suggestions, comments, bug reports etc. send mail to
info@littlecms.com.
.SH SEE ALSO
-.BR jpegicc (1),
-.BR tifficc (1),
-.BR icc2ps (1),
-.BR icctrans (1),
-.BR wtpt (1)
+.BR jpgicc (1),
+.BR psicc (1),
+.BR tificc (1),
+.BR transicc (1)
.SH AUTHOR
This manual page was written by Shiju p. Nair <shiju.p@gmail.com>,
for the Debian project.
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
static
int Help(int level)
{
- switch (level) {
-
- default:
- case 0:
-
- fprintf(stderr, "\nlinkicc: Links profiles into a single devicelink.\n");
-
- fprintf(stderr, "\n");
- fprintf(stderr, "usage: linkicc [flags] <profiles>\n\n");
- fprintf(stderr, "flags:\n\n");
- fprintf(stderr, "%co<profile> - Output devicelink profile. [defaults to 'devicelink.icc']\n", SW);
-
- PrintRenderingIntents();
-
- fprintf(stderr, "%cc<0,1,2> - Precision (0=LowRes, 1=Normal, 2=Hi-res) [defaults to 1]\n", SW);
- fprintf(stderr, "%cn<gridpoints> - Alternate way to set precision, number of CLUT points\n", SW);
- fprintf(stderr, "%cd<description> - description text (quotes can be used)\n", SW);
- fprintf(stderr, "%cy<copyright> - copyright notice (quotes can be used)\n", SW);
-
- fprintf(stderr, "\n%ck<0..400> - Ink-limiting in %% (CMYK only)\n", SW);
- fprintf(stderr, "%c8 - Creates 8-bit devicelink\n", SW);
- fprintf(stderr, "%cx - Creatively, guess deviceclass of resulting profile.\n", SW);
- fprintf(stderr, "%cb - Black point compensation\n", SW);
- fprintf(stderr, "%ca<0..1> - Observer adaptation state (abs.col. only)\n\n", SW);
- fprintf(stderr, "%cl - Use linearization curves (may affect accuracy)\n", SW);
- fprintf(stderr, "%cr<v.r> - Profile version. (CAUTION: may change the profile implementation)\n", SW);
- fprintf(stderr, "\n");
- fprintf(stderr, "Colorspaces must be paired except Lab/XYZ, that can be interchanged.\n\n");
-
- fprintf(stderr, "%ch<0,1,2,3> - More help\n", SW);
- break;
-
- case 1:
- PrintBuiltins();
- break;
-
- case 2:
-
- fprintf(stderr, "\nExamples:\n\n"
- "To create 'devicelink.icm' from a.icc to b.icc:\n"
- "\tlinkicc a.icc b.icc\n\n"
- "To create 'out.icc' from sRGB to cmyk.icc:\n"
- "\tlinkicc -o out.icc *sRGB cmyk.icc\n\n"
- "To create a sRGB input profile working in Lab:\n"
- "\tlinkicc -x -o sRGBLab.icc *sRGB *Lab\n\n"
- "To create a XYZ -> sRGB output profile:\n"
- "\tlinkicc -x -o sRGBLab.icc *XYZ *sRGB\n\n"
- "To create a abstract profile doing softproof for cmyk.icc:\n"
- "\tlinkicc -t1 -x -o softproof.icc *Lab cmyk.icc cmyk.icc *Lab\n\n"
- "To create a 'grayer' sRGB input profile:\n"
- "\tlinkicc -x -o grayer.icc *sRGB gray.icc gray.icc *Lab\n\n"
- "To embed ink limiting into a cmyk output profile:\n"
- "\tlinkicc -x -o cmyklimited.icc -k 250 cmyk.icc *Lab\n\n");
- break;
-
- case 3:
-
- fprintf(stderr, "This program is intended to be a demo of the little cms\n"
- "engine. Both lcms and this program are freeware. You can\n"
- "obtain both in source code at http://www.littlecms.com\n"
- "For suggestions, comments, bug reports etc. send mail to\n"
- "info@littlecms.com\n\n");
- }
-
- exit(0);
+ UTILS_UNUSED_PARAMETER(level);
+
+ fprintf(stderr, "\nlinkicc: Links profiles into a single devicelink.\n");
+
+ fprintf(stderr, "\n");
+ fprintf(stderr, "usage: linkicc [flags] <profiles>\n\n");
+ fprintf(stderr, "flags:\n\n");
+ fprintf(stderr, "-o<profile> - Output devicelink profile. [defaults to 'devicelink.icc']\n");
+
+ PrintRenderingIntents();
+
+ fprintf(stderr, "-c<0,1,2> - Precision (0=LowRes, 1=Normal, 2=Hi-res) [defaults to 1]\n");
+ fprintf(stderr, "-n<gridpoints> - Alternate way to set precision, number of CLUT points\n");
+ fprintf(stderr, "-d<description> - description text (quotes can be used)\n");
+ fprintf(stderr, "-y<copyright> - copyright notice (quotes can be used)\n");
+
+ fprintf(stderr, "\n-k<0..400> - Ink-limiting in %% (CMYK only)\n");
+ fprintf(stderr, "-8 - Creates 8-bit devicelink\n");
+ fprintf(stderr, "-x - Creatively, guess deviceclass of resulting profile.\n");
+ fprintf(stderr, "-b - Black point compensation\n");
+ fprintf(stderr, "-a<0..1> - Observer adaptation state (abs.col. only)\n\n");
+ fprintf(stderr, "-l - Use linearization curves (may affect accuracy)\n");
+ fprintf(stderr, "-r<v.r> - Profile version. (CAUTION: may change the profile implementation)\n");
+ fprintf(stderr, "\n");
+ fprintf(stderr, "Colorspaces must be paired except Lab/XYZ, that can be interchanged.\n\n");
+
+ PrintBuiltins();
+
+ fprintf(stderr, "\nExamples:\n\n"
+ "To create 'devicelink.icm' from a.icc to b.icc:\n"
+ "\tlinkicc a.icc b.icc\n\n"
+ "To create 'out.icc' from sRGB to cmyk.icc:\n"
+ "\tlinkicc -o out.icc *sRGB cmyk.icc\n\n"
+ "To create a sRGB input profile working in Lab:\n"
+ "\tlinkicc -x -o sRGBLab.icc *sRGB *Lab\n\n"
+ "To create a XYZ -> sRGB output profile:\n"
+ "\tlinkicc -x -o sRGBLab.icc *XYZ *sRGB\n\n"
+ "To create a abstract profile doing softproof for cmyk.icc:\n"
+ "\tlinkicc -t1 -x -o softproof.icc *Lab cmyk.icc cmyk.icc *Lab\n\n"
+ "To create a 'grayer' sRGB input profile:\n"
+ "\tlinkicc -x -o grayer.icc *sRGB gray.icc gray.icc *Lab\n\n"
+ "To embed ink limiting into a cmyk output profile:\n"
+ "\tlinkicc -x -o cmyklimited.icc -k 250 cmyk.icc *Lab\n\n");
+
+ fprintf(stderr, "This program is intended to be a demo of the Little CMS\n"
+ "color engine. Both lcms and this program are open source.\n"
+ "You can obtain both in source code at https://www.littlecms.com\n"
+ "For suggestions, comments, bug reports etc. send mail to\n"
+ "info@littlecms.com\n\n");
+
+ exit(0);
}
// The toggles stuff
{
int s;
- while ((s = xgetopt(argc,argv,"a:A:BbC:c:D:d:h:H:k:K:lLn:N:O:o:r:R:T:t:V:v:xX8y:Y:")) != EOF) {
+ while ((s = xgetopt(argc,argv,"a:A:BbC:c:D:d:h:H:k:K:lLn:N:O:o:r:R:T:t:V:v:xX8y:Y:-:")) != EOF) {
switch (s) {
+ case '-':
+ if (strcmp(xoptarg, "help") == 0)
+ {
+ Help(0);
+ }
+ else
+ {
+ FatalError("Unknown option - run without args to see valid ones.\n");
+ }
+ break;
+
+ case 'a':
+ case 'A':
+ ObserverAdaptationState = atof(xoptarg);
+ if (ObserverAdaptationState < 0 ||
+ ObserverAdaptationState > 1.0)
+ FatalError("Adaptation state should be 0..1");
+ break;
+
+ case 'b':
+ case 'B':
+ BlackPointCompensation = TRUE;
+ break;
+
+ case 'c':
+ case 'C':
+ PrecalcMode = atoi(xoptarg);
+ if (PrecalcMode < 0 || PrecalcMode > 2) {
+ FatalError("Unknown precalc mode '%d'", PrecalcMode);
+ }
+ break;
+
+ case 'd':
+ case 'D':
+ // Doing that is correct and safe: Description points to memory allocated in the command line.
+ // same for Copyright and output devicelink.
+ Description = xoptarg;
+ break;
+
+ case 'h':
+ case 'H':
+ Help(atoi(xoptarg));
+ return;
+
+ case 'k':
+ case 'K':
+ InkLimit = atof(xoptarg);
+ if (InkLimit < 0.0 || InkLimit > 400.0) {
+ FatalError("Ink limit must be 0%%..400%%");
+ }
+ break;
- case 'a':
- case 'A':
- ObserverAdaptationState = atof(xoptarg);
- if (ObserverAdaptationState < 0 ||
- ObserverAdaptationState > 1.0)
- FatalError("Adaptation state should be 0..1");
- break;
-
- case 'b':
- case 'B':
- BlackPointCompensation = TRUE;
- break;
-
- case 'c':
- case 'C':
- PrecalcMode = atoi(xoptarg);
- if (PrecalcMode < 0 || PrecalcMode > 2) {
- FatalError("Unknown precalc mode '%d'", PrecalcMode);
- }
- break;
-
- case 'd':
- case 'D':
- // Doing that is correct and safe: Description points to memory allocated in the command line.
- // same for Copyright and output devicelink.
- Description = xoptarg;
- break;
-
- case 'h':
- case 'H':
- Help(atoi(xoptarg));
- return;
-
- case 'k':
- case 'K':
- InkLimit = atof(xoptarg);
- if (InkLimit < 0.0 || InkLimit > 400.0) {
- FatalError("Ink limit must be 0%%..400%%");
- }
- break;
-
-
- case 'l':
- case 'L': KeepLinearization = TRUE;
- break;
-
- case 'n':
- case 'N':
- if (PrecalcMode != 1) {
- FatalError("Precalc mode already specified");
- }
- NumOfGridPoints = atoi(xoptarg);
- break;
-
- case 'o':
- case 'O':
- cOutProf = xoptarg;
- break;
-
-
- case 'r':
- case 'R':
- Version = atof(xoptarg);
- if (Version < 2.0 || Version > 4.3) {
- fprintf(stderr, "WARNING: lcms was not aware of this version, tag types may be wrong!\n");
- }
- break;
-
- case 't':
- case 'T':
- Intent = atoi(xoptarg); // Will be validated latter on
- break;
- case 'V':
- case 'v':
- Verbose = atoi(xoptarg);
- if (Verbose < 0 || Verbose > 3) {
- FatalError("Unknown verbosity level '%d'", Verbose);
- }
- break;
+ case 'l':
+ case 'L': KeepLinearization = TRUE;
+ break;
- case '8':
- lUse8bits = TRUE;
- break;
+ case 'n':
+ case 'N':
+ if (PrecalcMode != 1) {
+ FatalError("Precalc mode already specified");
+ }
+ NumOfGridPoints = atoi(xoptarg);
+ break;
+ case 'o':
+ case 'O':
+ cOutProf = xoptarg;
+ break;
- case 'y':
- case 'Y':
- Copyright = xoptarg;
- break;
+ case 'r':
+ case 'R':
+ Version = atof(xoptarg);
+ if (Version < 2.0 || Version > 4.3) {
+ fprintf(stderr, "WARNING: lcms was not aware of this version, tag types may be wrong!\n");
+ }
+ break;
+
+ case 't':
+ case 'T':
+ Intent = atoi(xoptarg); // Will be validated latter on
+ break;
+
+ case 'V':
+ case 'v':
+ Verbose = atoi(xoptarg);
+ if (Verbose < 0 || Verbose > 3) {
+ FatalError("Unknown verbosity level '%d'", Verbose);
+ }
+ break;
+ case '8':
+ lUse8bits = TRUE;
+ break;
- case 'x':
- case 'X': TagResult = TRUE;
- break;
+ case 'y':
+ case 'Y':
+ Copyright = xoptarg;
+ break;
-
- default:
- FatalError("Unknown option - run without args to see valid ones.\n");
- }
+
+ case 'x':
+ case 'X': TagResult = TRUE;
+ break;
+
+
+ default:
+
+ FatalError("Unknown option - run without args to see valid ones.\n");
+ }
}
}
cmsHTRANSFORM hTransform = NULL;
// Here we are
- fprintf(stderr, "little cms ICC device link generator - v2.2 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0);
+ fprintf(stderr, "Little CMS ICC device link generator - v3.0 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0);
+ fprintf(stderr, "Copyright (c) 1998-2020 Marti Maria Saguer. See COPYING file for details.\n");
fflush(stderr);
// Initialize
// Create the color transform. Specify 0 for the format is safe as the transform
// is intended to be used only for the devicelink.
- hTransform = cmsCreateMultiprofileTransform(Profiles, nargs, 0, 0, Intent, dwFlags);
+ hTransform = cmsCreateMultiprofileTransform(Profiles, nargs, 0, 0, Intent, dwFlags|cmsFLAGS_NOOPTIMIZE);
if (hTransform == NULL) {
FatalError("Transform creation failed");
goto Cleanup;
--- /dev/null
+
+To compile for matlab use:
+
+mex @lcms_rsp
mexPrintf("\nYou can use following built-ins as profiles:\n\n");
- mexPrintf("\t*Lab2 -- D50-based v2 CIEL*a*b\n"\r
- "\t*Lab4 -- D50-based v4 CIEL*a*b\n"\r
- "\t*Lab -- D50-based v4 CIEL*a*b\n"\r
- "\t*XYZ -- CIE XYZ (PCS)\n"\r
- "\t*sRGB -- IEC6 1996-2.1 sRGB color space\n" \r
- "\t*Gray22 - Monochrome of Gamma 2.2\n"\r
- "\t*Gray30 - Monochrome of Gamma 3.0\n"\r
- "\t*null - Monochrome black for all input\n"\r
+ mexPrintf("\t*Lab2 -- D50-based v2 CIEL*a*b\n"
+ "\t*Lab4 -- D50-based v4 CIEL*a*b\n"
+ "\t*Lab -- D50-based v4 CIEL*a*b\n"
+ "\t*XYZ -- CIE XYZ (PCS)\n"
+ "\t*sRGB -- IEC6 1996-2.1 sRGB color space\n"
+ "\t*Gray22 - Monochrome of Gamma 2.2\n"
+ "\t*Gray30 - Monochrome of Gamma 3.0\n"
+ "\t*null - Monochrome black for all input\n"
"\t*Lin2222- CMYK linearization of gamma 2.2 on each channel\n\n");
mexPrintf("For suggestions, comments, bug reports etc. send mail to info@littlecms.com\n\n");
+-v -compatibleArrayDims
-O
--I..\..\include
+-I../../include
icctrans.c
-..\..\src\cmscam02.c
-..\..\src\cmscgats.c
-..\..\src\cmscnvrt.c
-..\..\src\cmserr.c
-..\..\src\cmsgamma.c
-..\..\src\cmsgmt.c
-..\..\src\cmsintrp.c
-..\..\src\cmsio0.c
-..\..\src\cmsio1.c
-..\..\src\cmslut.c
-..\..\src\cmsmd5.c
-..\..\src\cmsmtrx.c
-..\..\src\cmsnamed.c
-..\..\src\cmsopt.c
-..\..\src\cmspack.c
-..\..\src\cmspcs.c
-..\..\src\cmsplugin.c
-..\..\src\cmsps2.c
-..\..\src\cmssamp.c
-..\..\src\cmssm.c
-..\..\src\cmstypes.c
-..\..\src\cmsvirt.c
-..\..\src\cmswtpnt.c
-..\..\src\cmsxform.c
+../../src/cmscam02.c
+../../src/cmscgats.c
+../../src/cmscnvrt.c
+../../src/cmserr.c
+../../src/cmsgamma.c
+../../src/cmsgmt.c
+../../src/cmsintrp.c
+../../src/cmsio0.c
+../../src/cmsio1.c
+../../src/cmslut.c
+../../src/cmsmd5.c
+../../src/cmsmtrx.c
+../../src/cmsnamed.c
+../../src/cmsopt.c
+../../src/cmspack.c
+../../src/cmspcs.c
+../../src/cmsplugin.c
+../../src/cmsps2.c
+../../src/cmssamp.c
+../../src/cmssm.c
+../../src/cmstypes.c
+../../src/cmsvirt.c
+../../src/cmswtpnt.c
+../../src/cmsxform.c
+../../src/cmshalf.c
+../../src/cmsalpha.c
# Additions and bugs by Marti Maria
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
bin_PROGRAMS = psicc
-psicc_LDADD = $(top_builddir)/src/liblcms2.la
+psicc_LDADD = $(top_builddir)/src/liblcms2.la @LCMS_LIB_DEPLIBS@
psicc_LDFLAGS = @LDFLAGS@
psicc_SOURCES = psicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h
-psicc_MANS = psicc.1
+man_MANS = psicc.1
EXTRA_DIST = $(man_MANS)
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
# Additions and bugs by Marti Maria
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
host_triplet = @host@
bin_PROGRAMS = psicc$(EXEEXT)
subdir = utils/psicc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_psicc_OBJECTS = psicc.$(OBJEXT) xgetopt.$(OBJEXT) vprf.$(OBJEXT)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_psicc_OBJECTS = psicc.$(OBJEXT) ../common/xgetopt.$(OBJEXT) \
+ ../common/vprf.$(OBJEXT)
psicc_OBJECTS = $(am_psicc_OBJECTS)
psicc_DEPENDENCIES = $(top_builddir)/src/liblcms2.la
-psicc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(psicc_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 =
+psicc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(psicc_LDFLAGS) $(LDFLAGS) -o $@
+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@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
+depcomp =
+am__maybe_remake_depfiles =
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)
+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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 = $(psicc_SOURCES)
DIST_SOURCES = $(psicc_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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; }; \
+ }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
-psicc_LDADD = $(top_builddir)/src/liblcms2.la
+psicc_LDADD = $(top_builddir)/src/liblcms2.la @LCMS_LIB_DEPLIBS@
psicc_LDFLAGS = @LDFLAGS@
psicc_SOURCES = psicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h
-psicc_MANS = psicc.1
+man_MANS = psicc.1
EXTRA_DIST = $(man_MANS)
all: all-am
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utils/psicc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign utils/psicc/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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@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; \
+ 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|.*|.|' \
+ 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 } \
@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)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+../common/$(am__dirstamp):
+ @$(MKDIR_P) ../common
+ @: > ../common/$(am__dirstamp)
+../common/xgetopt.$(OBJEXT): ../common/$(am__dirstamp)
+../common/vprf.$(OBJEXT): ../common/$(am__dirstamp)
+
psicc$(EXEEXT): $(psicc_OBJECTS) $(psicc_DEPENDENCIES) $(EXTRA_psicc_DEPENDENCIES)
@rm -f psicc$(EXEEXT)
- $(psicc_LINK) $(psicc_OBJECTS) $(psicc_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(psicc_LINK) $(psicc_OBJECTS) $(psicc_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f ../common/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psicc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vprf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetopt.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 $<
+ $(AM_V_CC)$(COMPILE) -c -o $@ $<
.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) '$<'`
+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(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 $@ $<
-
-xgetopt.o: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.o -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-
-xgetopt.obj: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.obj -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-
-vprf.o: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.o -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-
-vprf.obj: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.obj -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
+ $(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
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)
+install-man1: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
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 ../common/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
info-am:
-install-data-am:
+install-data-am: install-man
install-dvi: install-dvi-am
install-info-am:
-install-man:
+install-man: install-man1
install-pdf: install-pdf-am
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic 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 \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ 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-man1 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
.\"Shiju P. Nair September 30, 2004
-.TH ICC2PS 1 "September 30, 2004"
+.\"Thomas Weber <tweber@debian.org> April 23, 2014
+.TH PSICC 1 "September 30, 2004"
.SH NAME
-icc2ps - little cms PostScript converter.
+psicc - little cms PostScript converter.
.SH SYNOPSIS
-.B icc2ps
+.B psicc
.RI [ options ]
.SH DESCRIPTION
lcms is a standalone CMM engine, which deals with the color management.
It implements a fast transformation between ICC profiles.
-.B icc2ps
-is little cms PostScript converter.
+.B psicc
+is a little cms PostScript converter.
.SH OPTIONS
.TP
-.B \-b
+.B \-b
Black point compensation (CRD only).
.TP
+.BI \-c\ precision
+Precision (0=LowRes, 1=Normal, 2=Hi-res) (CRD only) [defaults to 1].
+.TP
.BI \-i\ profile
Input profile: Generates Color Space Array (CSA).
.TP
+.BI \-n\ gridpoints
+Alternate way to set precision, number of CLUT points (CRD only).
+.TP
.BI \-o\ profile
.p
Output profile: Generates Color Rendering Dictionary(CRD).
.TP
-.B \-t <0,1,2,3>
-Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute).
+.BI \-t\ intent
+Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute) [defaults to 0].
.TP
-.B \-u
+.B \-u
Do NOT generate resource name on CRD.
.SH NOTES
For suggestions, comments, bug reports etc. send mail to
info@littlecms.com.
.SH SEE ALSO
-.BR jpegicc (1),
-.BR tifficc (1),
-.BR icclink (1),
-.BR icctrans (1),
-.BR wtpt (1)
+.BR jpgicc (1),
+.BR linkicc (1),
+.BR tificc (1),
+.BR transicc (1)
.SH AUTHOR
This manual page was written by Shiju p. Nair <shiju.p@gmail.com>,
for the Debian project.
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
static int NumOfGridPoints = 0;
+
+static
+void Help(void)
+{
+ fprintf(stderr, "usage: psicc [flags] [<Output file>]\n\n");
+
+ fprintf(stderr, "flags:\n\n");
+
+ fprintf(stderr, "-i<profile> - Input profile: Generates Color Space Array (CSA)\n");
+ fprintf(stderr, "-o<profile> - Output profile: Generates Color Rendering Dictionary(CRD)\n");
+
+ fprintf(stderr, "-t<0,1,2,3> - Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute)\n");
+
+ fprintf(stderr, "-b - Black point compensation (CRD only)\n");
+ fprintf(stderr, "-u - Do NOT generate resource name on CRD\n");
+ fprintf(stderr, "-c<0,1,2> - Precision (0=LowRes, 1=Normal (default), 2=Hi-res) (CRD only)\n");
+ fprintf(stderr, "-n<gridpoints> - Alternate way to set precission, number of CLUT points (CRD only)\n");
+
+ fprintf(stderr, "\n");
+ fprintf(stderr, "If no output file is specified, output goes to stdout.\n\n");
+ fprintf(stderr, "This program is intended to be a demo of the little cms\n"
+ "engine. Both lcms and this program are freeware. You can\n"
+ "obtain both in source code at https://www.littlecms.com\n"
+ "For suggestions, comments, bug reports etc. send mail to\n"
+ "info@littlecms.com\n\n");
+
+ exit(0);
+}
+
// The toggles stuff
static
{
int s;
- while ((s = xgetopt(argc,argv,"uUbBI:i:O:o:T:t:c:C:n:N:")) != EOF) {
-
- switch (s){
-
+ while ((s = xgetopt(argc,argv,"uUbBI:i:O:o:T:t:c:C:n:N:-:")) != EOF) {
+
+ switch (s)
+ {
+
+ case '-':
+ if (strcmp(xoptarg, "help") == 0)
+ {
+ Help();
+ }
+ else
+ {
+ FatalError("Unknown option - run without args to see valid ones.\n");
+ }
+ break;
case 'i':
case 'I':
}
}
-static
-void Help(void)
-{
- fprintf(stderr, "little cms ICC PostScript generator - v2.0 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0);
-
- fprintf(stderr, "usage: psicc [flags]\n\n");
- fprintf(stderr, "flags:\n\n");
-
- fprintf(stderr, "%ci<profile> - Input profile: Generates Color Space Array (CSA)\n", SW);
- fprintf(stderr, "%co<profile> - Output profile: Generates Color Rendering Dictionary(CRD)\n", SW);
-
- fprintf(stderr, "%ct<0,1,2,3> - Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute)\n", SW);
-
- fprintf(stderr, "%cb - Black point compensation (CRD only)\n", SW);
- fprintf(stderr, "%cu - Do NOT generate resource name on CRD\n", SW);
- fprintf(stderr, "%cc<0,1,2> - Precision (0=LowRes, 1=Normal (default), 2=Hi-res) (CRD only)\n", SW);
- fprintf(stderr, "%cn<gridpoints> - Alternate way to set precission, number of CLUT points (CRD only)\n", SW);
-
- fprintf(stderr, "\n");
- fprintf(stderr, "This program is intended to be a demo of the little cms\n"
- "engine. Both lcms and this program are freeware. You can\n"
- "obtain both in source code at http://www.littlecms.com\n"
- "For suggestions, comments, bug reports etc. send mail to\n"
- "info@littlecms.com\n\n");
- exit(0);
-}
static
n = cmsGetPostScriptCSA(0, hProfile, Intent, 0, NULL, 0);
if (n == 0) return;
- Buffer = (char*) malloc(n + 1);
- cmsGetPostScriptCSA(0, hProfile, Intent, 0, Buffer, n);
- Buffer[n] = 0;
+ Buffer = (char*) malloc(n + 1);
+ if (Buffer != NULL) {
+
+ cmsGetPostScriptCSA(0, hProfile, Intent, 0, Buffer, (cmsUInt32Number) n);
+ Buffer[n] = 0;
+
+ fprintf(OutFile, "%s", Buffer);
+
+ free(Buffer);
+ }
- fprintf(OutFile, "%s", Buffer);
-
- free(Buffer);
cmsCloseProfile(hProfile);
}
if (n == 0) return;
Buffer = (char*) malloc(n + 1);
- cmsGetPostScriptCRD(0, hProfile, Intent, dwFlags, Buffer, n);
+ if (Buffer == NULL) return;
+ cmsGetPostScriptCRD(0, hProfile, Intent, dwFlags, Buffer, (cmsUInt32Number) n);
Buffer[n] = 0;
fprintf(OutFile, "%s", Buffer);
{
int nargs;
+ fprintf(stderr, "Little CMS ICC PostScript generator - v2.1 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0);
+ fprintf(stderr, "Copyright (c) 1998-2020 Marti Maria Saguer. See COPYING file for details.\n");
+ fflush(stderr);
+
// Initialize
InitUtils("psicc");
if (nargs != 0 && nargs != 1)
Help();
+ if (cInProf == NULL && cOutProf == NULL)
+ Help();
+
if (nargs == 0)
OutFile = stdout;
else
OutFile = fopen(argv[xoptind], "wt");
-
- if (cInProf == NULL && cOutProf == NULL)
- Help();
-
-
if (cInProf != NULL)
GenerateCSA();
# Additions and bugs by Marti Maria
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
wtpt_LDADD = $(top_builddir)/src/liblcms2.la
wtpt_LDFLAGS = @LDFLAGS@
wtpt_SOURCES = wtpt.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h
-wtpt_MANS = wtpt.1
+man_MANS = wtpt.1
EXTRA_DIST = $(man_MANS) roundtrip.c mktiff8.c mkgrayer.c mkcmy.c itufax.c
// the default range for ITU/T.42 -- See RFC 2301, section 6.2.3 for details
-// L* = [0, 100]
-// a* = [\9685, 85]
-// b* = [\9675, 125]
+// L* = [0, 100]
+// a* = [-85, 85]
+// b* = [-75, 125]
// These functions does convert the encoding of ITUFAX to floating point
// once for each node. In[] will contain the Lab PCS value to convert to ITUFAX
// on InputDirection, or the ITUFAX value to convert to Lab in OutputDirection
// You can change the number of sample points if desired, the algorithm will
-// remain same. 33 points gives good accurancy, but you can reduce to 22 or less
+// remain same. 33 points gives good accuracy, but you can reduce to 22 or less
// is space is critical
#define GRID_POINTS 33
}
hProfile = cmsOpenProfileFromFile(argv[1], "r");
+ if (hProfile == NULL)
+ {
+ printf("invalid profile\n");
+ return 1;
+ }
+
xform = cmsCreateTransform(hProfile,TYPE_RGB_8, hProfile, TYPE_RGB_8, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE);
+ if (xform == NULL)
+ {
+ printf("Not a valid RGB profile\n");
+ return 1;
+ }
for (r=0; r< 256; r++) {
printf("%d \r", r);
//
// Little cms
-// Copyright (C) 1998-2000 Marti Maria
+// Copyright (C) 1998-2015 Marti Maria
//
-// THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
-// WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+//---------------------------------------------------------------------------------
//
-// IN NO EVENT SHALL MARTI MARIA BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
-// INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
-// OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-// WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
-// LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-// OF THIS SOFTWARE.
+// Little Color Management System
+// Copyright (c) 1998-2014 Marti Maria Saguer
//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following conditions:
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2 of the License, or (at your option) any later version.
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
//
-// This library 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
-// Lesser General Public License for more details.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//---------------------------------------------------------------------------------
-// Example: how to show white points of profiles
+#include "utils.h"
-#include "lcms.h"
+// The toggles stuff
+static cmsBool lShowXYZ = TRUE;
+static cmsBool lShowLab = FALSE;
+static cmsBool lShowLCh = FALSE;
+static
+void HandleSwitches(int argc, char *argv[])
+{
+ int s;
+
+ while ((s = xgetopt(argc, argv, "lcx")) != EOF) {
+
+ switch (s){
+
+
+ case 'l':
+ lShowLab = TRUE;
+ break;
+
+ case 'c':
+ lShowLCh = TRUE;
+ break;
+
+ case 'x':
+ lShowXYZ = FALSE;
+ break;
+
+ default:
+
+ FatalError("Unknown option - run without args to see valid ones.\n");
+ }
+ }
+}
static
-void ShowWhitePoint(LPcmsCIEXYZ WtPt)
-{
- cmsCIELab Lab;
- cmsCIELCh LCh;
- cmsCIExyY xyY;
- char Buffer[1024];
-
-
- _cmsIdentifyWhitePoint(Buffer, WtPt);
- printf("%s\n", Buffer);
+void Help(void)
+{
+ fprintf(stderr, "little CMS ICC white point utility - v3 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0);
+
+ fprintf(stderr, "usage: wtpt [flags] [<ICC profile>]\n\n");
+
+ fprintf(stderr, "flags:\n\n");
+ fprintf(stderr, "%cl - CIE Lab\n", SW);
+ fprintf(stderr, "%cc - CIE LCh\n", SW);
+ fprintf(stderr, "%cx - Don't show XYZ\n", SW);
+
+ fprintf(stderr, "\nIf no parameters are given, then this program will\n");
+ fprintf(stderr, "ask for XYZ value of media white. If parameter given, it must be\n");
+ fprintf(stderr, "the profile to inspect.\n\n");
+
+ fprintf(stderr, "This program is intended to be a demo of the little cms\n"
+ "engine. Both lcms and this program are freeware. You can\n"
+ "obtain both in source code at http://www.littlecms.com\n"
+ "For suggestions, comments, bug reports etc. send mail to\n"
+ "info@littlecms.com\n\n");
+ exit(0);
+}
+
+
+
+static
+void ShowWhitePoint(cmsCIEXYZ* WtPt)
+{
+ cmsCIELab Lab;
+ cmsCIELCh LCh;
+ cmsCIExyY xyY;
+
+
cmsXYZ2Lab(NULL, &Lab, WtPt);
- cmsLab2LCh(&LCh, &Lab);
- cmsXYZ2xyY(&xyY, WtPt);
-
- printf("XYZ=(%3.1f, %3.1f, %3.1f)\n", WtPt->X, WtPt->Y, WtPt->Z);
- printf("Lab=(%3.3f, %3.3f, %3.3f)\n", Lab.L, Lab.a, Lab.b);
- printf("(x,y)=(%3.3f, %3.3f)\n", xyY.x, xyY.y);
- printf("Hue=%3.2f, Chroma=%3.2f\n", LCh.h, LCh.C);
- printf("\n");
-
+ cmsLab2LCh(&LCh, &Lab);
+ cmsXYZ2xyY(&xyY, WtPt);
+
+
+ if (lShowXYZ) printf("XYZ=(%3.1f, %3.1f, %3.1f)\n", WtPt->X, WtPt->Y, WtPt->Z);
+ if (lShowLab) printf("Lab=(%3.3f, %3.3f, %3.3f)\n", Lab.L, Lab.a, Lab.b);
+ if (lShowLCh) printf("LCh=(%3.3f, %3.3f, %3.3f)\n", LCh.L, LCh.C, LCh.h);
+ {
+ double Ssens = (LCh.C * 100.0 )/ sqrt(LCh.C*LCh.C + LCh.L * LCh.L) ;
+ printf("Sens = %f\n", Ssens);
+ }
+
}
-int main (int argc, char *argv[])
+int main(int argc, char *argv[])
{
- printf("Show media white of profiles, identifying black body locus. v2\n\n");
+ int nargs;
+
+ InitUtils("wtpt");
+
+ HandleSwitches(argc, argv);
+ nargs = (argc - xoptind);
- if (argc == 2) {
- cmsCIEXYZ WtPt;
- cmsHPROFILE hProfile = cmsOpenProfileFromFile(argv[1], "r");
+ if (nargs != 1)
+ Help();
- printf("%s\n", cmsTakeProductName(hProfile));
- cmsTakeMediaWhitePoint(&WtPt, hProfile);
- ShowWhitePoint(&WtPt);
- cmsCloseProfile(hProfile);
- }
- else
- {
- cmsCIEXYZ xyz;
-
- printf("usage:\n\nIf no parameters are given, then this program will\n");
- printf("ask for XYZ value of media white. If parameter given, it must be\n");
- printf("the profile to inspect.\n\n");
-
- printf("X? "); scanf("%lf", &xyz.X);
- printf("Y? "); scanf("%lf", &xyz.Y);
- printf("Z? "); scanf("%lf", &xyz.Z);
-
- ShowWhitePoint(&xyz);
- }
+ else {
+ cmsCIEXYZ* WtPt;
+ cmsHPROFILE hProfile = cmsOpenProfileFromFile(argv[xoptind], "r");
+ if (hProfile == NULL) return 1;
- return 0;
+ WtPt = cmsReadTag(hProfile, cmsSigMediaWhitePointTag);
+ ShowWhitePoint(WtPt);
+ cmsCloseProfile(hProfile);
+ }
+
+ return 0;
}
# bugs introduced by Marti Maria
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
# bugs introduced by Marti Maria
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
host_triplet = @host@
@HasTIFF_TRUE@bin_PROGRAMS = tificc$(EXEEXT)
subdir = utils/tificc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_tificc_OBJECTS = tificc.$(OBJEXT) xgetopt.$(OBJEXT) vprf.$(OBJEXT)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_tificc_OBJECTS = tificc.$(OBJEXT) ../common/xgetopt.$(OBJEXT) \
+ ../common/vprf.$(OBJEXT)
tificc_OBJECTS = $(am_tificc_OBJECTS)
tificc_DEPENDENCIES = $(top_builddir)/src/liblcms2.la
-tificc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(tificc_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 =
+tificc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(tificc_LDFLAGS) $(LDFLAGS) -o $@
+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@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
+depcomp =
+am__maybe_remake_depfiles =
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)
+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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 = $(tificc_SOURCES)
DIST_SOURCES = $(tificc_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man_MANS)
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utils/tificc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign utils/tificc/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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@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; \
+ 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|.*|.|' \
+ 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 } \
@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)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+../common/$(am__dirstamp):
+ @$(MKDIR_P) ../common
+ @: > ../common/$(am__dirstamp)
+../common/xgetopt.$(OBJEXT): ../common/$(am__dirstamp)
+../common/vprf.$(OBJEXT): ../common/$(am__dirstamp)
+
tificc$(EXEEXT): $(tificc_OBJECTS) $(tificc_DEPENDENCIES) $(EXTRA_tificc_DEPENDENCIES)
@rm -f tificc$(EXEEXT)
- $(tificc_LINK) $(tificc_OBJECTS) $(tificc_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(tificc_LINK) $(tificc_OBJECTS) $(tificc_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f ../common/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tificc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vprf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetopt.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 $<
+ $(AM_V_CC)$(COMPILE) -c -o $@ $<
.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) '$<'`
+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(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 $@ $<
-
-xgetopt.o: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.o -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-
-xgetopt.obj: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.obj -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-
-vprf.o: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.o -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-
-vprf.obj: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.obj -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
+ $(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
-rm -rf .libs _libs
install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man1dir)'; $(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)
+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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
- @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
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
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 ../common/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic 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-man1 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS uninstall-man \
- uninstall-man1
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ 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-man1 \
+ 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 tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
static
void Help()
{
- fprintf(stderr, "Little cms TIFF compare utility. v1.0\n\n");
+ fprintf(stderr, "Little CMS TIFF compare utility. v1.1\n\n");
fprintf(stderr, "usage: tiffdiff [flags] input.tif output.tif\n");
fprintf(stderr, "\nflags:\n\n");
- fprintf(stderr, "%co<tiff> - Output TIFF file\n", SW);
- fprintf(stderr, "%cg<CGATS> - Output results in CGATS file\n", SW);
+ fprintf(stderr, "-o<tiff> - Output TIFF file\n");
+ fprintf(stderr, "-g<CGATS> - Output results in CGATS file\n");
fprintf(stderr, "\n");
- fprintf(stderr, "%cv - Verbose (show warnings)\n", SW);
- fprintf(stderr, "%ch - This help\n", SW);
+ fprintf(stderr, "-v - Verbose (show warnings)\n");
+ fprintf(stderr, "-h - This help\n");
fflush(stderr);
.\"Shiju P. Nair September 30, 2004
-.TH TIFFICC 1 "October 23, 2004"
-.SH NAME
-tifficc - little cms ICC profile applier for TIFF.
+.\"Thomas Weber <tweber@debian.org> April 23, 2014
+.TH TIFICC 1 "October 23, 2004"
+.SH NAME
+tificc - little cms ICC profile applier for TIFF.
.SH SYNOPSIS
-.B tifficc
+.B tificc
.RI [ options ] " input.tif output.tif"
.SH DESCRIPTION
lcms is a standalone CMM engine, which deals with the color management.
It implements a fast transformation between ICC profiles.
-.B tifficc
-is little cms ICC profile applier for TIFF.
+.B tificc
+is a little cms ICC profile applier for TIFF.
.SH OPTIONS
.TP
.B \-a
Handle channels > 4 as alpha.
.TP
-.B \-b
+.B \-b
Black point compensation.
.TP
-.B \-c <0,1,2,3>
-Precalculates transform. (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1]
+.BI \-c\ NUM
+Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1].
+.TP
+.BI \-d\ NUM
+Observer adaptation state (abs.col. only), (0..1.0, float value) [defaults to 0.0].
.TP
.B \-e
Embed destination profile.
.B \-g
Marks out-of-gamut colors on softproof.
.TP
-.B \-h <0,1,2>
-Show summary of options and examples.
+.BI \-h\ NUM
+Show summary of options and examples (0=help, 1=Examples, 2=Built-in profiles, 3=Contact information)
.TP
.BI \-i\ profile
Input profile (defaults to sRGB).
.TP
-.B -k <0..400>
-Ink-limiting in % (CMYK only).
+.BI \-k\ inklimit
+Ink-limiting in % (CMYK only), (0..400.0, float value) [default 400.0].
.TP
.BI \-l\ profile
Transform by device-link profile.
.TP
-.B \-m <0,1,2,3>
-SoftProof intent.
+.B \-m TODO: check if values outside 0..3 are possible
+SoftProof intent [defaults to 0].
.TP
.B \-n
Ignore embedded profile on input.
.TP
-.BI \-p\ profile
-Soft proof profile.
-.TP
.BI \-o\ profile
-.p
Output profile (defaults to sRGB).
.TP
-.BI \-s\ profile
-Save embedded profile as <new profile>
+.BI \-p\ profile
+Soft proof profile.
+.TP
+.BI \-s\ newprofile
+Save embedded profile as \fInewprofile\fR.
.TP
-.B \-t <0,1,2,3>
-Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute).
+.BI \-t\ NUM
+Rendering intent
+.nf
+.RS
+0=Perceptual [default]
+1=Relative colorimetric
+2=Saturation
+3=Absolute colorimetric
+10=Perceptual preserving black ink
+11=Relative colorimetric preserving black ink
+12=Saturation preserving black ink
+13=Perceptual preserving black plane
+14=Relative colorimetric preserving black plane
+15=Saturation preserving black plane
+.RE
+.fi
.TP
.B \-v
Verbose.
.TP
-.B \-w
-Wide output (generates 16 bps tiff).
-.TP
-You can also use following builtins
-*Lab - CIE Lab D50 based
-*XYZ - XYZ
-*adobe1998RBB - AdobeRGB
-*colormatchrgb - ColorMatch RGB
-*applergb - Apple RGB
+.BI \-w\ NUM
+Output depth (8, 16 or 32). Use 32 for floating-point.
+.SH BUILT-IN PROFILES
+.nf
+ *Lab2 -- D50-based v2 CIEL*a*b
+ *Lab4 -- D50-based v4 CIEL*a*b
+ *Lab -- D50-based v4 CIEL*a*b
+ *XYZ -- CIE XYZ (PCS)
+ *sRGB -- sRGB color space
+ *Gray22 - Monochrome of Gamma 2.2
+ *Gray30 - Monochrome of Gamma 3.0
+ *null - Monochrome black for all input
+ *Lin2222- CMYK linearization of gamma 2.2 on each channel
+.fi
.SH EXAMPLES
.nf
To color correct from scanner to sRGB:
- tifficc -iscanner.icm in.tif out.tif
-
+ tificc -iscanner.icm in.tif out.tif
To convert from monitor1 to monitor2:
- tifficc -imon1.icm -omon2.icm in.tif out.tif
-
+ tificc -imon1.icm -omon2.icm in.tif out.tif
To make a CMYK separation:
- tifficc -oprinter.icm inrgb.tif outcmyk.tif
-
+ tificc -oprinter.icm inrgb.tif outcmyk.tif
To recover sRGB from a CMYK separation:
- tifficc -iprinter.icm incmyk.tif outrgb.tif
-
+ tificc -iprinter.icm incmyk.tif outrgb.tif
To convert from CIELab TIFF to sRGB
- tifficc -iTiffLab8Spac.icm in.tif out.tif
-.fi
+ tificc -i*Lab in.tif out.tif
+.fi
.SH NOTES
For suggestions, comments, bug reports etc. send mail to info@littlecms.com.
.SH SEE ALSO
-.BR jpegicc (1),
-.BR icc2ps (1),
-.BR icclink (1),
-.BR icctrans (1),
-.BR wtpt (1)
+.BR jpgicc (1),
+.BR linkicc (1),
+.BR psicc (1),
+.BR transicc (1)
.SH AUTHOR
This manual page was originally written by Shiju p. Nair <shiju.p@gmail.com>,
for the Debian project. Modified by Marti Maria to reflect further changes.
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
static cmsBool GamutCheck = FALSE;
static cmsBool lIsDeviceLink = FALSE;
static cmsBool StoreAsAlpha = FALSE;
-static cmsBool InputLabUsingICC = FALSE;
static int Intent = INTENT_PERCEPTUAL;
static int ProofingIntent = INTENT_PERCEPTUAL;
UTILS_UNUSED_PARAMETER(CMMcargo);
}
+// Formatter for 16bit Lab TIFF (photometric 8)
+static
+unsigned char* UnrollTIFFLab16(struct _cmstransform_struct* CMMcargo,
+ register cmsUInt16Number wIn[],
+ register cmsUInt8Number* accum,
+ register cmsUInt32Number Stride )
+{
+ cmsUInt16Number* accum16 = (cmsUInt16Number*) accum;
+
+ wIn[0] = (cmsUInt16Number) FromLabV2ToLabV4(accum16[0]);
+ wIn[1] = (cmsUInt16Number) FromLabV2ToLabV4(((accum16[1] > 0x7f00) ? (accum16[1] - 0x8000) : (accum16[1] + 0x8000)) );
+ wIn[2] = (cmsUInt16Number) FromLabV2ToLabV4(((accum16[2] > 0x7f00) ? (accum16[2] - 0x8000) : (accum16[2] + 0x8000)) );
+
+ return accum + 3 * sizeof(cmsUInt16Number);
+
+ UTILS_UNUSED_PARAMETER(Stride);
+ UTILS_UNUSED_PARAMETER(CMMcargo);
+}
+
+
static
unsigned char* PackTIFFLab8(struct _cmstransform_struct* CMMcargo,
register cmsUInt16Number wOut[],
UTILS_UNUSED_PARAMETER(CMMcargo);
}
+static
+unsigned char* PackTIFFLab16(struct _cmstransform_struct* CMMcargo,
+ register cmsUInt16Number wOut[],
+ register cmsUInt8Number* output,
+ register cmsUInt32Number Stride)
+{
+ int a, b;
+ cmsUInt16Number* output16 = (cmsUInt16Number*) output;
+
+ *output16++ = (cmsUInt16Number) FromLabV4ToLabV2(wOut[0]);
+
+ a = FromLabV4ToLabV2(wOut[1]);
+ b = FromLabV4ToLabV2(wOut[2]);
+
+ *output16++ = (cmsUInt16Number) ((a < 0x7f00) ? (a + 0x8000) : (a - 0x8000));
+ *output16++ = (cmsUInt16Number) ((b < 0x7f00) ? (b + 0x8000) : (b - 0x8000));
+
+ return (cmsUInt8Number*) output16;
+
+ UTILS_UNUSED_PARAMETER(Stride);
+ UTILS_UNUSED_PARAMETER(CMMcargo);
+}
+
static
-cmsFormatter TiffFormatterFactory(cmsUInt32Number Type,
- cmsFormatterDirection Dir,
+cmsFormatter TiffFormatterFactory(cmsUInt32Number Type,
+ cmsFormatterDirection Dir,
cmsUInt32Number dwFlags)
{
cmsFormatter Result = { NULL };
+ int bps = T_BYTES(Type);
+ int IsTiffSpecial = (Type >> 23) & 1;
- if (Type == TYPE_Lab_8 && !(dwFlags & CMS_PACK_FLAGS_FLOAT)) {
-
+ if (IsTiffSpecial && !(dwFlags & CMS_PACK_FLAGS_FLOAT))
+ {
if (Dir == cmsFormatterInput)
- Result.Fmt16 = UnrollTIFFLab8;
+ {
+ Result.Fmt16 = (bps == 1) ? UnrollTIFFLab8 : UnrollTIFFLab16;
+ }
else
- Result.Fmt16 = PackTIFFLab8;
+ Result.Fmt16 = (bps == 1) ? PackTIFFLab8 : PackTIFFLab16;
}
return Result;
static cmsPluginFormatters TiffLabPlugin = { {cmsPluginMagicNumber, 2000, cmsPluginFormattersSig, NULL}, TiffFormatterFactory };
+
// Build up the pixeltype descriptor
static
cmsUInt32Number GetInputPixelType(TIFF *Bank)
uint16 Photometric, bps, spp, extra, PlanarConfig, *info;
uint16 Compression, reverse = 0;
int ColorChannels, IsPlanar = 0, pt = 0, IsFlt;
+ int labTiffSpecial = FALSE;
TIFFGetField(Bank, TIFFTAG_PHOTOMETRIC, &Photometric);
TIFFGetFieldDefaulted(Bank, TIFFTAG_BITSPERSAMPLE, &bps);
switch (Photometric) {
- case PHOTOMETRIC_MINISWHITE:
+ case PHOTOMETRIC_MINISWHITE:
- reverse = 1;
+ reverse = 1;
- // ... fall through ...
+ // ... fall through ...
- case PHOTOMETRIC_MINISBLACK:
- pt = PT_GRAY;
- break;
+ case PHOTOMETRIC_MINISBLACK:
+ pt = PT_GRAY;
+ break;
- case PHOTOMETRIC_RGB:
- pt = PT_RGB;
- break;
+ case PHOTOMETRIC_RGB:
+ pt = PT_RGB;
+ break;
case PHOTOMETRIC_PALETTE:
break;
case PHOTOMETRIC_ICCLAB:
- pt = PT_Lab;
- InputLabUsingICC = TRUE;
+ pt = PT_LabV2;
break;
case PHOTOMETRIC_CIELAB:
pt = PT_Lab;
- InputLabUsingICC = FALSE;
+ labTiffSpecial = TRUE;
break;
bps >>= 3;
IsFlt = (bps == 0) || (bps == 4);
- return (FLOAT_SH(IsFlt)|COLORSPACE_SH(pt)|PLANAR_SH(IsPlanar)|EXTRA_SH(extra)|CHANNELS_SH(ColorChannels)|BYTES_SH(bps)|FLAVOR_SH(reverse));
+ return (FLOAT_SH(IsFlt)|COLORSPACE_SH(pt)|PLANAR_SH(IsPlanar)|EXTRA_SH(extra)|CHANNELS_SH(ColorChannels)|BYTES_SH(bps)|FLAVOR_SH(reverse) | (labTiffSpecial << 23) );
}
int PixelCount, j;
+ // Check for bad tiffs
+ if (BufSizeIn > INT_MAX || BufSizeOut > INT_MAX)
+ FatalError("Probably corrupted TIFF, tile too big.");
+
TIFFGetFieldDefaulted(in, TIFFTAG_TILEWIDTH, &tw);
TIFFGetFieldDefaulted(in, TIFFTAG_TILELENGTH, &tl);
PixelCount = (int) tw * tl;
BufferIn = (unsigned char *) _TIFFmalloc(BufSizeIn * nPlanes);
- if (!BufferIn) OutOfMem(BufSizeIn * nPlanes);
+ if (!BufferIn) OutOfMem((cmsUInt32Number) BufSizeIn * nPlanes);
BufferOut = (unsigned char *) _TIFFmalloc(BufSizeOut * nPlanes);
- if (!BufferOut) OutOfMem(BufSizeOut * nPlanes);
+ if (!BufferOut) OutOfMem((cmsUInt32Number) BufSizeOut * nPlanes);
for (i = 0; i < TileCount; i++) {
int j;
int PixelCount;
+ // Check for bad tiffs
+ if (BufSizeIn > INT_MAX || BufSizeOut > INT_MAX)
+ FatalError("Probably corrupted TIFF, strip too big.");
+
TIFFGetFieldDefaulted(in, TIFFTAG_IMAGEWIDTH, &sw);
TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &sl);
TIFFGetFieldDefaulted(in, TIFFTAG_IMAGELENGTH, &iml);
sl = iml; // One strip for whole image
BufferIn = (unsigned char *) _TIFFmalloc(BufSizeIn * nPlanes);
- if (!BufferIn) OutOfMem(BufSizeIn * nPlanes);
+ if (!BufferIn) OutOfMem((cmsUInt32Number) BufSizeIn * nPlanes);
BufferOut = (unsigned char *) _TIFFmalloc(BufSizeOut * nPlanes);
- if (!BufferOut) OutOfMem(BufSizeOut * nPlanes);
+ if (!BufferOut) OutOfMem((cmsUInt32Number) BufSizeOut * nPlanes);
for (i = 0; i < StripCount; i++) {
}
-// A replacement for (the nonstandard) filelenght
+// A replacement for (the nonstandard) filelength
static
void DoEmbedProfile(TIFF* Out, const char* ProfileFile)
{
FILE* f;
- cmsUInt32Number size, EmbedLen;
+ cmsInt32Number size;
+ cmsUInt32Number EmbedLen;
cmsUInt8Number* EmbedBuffer;
f = fopen(ProfileFile, "rb");
if (f == NULL) return;
size = cmsfilelength(f);
- EmbedBuffer = (cmsUInt8Number*) malloc(size + 1);
+ if (size < 0) return;
+
+ EmbedBuffer = (cmsUInt8Number*) malloc((size_t) size + 1);
if (EmbedBuffer == NULL) {
OutOfMem(size+1);
return;
}
- EmbedLen = fread(EmbedBuffer, 1, size, f);
+ EmbedLen = (cmsUInt32Number) fread(EmbedBuffer, 1, (size_t) size, f);
- if (EmbedLen != size)
- FatalError("Cannot read %ld bytes to %s", size, ProfileFile);
+ if (EmbedLen != (cmsUInt32Number) size)
+ FatalError("Cannot read %ld bytes to %s", (long) size, ProfileFile);
fclose(f);
EmbedBuffer[EmbedLen] = 0;
hProfile = cmsOpenProfileFromMem(EmbedBuffer, EmbedLen);
// Print description found in the profile
- if (Verbose) {
+ if (Verbose && (hProfile != NULL)) {
fprintf(stdout, "\n[Embedded profile]\n");
PrintProfileInformation(hProfile);
static
void Help(int level)
{
- fprintf(stderr, "little cms ICC profile applier for TIFF - v6.2 [LittleCMS %2.2f]\n\n", LCMS_VERSION / 1000.0);
- fflush(stderr);
-
- switch(level) {
+ UTILS_UNUSED_PARAMETER(level);
- default:
- case 0:
+ fprintf(stderr, "usage: tificc [flags] input.tif output.tif\n");
- fprintf(stderr, "usage: tificc [flags] input.tif output.tif\n");
+ fprintf(stderr, "\nflags:\n\n");
+ fprintf(stderr, "-v - Verbose\n");
+ fprintf(stderr, "-i<profile> - Input profile (defaults to sRGB)\n");
+ fprintf(stderr, "-o<profile> - Output profile (defaults to sRGB)\n");
+ fprintf(stderr, "-l<profile> - Transform by device-link profile\n");
- fprintf(stderr, "\nflags:\n\n");
- fprintf(stderr, "%cv - Verbose\n", SW);
- fprintf(stderr, "%ci<profile> - Input profile (defaults to sRGB)\n", SW);
- fprintf(stderr, "%co<profile> - Output profile (defaults to sRGB)\n", SW);
- fprintf(stderr, "%cl<profile> - Transform by device-link profile\n", SW);
+ PrintBuiltins();
- PrintRenderingIntents();
+ PrintRenderingIntents();
- fprintf(stderr, "%cb - Black point compensation\n", SW);
- fprintf(stderr, "%cd<0..1> - Observer adaptation state (abs.col. only)\n", SW);
+ fprintf(stderr, "-b - Black point compensation\n");
+ fprintf(stderr, "-d<0..1> - Observer adaptation state (abs.col. only)\n");
- fprintf(stderr, "%cc<0,1,2,3> - Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes)\n", SW);
- fprintf(stderr, "\n");
+ fprintf(stderr, "-c<0,1,2,3> - Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes)\n");
+ fprintf(stderr, "\n");
- fprintf(stderr, "%cw<8,16,32> - Output depth. Use 32 for floating-point\n\n", SW);
- fprintf(stderr, "%ca - Handle channels > 4 as alpha\n", SW);
+ fprintf(stderr, "-w<8,16,32> - Output depth. Use 32 for floating-point\n\n");
+ fprintf(stderr, "-a - Handle channels > 4 as alpha\n");
- fprintf(stderr, "%cn - Ignore embedded profile on input\n", SW);
- fprintf(stderr, "%ce - Embed destination profile\n", SW);
- fprintf(stderr, "%cs<new profile> - Save embedded profile as <new profile>\n", SW);
- fprintf(stderr, "\n");
+ fprintf(stderr, "-n - Ignore embedded profile on input\n");
+ fprintf(stderr, "-e - Embed destination profile\n");
+ fprintf(stderr, "-s<new profile> - Save embedded profile as <new profile>\n");
+ fprintf(stderr, "\n");
- fprintf(stderr, "%cp<profile> - Soft proof profile\n", SW);
- fprintf(stderr, "%cm<n> - Soft proof intent\n", SW);
- fprintf(stderr, "%cg - Marks out-of-gamut colors on softproof\n", SW);
+ fprintf(stderr, "-p<profile> - Soft proof profile\n");
+ fprintf(stderr, "-m<n> - Soft proof intent\n");
+ fprintf(stderr, "-g - Marks out-of-gamut colors on softproof\n");
- fprintf(stderr, "\n");
-
- fprintf(stderr, "%ck<0..400> - Ink-limiting in %% (CMYK only)\n", SW);
- fprintf(stderr, "\n");
- fprintf(stderr, "%ch<0,1,2,3> - More help\n", SW);
- break;
+ fprintf(stderr, "\n");
- case 1:
-
- fprintf(stderr, "Examples:\n\n"
- "To color correct from scanner to sRGB:\n"
- "\ttificc %ciscanner.icm in.tif out.tif\n"
- "To convert from monitor1 to monitor2:\n"
- "\ttificc %cimon1.icm %comon2.icm in.tif out.tif\n"
- "To make a CMYK separation:\n"
- "\ttificc %coprinter.icm inrgb.tif outcmyk.tif\n"
- "To recover sRGB from a CMYK separation:\n"
- "\ttificc %ciprinter.icm incmyk.tif outrgb.tif\n"
- "To convert from CIELab TIFF to sRGB\n"
- "\ttificc %ci*Lab in.tif out.tif\n\n",
- SW, SW, SW, SW, SW, SW);
- break;
+ fprintf(stderr, "-k<0..400> - Ink-limiting in %% (CMYK only)\n");
+ fprintf(stderr, "\n");
+
- case 2:
- PrintBuiltins();
- break;
+ fprintf(stderr, "Examples:\n\n"
+ "To color correct from scanner to sRGB:\n"
+ "\ttificc -iscanner.icm in.tif out.tif\n"
+ "To convert from monitor1 to monitor2:\n"
+ "\ttificc -imon1.icm -omon2.icm in.tif out.tif\n"
+ "To make a CMYK separation:\n"
+ "\ttificc -oprinter.icm inrgb.tif outcmyk.tif\n"
+ "To recover sRGB from a CMYK separation:\n"
+ "\ttificc -iprinter.icm incmyk.tif outrgb.tif\n"
+ "To convert from CIELab TIFF to sRGB\n"
+ "\ttificc -i*Lab in.tif out.tif\n\n");
- case 3:
- fprintf(stderr, "This program is intended to be a demo of the little cms\n"
- "engine. Both lcms and this program are freeware. You can\n"
- "obtain both in source code at http://www.littlecms.com\n"
- "For suggestions, comments, bug reports etc. send mail to\n"
- "info@littlecms.com\n\n");
+ fprintf(stderr, "This program is intended to be a demo of the Little CMS\n"
+ "color engine. Both lcms and this program are open source.\n"
+ "You can obtain both in source code at https://www.littlecms.com\n"
+ "For suggestions, comments, bug reports etc. send mail to\n"
+ "info@littlecms.com\n\n");
- break;
- }
- fflush(stderr);
exit(0);
}
{
int s;
- while ((s=xgetopt(argc,argv,"aAeEbBw:W:nNvVGgh:H:i:I:o:O:P:p:t:T:c:C:l:L:M:m:K:k:S:s:D:d:")) != EOF) {
+ while ((s=xgetopt(argc,argv,"aAeEbBw:W:nNvVGgh:H:i:I:o:O:P:p:t:T:c:C:l:L:M:m:K:k:S:s:D:d:-:")) != EOF) {
switch (s) {
+
+ case '-':
+ if (strcmp(xoptarg, "help") == 0)
+ {
+ Help(0);
+ }
+ else
+ {
+ FatalError("Unknown option - run without args to see valid ones.\n");
+ }
+ break;
+
case 'a':
case 'A':
StoreAsAlpha = TRUE;
{
TIFF *in, *out;
+
+ fprintf(stderr, "Little CMS ICC profile applier for TIFF - v6.3 [LittleCMS %2.2f]\n\n", LCMS_VERSION / 1000.0);
+ fprintf(stderr, "Copyright (c) 1998-2020 Marti Maria Saguer. See COPYING file for details.\n");
+ fflush(stderr);
+
cmsPlugin(&TiffLabPlugin);
InitUtils("tificc");
# Additions and bugs by Marti Maria
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
bin_PROGRAMS = transicc
-transicc_LDADD = $(top_builddir)/src/liblcms2.la
+transicc_LDADD = $(top_builddir)/src/liblcms2.la @LCMS_LIB_DEPLIBS@
transicc_LDFLAGS = @LDFLAGS@
transicc_SOURCES = transicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h
-transicc_MANS = transicc.1
+man_MANS = transicc.1
EXTRA_DIST = $(man_MANS)
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2018 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.
# Additions and bugs by Marti Maria
VPATH = @srcdir@
+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 \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ 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@
host_triplet = @host@
bin_PROGRAMS = transicc$(EXEEXT)
subdir = utils/transicc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
+ $(top_srcdir)/m4/ax_append_compile_flags.m4 \
+ $(top_srcdir)/m4/ax_append_flag.m4 \
+ $(top_srcdir)/m4/ax_check_compile_flag.m4 \
+ $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
+ $(top_srcdir)/m4/ax_require_defined.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)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
-am_transicc_OBJECTS = transicc.$(OBJEXT) xgetopt.$(OBJEXT) \
- vprf.$(OBJEXT)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_transicc_OBJECTS = transicc.$(OBJEXT) ../common/xgetopt.$(OBJEXT) \
+ ../common/vprf.$(OBJEXT)
transicc_OBJECTS = $(am_transicc_OBJECTS)
transicc_DEPENDENCIES = $(top_builddir)/src/liblcms2.la
-transicc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(transicc_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 =
+transicc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(transicc_LDFLAGS) $(LDFLAGS) -o $@
+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@
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
+depcomp =
+am__maybe_remake_depfiles =
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)
+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) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
- --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
+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 = $(transicc_SOURCES)
DIST_SOURCES = $(transicc_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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; }; \
+ }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+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
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIB_JPEG = @LIB_JPEG@
LIB_MATH = @LIB_MATH@
+LIB_PLUGINS = @LIB_PLUGINS@
+LIB_THREAD = @LIB_THREAD@
LIB_TIFF = @LIB_TIFF@
LIB_ZLIB = @LIB_ZLIB@
LIPO = @LIPO@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_CXX = @PTHREAD_CXX@
+PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
# Don't require all the GNU mandated files
-AUTOMAKE_OPTIONS = 1.7 foreign
+AUTOMAKE_OPTIONS = 1.7 foreign no-dependencies
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/utils/common -I$(top_builddir)/utils/common
-transicc_LDADD = $(top_builddir)/src/liblcms2.la
+transicc_LDADD = $(top_builddir)/src/liblcms2.la @LCMS_LIB_DEPLIBS@
transicc_LDFLAGS = @LDFLAGS@
transicc_SOURCES = transicc.c ../common/xgetopt.c ../common/vprf.c ../common/utils.h
-transicc_MANS = transicc.1
+man_MANS = transicc.1
EXTRA_DIST = $(man_MANS)
all: all-am
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign utils/transicc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign utils/transicc/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);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@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; \
+ 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|.*|.|' \
+ 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 } \
@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)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+../common/$(am__dirstamp):
+ @$(MKDIR_P) ../common
+ @: > ../common/$(am__dirstamp)
+../common/xgetopt.$(OBJEXT): ../common/$(am__dirstamp)
+../common/vprf.$(OBJEXT): ../common/$(am__dirstamp)
+
transicc$(EXEEXT): $(transicc_OBJECTS) $(transicc_DEPENDENCIES) $(EXTRA_transicc_DEPENDENCIES)
@rm -f transicc$(EXEEXT)
- $(transicc_LINK) $(transicc_OBJECTS) $(transicc_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(transicc_LINK) $(transicc_OBJECTS) $(transicc_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f ../common/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transicc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vprf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgetopt.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 $<
+ $(AM_V_CC)$(COMPILE) -c -o $@ $<
.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) '$<'`
+ $(AM_V_CC)$(COMPILE) -c -o $@ `$(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 $@ $<
-
-xgetopt.o: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.o -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.o `test -f '../common/xgetopt.c' || echo '$(srcdir)/'`../common/xgetopt.c
-
-xgetopt.obj: ../common/xgetopt.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xgetopt.obj -MD -MP -MF $(DEPDIR)/xgetopt.Tpo -c -o xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/xgetopt.Tpo $(DEPDIR)/xgetopt.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/xgetopt.c' object='xgetopt.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 xgetopt.obj `if test -f '../common/xgetopt.c'; then $(CYGPATH_W) '../common/xgetopt.c'; else $(CYGPATH_W) '$(srcdir)/../common/xgetopt.c'; fi`
-
-vprf.o: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.o -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.o `test -f '../common/vprf.c' || echo '$(srcdir)/'`../common/vprf.c
-
-vprf.obj: ../common/vprf.c
-@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vprf.obj -MD -MP -MF $(DEPDIR)/vprf.Tpo -c -o vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vprf.Tpo $(DEPDIR)/vprf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../common/vprf.c' object='vprf.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 vprf.obj `if test -f '../common/vprf.c'; then $(CYGPATH_W) '../common/vprf.c'; else $(CYGPATH_W) '$(srcdir)/../common/vprf.c'; fi`
+ $(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
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)
+install-man1: $(man_MANS)
+ @$(NORMAL_INSTALL)
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(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`; \
- 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; \
$$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; }; }'`; \
+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
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ 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)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
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 ../common/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
info-am:
-install-data-am:
+install-data-am: install-man
install-dvi: install-dvi-am
install-info-am:
-install-man:
+install-man: install-man1
install-pdf: install-pdf-am
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic 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 \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ 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-man1 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
.\"Shiju P. Nair September 30, 2004
-.TH ICCTRANS 1 "September 30, 2004"
+.\"Thomas Weber <tweber@debian.org> April 23, 2014
+.TH TRANSICC 1 "MAY 30, 2011"
.SH NAME
-icctrans - little cms ColorSpace conversion calculator.
+transicc - little cms ColorSpace conversion calculator.
.SH SYNOPSIS
-.B icctrans
-.RI [ options ]
+.B transicc
+.RI [ options ]\ [ CGATSINPUT ]\ [ CGATSOUTPUT ]
.SH DESCRIPTION
lcms is a standalone CMM engine, which deals with the color management.
It implements a fast transformation between ICC profiles.
-.B icctrans
-is lcms ColorSpace conversion calculator.
+.B transicc
+is a lcms ColorSpace conversion calculator.
.SH OPTIONS
.TP
-.B \-%
-use percent % of ink.
-.TP
-.B \-b
+.B \-b
Black point compensation.
.TP
-.B \-c <0,1,2,3>
-Precalculates transform. (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1]
+.BI \-c\ NUM
+Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes) [defaults to 1].
+.TP
+.BI \-d\ NUM
+Observer adaptation state (abs.col. only), (0..1.0, float value) [defaults to 0.0].
+.TP
+.B \-e
+Encoded representation of numbers is not float (Option \fB\-w\fR=use 16 bits, Option \fB\-x\fR=hexadecimal).
+.TP
+.B \-g
+Marks out-of-gamut colors on softproof.
.TP
.BI \-i\ profile
Input profile (defaults to sRGB).
.B \-l
Transform by device-link profile.
.TP
+.BI \-m\ NUM
+SoftProof intent (0,1,2,3) [defaults to 0].
+.TP
.B \-n
Terse output, intended for pipe usage.
.TP
.p
Output profile (defaults to sRGB).
.TP
-.B \-t <0,1,2,3>
-Intent (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute).
+.B \-q
+Quantize CGATS to 8 bits.
+.TP
+.BI \-s
+Bounded mode.
+.TP
+.BI \-t\ NUM
+Rendering intent
+.nf
+.RS
+0=Perceptual [default]
+1=Relative colorimetric
+2=Saturation
+3=Absolute colorimetric
+10=Perceptual preserving black ink
+11=Relative colorimetric preserving black ink
+12=Saturation preserving black ink
+13=Perceptual preserving black plane
+14=Relative colorimetric preserving black plane
+15=Saturation preserving black plane
+.RE
+.fi
.TP
-.B \-v
-Verbose.
+.BI \-v\ verbosity
+Verbosity level, (0=None, 1=Normal, 2=High, 3=Very High) [defaults to 1].
.TP
.B \-w
Use 16 bits.
For suggestions, comments, bug reports etc. send mail to
info@littlecms.com.
.SH SEE ALSO
-.BR jpegicc (1),
-.BR tifficc (1),
-.BR icc2ps (1),
-.BR icclink (1),
-.BR wtpt (1)
+.BR jpgicc (1),
+.BR linkicc (1),
+.BR psicc (1),
+.BR tificc (1)
.SH AUTHOR
This manual page was written by Shiju p. Nair <shiju.p@gmail.com>,
for the Debian project.
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2011 Marti Maria Saguer
+// Copyright (c) 1998-2020 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
static cmsBool BlackPointCompensation = FALSE;
static cmsBool lIsDeviceLink = FALSE;
static cmsBool lQuantize = FALSE;
+static cmsBool lUnbounded = TRUE;
static cmsBool lIsFloat = TRUE;
static cmsUInt32Number Intent = INTENT_PERCEPTUAL;
fprintf(stderr, "usage: transicc [flags] [CGATS input] [CGATS output]\n\n");
fprintf(stderr, "flags:\n\n");
- fprintf(stderr, "%cv<0..3> - Verbosity level\n", SW);
+ fprintf(stderr, "-v<0..3> - Verbosity level\n");
- fprintf(stderr, "%ce[op] - Encoded representation of numbers\n", SW);
- fprintf(stderr, "\t%cw - use 16 bits\n", SW);
- fprintf(stderr, "\t%cx - Hexadecimal\n", SW);
- fprintf(stderr, "%cq - Quantize CGATS to 8 bits\n\n", SW);
+ fprintf(stderr, "-e[op] - Encoded representation of numbers\n");
+ fprintf(stderr, "\t-w - use 16 bits\n");
+ fprintf(stderr, "\t-x - Hexadecimal\n\n");
+ fprintf(stderr, "-s - bounded mode (clip negatives and highlights)\n");
+ fprintf(stderr, "-q - Quantize (round decimals)\n\n");
- fprintf(stderr, "%ci<profile> - Input profile (defaults to sRGB)\n", SW);
- fprintf(stderr, "%co<profile> - Output profile (defaults to sRGB)\n", SW);
- fprintf(stderr, "%cl<profile> - Transform by device-link profile\n", SW);
-
- fprintf(stderr, "\nYou can use '*Lab', '*xyz' and others as built-in profiles\n\n");
+ fprintf(stderr, "-i<profile> - Input profile (defaults to sRGB)\n");
+ fprintf(stderr, "-o<profile> - Output profile (defaults to sRGB)\n");
+ fprintf(stderr, "-l<profile> - Transform by device-link profile\n");
+
+ PrintBuiltins();
PrintRenderingIntents();
fprintf(stderr, "\n");
- fprintf(stderr, "%cd<0..1> - Observer adaptation state (abs.col. only)\n\n", SW);
+ fprintf(stderr, "-d<0..1> - Observer adaptation state (abs.col. only)\n\n");
- fprintf(stderr, "%cb - Black point compensation\n", SW);
+ fprintf(stderr, "-b - Black point compensation\n");
- fprintf(stderr, "%cc<0,1,2,3> Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes)\n\n", SW);
- fprintf(stderr, "%cn - Terse output, intended for pipe usage\n", SW);
+ fprintf(stderr, "-c<0,1,2,3> Precalculates transform (0=Off, 1=Normal, 2=Hi-res, 3=LoRes)\n\n");
+ fprintf(stderr, "-n - Terse output, intended for pipe usage\n");
- fprintf(stderr, "%cp<profile> - Soft proof profile\n", SW);
- fprintf(stderr, "%cm<0,1,2,3> - Soft proof intent\n", SW);
- fprintf(stderr, "%cg - Marks out-of-gamut colors on softproof\n\n", SW);
+ fprintf(stderr, "-p<profile> - Soft proof profile\n");
+ fprintf(stderr, "-m<0,1,2,3> - Soft proof intent\n");
+ fprintf(stderr, "-g - Marks out-of-gamut colors on softproof\n\n");
- fprintf(stderr, "This program is intended to be a demo of the little cms\n"
- "engine. Both lcms and this program are freeware. You can\n"
- "obtain both in source code at http://www.littlecms.com\n"
+ fprintf(stderr, "This program is intended to be a demo of the Little CMS\n"
+ "color engine. Both lcms and this program are open source.\n"
+ "You can obtain both in source code at https://www.littlecms.com\n"
"For suggestions, comments, bug reports etc. send mail to\n"
"info@littlecms.com\n\n");
+
}
int s;
while ((s = xgetopt(argc, argv,
- "bBC:c:d:D:eEgGI:i:L:l:m:M:nNO:o:p:P:QqT:t:V:v:WwxX!:")) != EOF) {
+ "bBC:c:d:D:eEgGI:i:L:l:m:M:nNO:o:p:P:QqSsT:t:V:v:WwxX!:-:")) != EOF) {
switch (s){
+ case '-':
+ if (strcmp(xoptarg, "help") == 0)
+ {
+ Help();
+ exit(0);
+ }
+ else
+ {
+ FatalError("Unknown option - run without args to see valid ones.\n");
+ }
+ break;
+
case '!':
IncludePart = xoptarg;
break;
case 'd':
case 'D': {
cmsFloat64Number ObserverAdaptationState = atof(xoptarg);
- if (ObserverAdaptationState < 0 &&
+ if (ObserverAdaptationState < 0 ||
ObserverAdaptationState > 1.0)
FatalError("Adaptation states should be between 0 and 1");
cProofing = xoptarg;
break;
- // Quantize to 16 bits
+ // Quantize (get rid of decimals)
case 'q':
case 'Q':
lQuantize = TRUE;
break;
+ // Inhibit unbounded mode
+ case 's':
+ case 'S':
+ lUnbounded = FALSE;
+ break;
+
// The intent
case 't':
case 'T':
if (cmsGetDeviceClass(hInput) == cmsSigLinkClass ||
cmsGetDeviceClass(hOutput) == cmsSigLinkClass)
- FatalError("Use %cl flag for devicelink profiles!\n", SW);
+ FatalError("Use -l flag for devicelink profiles!\n");
InputColorSpace = cmsGetColorSpace(hInput);
// For named color, there is a specialized formatter
if (cmsGetDeviceClass(hInput) == cmsSigNamedColorClass) {
- dwOut = dwIn;
+
dwIn = TYPE_NAMED_COLOR_INDEX;
InputNamedColor = TRUE;
}
}
else {
OutputRange = 1;
- sprintf(ChannelName, "Channel #%d", i + 1);
+ sprintf(ChannelName, "Channel #%u", i + 1);
}
v = (cmsFloat64Number) Value[i]* OutputRange;
if (lQuantize)
v = floor(v + 0.5);
+ if (!lUnbounded) {
+
+ if (v < 0)
+ v = 0;
+ if (v > OutputRange)
+ v = OutputRange;
+ }
+
if (Verbose <= 0)
printf("%.4f ", v);
else
static
cmsUInt16Number GetIndex(void)
{
- char Buffer[4096], Name[40], Prefix[40], Suffix[40];
+ char Buffer[4096], Name[cmsMAX_PATH], Prefix[40], Suffix[40];
int index, max;
const cmsNAMEDCOLORLIST* NamedColorList;
{
cmsUInt32Number i, n;
char ChannelName[cmsMAX_PATH];
- char Buffer[cmsMAX_PATH];
+ char Buffer[4096];
if (xisatty(stdin))
fprintf(stderr, "\nEnter values, 'q' to quit\n");
}
else {
InputRange = 1;
- sprintf(ChannelName, "Channel #%d", i+1);
+ sprintf(ChannelName, "Channel #%u", i+1);
}
GetLine(Buffer, "%s? ", ChannelName);
cmsNamedColorInfo(OutputColorant, i, ChannelName, NULL, NULL, NULL, NULL);
}
else {
- sprintf(ChannelName, "Channel #%d", i + 1);
+ sprintf(ChannelName, "Channel #%u", i + 1);
}
if (Verbose > 0)
if (InputNamedColor) {
- const cmsNAMEDCOLORLIST* NamedColorList;
- int index;
+ const cmsNAMEDCOLORLIST* NamedColorList;
+ int index;
+
+ NamedColorList = cmsGetNamedColorList(hTrans);
+ if (NamedColorList == NULL)
+ FatalError("Malformed named color profile");
- NamedColorList = cmsGetNamedColorList(hTrans);
- if (NamedColorList == NULL)
- FatalError("Malformed named color profile");
-
- index = cmsNamedColorIndex(NamedColorList, CGATSPatch);
- if (index < 0)
+ index = cmsNamedColorIndex(NamedColorList, CGATSPatch);
+ if (index < 0)
FatalError("Named color '%s' not found in the profile", CGATSPatch);
Float[0] = index;
char Buffer[255];
- sprintf(Buffer, "%dCLR_%d", n, i+1);
+ sprintf(Buffer, "%uCLR_%u", n, i+1);
Float[i] = GetIT8Val(Buffer, 100.0);
}
}
- break;
+ break;
default:
{
char Buffer[255];
- sprintf(Buffer, "CHAN_%d", i+1);
+ sprintf(Buffer, "CHAN_%u", i+1);
Float[i] = GetIT8Val(Buffer, 1.0);
}
char Buffer[255];
- sprintf(Buffer, "%dCLR_%d", n, i+1);
+ sprintf(Buffer, "%uCLR_%u", n, i+1);
SetCGATSfld(Buffer, Float[i] * 100.0);
}
}
- break;
+ break;
default:
{
char Buffer[255];
- sprintf(Buffer, "CHAN_%d", i+1);
+ sprintf(Buffer, "CHAN_%u", i+1);
SetCGATSfld(Buffer, Float[i]);
}
case cmsSig13colorData:
case cmsSig14colorData:
case cmsSig15colorData:
- {
- int i, n;
- char Buffer[255];
+ {
+ int i, n;
+ char Buffer[255];
- n = cmsChannelsOf(OutputColorSpace);
- cmsIT8SetPropertyDbl(hIT8out, "NUMBER_OF_FIELDS", n+1);
- cmsIT8SetDataFormat(hIT8out, 0, "SAMPLE_ID");
+ n = cmsChannelsOf(OutputColorSpace);
+ cmsIT8SetPropertyDbl(hIT8out, "NUMBER_OF_FIELDS", n+1);
+ cmsIT8SetDataFormat(hIT8out, 0, "SAMPLE_ID");
- for (i=1; i <= n; i++) {
- sprintf(Buffer, "%dCLR_%d", n, i);
- cmsIT8SetDataFormat(hIT8out, i, Buffer);
- }
- }
- break;
+ for (i=1; i <= n; i++) {
+ sprintf(Buffer, "%dCLR_%d", n, i);
+ cmsIT8SetDataFormat(hIT8out, i, Buffer);
+ }
+ }
+ break;
default: {
int nPatch = 0;
- fprintf(stderr, "LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0);
+ fprintf(stderr, "LittleCMS ColorSpace conversion calculator - 5.0 [LittleCMS %2.2f]\n", LCMS_VERSION / 1000.0);
+ fprintf(stderr, "Copyright (c) 1998-2020 Marti Maria Saguer. See COPYING file for details.\n");
+ fflush(stderr);
InitUtils("transicc");