diff --git a/.github/workflows/freetype.vcxproj b/.github/workflows/freetype.vcxproj
deleted file mode 100644
index d7c0f302fe3..00000000000
--- a/.github/workflows/freetype.vcxproj
+++ /dev/null
@@ -1,1733 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Debug Multithreaded
- Win32
-
-
- Debug Multithreaded
- x64
-
-
- Debug Singlethreaded
- Win32
-
-
- Debug Singlethreaded
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
- Release Multithreaded
- Win32
-
-
- Release Multithreaded
- x64
-
-
- Release Singlethreaded
- Win32
-
-
- Release Singlethreaded
- x64
-
-
-
-
-
- 4.0
-
-
-
- v100
-
-
-
- v120
-
-
-
- v140
-
-
-
- v141
-
-
-
- {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
- 10.0.17763.0
-
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
- StaticLibrary
- false
- MultiByte
-
-
-
-
-
- <_ProjectFileVersion>10.0.30319.1
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- .\..\..\..\objs\vc2010\$(Platform)\
- .\..\..\..\objs\vc2010\$(Platform)\$(Configuration)\
- AllRules.ruleset
- AllRules.ruleset
-
-
-
-
- AllRules.ruleset
- AllRules.ruleset
-
-
-
-
- AllRules.ruleset
- AllRules.ruleset
-
-
-
-
- AllRules.ruleset
- AllRules.ruleset
-
-
-
-
- AllRules.ruleset
- AllRules.ruleset
-
-
-
-
- AllRules.ruleset
- AllRules.ruleset
-
-
-
-
- freetype281d
- freetype281d
- freetype281MTd
- freetype281MTd
- freetype281STd
- freetype281STd
- freetype281
- freetype281
- freetype281MT
- freetype281MT
- freetype281ST
- freetype281ST
-
-
-
-
- Disabled
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- EnableFastChecks
- MultiThreadedDebugDLL
- true
- Level4
- ProgramDatabase
- Default
- 4001
- true
- false
- $(OutDir)$(TargetName).pdb
- Disabled
-
-
- _DEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- MachineX86
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Disabled
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- EnableFastChecks
- MultiThreadedDebugDLL
- true
- Level4
- ProgramDatabase
- Default
- 4001
- true
- false
- $(OutDir)$(TargetName).pdb
- Disabled
-
-
- _DEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- MachineX64
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Disabled
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions)
- false
- false
- EnableFastChecks
- MultiThreadedDebug
- true
- Level4
- ProgramDatabase
- Default
- 4001
- true
- false
- $(OutDir)$(TargetName).pdb
- Disabled
-
-
- _DEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- MachineX86
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Disabled
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;_CRT_SECURE_NO_DEPRECATE;$(UserDefines);%(PreprocessorDefinitions)
- false
- false
- EnableFastChecks
- MultiThreadedDebug
- true
- Level4
- ProgramDatabase
- Default
- 4001
- true
- false
- $(OutDir)$(TargetName).pdb
- Disabled
-
-
- _DEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- MachineX64
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Disabled
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- EnableFastChecks
- MultiThreadedDebug
- true
- Level4
- ProgramDatabase
- Default
- 4001
- true
- false
- $(OutDir)$(TargetName).pdb
- Disabled
-
-
- _DEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- MachineX86
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Disabled
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- _DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- EnableFastChecks
- MultiThreadedDebug
- true
- Level4
- ProgramDatabase
- Default
- 4001
- true
- false
- $(OutDir)$(TargetName).pdb
- Disabled
-
-
- _DEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- MachineX64
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Full
- AnySuitable
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- true
- MultiThreadedDLL
- true
- true
- Level4
- Default
- 4001
- true
- false
- StreamingSIMDExtensions2
- false
- false
- false
-
-
- true
-
-
- true
- Neither
- true
-
-
- NDEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- true
- MachineX86
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Full
- AnySuitable
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- true
- MultiThreadedDLL
- true
- true
- Level4
- Default
- 4001
- true
- false
- StreamingSIMDExtensions2
- false
- false
- false
-
-
- true
-
-
- true
- Neither
- true
-
-
- NDEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- true
- MachineX64
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Full
- AnySuitable
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- true
- MultiThreaded
- true
- true
- Level4
- Default
- 4001
- true
- false
- StreamingSIMDExtensions2
- false
- false
- false
- false
-
-
- true
-
-
- true
- Neither
- true
-
-
- NDEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- true
- MachineX86
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Full
- AnySuitable
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- true
- MultiThreaded
- true
- true
- Level4
- Default
- 4001
- true
- false
- StreamingSIMDExtensions2
- false
- false
- false
- false
-
-
- true
-
-
- true
- Neither
- true
-
-
- NDEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
- true
- true
- MachineX64
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Full
- AnySuitable
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- true
- MultiThreaded
- true
- true
- Level4
- Default
- 4001
- true
- false
- StreamingSIMDExtensions2
- false
- false
- false
-
-
- true
-
-
- true
- Neither
- true
-
-
- NDEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
-
- true
- MachineX86
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
- Full
- AnySuitable
- $(UserOptionDirectory);..\..\..\include;$(UserIncludeDirectories);%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT2_BUILD_LIBRARY;$(UserDefines);%(PreprocessorDefinitions)
- true
- MultiThreaded
- true
- true
- Level4
- Default
- 4001
- true
- false
- StreamingSIMDExtensions2
- false
- false
- false
-
-
- true
-
-
- true
- Neither
- true
-
-
- NDEBUG;$(UserDefines);%(PreprocessorDefinitions)
- 0x0409
-
-
-
- true
- MachineX64
- $(UserLibraryDirectories);%(AdditionalLibraryDirectories)
- $(UserDependencies);%(AdditionalDependencies)
-
-
-
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- false
- false
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- false
- false
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- false
- false
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- false
- false
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- false
- false
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- false
- false
-
-
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
-
-
-
-
-
-
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- Disabled
- Disabled
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- EnableFastChecks
- EnableFastChecks
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
- MaxSpeed
- MaxSpeed
- %(AdditionalIncludeDirectories)
- %(AdditionalIncludeDirectories)
- %(PreprocessorDefinitions)
- %(PreprocessorDefinitions)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml
index 23000e784f4..a21af1172f5 100644
--- a/.github/workflows/submit.yml
+++ b/.github/workflows/submit.yml
@@ -725,13 +725,6 @@ jobs:
with:
path: jdk
- - name: Checkout the FreeType source
- uses: actions/checkout@v4
- with:
- repository: "freetype/freetype"
- ref: VER-2-8-1
- path: freetype
-
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v4
@@ -798,18 +791,11 @@ jobs:
- name: Fix OpenJDK permissions
run: bash -c "chmod -R 0777 jdk"
- - name: Copy FreeType project file
- run: >
- Remove-Item "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ;
- Copy-Item -Path "$env:GITHUB_WORKSPACE\jdk\.github\workflows\freetype.vcxproj"
- -Destination "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ;
-
- name: Configure
run: >
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
- $env:FREETYPE_HOME = "$env:GITHUB_WORKSPACE\freetype" ;
$env:JT_HOME = cygpath "$HOME/jtreg" ;
& bash configure
--with-toolchain-version=2017
@@ -818,7 +804,6 @@ jobs:
--with-user-release-suffix="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
--with-build-number=b00
--with-boot-jdk="$env:BOOT_JDK"
- --with-freetype-src="$env:FREETYPE_HOME"
--with-jtreg="$env:JT_HOME" ;
bash -c "cat $(find -name config.log)"
working-directory: jdk
@@ -906,13 +891,6 @@ jobs:
with:
path: jdk
- - name: Checkout the FreeType source
- uses: actions/checkout@v4
- with:
- repository: "freetype/freetype"
- ref: VER-2-8-1
- path: freetype
-
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v4
@@ -970,18 +948,11 @@ jobs:
- name: Fix OpenJDK permissions
run: bash -c "chmod -R 0777 jdk"
- - name: Copy FreeType project file
- run: >
- Remove-Item "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ;
- Copy-Item -Path "$env:GITHUB_WORKSPACE\jdk\.github\workflows\freetype.vcxproj"
- -Destination "$env:GITHUB_WORKSPACE\freetype\builds\windows\vc2010\freetype.vcxproj" ;
-
- name: Configure
run: >
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
- $env:FREETYPE_HOME = "$env:GITHUB_WORKSPACE\freetype" ;
$env:JT_HOME = cygpath "$HOME/jtreg" ;
& bash configure
--with-conf-name=windows-x86
@@ -992,7 +963,6 @@ jobs:
--with-user-release-suffix="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
--with-build-number=b00
--with-boot-jdk="$env:BOOT_JDK"
- --with-freetype-src="$env:FREETYPE_HOME"
--with-jtreg="$env:JT_HOME" ;
bash -c "cat $(find -name config.log)"
working-directory: jdk
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
index 97fc700d465..d314cd9a531 100644
--- a/THIRD_PARTY_README
+++ b/THIRD_PARTY_README
@@ -1028,6 +1028,552 @@ That's all there is to it!
-------------------------------------------------------------------------------
+%% This notice is provided with respect to Freetype v2.9 which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+## The FreeType Project: Freetype v2.9
+
+
+### FreeType Notice
+
+```
+FreeType comes with two licenses from which you can choose the one
+which fits your needs best.
+
+ The FreeType License (FTL) is the most commonly used one. It is
+ a BSD-style license with a credit clause and thus compatible with
+ the GNU Public License (GPL) version 3, but not with the
+ GPL version 2.
+
+ The GNU General Public License (GPL), version 2. Use it for all
+ projects which use the GPLv2 also, or which need a license
+ compatible to the GPLv2.
+
+```
+
+### FreeType License
+```
+ The FreeType Project LICENSE
+ ----------------------------
+
+ 2006-Jan-27
+
+ Copyright 1996-2002, 2006 by
+ David Turner, Robert Wilhelm, and Werner Lemberg
+
+
+
+Introduction
+============
+
+ The FreeType Project is distributed in several archive packages;
+ some of them may contain, in addition to the FreeType font engine,
+ various tools and contributions which rely on, or relate to, the
+ FreeType Project.
+
+ This license applies to all files found in such packages, and
+ which do not fall under their own explicit license. The license
+ affects thus the FreeType font engine, the test programs,
+ documentation and makefiles, at the very least.
+
+ This license was inspired by the BSD, Artistic, and IJG
+ (Independent JPEG Group) licenses, which all encourage inclusion
+ and use of free software in commercial and freeware products
+ alike. As a consequence, its main points are that:
+
+ o We don't promise that this software works. However, we will be
+ interested in any kind of bug reports. (`as is' distribution)
+
+ o You can use this software for whatever you want, in parts or
+ full form, without having to pay us. (`royalty-free' usage)
+
+ o You may not pretend that you wrote this software. If you use
+ it, or only parts of it, in a program, you must acknowledge
+ somewhere in your documentation that you have used the
+ FreeType code. (`credits')
+
+ We specifically permit and encourage the inclusion of this
+ software, with or without modifications, in commercial products.
+ We disclaim all warranties covering The FreeType Project and
+ assume no liability related to The FreeType Project.
+
+
+ Finally, many people asked us for a preferred form for a
+ credit/disclaimer to use in compliance with this license. We thus
+ encourage you to use the following text:
+
+ """
+ Portions of this software are copyright © The FreeType
+ Project (www.freetype.org). All rights reserved.
+ """
+
+ Please replace with the value from the FreeType version you
+ actually use.
+
+
+Legal Terms
+===========
+
+0. Definitions
+--------------
+
+ Throughout this license, the terms `package', `FreeType Project',
+ and `FreeType archive' refer to the set of files originally
+ distributed by the authors (David Turner, Robert Wilhelm, and
+ Werner Lemberg) as the `FreeType Project', be they named as alpha,
+ beta or final release.
+
+ `You' refers to the licensee, or person using the project, where
+ `using' is a generic term including compiling the project's source
+ code as well as linking it to form a `program' or `executable'.
+ This program is referred to as `a program using the FreeType
+ engine'.
+
+ This license applies to all files distributed in the original
+ FreeType Project, including all source code, binaries and
+ documentation, unless otherwise stated in the file in its
+ original, unmodified form as distributed in the original archive.
+ If you are unsure whether or not a particular file is covered by
+ this license, you must contact us to verify this.
+
+ The FreeType Project is copyright (C) 1996-2000 by David Turner,
+ Robert Wilhelm, and Werner Lemberg. All rights reserved except as
+ specified below.
+
+1. No Warranty
+--------------
+
+ THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
+ BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
+ USE, OF THE FREETYPE PROJECT.
+
+2. Redistribution
+-----------------
+
+ This license grants a worldwide, royalty-free, perpetual and
+ irrevocable right and license to use, execute, perform, compile,
+ display, copy, create derivative works of, distribute and
+ sublicense the FreeType Project (in both source and object code
+ forms) and derivative works thereof for any purpose; and to
+ authorize others to exercise some or all of the rights granted
+ herein, subject to the following conditions:
+
+ o Redistribution of source code must retain this license file
+ (`FTL.TXT') unaltered; any additions, deletions or changes to
+ the original files must be clearly indicated in accompanying
+ documentation. The copyright notices of the unaltered,
+ original files must be preserved in all copies of source
+ files.
+
+ o Redistribution in binary form must provide a disclaimer that
+ states that the software is based in part of the work of the
+ FreeType Team, in the distribution documentation. We also
+ encourage you to put an URL to the FreeType web page in your
+ documentation, though this isn't mandatory.
+
+ These conditions apply to any software derived from or based on
+ the FreeType Project, not just the unmodified files. If you use
+ our work, you must acknowledge us. However, no fee need be paid
+ to us.
+
+3. Advertising
+--------------
+
+ Neither the FreeType authors and contributors nor you shall use
+ the name of the other for commercial, advertising, or promotional
+ purposes without specific prior written permission.
+
+ We suggest, but do not require, that you use one or more of the
+ following phrases to refer to this software in your documentation
+ or advertising materials: `FreeType Project', `FreeType Engine',
+ `FreeType library', or `FreeType Distribution'.
+
+ As you have not signed this license, you are not required to
+ accept it. However, as the FreeType Project is copyrighted
+ material, only this license, or another one contracted with the
+ authors, grants you the right to use, distribute, and modify it.
+ Therefore, by using, distributing, or modifying the FreeType
+ Project, you indicate that you understand and accept all the terms
+ of this license.
+
+4. Contacts
+-----------
+
+ There are two mailing lists related to FreeType:
+
+ o freetype@nongnu.org
+
+ Discusses general use and applications of FreeType, as well as
+ future and wanted additions to the library and distribution.
+ If you are looking for support, start in this list if you
+ haven't found anything to help you in the documentation.
+
+ o freetype-devel@nongnu.org
+
+ Discusses bugs, as well as engine internals, design issues,
+ specific licenses, porting, etc.
+
+ Our home page can be found at
+
+ http://www.freetype.org
+
+```
+
+### GPL v2
+
+```
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) 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
+this service 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 make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. 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.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+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
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the 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 a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE 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.
+
+ 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
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision 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, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This 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 Library General
+Public License instead of this License.
+
+```
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
%% This notice is provided with respect to ECMAScript Language
Specification ECMA-262 Edition 5.1 which may be included with
JRE 8, JDK 8, and OpenJDK 8.
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index ad3f7f232ea..0541d07f74e 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -661,7 +661,7 @@ USE_EXTERNAL_LIBJPEG
FONTCONFIG_CFLAGS
ALSA_LIBS
ALSA_CFLAGS
-FREETYPE_BUNDLE_LIB_PATH
+FREETYPE_TO_USE
FREETYPE_LIBS
FREETYPE_CFLAGS
CUPS_CFLAGS
@@ -1021,6 +1021,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -1107,8 +1108,6 @@ with_cups_include
with_freetype
with_freetype_include
with_freetype_lib
-with_freetype_src
-enable_freetype_bundling
with_alsa
with_alsa_include
with_alsa_lib
@@ -1266,6 +1265,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1518,6 +1518,15 @@ do
| -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=* \
@@ -1655,7 +1664,7 @@ fi
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.
@@ -1808,6 +1817,7 @@ Fine tuning of the installation directories:
--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]
@@ -1863,10 +1873,6 @@ Optional Features:
--enable-macosx-runtime-support
Deprecated. Option is kept for backwards
compatibility and is ignored
- --disable-freetype-bundling
- disable bundling of the freetype library with the
- build result [enabled on Windows or when using
- --with-freetype, disabled otherwise]
--enable-sjavac use sjavac to do fast incremental compiles
[disabled]
--disable-precompiled-headers
@@ -1971,14 +1977,15 @@ Optional Packages:
--with-cups specify prefix directory for the cups package
(expecting the headers under PATH/include)
--with-cups-include specify directory for the cups include files
- --with-freetype specify prefix directory for the freetype package
- (expecting the libraries under PATH/lib and the
- headers under PATH/include)
+ --with-freetype specify whether to use 'system' or 'bundled'
+ freetype. The selected option applies to both build
+ time and run time. The default behaviour can be
+ platform dependent. If using 'system' and either the
+ include files or libraries cannot be located
+ automatically, then additionally specify both using
+ --with-freetype-include and --with-freetype-lib.
--with-freetype-include specify directory for the freetype include files
--with-freetype-lib specify directory for the freetype library
- --with-freetype-src specify directory with freetype sources to
- automatically build the library (experimental,
- Windows-only)
--with-alsa specify prefix directory for the alsa package
(expecting the libraries under PATH/lib and the
headers under PATH/include)
@@ -2566,7 +2573,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
-main (void)
+main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
@@ -2583,7 +2590,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then :
/* end confdefs.h. */
$4
int
-main (void)
+main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2610,7 +2617,7 @@ else
/* end confdefs.h. */
$4
int
-main (void)
+main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
@@ -2627,7 +2634,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then :
/* end confdefs.h. */
$4
int
-main (void)
+main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
@@ -2662,7 +2669,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
/* end confdefs.h. */
$4
int
-main (void)
+main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
@@ -2687,12 +2694,12 @@ esac
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
-static long int longval (void) { return $2; }
-static unsigned long int ulongval (void) { return $2; }
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
#include
#include
int
-main (void)
+main ()
{
FILE *f = fopen ("conftest.val", "w");
@@ -2799,7 +2806,7 @@ else
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (void); below.
+ which can conflict with char $2 (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
@@ -2817,7 +2824,7 @@ else
#ifdef __cplusplus
extern "C"
#endif
-char $2 (void);
+char $2 ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
@@ -2826,7 +2833,7 @@ choke me
#endif
int
-main (void)
+main ()
{
return $2 ();
;
@@ -3845,20 +3852,6 @@ cygwin_help() {
PKGHANDLER_COMMAND="( cd && cmd /c setup -q -P make )"
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
;;
- freetype)
- HELP_MSG="
-The freetype library can now be build during the configure process.
-Download the freetype sources and unpack them into an arbitrary directory:
-
-wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
-tar -xzf freetype-2.5.3.tar.gz
-
-Then run configure with '--with-freetype-src='. This will
-automatically build the freetype library into '/lib64' for 64-bit
-builds or into '/lib32' for 32-bit builds.
-Afterwards you can always use '--with-freetype-include=/include'
-and '--with-freetype-lib=/lib32|64' for other builds."
- ;;
esac
}
@@ -4035,8 +4028,6 @@ fi
-
-
################################################################################
# Setup fontconfig
################################################################################
@@ -4432,7 +4423,7 @@ VS_TOOLSET_SUPPORTED_2022=true
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1716396030
+DATE_WHEN_GENERATED=1723798372
###############################################################################
#
@@ -25373,7 +25364,7 @@ $as_echo "$BOOT_JDK_VERSION" >&6; }
if test "x$BOOT_JDK_FOUND" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # openjdk is the help tag: freetype, cups, pulse, alsa etc
+ # openjdk is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=openjdk
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -27831,7 +27822,7 @@ done
if test "x$CC" = x; then
# Print a helpful message on how to acquire the necessary build dependency.
- # devkit is the help tag: freetype, cups, pulse, alsa etc
+ # devkit is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=devkit
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -28926,7 +28917,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -29066,7 +29057,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include
int
-main (void)
+main ()
{
FILE *f = fopen ("conftest.out", "w");
return ferror (f) || fclose (f) != 0;
@@ -29130,7 +29121,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -29181,7 +29172,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
#ifndef __GNUC__
choke me
@@ -29222,7 +29213,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -29237,7 +29228,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -29253,7 +29244,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -29302,7 +29293,9 @@ 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);
-static char *e (char **p, int i)
+static char *e (p, i)
+ char **p;
+ int i;
{
return p[i];
}
@@ -29337,7 +29330,7 @@ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, i
int argc;
char **argv;
int
-main (void)
+main ()
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
@@ -29570,7 +29563,7 @@ done
if test "x$CXX" = x; then
# Print a helpful message on how to acquire the necessary build dependency.
- # devkit is the help tag: freetype, cups, pulse, alsa etc
+ # devkit is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=devkit
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -30670,7 +30663,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
#ifndef __GNUC__
choke me
@@ -30711,7 +30704,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -30726,7 +30719,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -30742,7 +30735,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -33255,7 +33248,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
#ifndef __GNUC__
choke me
@@ -33296,7 +33289,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -33311,7 +33304,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -33327,7 +33320,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -41873,7 +41866,7 @@ else
#include
int
-main (void)
+main ()
{
;
@@ -41943,7 +41936,7 @@ else
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
-main (void)
+main ()
{
int i;
for (i = 0; i < 256; i++)
@@ -42241,7 +42234,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include
int
-main (void)
+main ()
{
#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
&& defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
@@ -42261,7 +42254,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then :
#include
int
-main (void)
+main ()
{
#if BYTE_ORDER != BIG_ENDIAN
not big endian
@@ -42287,7 +42280,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#include
int
-main (void)
+main ()
{
#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
bogus endian macros
@@ -42304,7 +42297,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then :
#include
int
-main (void)
+main ()
{
#ifndef _BIG_ENDIAN
not big endian
@@ -42346,7 +42339,7 @@ short int ascii_mm[] =
extern int foo;
int
-main (void)
+main ()
{
return use_ascii (foo) == use_ebcdic (foo);
;
@@ -42372,7 +42365,7 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-main (void)
+main ()
{
/* Are we little or big endian? From Harbison&Steele. */
@@ -44215,7 +44208,7 @@ if test "$ac_x_libraries" = no; then
/* end confdefs.h. */
#include
int
-main (void)
+main ()
{
XrmInitialize ()
;
@@ -44301,7 +44294,7 @@ $as_echo_n "checking whether -R must be followed by a space... " >&6; }
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -44318,7 +44311,7 @@ else
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
@@ -44362,9 +44355,9 @@ rm -f core conftest.err conftest.$ac_objext \
#ifdef __cplusplus
extern "C"
#endif
-char XOpenDisplay (void);
+char XOpenDisplay ();
int
-main (void)
+main ()
{
return XOpenDisplay ();
;
@@ -44390,9 +44383,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char dnet_ntoa (void);
+char dnet_ntoa ();
int
-main (void)
+main ()
{
return dnet_ntoa ();
;
@@ -44431,9 +44424,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char dnet_ntoa (void);
+char dnet_ntoa ();
int
-main (void)
+main ()
{
return dnet_ntoa ();
;
@@ -44491,9 +44484,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char gethostbyname (void);
+char gethostbyname ();
int
-main (void)
+main ()
{
return gethostbyname ();
;
@@ -44532,9 +44525,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char gethostbyname (void);
+char gethostbyname ();
int
-main (void)
+main ()
{
return gethostbyname ();
;
@@ -44588,9 +44581,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char connect (void);
+char connect ();
int
-main (void)
+main ()
{
return connect ();
;
@@ -44637,9 +44630,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char remove (void);
+char remove ();
int
-main (void)
+main ()
{
return remove ();
;
@@ -44686,9 +44679,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char shmat (void);
+char shmat ();
int
-main (void)
+main ()
{
return shmat ();
;
@@ -44738,9 +44731,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char IceConnectionNumber (void);
+char IceConnectionNumber ();
int
-main (void)
+main ()
{
return IceConnectionNumber ();
;
@@ -44776,7 +44769,7 @@ fi
if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
# Print a helpful message on how to acquire the necessary build dependency.
- # x11 is the help tag: freetype, cups, pulse, alsa etc
+ # x11 is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=x11
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -44870,7 +44863,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
# Print a helpful message on how to acquire the necessary build dependency.
- # x11 is the help tag: freetype, cups, pulse, alsa etc
+ # x11 is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=x11
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -45130,7 +45123,7 @@ $as_echo "$CUPS_FOUND" >&6; }
if test "x$CUPS_FOUND" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # cups is the help tag: freetype, cups, pulse, alsa etc
+ # cups is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=cups
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -45167,11 +45160,6 @@ $as_echo "$CUPS_FOUND" >&6; }
- ###############################################################################
- #
- # The ubiquitous freetype library is used to render fonts.
- #
-
# Check whether --with-freetype was given.
if test "${with_freetype+set}" = set; then :
withval=$with_freetype;
@@ -45190,453 +45178,518 @@ if test "${with_freetype_lib+set}" = set; then :
fi
-# Check whether --with-freetype-src was given.
-if test "${with_freetype_src+set}" = set; then :
- withval=$with_freetype_src;
-fi
-
- # Check whether --enable-freetype-bundling was given.
-if test "${enable_freetype_bundling+set}" = set; then :
- enableval=$enable_freetype_bundling;
-fi
-
-
+ # This setup is to verify access to system installed freetype header and
+ # libraries. On Windows and MacOS this does not apply and using these options
+ # will report an error. On other platforms they will default to using the
+ # system libraries. If they are found automatically, nothing need be done.
+ # If they are not found, the configure "--with-freetype-*" options may be
+ # used to fix that. If the preference is to bundle on these platforms then
+ # use --with-freetype=bundled.
+ FREETYPE_BASE_NAME=freetype
FREETYPE_CFLAGS=
FREETYPE_LIBS=
- FREETYPE_BUNDLE_LIB_PATH=
-
- if test "x$FREETYPE_NOT_NEEDED" = xyes; then
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
-$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
- fi
- if test "x$enable_freetype_bundling" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
-$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
+ if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
+ (test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
+ as_fn_error $? "Must specify both or neither of --with-freetype-include and --with-freetype-lib" "$LINENO" 5
+ fi
+ FREETYPE_TO_USE=bundled
+ if test "x$OPENJDK_TARGET_OS" != "xwindows" && \
+ test "x$OPENJDK_TARGET_OS" != "xmacosx" && \
+ test "x$OPENJDK_TARGET_OS" != "xaix"; then
+ FREETYPE_TO_USE=system
+ fi
+ if test "x$with_freetype" != "x" ; then
+ if test "x$with_freetype" = "xsystem" ; then
+ FREETYPE_TO_USE=system
+ elif test "x$with_freetype" = "xbundled" ; then
+ FREETYPE_TO_USE=bundled
+ if test "x$with_freetype_include" != "x" || \
+ test "x$with_freetype_lib" != "x" ; then
+ as_fn_error $? "'bundled' cannot be specified with --with-freetype-include and --with-freetype-lib" "$LINENO" 5
+ fi
+ else
+ as_fn_error $? "Valid values for --with-freetype are 'system' and 'bundled'" "$LINENO" 5
fi
- else
- # freetype is needed to build; go get it!
-
- BUNDLE_FREETYPE="$enable_freetype_bundling"
-
- if test "x$with_freetype_src" != x; then
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # Try to build freetype if --with-freetype-src was given on Windows
+ fi
- FREETYPE_SRC_PATH="$with_freetype_src"
- BUILD_FREETYPE=yes
+ if test "x$with_freetype_include" != "x" && \
+ test "x$with_freetype_lib" != "x" ; then
+ FREETYPE_TO_USE=system
+ fi
- # Check if the freetype sources are acessible..
- if ! test -d $FREETYPE_SRC_PATH; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
- BUILD_FREETYPE=no
+ if test "x$FREETYPE_TO_USE" = "xsystem" && \
+ (test "x$OPENJDK_TARGET_OS" = "xwindows" || \
+ test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
+ as_fn_error $? "Only bundled freetype can be specified on Mac and Windows" "$LINENO" 5
fi
- # ..and contain a vc2010 project file
- vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
- if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
- BUILD_FREETYPE=no
+
+ if test "x$with_freetype_include" != "x" ; then
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
fi
- # Now check if configure found a version of 'msbuild.exe'
- if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
-$as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
- BUILD_FREETYPE=no
+ if test "x$with_freetype_lib" != "x" ; then
+ POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
fi
- # Ready to go..
- if test "x$BUILD_FREETYPE" = xyes; then
+ if test "x$FREETYPE_TO_USE" = "xsystem" ; then
+ if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != "x" && \
+ test "x$POTENTIAL_FREETYPE_LIB_PATH" != "x" ; then
+ # Okay, we got it. Check that it works.
- # msbuild requires trailing slashes for output directories
- freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
- freetype_lib_path_unix="$freetype_lib_path"
- freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ METHOD="--with-freetype"
- unix_path="$vcxproj_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- windows_path=`$CYGPATH -m "$unix_path"`
- vcxproj_path="$windows_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- windows_path=`cmd //c echo $unix_path`
- vcxproj_path="$windows_path"
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
fi
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
- unix_path="$freetype_lib_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- windows_path=`$CYGPATH -m "$unix_path"`
- freetype_lib_path="$windows_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- windows_path=`cmd //c echo $unix_path`
- freetype_lib_path="$windows_path"
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
+ fi
fi
-
- unix_path="$freetype_obj_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- windows_path=`$CYGPATH -m "$unix_path"`
- freetype_obj_path="$windows_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- windows_path=`cmd //c echo $unix_path`
- freetype_obj_path="$windows_path"
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- freetype_platform=x64
- else
- freetype_platform=win32
- fi
-
- # The original freetype project file is for VS 2010 (i.e. 'v100'),
- # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
- # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
- # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
- { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
-$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
-
- # First we try to build the freetype.dll
- $ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=DynamicLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
- cmd /c freetype.bat
-
- if test -s "$freetype_lib_path_unix/freetype.dll"; then
- # If that succeeds we also build freetype.lib
- $ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=StaticLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
- cmd /c freetype.bat
-
- if test -s "$freetype_lib_path_unix/freetype.lib"; then
- # Once we build both, lib and dll, set freetype lib and include path appropriately
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
- POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
-$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
- else
- BUILD_FREETYPE=no
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ as_fn_error $? "Can not find or use freetype at location given by --with-freetype-lib|include" "$LINENO" 5
fi
else
- BUILD_FREETYPE=no
- fi
- fi
+ # User did not specify a location, but asked for system freetype.
+ # Try to locate it.
+ # If we have a sysroot, assume that's where we are supposed to look and
+ # skip pkg-config.
+ if test "x$SYSROOT" = "x" ; then
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ # Check modules using pkg-config, but only if we have it (ugly output
+ # results otherwise)
+ if test "x$PKG_CONFIG" != "x" ; then
- if test "x$BUILD_FREETYPE" = xyes; then
- # Okay, we built it. Check that it works.
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
+$as_echo_n "checking for FREETYPE... " >&6; }
- POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- METHOD="--with-freetype-src"
+if test -n "$FREETYPE_CFLAGS"; then
+ pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$FREETYPE_LIBS"; then
+ pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
+ else
+ FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$FREETYPE_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ FOUND_FREETYPE=no
+elif test $pkg_failed = untried; then
+ FOUND_FREETYPE=no
+else
+ FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
+ FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ FOUND_FREETYPE=yes
+fi
+ if test "x$FOUND_FREETYPE" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
+$as_echo_n "checking for freetype... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
+$as_echo "yes (using pkg-config)" >&6; }
+ fi
+ fi
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ # Check in well-known locations
+ FREETYPE_BASE_DIR="$SYSROOT/usr"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" ; then
+
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
+ METHOD="well-known location"
+
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
FOUND_FREETYPE=yes
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
fi
fi
- if test "x$FOUND_FREETYPE" = xyes; then
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
+ fi
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
+ METHOD="well-known location"
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
fi
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
fi
fi
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
+ fi
+ else
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
+ METHOD="well-known location"
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
fi
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
+ fi
fi
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
+ METHOD="well-known location"
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
fi
+ fi
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
+
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
fi
+ fi
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
+ fi
+ fi
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
+ METHOD="well-known location"
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
fi
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
fi
fi
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
+ fi
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
+ METHOD="well-known location"
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
fi
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
+ fi
fi
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
+ fi
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
+ METHOD="well-known location"
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
fi
+ fi
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
+ fi
fi
-
+ if test "x$FOUND_FREETYPE" = "xyes"; then
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
@@ -45649,3166 +45702,92 @@ $as_echo_n "checking for freetype libraries... " >&6; }
$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
- if test "x$FOUND_FREETYPE" != xyes; then
- as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
-$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
- as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
-$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
- fi
- fi
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
- # User has specified settings
-
- if test "x$BUNDLE_FREETYPE" = x; then
- # If not specified, default is to bundle freetype
- BUNDLE_FREETYPE=yes
- fi
-
- if test "x$with_freetype" != x; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
- POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
- fi
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
- # Allow --with-freetype-lib and --with-freetype-include to override
- if test "x$with_freetype_include" != x; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
- fi
- if test "x$with_freetype_lib" != x; then
- POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
- fi
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
+ METHOD="well-known location"
- if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
- # Okay, we got it. Check that it works.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
- POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- METHOD="--with-freetype"
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
FOUND_FREETYPE=yes
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
fi
fi
- if test "x$FOUND_FREETYPE" = xyes; then
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
+$as_echo_n "checking for freetype includes... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
+$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
+ FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
+$as_echo_n "checking for freetype libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
+$as_echo "$FREETYPE_LIB_PATH" >&6; }
+ fi
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ fi
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ FREETYPE_BASE_DIR="$SYSROOT/usr/local"
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
- fi
- else
- # User specified only one of lib or include. This is an error.
- if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
-$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
- as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
-$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
- as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
- fi
- fi
- else
- # User did not specify settings, but we need freetype. Try to locate it.
-
- if test "x$BUNDLE_FREETYPE" = x; then
- # If not specified, default is to bundle freetype only on windows
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- BUNDLE_FREETYPE=yes
- else
- BUNDLE_FREETYPE=no
- fi
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check builddeps
-
-
- if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
- # Source the builddeps file again, to make sure it uses the latest variables!
- . $builddepsfile
- # Look for a target and build machine specific resource!
- eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
- if test "x$resource" = x; then
- # Ok, lets instead look for a target specific resource
- eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a build specific resource
- eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
- fi
- if test "x$resource" = x; then
- # Ok, lets instead look for a generic resource
- # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
- resource=${builddep_freetype2}
- fi
- if test "x$resource" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
-$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
- # If the resource in the builddeps.conf file is an existing directory,
- # for example /java/linux/cups
- if test -d ${resource}; then
- depdir=${resource}
- else
-
- # freetype2 is for example mymodule
- # $resource is for example libs/general/libmymod_1_2_3.zip
- # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
- # $with_builddeps_dir is for example /localhome/builddeps
- # depdir is the name of the variable into which we store the depdir, eg MYMOD
- # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
- # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
- filename=`basename $resource`
- filebase=`echo $filename | sed 's/\.[^\.]*$//'`
- filebase=${filename%%.*}
- extension=${filename#*.}
- installdir=$with_builddeps_dir/$filebase
- if test ! -f $installdir/$filename.unpacked; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
-$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
- if test ! -d $installdir; then
- mkdir -p $installdir
- fi
- if test ! -d $installdir; then
- as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
- fi
- tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
- touch $tmpfile
- if test ! -f $tmpfile; then
- as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
- fi
-
- # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
- # $tmpfile is the local file name for the downloaded file.
- VALID_TOOL=no
- if test "x$BDEPS_FTP" = xwget; then
- VALID_TOOL=yes
- wget -O $tmpfile $with_builddeps_server/$resource
- fi
- if test "x$BDEPS_FTP" = xlftp; then
- VALID_TOOL=yes
- lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
- fi
- if test "x$BDEPS_FTP" = xftp; then
- VALID_TOOL=yes
- FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
- FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
- FTPUSERPWD=${FTPSERVER%%@*}
- if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
- FTPUSER=${userpwd%%:*}
- FTPPWD=${userpwd#*@}
- FTPSERVER=${FTPSERVER#*@}
- else
- FTPUSER=ftp
- FTPPWD=ftp
- fi
- # the "pass" command does not work on some
- # ftp clients (read ftp.exe) but if it works,
- # passive mode is better!
- ( \
- echo "user $FTPUSER $FTPPWD" ; \
- echo "pass" ; \
- echo "bin" ; \
- echo "get $FTPPATH $tmpfile" ; \
- ) | ftp -in $FTPSERVER
- fi
- if test "x$VALID_TOOL" != xyes; then
- as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
- fi
-
- mv $tmpfile $installdir/$filename
- if test ! -s $installdir/$filename; then
- as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
- fi
- case "$extension" in
- zip) echo "Unzipping $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
- ;;
- tar.gz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- tgz) echo "Untaring $installdir/$filename..."
- (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
- ;;
- *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
- ;;
- esac
- fi
- if test -f $installdir/$filename.unpacked; then
- depdir=$installdir
- fi
-
- fi
- # Source the builddeps file again, because in the previous command, the depdir
- # was updated to point at the current build dependency install directory.
- . $builddepsfile
- # Now extract variables from the builddeps.conf files.
- theroot=${builddep_freetype2_ROOT}
- thecflags=${builddep_freetype2_CFLAGS}
- thelibs=${builddep_freetype2_LIBS}
- if test "x$depdir" = x; then
- as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
- fi
- FREETYPE=$depdir
- if test "x$theroot" != x; then
- FREETYPE="$theroot"
- fi
- if test "x$thecflags" != x; then
- FREETYPE_CFLAGS="$thecflags"
- fi
- if test "x$thelibs" != x; then
- FREETYPE_LIBS="$thelibs"
- fi
- FOUND_FREETYPE=yes
- else FOUND_FREETYPE=no
-
- fi
- else FOUND_FREETYPE=no
-
- fi
-
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
- if test "x$FOUND_FREETYPE" = xyes; then
- if test "x$BUNDLE_FREETYPE" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
-$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
- FOUND_FREETYPE=no
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
-$as_echo_n "checking for freetype... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
-$as_echo "yes (using builddeps)" >&6; }
- fi
- fi
- fi
-
- # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
- if test "x$SYSROOT" = x; then
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
- if test "x$PKG_CONFIG" != x; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
-$as_echo_n "checking for FREETYPE... " >&6; }
-
-if test -n "$FREETYPE_CFLAGS"; then
- pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$FREETYPE_LIBS"; then
- pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
- ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
- else
- FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$FREETYPE_PKG_ERRORS" >&5
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- FOUND_FREETYPE=no
-elif test $pkg_failed = untried; then
- FOUND_FREETYPE=no
-else
- FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
- FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- FOUND_FREETYPE=yes
-fi
- if test "x$FOUND_FREETYPE" = xyes; then
- # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
- FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
- # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
- if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
- fi
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
- if test "x$BUNDLE_FREETYPE" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
-$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
- FOUND_FREETYPE=no
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
-$as_echo_n "checking for freetype... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
-$as_echo "yes (using pkg-config)" >&6; }
- fi
- fi
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check in well-known locations
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
-
- windows_path="$FREETYPE_BASE_DIR"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- FREETYPE_BASE_DIR="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- FREETYPE_BASE_DIR="$unix_path"
- fi
-
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
-
- windows_path="$FREETYPE_BASE_DIR"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- FREETYPE_BASE_DIR="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- FREETYPE_BASE_DIR="$unix_path"
- fi
-
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
- fi
- else
- FREETYPE_BASE_DIR="$SYSROOT/usr"
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr"
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
- else
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
-$as_echo_n "checking for freetype includes... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
-$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
- FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
-$as_echo_n "checking for freetype libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
-$as_echo "$FREETYPE_LIB_PATH" >&6; }
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
- POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
- METHOD="well-known location"
-
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
- { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
-$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
- FOUND_FREETYPE=yes
-
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
-$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
- fi
- fi
-
- if test "x$FOUND_FREETYPE" = xyes; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
+ POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
+ METHOD="well-known location"
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
fi
fi
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
+$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
+ FOUND_FREETYPE=yes
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- POTENTIAL_FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$POTENTIAL_FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
+ if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
+$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
+ FOUND_FREETYPE=no
fi
-
- POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
fi
-
+ if test "x$FOUND_FREETYPE" = "xyes"; then
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
@@ -48821,16 +45800,13 @@ $as_echo_n "checking for freetype libraries... " >&6; }
$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
- fi
- fi
- fi
fi
fi # end check in well-known locations
- if test "x$FOUND_FREETYPE" != xyes; then
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
# Print a helpful message on how to acquire the necessary build dependency.
- # freetype is the help tag: freetype, cups, pulse, alsa etc
+ # freetype is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=freetype
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -48863,384 +45839,21 @@ $as_echo "$FREETYPE_LIB_PATH" >&6; }
fi # end user specified settings
# Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
- if test "x$FREETYPE_CFLAGS" = x; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$FREETYPE_INCLUDE_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$FREETYPE_INCLUDE_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- FREETYPE_INCLUDE_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$FREETYPE_INCLUDE_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
- if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
+ if test "x$FREETYPE_CFLAGS" = "x" ; then
+ if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype ; then
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
else
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
fi
fi
- if test "x$FREETYPE_LIBS" = x; then
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="$FREETYPE_LIB_PATH"
- new_path=`$CYGPATH -u "$path"`
-
- # preserve original basename
- original_basename=`$BASENAME "${new_path}"`
-
- # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
- # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
- fi
-
- # Call helper function which possibly converts this using DOS-style short mode.
- # If so, the updated path is stored in $new_path.
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-
-
- # get basename after fixup
- fixed_basename=`$BASENAME "${new_path}"`
-
- # if basename changed replace it with original value
- if test "x$original_basename" != "x$fixed_basename"; then
- new_path=`echo "${new_path}" | sed "s/${fixed_basename}$/${original_basename}/g"`
- fi
-
- if test "x$path" != "x$new_path"; then
- FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
-
- path="$FREETYPE_LIB_PATH"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
-
- input_path="$new_path"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use [ and ] instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-
-
- windows_path="$new_path"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- new_path="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- new_path="$unix_path"
- fi
-
- if test "x$path" != "x$new_path"; then
- FREETYPE_LIB_PATH="$new_path"
- { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
-$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
-
- else
- # We're on a posix platform. Hooray! :)
- path="$FREETYPE_LIB_PATH"
- has_space=`$ECHO "$path" | $GREP " "`
- if test "x$has_space" != x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
-$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
- as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
- fi
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
- fi
-
- FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
- fi
-
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
- else
- FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
- fi
- fi
-
- # Try to compile it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
-$as_echo_n "checking if we can compile and link with freetype... " >&6; }
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- PREV_CXXCFLAGS="$CXXFLAGS"
- PREV_LIBS="$LIBS"
- PREV_CXX="$CXX"
- CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
- LIBS="$LIBS $FREETYPE_LIBS"
- CXX="$FIXPATH $CXX"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include
- #include FT_FREETYPE_H
- int main () {
- FT_Init_FreeType(NULL);
- return 0;
- }
-
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
-$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
-$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
-
-
- # Print a helpful message on how to acquire the necessary build dependency.
- # freetype is the help tag: freetype, cups, pulse, alsa etc
- MISSING_DEPENDENCY=freetype
-
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- cygwin_help $MISSING_DEPENDENCY
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- msys_help $MISSING_DEPENDENCY
- else
- PKGHANDLER_COMMAND=
-
- case $PKGHANDLER in
- apt-get)
- apt_help $MISSING_DEPENDENCY ;;
- yum)
- yum_help $MISSING_DEPENDENCY ;;
- port)
- port_help $MISSING_DEPENDENCY ;;
- pkgutil)
- pkgutil_help $MISSING_DEPENDENCY ;;
- pkgadd)
- pkgadd_help $MISSING_DEPENDENCY ;;
- esac
-
- if test "x$PKGHANDLER_COMMAND" != x; then
- HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ if test "x$FREETYPE_LIBS" = "x" ; then
+ FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
fi
fi
-
- as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CXXCFLAGS="$PREV_CXXFLAGS"
- LIBS="$PREV_LIBS"
- CXX="$PREV_CXX"
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
-$as_echo_n "checking if we should bundle freetype... " >&6; }
- if test "x$BUNDLE_FREETYPE" = xyes; then
- FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
-$as_echo "$BUNDLE_FREETYPE" >&6; }
-
- fi # end freetype needed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using freetype: $FREETYPE_TO_USE" >&5
+$as_echo "Using freetype: $FREETYPE_TO_USE" >&6; }
@@ -49541,7 +46154,7 @@ done
if test "x$ALSA_FOUND" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # alsa is the help tag: freetype, cups, pulse, alsa etc
+ # alsa is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=alsa
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -49650,7 +46263,7 @@ done
if test "x$FONTCONFIG_FOUND" = xno; then
# Print a helpful message on how to acquire the necessary build dependency.
- # fontconfig is the help tag: freetype, cups, pulse, alsa etc
+ # fontconfig is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=fontconfig
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -49704,7 +46317,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
int
-main (void)
+main ()
{
return main ();
;
@@ -49794,9 +46407,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char DGifGetCode (void);
+char DGifGetCode ();
int
-main (void)
+main ()
{
return DGifGetCode ();
;
@@ -49860,9 +46473,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char compress (void);
+char compress ();
int
-main (void)
+main ()
{
return compress ();
;
@@ -49946,7 +46559,7 @@ $as_echo "system not found" >&6; }
/* end confdefs.h. */
#include
int
-main (void)
+main ()
{
return (int)altzone;
;
@@ -49987,9 +46600,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char cos (void);
+char cos ();
int
-main (void)
+main ()
{
return cos ();
;
@@ -50046,9 +46659,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char dlopen (void);
+char dlopen ();
int
-main (void)
+main ()
{
return dlopen ();
;
@@ -50116,7 +46729,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
/* end confdefs.h. */
int
-main (void)
+main ()
{
return 0;
;
@@ -50158,7 +46771,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
/* end confdefs.h. */
int
-main (void)
+main ()
{
return 0;
;
@@ -55949,7 +52562,7 @@ $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6;
/* end confdefs.h. */
int
-main (void)
+main ()
{
;
diff --git a/common/autoconf/help.m4 b/common/autoconf/help.m4
index 4b752f64c24..e4c1964797e 100644
--- a/common/autoconf/help.m4
+++ b/common/autoconf/help.m4
@@ -31,7 +31,7 @@ AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
[
# Print a helpful message on how to acquire the necessary build dependency.
- # $1 is the help tag: freetype, cups, pulse, alsa etc
+ # $1 is the help tag: cups, pulse, alsa etc
MISSING_DEPENDENCY=$1
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
@@ -74,20 +74,6 @@ cygwin_help() {
PKGHANDLER_COMMAND="( cd && cmd /c setup -q -P make )"
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
;;
- freetype)
- HELP_MSG="
-The freetype library can now be build during the configure process.
-Download the freetype sources and unpack them into an arbitrary directory:
-
-wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
-tar -xzf freetype-2.5.3.tar.gz
-
-Then run configure with '--with-freetype-src='. This will
-automatically build the freetype library into '/lib64' for 64-bit
-builds or into '/lib32' for 32-bit builds.
-Afterwards you can always use '--with-freetype-include=/include'
-and '--with-freetype-lib=/lib[32|64]' for other builds."
- ;;
esac
}
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
index 6efae578ea9..687f6ad82ec 100644
--- a/common/autoconf/libraries.m4
+++ b/common/autoconf/libraries.m4
@@ -253,123 +253,38 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
])
-AC_DEFUN([LIB_BUILD_FREETYPE],
-[
- FREETYPE_SRC_PATH="$1"
- BUILD_FREETYPE=yes
-
- # Check if the freetype sources are acessible..
- if ! test -d $FREETYPE_SRC_PATH; then
- AC_MSG_WARN([--with-freetype-src specified, but can't find path "$FREETYPE_SRC_PATH" - ignoring --with-freetype-src])
- BUILD_FREETYPE=no
- fi
- # ..and contain a vc2010 project file
- vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
- if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
- AC_MSG_WARN([Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src])
- BUILD_FREETYPE=no
- fi
- # Now check if configure found a version of 'msbuild.exe'
- if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
- AC_MSG_WARN([Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src])
- BUILD_FREETYPE=no
- fi
-
- # Ready to go..
- if test "x$BUILD_FREETYPE" = xyes; then
-
- # msbuild requires trailing slashes for output directories
- freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
- freetype_lib_path_unix="$freetype_lib_path"
- freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(vcxproj_path)
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_lib_path)
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(freetype_obj_path)
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- freetype_platform=x64
- else
- freetype_platform=win32
- fi
-
- # The original freetype project file is for VS 2010 (i.e. 'v100'),
- # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
- # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
- # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
- AC_MSG_NOTICE([Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ...])
-
- # First we try to build the freetype.dll
- $ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=DynamicLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
- cmd /c freetype.bat
-
- if test -s "$freetype_lib_path_unix/freetype.dll"; then
- # If that succeeds we also build freetype.lib
- $ECHO -e "@echo off\n"\
- "$MSBUILD $vcxproj_path "\
- "/p:PlatformToolset=$PLATFORM_TOOLSET "\
- "/p:Configuration=\"Release Multithreaded\" "\
- "/p:Platform=$freetype_platform "\
- "/p:ConfigurationType=StaticLibrary "\
- "/p:TargetName=freetype "\
- "/p:OutDir=\"$freetype_lib_path\" "\
- "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
- cmd /c freetype.bat
-
- if test -s "$freetype_lib_path_unix/freetype.lib"; then
- # Once we build both, lib and dll, set freetype lib and include path appropriately
- POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
- POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
- AC_MSG_NOTICE([Compiling freetype sources succeeded! (see freetype.log for build results)])
- else
- BUILD_FREETYPE=no
- fi
- else
- BUILD_FREETYPE=no
- fi
- fi
-])
-
AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
[
POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
POTENTIAL_FREETYPE_LIB_PATH="$2"
METHOD="$3"
- # First check if the files exists.
- if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
- # We found an arbitrary include file. That's a good sign.
+ # Let's start with an optimistic view of the world :-)
+ FOUND_FREETYPE=yes
+
+ # First look for the canonical freetype main include file ft2build.h.
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Oh no! Let's try in the freetype2 directory.
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
+ if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
+ # Fail.
+ FOUND_FREETYPE=no
+ fi
+ fi
+
+ if test "x$FOUND_FREETYPE" = "xyes"; then
+ # Include file found, let's continue the sanity check.
AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
FOUND_FREETYPE=yes
- FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
+ FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.])
FOUND_FREETYPE=no
- else
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # On Windows, we will need both .lib and .dll file.
- if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
- AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.])
- FOUND_FREETYPE=no
- fi
- elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
- # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
- POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
- fi
fi
fi
- if test "x$FOUND_FREETYPE" = xyes; then
- BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH)
- BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH)
-
+ if test "x$FOUND_FREETYPE" = "xyes"; then
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
AC_MSG_CHECKING([for freetype includes])
AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH])
@@ -381,256 +296,168 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
[
-
- ###############################################################################
- #
- # The ubiquitous freetype library is used to render fonts.
- #
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
- [specify prefix directory for the freetype package
- (expecting the libraries under PATH/lib and the headers under PATH/include)])])
+ [specify whether to use 'system' or 'bundled' freetype.
+ The selected option applies to both build time and run time.
+ The default behaviour can be platform dependent.
+ If using 'system' and either the include files or libraries cannot be
+ located automatically, then additionally specify both using
+ --with-freetype-include and --with-freetype-lib.])])
AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
[specify directory for the freetype include files])])
AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
[specify directory for the freetype library])])
- AC_ARG_WITH(freetype-src, [AS_HELP_STRING([--with-freetype-src],
- [specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
- AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
- [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
+ # This setup is to verify access to system installed freetype header and
+ # libraries. On Windows and MacOS this does not apply and using these options
+ # will report an error. On other platforms they will default to using the
+ # system libraries. If they are found automatically, nothing need be done.
+ # If they are not found, the configure "--with-freetype-*" options may be
+ # used to fix that. If the preference is to bundle on these platforms then
+ # use --with-freetype=bundled.
+ FREETYPE_BASE_NAME=freetype
FREETYPE_CFLAGS=
FREETYPE_LIBS=
- FREETYPE_BUNDLE_LIB_PATH=
-
- if test "x$FREETYPE_NOT_NEEDED" = xyes; then
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
- AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
- fi
- if test "x$enable_freetype_bundling" != x; then
- AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
- fi
- else
- # freetype is needed to build; go get it!
-
- BUNDLE_FREETYPE="$enable_freetype_bundling"
-
- if test "x$with_freetype_src" != x; then
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- # Try to build freetype if --with-freetype-src was given on Windows
- LIB_BUILD_FREETYPE([$with_freetype_src])
- if test "x$BUILD_FREETYPE" = xyes; then
- # Okay, we built it. Check that it works.
- LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype-src])
- if test "x$FOUND_FREETYPE" != xyes; then
- AC_MSG_ERROR([Can not use the built freetype at location given by --with-freetype-src])
- fi
- else
- AC_MSG_NOTICE([User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)])
- AC_MSG_ERROR([Consider building freetype manually and using --with-freetype instead.])
- fi
- else
- AC_MSG_WARN([--with-freetype-src is currently only supported on Windows - ignoring])
+ if (test "x$with_freetype_include" = "x" && test "x$with_freetype_lib" != "x") || \
+ (test "x$with_freetype_include" != "x" && test "x$with_freetype_lib" = "x"); then
+ AC_MSG_ERROR([Must specify both or neither of --with-freetype-include and --with-freetype-lib])
+ fi
+ FREETYPE_TO_USE=bundled
+ if test "x$OPENJDK_TARGET_OS" != "xwindows" && \
+ test "x$OPENJDK_TARGET_OS" != "xmacosx" && \
+ test "x$OPENJDK_TARGET_OS" != "xaix"; then
+ FREETYPE_TO_USE=system
+ fi
+ if test "x$with_freetype" != "x" ; then
+ if test "x$with_freetype" = "xsystem" ; then
+ FREETYPE_TO_USE=system
+ elif test "x$with_freetype" = "xbundled" ; then
+ FREETYPE_TO_USE=bundled
+ if test "x$with_freetype_include" != "x" || \
+ test "x$with_freetype_lib" != "x" ; then
+ AC_MSG_ERROR(['bundled' cannot be specified with --with-freetype-include and --with-freetype-lib])
fi
+ else
+ AC_MSG_ERROR([Valid values for --with-freetype are 'system' and 'bundled'])
fi
+ fi
- if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
- # User has specified settings
-
- if test "x$BUNDLE_FREETYPE" = x; then
- # If not specified, default is to bundle freetype
- BUNDLE_FREETYPE=yes
- fi
+ if test "x$with_freetype_include" != "x" && \
+ test "x$with_freetype_lib" != "x" ; then
+ FREETYPE_TO_USE=system
+ fi
- if test "x$with_freetype" != x; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
- POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
- fi
+ if test "x$FREETYPE_TO_USE" = "xsystem" && \
+ (test "x$OPENJDK_TARGET_OS" = "xwindows" || \
+ test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
+ AC_MSG_ERROR([Only bundled freetype can be specified on Mac and Windows])
+ fi
- # Allow --with-freetype-lib and --with-freetype-include to override
- if test "x$with_freetype_include" != x; then
- POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
- fi
- if test "x$with_freetype_lib" != x; then
- POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
- fi
+ if test "x$with_freetype_include" != "x" ; then
+ POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
+ fi
+ if test "x$with_freetype_lib" != "x" ; then
+ POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
+ fi
- if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
- # Okay, we got it. Check that it works.
- LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
- if test "x$FOUND_FREETYPE" != xyes; then
- AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype])
- fi
- else
- # User specified only one of lib or include. This is an error.
- if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
- AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include])
- AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
- else
- AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib])
- AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.])
- fi
+ if test "x$FREETYPE_TO_USE" = "xsystem" ; then
+ if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != "x" && \
+ test "x$POTENTIAL_FREETYPE_LIB_PATH" != "x" ; then
+ # Okay, we got it. Check that it works.
+ LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH,
+ $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype])
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype-lib|include])
fi
else
- # User did not specify settings, but we need freetype. Try to locate it.
-
- if test "x$BUNDLE_FREETYPE" = x; then
- # If not specified, default is to bundle freetype only on windows
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- BUNDLE_FREETYPE=yes
- else
- BUNDLE_FREETYPE=no
- fi
- fi
-
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check builddeps
- BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
- if test "x$FOUND_FREETYPE" = xyes; then
- if test "x$BUNDLE_FREETYPE" = xyes; then
- AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that])
- FOUND_FREETYPE=no
- else
- AC_MSG_CHECKING([for freetype])
- AC_MSG_RESULT([yes (using builddeps)])
- fi
- fi
- fi
-
- # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
- if test "x$SYSROOT" = x; then
- if test "x$FOUND_FREETYPE" != xyes; then
- # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
- if test "x$PKG_CONFIG" != x; then
+ # User did not specify a location, but asked for system freetype.
+ # Try to locate it.
+ # If we have a sysroot, assume that's where we are supposed to look and
+ # skip pkg-config.
+ if test "x$SYSROOT" = "x" ; then
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ # Check modules using pkg-config, but only if we have it (ugly output
+ # results otherwise)
+ if test "x$PKG_CONFIG" != "x" ; then
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
- if test "x$FOUND_FREETYPE" = xyes; then
- # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
- FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
- # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
- if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
- fi
- # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
- if test "x$BUNDLE_FREETYPE" = xyes; then
- AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
- FOUND_FREETYPE=no
- else
- AC_MSG_CHECKING([for freetype])
- AC_MSG_RESULT([yes (using pkg-config)])
- fi
+ if test "x$FOUND_FREETYPE" = "xyes" ; then
+ AC_MSG_CHECKING([for freetype])
+ AC_MSG_RESULT([yes (using pkg-config)])
fi
fi
fi
fi
- if test "x$FOUND_FREETYPE" != xyes; then
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
# Check in well-known locations
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+ FREETYPE_BASE_DIR="$SYSROOT/usr"
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" ; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib64], [well-known location])
fi
else
- FREETYPE_BASE_DIR="$SYSROOT/usr"
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
-
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib32], [well-known location])
fi
+ fi
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
- fi
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib], [well-known location])
+ fi
- if test "x$FOUND_FREETYPE" != xyes; then
- FREETYPE_BASE_DIR="$SYSROOT/usr"
- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
- else
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
- if test "x$FOUND_FREETYPE" != xyes; then
- LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
- fi
- fi
- fi
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI], [well-known location])
+ fi
+
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI], [well-known location])
+ fi
+
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib], [well-known location])
+ fi
+
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
+ FREETYPE_BASE_DIR="$SYSROOT/usr/local"
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include],
+ [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
fi # end check in well-known locations
- if test "x$FOUND_FREETYPE" != xyes; then
+ if test "x$FOUND_FREETYPE" != "xyes" ; then
HELP_MSG_MISSING_DEPENDENCY([freetype])
AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
fi
fi # end user specified settings
# Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
- if test "x$FREETYPE_CFLAGS" = x; then
- BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH)
- if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
+ if test "x$FREETYPE_CFLAGS" = "x" ; then
+ if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype ; then
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
else
FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
fi
fi
- if test "x$FREETYPE_LIBS" = x; then
- BASIC_FIXUP_PATH(FREETYPE_LIB_PATH)
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
- FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
- else
- FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
- fi
- fi
-
- # Try to compile it
- AC_MSG_CHECKING([if we can compile and link with freetype])
- AC_LANG_PUSH(C++)
- PREV_CXXCFLAGS="$CXXFLAGS"
- PREV_LIBS="$LIBS"
- PREV_CXX="$CXX"
- CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
- LIBS="$LIBS $FREETYPE_LIBS"
- CXX="$FIXPATH $CXX"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[
- #include
- #include FT_FREETYPE_H
- int main () {
- FT_Init_FreeType(NULL);
- return 0;
- }
- ]])],
- [
- AC_MSG_RESULT([yes])
- ],
- [
- AC_MSG_RESULT([no])
- AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.])
- AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS])
-
- HELP_MSG_MISSING_DEPENDENCY([freetype])
-
- AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG])
- ]
- )
- CXXCFLAGS="$PREV_CXXFLAGS"
- LIBS="$PREV_LIBS"
- CXX="$PREV_CXX"
- AC_LANG_POP(C++)
-
- AC_MSG_CHECKING([if we should bundle freetype])
- if test "x$BUNDLE_FREETYPE" = xyes; then
- FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
+ if test "x$FREETYPE_LIBS" = "x" ; then
+ FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
fi
- AC_MSG_RESULT([$BUNDLE_FREETYPE])
+ fi
- fi # end freetype needed
+ AC_MSG_RESULT([Using freetype: $FREETYPE_TO_USE])
- AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
+ AC_SUBST(FREETYPE_TO_USE)
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
])
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
index 9573bb2cbd0..d5cd72b5ccc 100644
--- a/common/autoconf/spec.gmk.in
+++ b/common/autoconf/spec.gmk.in
@@ -304,9 +304,9 @@ SJAVAC_SERVER_DIR:=@SJAVAC_SERVER_DIR@
# Number of parallel jobs to use for compilation
JOBS?=@JOBS@
+FREETYPE_TO_USE:=@FREETYPE_TO_USE@
FREETYPE_LIBS:=@FREETYPE_LIBS@
FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
-FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
CUPS_CFLAGS:=@CUPS_CFLAGS@
ALSA_LIBS:=@ALSA_LIBS@
diff --git a/doc/building.md b/doc/building.md
index 460e4d12668..45d6165d52b 100644
--- a/doc/building.md
+++ b/doc/building.md
@@ -405,9 +405,6 @@ happens, read more below in [the `configure` options](#configureoptions).
Some examples:
-> **Windows 32bit build with freetype specified:** \
-> `bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32`
-
> **Debug 64bit Build:** \
> `bash ./configure --enable-debug --with-target-bits=64`
diff --git a/jdk/make/CopyFiles.gmk b/jdk/make/CopyFiles.gmk
index bf2283963c4..8d6dfa30865 100644
--- a/jdk/make/CopyFiles.gmk
+++ b/jdk/make/CopyFiles.gmk
@@ -212,41 +212,6 @@ COPY_FILES += $(ICCPROFILE_TARGET_FILES)
##########################################################################################
-ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
- # We need to bundle the freetype library, so it will be available at runtime as well as link time.
- #
- # NB: Default freetype build system uses -h linker option and
- # result .so contains hardcoded library name that is later
- # used for adding dependencies to other objects
- # (e.g. libfontmanager.so).
- #
- # It is not obvious how to extract that hardcoded name (libfreetype.so.6)
- # without overcomplicating logic here.
- # To workaround this we hardcode .6 suffix for now.
- #
- # Note that .so.6 library will not be found by System.loadLibrary()
- # but fortunately we need to load FreeType library explicitly
- # on windows only
- #
- #TODO: rework this to avoid hardcoding library name in the makefile
- #
- ifeq ($(OPENJDK_TARGET_OS), windows)
- FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
- else
- FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
- endif
-
- $(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
- $(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
- ifeq ($(OPENJDK_BUILD_OS), windows)
- $(CHMOD) +rx $@
- endif
-
- COPY_FILES += $(FREETYPE_TARGET_LIB)
-endif
-
-##########################################################################################
-
# Copy the microsoft runtime libraries on windows
ifeq ($(OPENJDK_TARGET_OS), windows)
diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk
index 01e0369017f..44db18b4a60 100644
--- a/jdk/make/lib/Awt2dLibraries.gmk
+++ b/jdk/make/lib/Awt2dLibraries.gmk
@@ -857,6 +857,51 @@ endif
##########################################################################################
+ifeq ($(FREETYPE_TO_USE), system)
+ # For use by libfontmanager:
+ LIBFREETYPE_CFLAGS := $(FREETYPE_CFLAGS)
+ LIBFREETYPE_LIBS := $(FREETYPE_LIBS)
+else
+ LIBFREETYPE_SRC := $(TOPDIR)/jdk/src/share/native/sun/awt/libfreetype
+ BUILD_LIBFREETYPE_HEADER_DIRS := $(LIBFREETYPE_SRC)/include
+
+# BUILD_LIBFREETYPE_HEADERS := $(addprefix -I, $(BUILD_LIBFREETYPE_HEADER_DIRS))
+
+ # For use by libfontmanager:
+ LIBFREETYPE_CFLAGS := -I$(LIBFREETYPE_SRC)/include
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ LIBFREETYPE_LIBS := $(JDK_OUTPUTDIR)/objs/libfreetype/freetype.lib
+ # freetype now requires you to manually define this (see ftconfig.h)
+ BUILD_LIBFREETYPE_CFLAGS += -DDLL_EXPORT
+ else
+ LIBFREETYPE_LIBS := -lfreetype
+ endif
+
+ $(eval $(call SetupNativeCompilation,BUILD_LIBFREETYPE, \
+ LIBRARY := freetype, \
+ OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
+ SRC := $(LIBFREETYPE_SRC)/src, \
+ LANG := C, \
+ OPTIMIZATION := HIGHEST, \
+ CFLAGS := $(CFLAGS_JDKLIB) $(LIBFREETYPE_CFLAGS) \
+ $(BUILD_LIBFREETYPE_CFLAGS) \
+ -DFT2_BUILD_LIBRARY, \
+ LDFLAGS := $(LDFLAGS_JDKLIB) \
+ $(call SET_SHARED_LIBRARY_ORIGIN), \
+ VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
+ RC_FLAGS := $(RC_FLAGS) \
+ -D "JDK_FNAME=freetype.dll" \
+ -D "JDK_INTERNAL_NAME=freetype" \
+ -D "JDK_FTYPE=0x2L", \
+ OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfreetype, \
+ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES) \
+ ))
+
+ BUILD_LIBRARIES += $(BUILD_LIBFREETYPE)
+endif
+
+##########################################################################################
+
ifndef OPENJDK
FONT_HEADERS := -I$(JDK_TOPDIR)/src/closed/share/native/sun/font/t2k
BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
@@ -897,6 +942,9 @@ BUILD_LIBFONTMANAGER_CFLAGS_COMMON := \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/java2d \
-I$(JDK_TOPDIR)/src/share/native/sun/java2d
+BUILD_LIBFONTMANAGER_CFLAGS_COMMON += $(LIBFREETYPE_CFLAGS)
+BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
+
# Turn off aliasing with GCC for ExtensionSubtables.cpp
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
diff --git a/jdk/src/share/classes/sun/font/FileFontStrike.java b/jdk/src/share/classes/sun/font/FileFontStrike.java
index d423feb3258..acc131265dc 100644
--- a/jdk/src/share/classes/sun/font/FileFontStrike.java
+++ b/jdk/src/share/classes/sun/font/FileFontStrike.java
@@ -114,7 +114,7 @@ public class FileFontStrike extends PhysicalStrike {
private static native boolean initNative();
private static boolean isXPorLater = false;
static {
- if (FontUtilities.isWindows && !FontUtilities.useT2K &&
+ if (FontUtilities.isWindows && !FontUtilities.useJDKScaler &&
!GraphicsEnvironment.isHeadless()) {
isXPorLater = initNative();
}
@@ -228,7 +228,7 @@ public class FileFontStrike extends PhysicalStrike {
* the JDK rasteriser supplied one (see getGlyphImageFromWindows()).
*/
if (FontUtilities.isWindows && isXPorLater &&
- !FontUtilities.useT2K &&
+ !FontUtilities.useJDKScaler &&
!GraphicsEnvironment.isHeadless() &&
!fileFont.useJavaRasterizer &&
(desc.aaHint == INTVAL_TEXT_ANTIALIAS_LCD_HRGB ||
diff --git a/jdk/src/share/classes/sun/font/FontScaler.java b/jdk/src/share/classes/sun/font/FontScaler.java
index fa3e275448a..840236e7634 100644
--- a/jdk/src/share/classes/sun/font/FontScaler.java
+++ b/jdk/src/share/classes/sun/font/FontScaler.java
@@ -94,7 +94,7 @@ public abstract class FontScaler implements DisposerRecord {
boolean.class, int.class};
try {
- if (FontUtilities.isOpenJDK) {
+ if (!FontUtilities.useT2K) {
scalerClass = Class.forName("sun.font.FreetypeFontScaler");
} else {
scalerClass = Class.forName("sun.font.T2KFontScaler");
diff --git a/jdk/src/share/classes/sun/font/FontUtilities.java b/jdk/src/share/classes/sun/font/FontUtilities.java
index 7defc023f83..3f6bc7db4d0 100644
--- a/jdk/src/share/classes/sun/font/FontUtilities.java
+++ b/jdk/src/share/classes/sun/font/FontUtilities.java
@@ -57,6 +57,8 @@ public final class FontUtilities {
public static boolean isOpenSolaris;
+ public static boolean useJDKScaler;
+
public static boolean useT2K;
public static boolean isWindows;
@@ -100,11 +102,26 @@ public Object run() {
}
}
- String t2kStr = System.getProperty("sun.java2d.font.scaler");
- if (t2kStr != null) {
- useT2K = "t2k".equals(t2kStr);
+ /* Support a value of "t2k" as meaning use the JDK internal
+ * scaler over the platform scaler whether or not t2k is
+ * actually available.
+ * This can be considered transitional support for some
+ * level of compatibility, as in it avoids the native scaler
+ * as before but cannot guarantee rendering equivalence
+ * with T2K.
+ * It will also use t2k instead of freetype if t2k is
+ * available - this is the same as before.
+ * The new value of "jdk" means even if t2k is available,
+ * the decision as to whether to use that or freetype is
+ * not affected by this setting.
+ */
+ String scalerStr = System.getProperty("sun.java2d.font.scaler");
+ if (scalerStr != null) {
+ useT2K = "t2k".equals(scalerStr);
+ useJDKScaler = useT2K || "jdk".equals(scalerStr);
} else {
useT2K = false;
+ useJDKScaler = false;
}
if (isSolaris) {
String version = System.getProperty("os.version", "0.0");
diff --git a/jdk/src/share/classes/sun/font/TrueTypeFont.java b/jdk/src/share/classes/sun/font/TrueTypeFont.java
index f39a27715ed..bf01a513a25 100644
--- a/jdk/src/share/classes/sun/font/TrueTypeFont.java
+++ b/jdk/src/share/classes/sun/font/TrueTypeFont.java
@@ -237,7 +237,7 @@ protected boolean checkUseNatives() {
return useNatives;
}
if (!FontUtilities.isSolaris || useJavaRasterizer ||
- FontUtilities.useT2K || nativeNames == null ||
+ FontUtilities.useJDKScaler || nativeNames == null ||
getDirectoryEntry(EBLCTag) != null ||
GraphicsEnvironment.isHeadless()) {
checkedNatives = true;
diff --git a/jdk/src/share/native/sun/awt/libfreetype/UPDATING.txt b/jdk/src/share/native/sun/awt/libfreetype/UPDATING.txt
new file mode 100644
index 00000000000..ad062632312
--- /dev/null
+++ b/jdk/src/share/native/sun/awt/libfreetype/UPDATING.txt
@@ -0,0 +1,27 @@
+Tips and tasks when updating freetype sources to a newer version.
+-----------------------------------------------------------------
+
+The freetype sources here are just the subset needed by JDK. This is deliberate.
+When updating be sure to import only the same files.
+If a file is no longer present in freetype, or renamed this will be noticed
+during the copy.
+Occasionally there may be a new missing dependency if freetype introduces
+a new file or imports a file into these files that was not previously used.
+Import just what is needed.
+
+Before attempting compilation be sure to diff the JDK copy and the freetype copy
+of src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h
+and re-apply the same edits made for the JDK option file.
+Notably JDK is not using GZIP or LZW or BDF support which are on by default
+for the freetype distribution.
+If you don't make the edits the build will fail due to not copying the relevant
+sources.
+
+Use "expand" and "sed" to remove tabs and trailing white space from the imported
+sources. The current version of freetype is quite clean in this respect.
+./src/base/md5.h and ./src/base/md5.c are the only files with tabs,
+and ./include/freetype/ftdriver.h has the only trailing white space.
+If you forget this step, or aren't thorough, jcheck will remind you.
+
+Remember to update the freetype version identified in
+src/java.desktop/share/legal/freetype.md
diff --git a/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftconfig.h b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftconfig.h
new file mode 100644
index 00000000000..f539e9a17a7
--- /dev/null
+++ b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftconfig.h
@@ -0,0 +1,562 @@
+/***************************************************************************/
+/* */
+/* ftconfig.h */
+/* */
+/* ANSI-specific configuration file (specification only). */
+/* */
+/* Copyright 1996-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This header file contains a number of macro definitions that are used */
+ /* by the rest of the engine. Most of the macros here are automatically */
+ /* determined at compile time, and you should not need to change it to */
+ /* port FreeType, except to compile the library with a non-ANSI */
+ /* compiler. */
+ /* */
+ /* Note however that if some specific modifications are needed, we */
+ /* advise you to place a modified copy in your build directory. */
+ /* */
+ /* The build directory is usually `builds/', and contains */
+ /* system-specific files that are always included first when building */
+ /* the library. */
+ /* */
+ /* This ANSI version should stay in `include/config/'. */
+ /* */
+ /*************************************************************************/
+
+#ifndef FTCONFIG_H_
+#define FTCONFIG_H_
+
+#include
+#include FT_CONFIG_OPTIONS_H
+#include FT_CONFIG_STANDARD_LIBRARY_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*************************************************************************/
+ /* */
+ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */
+ /* */
+ /* These macros can be toggled to suit a specific system. The current */
+ /* ones are defaults used to compile FreeType in an ANSI C environment */
+ /* (16bit compilers are also supported). Copy this file to your own */
+ /* `builds/' directory, and edit it to port the engine. */
+ /* */
+ /*************************************************************************/
+
+
+ /* There are systems (like the Texas Instruments 'C54x) where a `char' */
+ /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */
+ /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */
+ /* is probably unexpected. */
+ /* */
+ /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */
+ /* `char' type. */
+
+#ifndef FT_CHAR_BIT
+#define FT_CHAR_BIT CHAR_BIT
+#endif
+
+
+ /* The size of an `int' type. */
+#if FT_UINT_MAX == 0xFFFFUL
+#define FT_SIZEOF_INT ( 16 / FT_CHAR_BIT )
+#elif FT_UINT_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_INT ( 32 / FT_CHAR_BIT )
+#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_INT ( 64 / FT_CHAR_BIT )
+#else
+#error "Unsupported size of `int' type!"
+#endif
+
+ /* The size of a `long' type. A five-byte `long' (as used e.g. on the */
+ /* DM642) is recognized but avoided. */
+#if FT_ULONG_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
+#define FT_SIZEOF_LONG ( 32 / FT_CHAR_BIT )
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
+#define FT_SIZEOF_LONG ( 64 / FT_CHAR_BIT )
+#else
+#error "Unsupported size of `long' type!"
+#endif
+
+
+ /* FT_UNUSED is a macro used to indicate that a given parameter is not */
+ /* used -- this is only used to get rid of unpleasant compiler warnings */
+#ifndef FT_UNUSED
+#define FT_UNUSED( arg ) ( (arg) = (arg) )
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* AUTOMATIC CONFIGURATION MACROS */
+ /* */
+ /* These macros are computed from the ones defined above. Don't touch */
+ /* their definition, unless you know precisely what you are doing. No */
+ /* porter should need to mess with them. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Mac support */
+ /* */
+ /* This is the only necessary change, so it is defined here instead */
+ /* providing a new configuration file. */
+ /* */
+#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
+ /* no Carbon frameworks for 64bit 10.4.x */
+ /* AvailabilityMacros.h is available since Mac OS X 10.2, */
+ /* so guess the system version by maximum errno before inclusion */
+#include
+#ifdef ECANCELED /* defined since 10.2 */
+#include "AvailabilityMacros.h"
+#endif
+#if defined( __LP64__ ) && \
+ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
+#undef FT_MACINTOSH
+#endif
+
+#elif defined( __SC__ ) || defined( __MRC__ )
+ /* Classic MacOS compilers */
+#include "ConditionalMacros.h"
+#if TARGET_OS_MAC
+#define FT_MACINTOSH 1
+#endif
+
+#endif
+
+
+ /* Fix compiler warning with sgi compiler */
+#if defined( __sgi ) && !defined( __GNUC__ )
+#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
+#pragma set woff 3505
+#endif
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* basic_types */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Int16 */
+ /* */
+ /* */
+ /* A typedef for a 16bit signed integer type. */
+ /* */
+ typedef signed short FT_Int16;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_UInt16 */
+ /* */
+ /* */
+ /* A typedef for a 16bit unsigned integer type. */
+ /* */
+ typedef unsigned short FT_UInt16;
+
+ /* */
+
+
+ /* this #if 0 ... #endif clause is for documentation purposes */
+#if 0
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Int32 */
+ /* */
+ /* */
+ /* A typedef for a 32bit signed integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef signed XXX FT_Int32;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_UInt32 */
+ /* */
+ /* A typedef for a 32bit unsigned integer type. The size depends on */
+ /* the configuration. */
+ /* */
+ typedef unsigned XXX FT_UInt32;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Int64 */
+ /* */
+ /* A typedef for a 64bit signed integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef signed XXX FT_Int64;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_UInt64 */
+ /* */
+ /* A typedef for a 64bit unsigned integer type. The size depends on */
+ /* the configuration. Only defined if there is real 64bit support; */
+ /* otherwise, it gets emulated with a structure (if necessary). */
+ /* */
+ typedef unsigned XXX FT_UInt64;
+
+ /* */
+
+#endif
+
+#if FT_SIZEOF_INT == ( 32 / FT_CHAR_BIT )
+
+ typedef signed int FT_Int32;
+ typedef unsigned int FT_UInt32;
+
+#elif FT_SIZEOF_LONG == ( 32 / FT_CHAR_BIT )
+
+ typedef signed long FT_Int32;
+ typedef unsigned long FT_UInt32;
+
+#else
+#error "no 32bit type found -- please check your configuration files"
+#endif
+
+
+ /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= ( 32 / FT_CHAR_BIT )
+
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
+
+#elif FT_SIZEOF_LONG >= ( 32 / FT_CHAR_BIT )
+
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
+
+#endif
+
+
+ /* determine whether we have a 64-bit int type for platforms without */
+ /* Autoconf */
+#if FT_SIZEOF_LONG == ( 64 / FT_CHAR_BIT )
+
+ /* FT_LONG64 must be defined if a 64-bit type is available */
+#define FT_LONG64
+#define FT_INT64 long
+#define FT_UINT64 unsigned long
+
+ /*************************************************************************/
+ /* */
+ /* A 64-bit data type may create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable other 64-bit data */
+ /* types if __STDC__ is defined. You can however ignore this rule */
+ /* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
+ /* */
+#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#if defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L
+
+#define FT_LONG64
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
+#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
+
+#elif defined( __BORLANDC__ ) /* Borland C++ */
+
+ /* XXXX: We should probably check the value of __BORLANDC__ in order */
+ /* to test the compiler version. */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+#define FT_UINT64 unsigned __int64
+
+#elif defined( __WATCOMC__ ) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
+#elif defined( __GNUC__ )
+
+ /* GCC provides the `long long' type */
+#define FT_LONG64
+#define FT_INT64 long long int
+#define FT_UINT64 unsigned long long int
+
+#endif /* __STDC_VERSION__ >= 199901L */
+
+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
+
+#ifdef FT_LONG64
+ typedef FT_INT64 FT_Int64;
+ typedef FT_UINT64 FT_UInt64;
+#endif
+
+
+#ifdef _WIN64
+ /* only 64bit Windows uses the LLP64 data model, i.e., */
+ /* 32bit integers, 64bit pointers */
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x)
+#else
+#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x)
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* miscellaneous */
+ /* */
+ /*************************************************************************/
+
+
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
+
+
+ /* typeof condition taken from gnulib's `intprops.h' header file */
+#if ( ( defined( __GNUC__ ) && __GNUC__ >= 2 ) || \
+ ( defined( __IBMC__ ) && __IBMC__ >= 1210 && \
+ defined( __IBM__TYPEOF__ ) ) || \
+ ( defined( __SUNPRO_C ) && __SUNPRO_C >= 0x5110 && !__STDC__ ) )
+#define FT_TYPEOF( type ) ( __typeof__ ( type ) )
+#else
+#define FT_TYPEOF( type ) /* empty */
+#endif
+
+
+ /* Use FT_LOCAL and FT_LOCAL_DEF to declare and define, respectively, */
+ /* a function that gets used only within the scope of a module. */
+ /* Normally, both the header and source code files for such a */
+ /* function are within a single module directory. */
+ /* */
+ /* Intra-module arrays should be tagged with FT_LOCAL_ARRAY and */
+ /* FT_LOCAL_ARRAY_DEF. */
+ /* */
+#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
+
+#define FT_LOCAL( x ) static x
+#define FT_LOCAL_DEF( x ) static x
+
+#else
+
+#ifdef __cplusplus
+#define FT_LOCAL( x ) extern "C" x
+#define FT_LOCAL_DEF( x ) extern "C" x
+#else
+#define FT_LOCAL( x ) extern x
+#define FT_LOCAL_DEF( x ) x
+#endif
+
+#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+
+#define FT_LOCAL_ARRAY( x ) extern const x
+#define FT_LOCAL_ARRAY_DEF( x ) const x
+
+
+ /* Use FT_BASE and FT_BASE_DEF to declare and define, respectively, */
+ /* functions that are used in more than a single module. In the */
+ /* current setup this implies that the declaration is in a header */
+ /* file in the `include/freetype/internal' directory, and the */
+ /* function body is in a file in `src/base'. */
+ /* */
+#ifndef FT_BASE
+
+#ifdef __cplusplus
+#define FT_BASE( x ) extern "C" x
+#else
+#define FT_BASE( x ) extern x
+#endif
+
+#endif /* !FT_BASE */
+
+
+#ifndef FT_BASE_DEF
+
+#ifdef __cplusplus
+#define FT_BASE_DEF( x ) x
+#else
+#define FT_BASE_DEF( x ) x
+#endif
+
+#endif /* !FT_BASE_DEF */
+
+
+ /* When compiling FreeType as a DLL, some systems/compilers need a */
+ /* special attribute in front OR after the return type of function */
+ /* declarations. */
+ /* */
+ /* Two macros are used within the FreeType source code to define */
+ /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */
+ /* */
+ /* FT_EXPORT( return_type ) */
+ /* */
+ /* is used in a function declaration, as in */
+ /* */
+ /* FT_EXPORT( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ); */
+ /* */
+ /* */
+ /* FT_EXPORT_DEF( return_type ) */
+ /* */
+ /* is used in a function definition, as in */
+ /* */
+ /* FT_EXPORT_DEF( FT_Error ) */
+ /* FT_Init_FreeType( FT_Library* alibrary ) */
+ /* { */
+ /* ... some code ... */
+ /* return FT_Err_Ok; */
+ /* } */
+ /* */
+ /* You can provide your own implementation of FT_EXPORT and */
+ /* FT_EXPORT_DEF here if you want. */
+ /* */
+ /* To export a variable, use FT_EXPORT_VAR. */
+ /* */
+#ifndef FT_EXPORT
+
+#ifdef __cplusplus
+#define FT_EXPORT( x ) extern "C" x
+#else
+#define FT_EXPORT( x ) extern x
+#endif
+
+#ifdef _MSC_VER
+#undef FT_EXPORT
+#ifdef _DLL
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#else
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#endif
+#endif
+
+#endif /* !FT_EXPORT */
+
+
+#ifndef FT_EXPORT_DEF
+
+#ifdef __cplusplus
+#define FT_EXPORT_DEF( x ) extern "C" x
+#else
+#define FT_EXPORT_DEF( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT_DEF */
+
+
+#ifndef FT_EXPORT_VAR
+
+#ifdef __cplusplus
+#define FT_EXPORT_VAR( x ) extern "C" x
+#else
+#define FT_EXPORT_VAR( x ) extern x
+#endif
+
+#endif /* !FT_EXPORT_VAR */
+
+
+ /* The following macros are needed to compile the library with a */
+ /* C++ compiler and with 16bit compilers. */
+ /* */
+
+ /* This is special. Within C++, you must specify `extern "C"' for */
+ /* functions which are used via function pointers, and you also */
+ /* must do that for structures which contain function pointers to */
+ /* assure C linkage -- it's not possible to have (local) anonymous */
+ /* functions which are accessed by (global) function pointers. */
+ /* */
+ /* */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function, */
+ /* located in the same source code file as the structure that uses */
+ /* it. */
+ /* */
+ /* FT_BASE_CALLBACK and FT_BASE_CALLBACK_DEF are used to declare */
+ /* and define a callback function, respectively, in a similar way */
+ /* as FT_BASE and FT_BASE_DEF work. */
+ /* */
+ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
+ /* contains pointers to callback functions. */
+ /* */
+ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
+ /* that contains pointers to callback functions. */
+ /* */
+ /* */
+ /* Some 16bit compilers have to redefine these macros to insert */
+ /* the infamous `_cdecl' or `__fastcall' declarations. */
+ /* */
+#ifndef FT_CALLBACK_DEF
+#ifdef __cplusplus
+#define FT_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_CALLBACK_DEF( x ) static x
+#endif
+#endif /* FT_CALLBACK_DEF */
+
+#ifndef FT_BASE_CALLBACK
+#ifdef __cplusplus
+#define FT_BASE_CALLBACK( x ) extern "C" x
+#define FT_BASE_CALLBACK_DEF( x ) extern "C" x
+#else
+#define FT_BASE_CALLBACK( x ) extern x
+#define FT_BASE_CALLBACK_DEF( x ) x
+#endif
+#endif /* FT_BASE_CALLBACK */
+
+#ifndef FT_CALLBACK_TABLE
+#ifdef __cplusplus
+#define FT_CALLBACK_TABLE extern "C"
+#define FT_CALLBACK_TABLE_DEF extern "C"
+#else
+#define FT_CALLBACK_TABLE extern
+#define FT_CALLBACK_TABLE_DEF /* nothing */
+#endif
+#endif /* FT_CALLBACK_TABLE */
+
+
+FT_END_HEADER
+
+
+#endif /* FTCONFIG_H_ */
+
+
+/* END */
diff --git a/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftheader.h b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftheader.h
new file mode 100644
index 00000000000..702f77cc422
--- /dev/null
+++ b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftheader.h
@@ -0,0 +1,804 @@
+/***************************************************************************/
+/* */
+/* ftheader.h */
+/* */
+/* Build macros of the FreeType 2 library. */
+/* */
+/* Copyright 1996-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+#ifndef FTHEADER_H_
+#define FTHEADER_H_
+
+
+ /*@***********************************************************************/
+ /* */
+ /* */
+ /* FT_BEGIN_HEADER */
+ /* */
+ /* */
+ /* This macro is used in association with @FT_END_HEADER in header */
+ /* files to ensure that the declarations within are properly */
+ /* encapsulated in an `extern "C" { .. }' block when included from a */
+ /* C++ compiler. */
+ /* */
+#ifdef __cplusplus
+#define FT_BEGIN_HEADER extern "C" {
+#else
+#define FT_BEGIN_HEADER /* nothing */
+#endif
+
+
+ /*@***********************************************************************/
+ /* */
+ /* */
+ /* FT_END_HEADER */
+ /* */
+ /* */
+ /* This macro is used in association with @FT_BEGIN_HEADER in header */
+ /* files to ensure that the declarations within are properly */
+ /* encapsulated in an `extern "C" { .. }' block when included from a */
+ /* C++ compiler. */
+ /* */
+#ifdef __cplusplus
+#define FT_END_HEADER }
+#else
+#define FT_END_HEADER /* nothing */
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* Aliases for the FreeType 2 public and configuration files. */
+ /* */
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* header_file_macros */
+ /* */
+ /* */
+ /* Header File Macros */
+ /* */
+ /* */
+ /* Macro definitions used to #include specific header files. */
+ /* */
+ /* */
+ /* The following macros are defined to the name of specific */
+ /* FreeType~2 header files. They can be used directly in #include */
+ /* statements as in: */
+ /* */
+ /* { */
+ /* #include FT_FREETYPE_H */
+ /* #include FT_MULTIPLE_MASTERS_H */
+ /* #include FT_GLYPH_H */
+ /* } */
+ /* */
+ /* There are several reasons why we are now using macros to name */
+ /* public header files. The first one is that such macros are not */
+ /* limited to the infamous 8.3~naming rule required by DOS (and */
+ /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */
+ /* */
+ /* The second reason is that it allows for more flexibility in the */
+ /* way FreeType~2 is installed on a given system. */
+ /* */
+ /*************************************************************************/
+
+
+ /* configuration files */
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_CONFIG_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * FreeType~2 configuration data.
+ *
+ */
+#ifndef FT_CONFIG_CONFIG_H
+#define FT_CONFIG_CONFIG_H
+#endif
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_STANDARD_LIBRARY_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * FreeType~2 interface to the standard C library functions.
+ *
+ */
+#ifndef FT_CONFIG_STANDARD_LIBRARY_H
+#define FT_CONFIG_STANDARD_LIBRARY_H
+#endif
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_OPTIONS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * FreeType~2 project-specific configuration options.
+ *
+ */
+#ifndef FT_CONFIG_OPTIONS_H
+#define FT_CONFIG_OPTIONS_H
+#endif
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_MODULES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list of FreeType~2 modules that are statically linked to new library
+ * instances in @FT_Init_FreeType.
+ *
+ */
+#ifndef FT_CONFIG_MODULES_H
+#define FT_CONFIG_MODULES_H
+#endif
+
+ /* */
+
+ /* public headers */
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_FREETYPE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * base FreeType~2 API.
+ *
+ */
+#define FT_FREETYPE_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ERRORS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list of FreeType~2 error codes (and messages).
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
+#define FT_ERRORS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MODULE_ERRORS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list of FreeType~2 module error offsets (and messages).
+ *
+ */
+#define FT_MODULE_ERRORS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_SYSTEM_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 interface to low-level operations (i.e., memory management
+ * and stream i/o).
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
+#define FT_SYSTEM_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IMAGE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing type
+ * definitions related to glyph images (i.e., bitmaps, outlines,
+ * scan-converter parameters).
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
+#define FT_IMAGE_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TYPES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * basic data types defined by FreeType~2.
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
+#define FT_TYPES_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_LIST_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list management API of FreeType~2.
+ *
+ * (Most applications will never need to include this file.)
+ *
+ */
+#define FT_LIST_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_OUTLINE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * scalable outline management API of FreeType~2.
+ *
+ */
+#define FT_OUTLINE_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_SIZES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API which manages multiple @FT_Size objects per face.
+ *
+ */
+#define FT_SIZES_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MODULE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * module management API of FreeType~2.
+ *
+ */
+#define FT_MODULE_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_RENDER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * renderer module management API of FreeType~2.
+ *
+ */
+#define FT_RENDER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the driver modules.
+ *
+ */
+#define FT_DRIVER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_AUTOHINTER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the auto-hinting module.
+ *
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
+ */
+#define FT_AUTOHINTER_H FT_DRIVER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CFF_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the CFF driver module.
+ *
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
+ */
+#define FT_CFF_DRIVER_H FT_DRIVER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the TrueType driver module.
+ *
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
+ */
+#define FT_TRUETYPE_DRIVER_H FT_DRIVER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_PCF_DRIVER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * structures and macros related to the PCF driver module.
+ *
+ * Deprecated since version 2.9; use @FT_DRIVER_H instead.
+ *
+ */
+#define FT_PCF_DRIVER_H FT_DRIVER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TYPE1_TABLES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * types and API specific to the Type~1 format.
+ *
+ */
+#define FT_TYPE1_TABLES_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_IDS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * enumeration values which identify name strings, languages, encodings,
+ * etc. This file really contains a _large_ set of constant macro
+ * definitions, taken from the TrueType and OpenType specifications.
+ *
+ */
+#define FT_TRUETYPE_IDS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_TABLES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * types and API specific to the TrueType (as well as OpenType) format.
+ *
+ */
+#define FT_TRUETYPE_TABLES_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_TAGS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of TrueType four-byte `tags' which identify blocks in
+ * SFNT-based font formats (i.e., TrueType and OpenType).
+ *
+ */
+#define FT_TRUETYPE_TAGS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_BDF_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which accesses BDF-specific strings from a
+ * face.
+ *
+ */
+#define FT_BDF_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CID_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which access CID font information from a
+ * face.
+ *
+ */
+#define FT_CID_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_GZIP_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which supports gzip-compressed files.
+ *
+ */
+#define FT_GZIP_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_LZW_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which supports LZW-compressed files.
+ *
+ */
+#define FT_LZW_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_BZIP2_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which supports bzip2-compressed files.
+ *
+ */
+#define FT_BZIP2_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_WINFONTS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API which supports Windows FNT files.
+ *
+ */
+#define FT_WINFONTS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_GLYPH_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional glyph management component.
+ *
+ */
+#define FT_GLYPH_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_BITMAP_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional bitmap conversion component.
+ *
+ */
+#define FT_BITMAP_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_BBOX_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional exact bounding box computation routines.
+ *
+ */
+#define FT_BBOX_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CACHE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional FreeType~2 cache sub-system.
+ *
+ */
+#define FT_CACHE_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MAC_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * Macintosh-specific FreeType~2 API. The latter is used to access
+ * fonts embedded in resource forks.
+ *
+ * This header file must be explicitly included by client applications
+ * compiled on the Mac (note that the base API still works though).
+ *
+ */
+#define FT_MAC_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MULTIPLE_MASTERS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional multiple-masters management API of FreeType~2.
+ *
+ */
+#define FT_MULTIPLE_MASTERS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_SFNT_NAMES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional FreeType~2 API which accesses embedded `name' strings in
+ * SFNT-based font formats (i.e., TrueType and OpenType).
+ *
+ */
+#define FT_SFNT_NAMES_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_OPENTYPE_VALIDATE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional FreeType~2 API which validates OpenType tables (BASE, GDEF,
+ * GPOS, GSUB, JSTF).
+ *
+ */
+#define FT_OPENTYPE_VALIDATE_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_GX_VALIDATE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat,
+ * mort, morx, bsln, just, kern, opbd, trak, prop).
+ *
+ */
+#define FT_GX_VALIDATE_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_PFR_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which accesses PFR-specific data.
+ *
+ */
+#define FT_PFR_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_STROKER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which provides functions to stroke outline paths.
+ */
+#define FT_STROKER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_SYNTHESIS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which performs artificial obliquing and emboldening.
+ */
+#define FT_SYNTHESIS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_FONT_FORMATS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which provides functions specific to font formats.
+ */
+#define FT_FONT_FORMATS_H
+
+ /* deprecated */
+#define FT_XFREE86_H FT_FONT_FORMATS_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRIGONOMETRY_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which performs trigonometric computations (e.g.,
+ * cosines and arc tangents).
+ */
+#define FT_TRIGONOMETRY_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_LCD_FILTER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which performs color filtering for subpixel rendering.
+ */
+#define FT_LCD_FILTER_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_INCREMENTAL_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which performs incremental glyph loading.
+ */
+#define FT_INCREMENTAL_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_GASP_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which returns entries from the TrueType GASP table.
+ */
+#define FT_GASP_H
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ADVANCES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType~2 API which returns individual and ranged glyph advances.
+ */
+#define FT_ADVANCES_H
+
+
+ /* */
+
+ /* These header files don't need to be included by the user. */
+#define FT_ERROR_DEFINITIONS_H
+#define FT_PARAMETER_TAGS_H
+
+ /* Deprecated macros. */
+#define FT_UNPATENTED_HINTING_H
+#define FT_TRUETYPE_UNPATENTED_H
+
+ /* FT_CACHE_H is the only header file needed for the cache subsystem. */
+#define FT_CACHE_IMAGE_H FT_CACHE_H
+#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
+#define FT_CACHE_CHARMAP_H FT_CACHE_H
+
+ /* The internals of the cache sub-system are no longer exposed. We */
+ /* default to FT_CACHE_H at the moment just in case, but we know of */
+ /* no rogue client that uses them. */
+ /* */
+#define FT_CACHE_MANAGER_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_MRU_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_MANAGER_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_CACHE_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_GLYPH_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_IMAGE_H FT_CACHE_H
+#define FT_CACHE_INTERNAL_SBITS_H FT_CACHE_H
+
+
+ /*
+ * Include internal headers definitions from
+ * only when building the library.
+ */
+#ifdef FT2_BUILD_LIBRARY
+#define FT_INTERNAL_INTERNAL_H
+#include FT_INTERNAL_INTERNAL_H
+#endif /* FT2_BUILD_LIBRARY */
+
+
+#endif /* FTHEADER_H_ */
+
+
+/* END */
diff --git a/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftmodule.h b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftmodule.h
new file mode 100644
index 00000000000..139014404ce
--- /dev/null
+++ b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftmodule.h
@@ -0,0 +1,32 @@
+/*
+ * This file registers the FreeType modules compiled into the library.
+ *
+ * If you use GNU make, this file IS NOT USED! Instead, it is created in
+ * the objects directory (normally `/objs/') based on information
+ * from `/modules.cfg'.
+ *
+ * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
+ * FreeType without GNU make.
+ *
+ */
+
+FT_USE_MODULE( FT_Module_Class, autofit_module_class )
+FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
+FT_USE_MODULE( FT_Module_Class, psaux_module_class )
+FT_USE_MODULE( FT_Module_Class, psnames_module_class )
+FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
+FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
+//FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
+
+/* EOF */
diff --git a/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftoption.h b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftoption.h
new file mode 100644
index 00000000000..044d19f84f0
--- /dev/null
+++ b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftoption.h
@@ -0,0 +1,973 @@
+/***************************************************************************/
+/* */
+/* ftoption.h */
+/* */
+/* User-selectable configuration macros (specification only). */
+/* */
+/* Copyright 1996-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef FTOPTION_H_
+#define FTOPTION_H_
+
+
+#include
+
+
+FT_BEGIN_HEADER
+
+ /*************************************************************************/
+ /* */
+ /* USER-SELECTABLE CONFIGURATION MACROS */
+ /* */
+ /* This file contains the default configuration macro definitions for */
+ /* a standard build of the FreeType library. There are three ways to */
+ /* use this file to build project-specific versions of the library: */
+ /* */
+ /* - You can modify this file by hand, but this is not recommended in */
+ /* cases where you would like to build several versions of the */
+ /* library from a single source directory. */
+ /* */
+ /* - You can put a copy of this file in your build directory, more */
+ /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
+ /* is the name of a directory that is included _before_ the FreeType */
+ /* include path during compilation. */
+ /* */
+ /* The default FreeType Makefiles and Jamfiles use the build */
+ /* directory `builds/' by default, but you can easily change */
+ /* that for your own projects. */
+ /* */
+ /* - Copy the file to `$BUILD/ft2build.h' and modify it */
+ /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */
+ /* locate this file during the build. For example, */
+ /* */
+ /* #define FT_CONFIG_OPTIONS_H */
+ /* #include */
+ /* */
+ /* will use `$BUILD/myftoptions.h' instead of this file for macro */
+ /* definitions. */
+ /* */
+ /* Note also that you can similarly pre-define the macro */
+ /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
+ /* that are statically linked to the library at compile time. By */
+ /* default, this file is . */
+ /* */
+ /* We highly recommend using the third method whenever possible. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*#***********************************************************************/
+ /* */
+ /* If you enable this configuration option, FreeType recognizes an */
+ /* environment variable called `FREETYPE_PROPERTIES', which can be used */
+ /* to control the various font drivers and modules. The controllable */
+ /* properties are listed in the section @properties. */
+ /* */
+ /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
+ /* multiple lines for better readability). */
+ /* */
+ /* { */
+ /* */
+ /* ':' */
+ /* '=' */
+ /* */
+ /* ':' */
+ /* '=' */
+ /* ... */
+ /* } */
+ /* */
+ /* Example: */
+ /* */
+ /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */
+ /* cff:no-stem-darkening=1 \ */
+ /* autofitter:warping=1 */
+ /* */
+#define FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
+
+
+ /*************************************************************************/
+ /* */
+ /* Uncomment the line below if you want to activate LCD rendering */
+ /* technology similar to ClearType in this build of the library. This */
+ /* technology triples the resolution in the direction color subpixels. */
+ /* To mitigate color fringes inherent to this technology, you also need */
+ /* to explicitly set up LCD filtering. */
+ /* */
+ /* Note that this feature is covered by several Microsoft patents */
+ /* and should not be activated in any default build of the library. */
+ /* When this macro is not defined, FreeType offers alternative LCD */
+ /* rendering technology that produces excellent output without LCD */
+ /* filtering. */
+ /* */
+/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+
+
+ /*************************************************************************/
+ /* */
+ /* Many compilers provide a non-ANSI 64-bit data type that can be used */
+ /* by FreeType to speed up some computations. However, this will create */
+ /* some problems when compiling the library in strict ANSI mode. */
+ /* */
+ /* For this reason, the use of 64-bit integers is normally disabled when */
+ /* the __STDC__ macro is defined. You can however disable this by */
+ /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */
+ /* */
+ /* For most compilers, this will only create compilation warnings when */
+ /* building the library. */
+ /* */
+ /* ObNote: The compiler-specific 64-bit integers are detected in the */
+ /* file `ftconfig.h' either statically or through the */
+ /* `configure' script on supported platforms. */
+ /* */
+#undef FT_CONFIG_OPTION_FORCE_INT64
+
+
+ /*************************************************************************/
+ /* */
+ /* If this macro is defined, do not try to use an assembler version of */
+ /* performance-critical functions (e.g. FT_MulFix). You should only do */
+ /* that to verify that the assembler function works properly, or to */
+ /* execute benchmark tests of the various implementations. */
+/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+
+ /*************************************************************************/
+ /* */
+ /* If this macro is defined, try to use an inlined assembler version of */
+ /* the `FT_MulFix' function, which is a `hotspot' when loading and */
+ /* hinting glyphs, and which should be executed as fast as possible. */
+ /* */
+ /* Note that if your compiler or CPU is not supported, this will default */
+ /* to the standard and portable implementation found in `ftcalc.c'. */
+ /* */
+#define FT_CONFIG_OPTION_INLINE_MULFIX
+
+
+ /*************************************************************************/
+ /* */
+ /* LZW-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* `compress' program. This is mostly used to parse many of the PCF */
+ /* files that come with various X11 distributions. The implementation */
+ /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
+ /* (see src/lzw/ftgzip.c). */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_LZW */
+
+
+ /*************************************************************************/
+ /* */
+ /* Gzip-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* `gzip' program. This is mostly used to parse many of the PCF files */
+ /* that come with XFree86. The implementation uses `zlib' to */
+ /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
+ /* */
+ /* Define this macro if you want to enable this `feature'. See also */
+ /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_ZLIB */
+
+
+ /*************************************************************************/
+ /* */
+ /* ZLib library selection */
+ /* */
+ /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
+ /* It allows FreeType's `ftgzip' component to link to the system's */
+ /* installation of the ZLib library. This is useful on systems like */
+ /* Unix or VMS where it generally is already available. */
+ /* */
+ /* If you let it undefined, the component will use its own copy */
+ /* of the zlib sources instead. These have been modified to be */
+ /* included directly within the component and *not* export external */
+ /* function names. This allows you to link any program with FreeType */
+ /* _and_ ZLib without linking conflicts. */
+ /* */
+ /* Do not #undef this macro here since the build system might define */
+ /* it for certain configurations only. */
+ /* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
+/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
+
+
+ /*************************************************************************/
+ /* */
+ /* Bzip2-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* `bzip2' program. This is mostly used to parse many of the PCF */
+ /* files that come with XFree86. The implementation uses `libbz2' to */
+ /* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). */
+ /* Contrary to gzip, bzip2 currently is not included and need to use */
+ /* the system available bzip2 implementation. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_BZIP2 */
+
+
+ /*************************************************************************/
+ /* */
+ /* Define to disable the use of file stream functions and types, FILE, */
+ /* fopen() etc. Enables the use of smaller system libraries on embedded */
+ /* systems that have multiple system libraries, some with or without */
+ /* file stream support, in the cases where file stream support is not */
+ /* necessary such as memory loading of font files. */
+ /* */
+/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */
+
+
+ /*************************************************************************/
+ /* */
+ /* PNG bitmap support. */
+ /* */
+ /* FreeType now handles loading color bitmap glyphs in the PNG format. */
+ /* This requires help from the external libpng library. Uncompressed */
+ /* color bitmaps do not need any external libraries and will be */
+ /* supported regardless of this configuration. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_PNG */
+
+
+ /*************************************************************************/
+ /* */
+ /* HarfBuzz support. */
+ /* */
+ /* FreeType uses the HarfBuzz library to improve auto-hinting of */
+ /* OpenType fonts. If available, many glyphs not directly addressable */
+ /* by a font's character map will be hinted also. */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+ /* If you use a build system like cmake or the `configure' script, */
+ /* options set by those programs have precendence, overwriting the */
+ /* value here with the configured one. */
+ /* */
+/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
+
+
+ /*************************************************************************/
+ /* */
+ /* Glyph Postscript Names handling */
+ /* */
+ /* By default, FreeType 2 is compiled with the `psnames' module. This */
+ /* module is in charge of converting a glyph name string into a */
+ /* Unicode value, or return a Macintosh standard glyph name for the */
+ /* use with the TrueType `post' table. */
+ /* */
+ /* Undefine this macro if you do not want `psnames' compiled in your */
+ /* build of FreeType. This has the following effects: */
+ /* */
+ /* - The TrueType driver will provide its own set of glyph names, */
+ /* if you build it to support postscript names in the TrueType */
+ /* `post' table, but will not synthesize a missing Unicode charmap. */
+ /* */
+ /* - The Type 1 driver will not be able to synthesize a Unicode */
+ /* charmap out of the glyphs found in the fonts. */
+ /* */
+ /* You would normally undefine this configuration macro when building */
+ /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */
+ /* */
+#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
+
+ /*************************************************************************/
+ /* */
+ /* Postscript Names to Unicode Values support */
+ /* */
+ /* By default, FreeType 2 is built with the `PSNames' module compiled */
+ /* in. Among other things, the module is used to convert a glyph name */
+ /* into a Unicode value. This is especially useful in order to */
+ /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */
+ /* through a big table named the `Adobe Glyph List' (AGL). */
+ /* */
+ /* Undefine this macro if you do not want the Adobe Glyph List */
+ /* compiled in your `PSNames' module. The Type 1 driver will not be */
+ /* able to synthesize a Unicode charmap out of the glyphs found in the */
+ /* fonts. */
+ /* */
+#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
+
+
+ /*************************************************************************/
+ /* */
+ /* Support for Mac fonts */
+ /* */
+ /* Define this macro if you want support for outline fonts in Mac */
+ /* format (mac dfont, mac resource, macbinary containing a mac */
+ /* resource) on non-Mac platforms. */
+ /* */
+ /* Note that the `FOND' resource isn't checked. */
+ /* */
+#define FT_CONFIG_OPTION_MAC_FONTS
+
+
+ /*************************************************************************/
+ /* */
+ /* Guessing methods to access embedded resource forks */
+ /* */
+ /* Enable extra Mac fonts support on non-Mac platforms (e.g. */
+ /* GNU/Linux). */
+ /* */
+ /* Resource forks which include fonts data are stored sometimes in */
+ /* locations which users or developers don't expected. In some cases, */
+ /* resource forks start with some offset from the head of a file. In */
+ /* other cases, the actual resource fork is stored in file different */
+ /* from what the user specifies. If this option is activated, */
+ /* FreeType tries to guess whether such offsets or different file */
+ /* names must be used. */
+ /* */
+ /* Note that normal, direct access of resource forks is controlled via */
+ /* the FT_CONFIG_OPTION_MAC_FONTS option. */
+ /* */
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+#endif
+
+
+ /*************************************************************************/
+ /* */
+ /* Allow the use of FT_Incremental_Interface to load typefaces that */
+ /* contain no glyph data, but supply it via a callback function. */
+ /* This is required by clients supporting document formats which */
+ /* supply font data incrementally as the document is parsed, such */
+ /* as the Ghostscript interpreter for the PostScript language. */
+ /* */
+#define FT_CONFIG_OPTION_INCREMENTAL
+
+
+ /*************************************************************************/
+ /* */
+ /* The size in bytes of the render pool used by the scan-line converter */
+ /* to do all of its work. */
+ /* */
+#define FT_RENDER_POOL_SIZE 16384L
+
+
+ /*************************************************************************/
+ /* */
+ /* FT_MAX_MODULES */
+ /* */
+ /* The maximum number of modules that can be registered in a single */
+ /* FreeType library object. 32 is the default. */
+ /* */
+#define FT_MAX_MODULES 32
+
+
+ /*************************************************************************/
+ /* */
+ /* Debug level */
+ /* */
+ /* FreeType can be compiled in debug or trace mode. In debug mode, */
+ /* errors are reported through the `ftdebug' component. In trace */
+ /* mode, additional messages are sent to the standard output during */
+ /* execution. */
+ /* */
+ /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */
+ /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */
+ /* */
+ /* Don't define any of these macros to compile in `release' mode! */
+ /* */
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
+/* #define FT_DEBUG_LEVEL_ERROR */
+/* #define FT_DEBUG_LEVEL_TRACE */
+
+
+ /*************************************************************************/
+ /* */
+ /* Autofitter debugging */
+ /* */
+ /* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to */
+ /* control the autofitter behaviour for debugging purposes with global */
+ /* boolean variables (consequently, you should *never* enable this */
+ /* while compiling in `release' mode): */
+ /* */
+ /* _af_debug_disable_horz_hints */
+ /* _af_debug_disable_vert_hints */
+ /* _af_debug_disable_blue_hints */
+ /* */
+ /* Additionally, the following functions provide dumps of various */
+ /* internal autofit structures to stdout (using `printf'): */
+ /* */
+ /* af_glyph_hints_dump_points */
+ /* af_glyph_hints_dump_segments */
+ /* af_glyph_hints_dump_edges */
+ /* af_glyph_hints_get_num_segments */
+ /* af_glyph_hints_get_segment_offset */
+ /* */
+ /* As an argument, they use another global variable: */
+ /* */
+ /* _af_debug_hints */
+ /* */
+ /* Please have a look at the `ftgrid' demo program to see how those */
+ /* variables and macros should be used. */
+ /* */
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
+/* #define FT_DEBUG_AUTOFIT */
+
+
+ /*************************************************************************/
+ /* */
+ /* Memory Debugging */
+ /* */
+ /* FreeType now comes with an integrated memory debugger that is */
+ /* capable of detecting simple errors like memory leaks or double */
+ /* deletes. To compile it within your build of the library, you */
+ /* should define FT_DEBUG_MEMORY here. */
+ /* */
+ /* Note that the memory debugger is only activated at runtime when */
+ /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
+ /* */
+ /* Do not #undef this macro here since the build system might define */
+ /* it for certain configurations only. */
+ /* */
+/* #define FT_DEBUG_MEMORY */
+
+
+ /*************************************************************************/
+ /* */
+ /* Module errors */
+ /* */
+ /* If this macro is set (which is _not_ the default), the higher byte */
+ /* of an error code gives the module in which the error has occurred, */
+ /* while the lower byte is the real error code. */
+ /* */
+ /* Setting this macro makes sense for debugging purposes only, since */
+ /* it would break source compatibility of certain programs that use */
+ /* FreeType 2. */
+ /* */
+ /* More details can be found in the files ftmoderr.h and fterrors.h. */
+ /* */
+#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+
+
+ /*************************************************************************/
+ /* */
+ /* Position Independent Code */
+ /* */
+ /* If this macro is set (which is _not_ the default), FreeType2 will */
+ /* avoid creating constants that require address fixups. Instead the */
+ /* constants will be moved into a struct and additional intialization */
+ /* code will be used. */
+ /* */
+ /* Setting this macro is needed for systems that prohibit address */
+ /* fixups, such as BREW. [Note that standard compilers like gcc or */
+ /* clang handle PIC generation automatically; you don't have to set */
+ /* FT_CONFIG_OPTION_PIC, which is only necessary for very special */
+ /* compilers.] */
+ /* */
+ /* Note that FT_CONFIG_OPTION_PIC support is not available for all */
+ /* modules (see `modules.cfg' for a complete list). For building with */
+ /* FT_CONFIG_OPTION_PIC support, do the following. */
+ /* */
+ /* 0. Clone the repository. */
+ /* 1. Define FT_CONFIG_OPTION_PIC. */
+ /* 2. Remove all subdirectories in `src' that don't have */
+ /* FT_CONFIG_OPTION_PIC support. */
+ /* 3. Comment out the corresponding modules in `modules.cfg'. */
+ /* 4. Compile. */
+ /* */
+/* #define FT_CONFIG_OPTION_PIC */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** S F N T D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */
+ /* embedded bitmaps in all formats using the SFNT module (namely */
+ /* TrueType & OpenType). */
+ /* */
+#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */
+ /* load and enumerate the glyph Postscript names in a TrueType or */
+ /* OpenType file. */
+ /* */
+ /* Note that when you do not compile the `PSNames' module by undefining */
+ /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */
+ /* contain additional code used to read the PS Names table from a font. */
+ /* */
+ /* (By default, the module uses `PSNames' to extract glyph names.) */
+ /* */
+#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */
+ /* access the internal name table in a SFNT-based format like TrueType */
+ /* or OpenType. The name table contains various strings used to */
+ /* describe the font, like family name, copyright, version, etc. It */
+ /* does not contain any glyph name though. */
+ /* */
+ /* Accessing SFNT names is done through the functions declared in */
+ /* `ftsnames.h'. */
+ /* */
+#define TT_CONFIG_OPTION_SFNT_NAMES
+
+
+ /*************************************************************************/
+ /* */
+ /* TrueType CMap support */
+ /* */
+ /* Here you can fine-tune which TrueType CMap table format shall be */
+ /* supported. */
+#define TT_CONFIG_CMAP_FORMAT_0
+#define TT_CONFIG_CMAP_FORMAT_2
+#define TT_CONFIG_CMAP_FORMAT_4
+#define TT_CONFIG_CMAP_FORMAT_6
+#define TT_CONFIG_CMAP_FORMAT_8
+#define TT_CONFIG_CMAP_FORMAT_10
+#define TT_CONFIG_CMAP_FORMAT_12
+#define TT_CONFIG_CMAP_FORMAT_13
+#define TT_CONFIG_CMAP_FORMAT_14
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
+ /* a bytecode interpreter in the TrueType driver. */
+ /* */
+ /* By undefining this, you will only compile the code necessary to load */
+ /* TrueType glyphs without hinting. */
+ /* */
+ /* Do not #undef this macro here, since the build system might */
+ /* define it for certain configurations only. */
+ /* */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile */
+ /* subpixel hinting support into the TrueType driver. This modifies the */
+ /* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is */
+ /* requested. */
+ /* */
+ /* In particular, it modifies the bytecode interpreter to interpret (or */
+ /* not) instructions in a certain way so that all TrueType fonts look */
+ /* like they do in a Windows ClearType (DirectWrite) environment. See */
+ /* [1] for a technical overview on what this means. See `ttinterp.h' */
+ /* for more details on the LEAN option. */
+ /* */
+ /* There are three possible values. */
+ /* */
+ /* Value 1: */
+ /* This value is associated with the `Infinality' moniker, */
+ /* contributed by an individual nicknamed Infinality with the goal of */
+ /* making TrueType fonts render better than on Windows. A high */
+ /* amount of configurability and flexibility, down to rules for */
+ /* single glyphs in fonts, but also very slow. Its experimental and */
+ /* slow nature and the original developer losing interest meant that */
+ /* this option was never enabled in default builds. */
+ /* */
+ /* The corresponding interpreter version is v38. */
+ /* */
+ /* Value 2: */
+ /* The new default mode for the TrueType driver. The Infinality code */
+ /* base was stripped to the bare minimum and all configurability */
+ /* removed in the name of speed and simplicity. The configurability */
+ /* was mainly aimed at legacy fonts like Arial, Times New Roman, or */
+ /* Courier. Legacy fonts are fonts that modify vertical stems to */
+ /* achieve clean black-and-white bitmaps. The new mode focuses on */
+ /* applying a minimal set of rules to all fonts indiscriminately so */
+ /* that modern and web fonts render well while legacy fonts render */
+ /* okay. */
+ /* */
+ /* The corresponding interpreter version is v40. */
+ /* */
+ /* Value 3: */
+ /* Compile both, making both v38 and v40 available (the latter is the */
+ /* default). */
+ /* */
+ /* By undefining these, you get rendering behavior like on Windows */
+ /* without ClearType, i.e., Windows XP without ClearType enabled and */
+ /* Win9x (interpreter version v35). Or not, depending on how much */
+ /* hinting blood and testing tears the font designer put into a given */
+ /* font. If you define one or both subpixel hinting options, you can */
+ /* switch between between v35 and the ones you define (using */
+ /* `FT_Property_Set'). */
+ /* */
+ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */
+ /* defined. */
+ /* */
+ /* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx */
+ /* */
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
+/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 ) */
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */
+ /* TrueType glyph loader to use Apple's definition of how to handle */
+ /* component offsets in composite glyphs. */
+ /* */
+ /* Apple and MS disagree on the default behavior of component offsets */
+ /* in composites. Apple says that they should be scaled by the scaling */
+ /* factors in the transformation matrix (roughly, it's more complex) */
+ /* while MS says they should not. OpenType defines two bits in the */
+ /* composite flags array which can be used to disambiguate, but old */
+ /* fonts will not have them. */
+ /* */
+ /* https://www.microsoft.com/typography/otspec/glyf.htm */
+ /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html */
+ /* */
+#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */
+ /* support for Apple's distortable font technology (fvar, gvar, cvar, */
+ /* and avar tables). This has many similarities to Type 1 Multiple */
+ /* Masters support. */
+ /* */
+#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_BDF if you want to include support for */
+ /* an embedded `BDF ' table within SFNT-based bitmap formats. */
+ /* */
+/* #define TT_CONFIG_OPTION_BDF */
+
+
+ /*************************************************************************/
+ /* */
+ /* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum */
+ /* number of bytecode instructions executed for a single run of the */
+ /* bytecode interpreter, needed to prevent infinite loops. You don't */
+ /* want to change this except for very special situations (e.g., making */
+ /* a library fuzzer spend less time to handle broken fonts). */
+ /* */
+ /* It is not expected that this value is ever modified by a configuring */
+ /* script; instead, it gets surrounded with #ifndef ... #endif so that */
+ /* the value can be set as a preprocessor option on the compiler's */
+ /* command line. */
+ /* */
+#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
+#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
+#endif
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and */
+ /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */
+ /* required. */
+ /* */
+#define T1_MAX_DICT_DEPTH 5
+
+
+ /*************************************************************************/
+ /* */
+ /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */
+ /* calls during glyph loading. */
+ /* */
+#define T1_MAX_SUBRS_CALLS 16
+
+
+ /*************************************************************************/
+ /* */
+ /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */
+ /* minimum of 16 is required. */
+ /* */
+ /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */
+ /* */
+#define T1_MAX_CHARSTRINGS_OPERANDS 256
+
+
+ /*************************************************************************/
+ /* */
+ /* Define this configuration macro if you want to prevent the */
+ /* compilation of `t1afm', which is in charge of reading Type 1 AFM */
+ /* files into an existing face. Note that if set, the T1 driver will be */
+ /* unable to produce kerning distances. */
+ /* */
+#undef T1_CONFIG_OPTION_NO_AFM
+
+
+ /*************************************************************************/
+ /* */
+ /* Define this configuration macro if you want to prevent the */
+ /* compilation of the Multiple Masters font support in the Type 1 */
+ /* driver. */
+ /* */
+#undef T1_CONFIG_OPTION_NO_MM_SUPPORT
+
+
+ /*************************************************************************/
+ /* */
+ /* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 */
+ /* engine gets compiled into FreeType. If defined, it is possible to */
+ /* switch between the two engines using the `hinting-engine' property of */
+ /* the type1 driver module. */
+ /* */
+/* #define T1_CONFIG_OPTION_OLD_ENGINE */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** C F F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is */
+ /* possible to set up the default values of the four control points that */
+ /* define the stem darkening behaviour of the (new) CFF engine. For */
+ /* more details please read the documentation of the */
+ /* `darkening-parameters' property (file `ftdriver.h'), which allows the */
+ /* control at run-time. */
+ /* */
+ /* Do *not* undefine these macros! */
+ /* */
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 1000
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 1667
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 275
+
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 2333
+#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 0
+
+
+ /*************************************************************************/
+ /* */
+ /* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF */
+ /* engine gets compiled into FreeType. If defined, it is possible to */
+ /* switch between the two engines using the `hinting-engine' property of */
+ /* the cff driver module. */
+ /* */
+/* #define CFF_CONFIG_OPTION_OLD_ENGINE */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** P C F D R I V E R C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* There are many PCF fonts just called `Fixed' which look completely */
+ /* different, and which have nothing to do with each other. When */
+ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
+ /* random, the style changes often if one changes the size and one */
+ /* cannot select some fonts at all. This option makes the PCF module */
+ /* prepend the foundry name (plus a space) to the family name. */
+ /* */
+ /* We also check whether we have `wide' characters; all put together, we */
+ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */
+ /* */
+ /* If this option is activated, it can be controlled with the */
+ /* `no-long-family-names' property of the pcf driver module. */
+ /* */
+/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */
+ /* support. */
+ /* */
+#define AF_CONFIG_OPTION_CJK
+
+ /*************************************************************************/
+ /* */
+ /* Compile autofit module with fallback Indic script support, covering */
+ /* some scripts that the `latin' submodule of the autofit module doesn't */
+ /* (yet) handle. */
+ /* */
+#define AF_CONFIG_OPTION_INDIC
+
+ /*************************************************************************/
+ /* */
+ /* Compile autofit module with warp hinting. The idea of the warping */
+ /* code is to slightly scale and shift a glyph within a single dimension */
+ /* so that as much of its segments are aligned (more or less) on the */
+ /* grid. To find out the optimal scaling and shifting value, various */
+ /* parameter combinations are tried and scored. */
+ /* */
+ /* This experimental option is active only if the rendering mode is */
+ /* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the */
+ /* `warping' property of the auto-hinter (see file `ftdriver.h' for more */
+ /* information; by default it is switched off). */
+ /* */
+#define AF_CONFIG_OPTION_USE_WARPER
+
+ /*************************************************************************/
+ /* */
+ /* Use TrueType-like size metrics for `light' auto-hinting. */
+ /* */
+ /* It is strongly recommended to avoid this option, which exists only to */
+ /* help some legacy applications retain its appearance and behaviour */
+ /* with respect to auto-hinted TrueType fonts. */
+ /* */
+ /* The very reason this option exists at all are GNU/Linux distributions */
+ /* like Fedora that did not un-patch the following change (which was */
+ /* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). */
+ /* */
+ /* 2011-07-16 Steven Chu */
+ /* */
+ /* [truetype] Fix metrics on size request for scalable fonts. */
+ /* */
+ /* This problematic commit is now reverted (more or less). */
+ /* */
+/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */
+
+ /* */
+
+
+ /*
+ * This macro is obsolete. Support has been removed in FreeType
+ * version 2.5.
+ */
+/* #define FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+ /*
+ * This macro is defined if native TrueType hinting is requested by the
+ * definitions above.
+ */
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#define TT_USE_BYTECODE_INTERPRETER
+
+#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
+#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1
+#define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
+#endif
+
+#if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2
+#define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
+#endif
+#endif
+#endif
+
+
+ /*
+ * Check CFF darkening parameters. The checks are the same as in function
+ * `cff_property_set' in file `cffdrivr.c'.
+ */
+#if CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 < 0 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 < 0 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 < 0 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 > \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 || \
+ \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 > 500 || \
+ CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 > 500
+#error "Invalid CFF darkening parameters!"
+#endif
+
+FT_END_HEADER
+
+
+#endif /* FTOPTION_H_ */
+
+
+/* END */
diff --git a/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftstdlib.h b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftstdlib.h
new file mode 100644
index 00000000000..42f9a06e439
--- /dev/null
+++ b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/config/ftstdlib.h
@@ -0,0 +1,175 @@
+/***************************************************************************/
+/* */
+/* ftstdlib.h */
+/* */
+/* ANSI-specific library and header configuration file (specification */
+/* only). */
+/* */
+/* Copyright 2002-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This file is used to group all #includes to the ANSI C library that */
+ /* FreeType normally requires. It also defines macros to rename the */
+ /* standard functions within the FreeType source code. */
+ /* */
+ /* Load a file which defines FTSTDLIB_H_ before this one to override it. */
+ /* */
+ /*************************************************************************/
+
+
+#ifndef FTSTDLIB_H_
+#define FTSTDLIB_H_
+
+
+#include
+
+#define ft_ptrdiff_t ptrdiff_t
+
+
+ /**********************************************************************/
+ /* */
+ /* integer limits */
+ /* */
+ /* UINT_MAX and ULONG_MAX are used to automatically compute the size */
+ /* of `int' and `long' in bytes at compile-time. So far, this works */
+ /* for all platforms the library has been tested on. */
+ /* */
+ /* Note that on the extremely rare platforms that do not provide */
+ /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */
+ /* old Crays where `int' is 36 bits), we do not make any guarantee */
+ /* about the correct behaviour of FT2 with all fonts. */
+ /* */
+ /* In these case, `ftconfig.h' will refuse to compile anyway with a */
+ /* message like `couldn't find 32-bit type' or something similar. */
+ /* */
+ /**********************************************************************/
+
+
+#include
+
+#define FT_CHAR_BIT CHAR_BIT
+#define FT_USHORT_MAX USHRT_MAX
+#define FT_INT_MAX INT_MAX
+#define FT_INT_MIN INT_MIN
+#define FT_UINT_MAX UINT_MAX
+#define FT_LONG_MIN LONG_MIN
+#define FT_LONG_MAX LONG_MAX
+#define FT_ULONG_MAX ULONG_MAX
+
+
+ /**********************************************************************/
+ /* */
+ /* character and string processing */
+ /* */
+ /**********************************************************************/
+
+
+#include
+
+#define ft_memchr memchr
+#define ft_memcmp memcmp
+#define ft_memcpy memcpy
+#define ft_memmove memmove
+#define ft_memset memset
+#define ft_strcat strcat
+#define ft_strcmp strcmp
+#define ft_strcpy strcpy
+#define ft_strlen strlen
+#define ft_strncmp strncmp
+#define ft_strncpy strncpy
+#define ft_strrchr strrchr
+#define ft_strstr strstr
+
+
+ /**********************************************************************/
+ /* */
+ /* file handling */
+ /* */
+ /**********************************************************************/
+
+
+#include
+
+#define FT_FILE FILE
+#define ft_fclose fclose
+#define ft_fopen fopen
+#define ft_fread fread
+#define ft_fseek fseek
+#define ft_ftell ftell
+#define ft_sprintf sprintf
+
+
+ /**********************************************************************/
+ /* */
+ /* sorting */
+ /* */
+ /**********************************************************************/
+
+
+#include
+
+#define ft_qsort qsort
+
+
+ /**********************************************************************/
+ /* */
+ /* memory allocation */
+ /* */
+ /**********************************************************************/
+
+
+#define ft_scalloc calloc
+#define ft_sfree free
+#define ft_smalloc malloc
+#define ft_srealloc realloc
+
+
+ /**********************************************************************/
+ /* */
+ /* miscellaneous */
+ /* */
+ /**********************************************************************/
+
+
+#define ft_strtol strtol
+#define ft_getenv getenv
+
+
+ /**********************************************************************/
+ /* */
+ /* execution control */
+ /* */
+ /**********************************************************************/
+
+
+#include
+
+#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
+ /* jmp_buf is defined as a macro */
+ /* on certain platforms */
+
+#define ft_longjmp longjmp
+#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
+
+
+ /* the following is only used for debugging purposes, i.e., if */
+ /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
+
+#include
+
+
+#endif /* FTSTDLIB_H_ */
+
+
+/* END */
diff --git a/jdk/src/share/native/sun/awt/libfreetype/include/freetype/freetype.h b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/freetype.h
new file mode 100644
index 00000000000..eda95e2abe4
--- /dev/null
+++ b/jdk/src/share/native/sun/awt/libfreetype/include/freetype/freetype.h
@@ -0,0 +1,4652 @@
+/***************************************************************************/
+/* */
+/* freetype.h */
+/* */
+/* FreeType high-level API and common types (specification only). */
+/* */
+/* Copyright 1996-2018 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef FREETYPE_H_
+#define FREETYPE_H_
+
+
+#ifndef FT_FREETYPE_H
+#error "`ft2build.h' hasn't been included yet!"
+#error "Please always use macros to include FreeType header files."
+#error "Example:"
+#error " #include "
+#error " #include FT_FREETYPE_H"
+#endif
+
+
+#include
+#include FT_CONFIG_CONFIG_H
+#include FT_TYPES_H
+#include FT_ERRORS_H
+
+
+FT_BEGIN_HEADER
+
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* header_inclusion */
+ /* */
+ /* */
+ /* FreeType's header inclusion scheme */
+ /* */
+ /* */
+ /* How client applications should include FreeType header files. */
+ /* */
+ /* */
+ /* To be as flexible as possible (and for historical reasons), */
+ /* FreeType uses a very special inclusion scheme to load header */
+ /* files, for example */
+ /* */
+ /* { */
+ /* #include */
+ /* */
+ /* #include FT_FREETYPE_H */
+ /* #include FT_OUTLINE_H */
+ /* } */
+ /* */
+ /* A compiler and its preprocessor only needs an include path to find */
+ /* the file `ft2build.h'; the exact locations and names of the other */
+ /* FreeType header files are hidden by preprocessor macro names, */
+ /* loaded by `ft2build.h'. The API documentation always gives the */
+ /* header macro name needed for a particular function. */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* user_allocation */
+ /* */
+ /* */
+ /* User allocation */
+ /* */
+ /* */
+ /* How client applications should allocate FreeType data structures. */
+ /* */
+ /* */
+ /* FreeType assumes that structures allocated by the user and passed */
+ /* as arguments are zeroed out except for the actual data. In other */
+ /* words, it is recommended to use `calloc' (or variants of it) */
+ /* instead of `malloc' for allocation. */
+ /* */
+ /*************************************************************************/
+
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* B A S I C T Y P E S */
+ /* */
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* base_interface */
+ /* */
+ /* */
+ /* Base Interface */
+ /* */
+ /* */
+ /* The FreeType~2 base font interface. */
+ /* */
+ /* */
+ /* This section describes the most important public high-level API */
+ /* functions of FreeType~2. */
+ /* */
+ /* */
+ /* FT_Library */
+ /* FT_Face */
+ /* FT_Size */
+ /* FT_GlyphSlot */
+ /* FT_CharMap */
+ /* FT_Encoding */
+ /* FT_ENC_TAG */
+ /* */
+ /* FT_FaceRec */
+ /* */
+ /* FT_FACE_FLAG_SCALABLE */
+ /* FT_FACE_FLAG_FIXED_SIZES */
+ /* FT_FACE_FLAG_FIXED_WIDTH */
+ /* FT_FACE_FLAG_HORIZONTAL */
+ /* FT_FACE_FLAG_VERTICAL */
+ /* FT_FACE_FLAG_COLOR */
+ /* FT_FACE_FLAG_SFNT */
+ /* FT_FACE_FLAG_CID_KEYED */
+ /* FT_FACE_FLAG_TRICKY */
+ /* FT_FACE_FLAG_KERNING */
+ /* FT_FACE_FLAG_MULTIPLE_MASTERS */
+ /* FT_FACE_FLAG_VARIATION */
+ /* FT_FACE_FLAG_GLYPH_NAMES */
+ /* FT_FACE_FLAG_EXTERNAL_STREAM */
+ /* FT_FACE_FLAG_HINTER */
+ /* */
+ /* FT_HAS_HORIZONTAL */
+ /* FT_HAS_VERTICAL */
+ /* FT_HAS_KERNING */
+ /* FT_HAS_FIXED_SIZES */
+ /* FT_HAS_GLYPH_NAMES */
+ /* FT_HAS_COLOR */
+ /* FT_HAS_MULTIPLE_MASTERS */
+ /* */
+ /* FT_IS_SFNT */
+ /* FT_IS_SCALABLE */
+ /* FT_IS_FIXED_WIDTH */
+ /* FT_IS_CID_KEYED */
+ /* FT_IS_TRICKY */
+ /* FT_IS_NAMED_INSTANCE */
+ /* FT_IS_VARIATION */
+ /* */
+ /* FT_STYLE_FLAG_BOLD */
+ /* FT_STYLE_FLAG_ITALIC */
+ /* */
+ /* FT_SizeRec */
+ /* FT_Size_Metrics */
+ /* */
+ /* FT_GlyphSlotRec */
+ /* FT_Glyph_Metrics */
+ /* FT_SubGlyph */
+ /* */
+ /* FT_Bitmap_Size */
+ /* */
+ /* FT_Init_FreeType */
+ /* FT_Done_FreeType */
+ /* */
+ /* FT_New_Face */
+ /* FT_Done_Face */
+ /* FT_Reference_Face */
+ /* FT_New_Memory_Face */
+ /* FT_Face_Properties */
+ /* FT_Open_Face */
+ /* FT_Open_Args */
+ /* FT_Parameter */
+ /* FT_Attach_File */
+ /* FT_Attach_Stream */
+ /* */
+ /* FT_Set_Char_Size */
+ /* FT_Set_Pixel_Sizes */
+ /* FT_Request_Size */
+ /* FT_Select_Size */
+ /* FT_Size_Request_Type */
+ /* FT_Size_RequestRec */
+ /* FT_Size_Request */
+ /* FT_Set_Transform */
+ /* FT_Load_Glyph */
+ /* FT_Get_Char_Index */
+ /* FT_Get_First_Char */
+ /* FT_Get_Next_Char */
+ /* FT_Get_Name_Index */
+ /* FT_Load_Char */
+ /* */
+ /* FT_OPEN_MEMORY */
+ /* FT_OPEN_STREAM */
+ /* FT_OPEN_PATHNAME */
+ /* FT_OPEN_DRIVER */
+ /* FT_OPEN_PARAMS */
+ /* */
+ /* FT_LOAD_DEFAULT */
+ /* FT_LOAD_RENDER */
+ /* FT_LOAD_MONOCHROME */
+ /* FT_LOAD_LINEAR_DESIGN */
+ /* FT_LOAD_NO_SCALE */
+ /* FT_LOAD_NO_HINTING */
+ /* FT_LOAD_NO_BITMAP */
+ /* FT_LOAD_NO_AUTOHINT */
+ /* FT_LOAD_COLOR */
+ /* */
+ /* FT_LOAD_VERTICAL_LAYOUT */
+ /* FT_LOAD_IGNORE_TRANSFORM */
+ /* FT_LOAD_FORCE_AUTOHINT */
+ /* FT_LOAD_NO_RECURSE */
+ /* FT_LOAD_PEDANTIC */
+ /* */
+ /* FT_LOAD_TARGET_NORMAL */
+ /* FT_LOAD_TARGET_LIGHT */
+ /* FT_LOAD_TARGET_MONO */
+ /* FT_LOAD_TARGET_LCD */
+ /* FT_LOAD_TARGET_LCD_V */
+ /* */
+ /* FT_LOAD_TARGET_MODE */
+ /* */
+ /* FT_Render_Glyph */
+ /* FT_Render_Mode */
+ /* FT_Get_Kerning */
+ /* FT_Kerning_Mode */
+ /* FT_Get_Track_Kerning */
+ /* FT_Get_Glyph_Name */
+ /* FT_Get_Postscript_Name */
+ /* */
+ /* FT_CharMapRec */
+ /* FT_Select_Charmap */
+ /* FT_Set_Charmap */
+ /* FT_Get_Charmap_Index */
+ /* */
+ /* FT_Get_FSType_Flags */
+ /* FT_Get_SubGlyph_Info */
+ /* */
+ /* FT_Face_Internal */
+ /* FT_Size_Internal */
+ /* FT_Slot_Internal */
+ /* */
+ /* FT_FACE_FLAG_XXX */
+ /* FT_STYLE_FLAG_XXX */
+ /* FT_OPEN_XXX */
+ /* FT_LOAD_XXX */
+ /* FT_LOAD_TARGET_XXX */
+ /* FT_SUBGLYPH_FLAG_XXX */
+ /* FT_FSTYPE_XXX */
+ /* */
+ /* FT_HAS_FAST_GLYPHS */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Glyph_Metrics */
+ /* */
+ /* */
+ /* A structure to model the metrics of a single glyph. The values */
+ /* are expressed in 26.6 fractional pixel format; if the flag */
+ /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */
+ /* are expressed in font units instead. */
+ /* */
+ /* */
+ /* width :: */
+ /* The glyph's width. */
+ /* */
+ /* height :: */
+ /* The glyph's height. */
+ /* */
+ /* horiBearingX :: */
+ /* Left side bearing for horizontal layout. */
+ /* */
+ /* horiBearingY :: */
+ /* Top side bearing for horizontal layout. */
+ /* */
+ /* horiAdvance :: */
+ /* Advance width for horizontal layout. */
+ /* */
+ /* vertBearingX :: */
+ /* Left side bearing for vertical layout. */
+ /* */
+ /* vertBearingY :: */
+ /* Top side bearing for vertical layout. Larger positive values */
+ /* mean further below the vertical glyph origin. */
+ /* */
+ /* vertAdvance :: */
+ /* Advance height for vertical layout. Positive values mean the */
+ /* glyph has a positive advance downward. */
+ /* */
+ /* */
+ /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */
+ /* dimensions of the hinted glyph (in case hinting is applicable). */
+ /* */
+ /* Stroking a glyph with an outside border does not increase */
+ /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */
+ /* values to account for the added width and height. */
+ /* */
+ /* FreeType doesn't use the `VORG' table data for CFF fonts because */
+ /* it doesn't have an interface to quickly retrieve the glyph height. */
+ /* The y~coordinate of the vertical origin can be simply computed as */
+ /* `vertBearingY + height' after loading a glyph. */
+ /* */
+ typedef struct FT_Glyph_Metrics_
+ {
+ FT_Pos width;
+ FT_Pos height;
+
+ FT_Pos horiBearingX;
+ FT_Pos horiBearingY;
+ FT_Pos horiAdvance;
+
+ FT_Pos vertBearingX;
+ FT_Pos vertBearingY;
+ FT_Pos vertAdvance;
+
+ } FT_Glyph_Metrics;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Bitmap_Size */
+ /* */
+ /* */
+ /* This structure models the metrics of a bitmap strike (i.e., a set */
+ /* of glyphs for a given point size and resolution) in a bitmap font. */
+ /* It is used for the `available_sizes' field of @FT_Face. */
+ /* */
+ /* */
+ /* height :: The vertical distance, in pixels, between two */
+ /* consecutive baselines. It is always positive. */
+ /* */
+ /* width :: The average width, in pixels, of all glyphs in the */
+ /* strike. */
+ /* */
+ /* size :: The nominal size of the strike in 26.6 fractional */
+ /* points. This field is not very useful. */
+ /* */
+ /* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */
+ /* pixels. */
+ /* */
+ /* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */
+ /* pixels. */
+ /* */
+ /* */
+ /* Windows FNT: */
+ /* The nominal size given in a FNT font is not reliable. If the */
+ /* driver finds it incorrect, it sets `size' to some calculated */
+ /* values, and `x_ppem' and `y_ppem' to the pixel width and height */
+ /* given in the font, respectively. */
+ /* */
+ /* TrueType embedded bitmaps: */
+ /* `size', `width', and `height' values are not contained in the */
+ /* bitmap strike itself. They are computed from the global font */
+ /* parameters. */
+ /* */
+ typedef struct FT_Bitmap_Size_
+ {
+ FT_Short height;
+ FT_Short width;
+
+ FT_Pos size;
+
+ FT_Pos x_ppem;
+ FT_Pos y_ppem;
+
+ } FT_Bitmap_Size;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* O B J E C T C L A S S E S */
+ /* */
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Library */
+ /* */
+ /* */
+ /* A handle to a FreeType library instance. Each `library' is */
+ /* completely independent from the others; it is the `root' of a set */
+ /* of objects like fonts, faces, sizes, etc. */
+ /* */
+ /* It also embeds a memory manager (see @FT_Memory), as well as a */
+ /* scan-line converter object (see @FT_Raster). */
+ /* */
+ /* In multi-threaded applications it is easiest to use one */
+ /* `FT_Library' object per thread. In case this is too cumbersome, */
+ /* a single `FT_Library' object across threads is possible also */
+ /* (since FreeType version 2.5.6), as long as a mutex lock is used */
+ /* around @FT_New_Face and @FT_Done_Face. */
+ /* */
+ /* */
+ /* Library objects are normally created by @FT_Init_FreeType, and */
+ /* destroyed with @FT_Done_FreeType. If you need reference-counting */
+ /* (cf. @FT_Reference_Library), use @FT_New_Library and */
+ /* @FT_Done_Library. */
+ /* */
+ typedef struct FT_LibraryRec_ *FT_Library;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* module_management */
+ /* */
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Module */
+ /* */
+ /* */
+ /* A handle to a given FreeType module object. A module can be a */
+ /* font driver, a renderer, or anything else that provides services */
+ /* to the former. */
+ /* */
+ typedef struct FT_ModuleRec_* FT_Module;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Driver */
+ /* */
+ /* */
+ /* A handle to a given FreeType font driver object. A font driver */
+ /* is a module capable of creating faces from font files. */
+ /* */
+ typedef struct FT_DriverRec_* FT_Driver;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Renderer */
+ /* */
+ /* */
+ /* A handle to a given FreeType renderer. A renderer is a module in */
+ /* charge of converting a glyph's outline image to a bitmap. It */
+ /* supports a single glyph image format, and one or more target */
+ /* surface depths. */
+ /* */
+ typedef struct FT_RendererRec_* FT_Renderer;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* base_interface */
+ /* */
+ /*************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Face */
+ /* */
+ /* */
+ /* A handle to a typographic face object. A face object models a */
+ /* given typeface, in a given style. */
+ /* */
+ /* */
+ /* A face object also owns a single @FT_GlyphSlot object, as well */
+ /* as one or more @FT_Size objects. */
+ /* */
+ /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */
+ /* a given filepath or a custom input stream. */
+ /* */
+ /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */
+ /* */
+ /* An `FT_Face' object can only be safely used from one thread at a */
+ /* time. Similarly, creation and destruction of `FT_Face' with the */
+ /* same @FT_Library object can only be done from one thread at a */
+ /* time. On the other hand, functions like @FT_Load_Glyph and its */
+ /* siblings are thread-safe and do not need the lock to be held as */
+ /* long as the same `FT_Face' object is not used from multiple */
+ /* threads at the same time. */
+ /* */
+ /* */
+ /* See @FT_FaceRec for the publicly accessible fields of a given face */
+ /* object. */
+ /* */
+ typedef struct FT_FaceRec_* FT_Face;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Size */
+ /* */
+ /* */
+ /* A handle to an object that models a face scaled to a given */
+ /* character size. */
+ /* */
+ /* */
+ /* An @FT_Face has one _active_ @FT_Size object that is used by */
+ /* functions like @FT_Load_Glyph to determine the scaling */
+ /* transformation that in turn is used to load and hint glyphs and */
+ /* metrics. */
+ /* */
+ /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */
+ /* @FT_Request_Size or even @FT_Select_Size to change the content */
+ /* (i.e., the scaling values) of the active @FT_Size. */
+ /* */
+ /* You can use @FT_New_Size to create additional size objects for a */
+ /* given @FT_Face, but they won't be used by other functions until */
+ /* you activate it through @FT_Activate_Size. Only one size can be */
+ /* activated at any given time per face. */
+ /* */
+ /* */
+ /* See @FT_SizeRec for the publicly accessible fields of a given size */
+ /* object. */
+ /* */
+ typedef struct FT_SizeRec_* FT_Size;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_GlyphSlot */
+ /* */
+ /* */
+ /* A handle to a given `glyph slot'. A slot is a container that can */
+ /* hold any of the glyphs contained in its parent face. */
+ /* */
+ /* In other words, each time you call @FT_Load_Glyph or */
+ /* @FT_Load_Char, the slot's content is erased by the new glyph data, */
+ /* i.e., the glyph's metrics, its image (bitmap or outline), and */
+ /* other control information. */
+ /* */
+ /* */
+ /* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */
+ /* */
+ typedef struct FT_GlyphSlotRec_* FT_GlyphSlot;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_CharMap */
+ /* */
+ /* */
+ /* A handle to a character map (usually abbreviated to `charmap'). A */
+ /* charmap is used to translate character codes in a given encoding */
+ /* into glyph indexes for its parent's face. Some font formats may */
+ /* provide several charmaps per font. */
+ /* */
+ /* Each face object owns zero or more charmaps, but only one of them */
+ /* can be `active', providing the data used by @FT_Get_Char_Index or */
+ /* @FT_Load_Char. */
+ /* */
+ /* The list of available charmaps in a face is available through the */
+ /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */
+ /* */
+ /* The currently active charmap is available as `face->charmap'. */
+ /* You should call @FT_Set_Charmap to change it. */
+ /* */
+ /* */
+ /* When a new face is created (either through @FT_New_Face or */
+ /* @FT_Open_Face), the library looks for a Unicode charmap within */
+ /* the list and automatically activates it. If there is no Unicode */
+ /* charmap, FreeType doesn't set an `active' charmap. */
+ /* */
+ /* */
+ /* See @FT_CharMapRec for the publicly accessible fields of a given */
+ /* character map. */
+ /* */
+ typedef struct FT_CharMapRec_* FT_CharMap;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_ENC_TAG */
+ /* */
+ /* */
+ /* This macro converts four-letter tags into an unsigned long. It is */
+ /* used to define `encoding' identifiers (see @FT_Encoding). */
+ /* */
+ /* */
+ /* Since many 16-bit compilers don't like 32-bit enumerations, you */
+ /* should redefine this macro in case of problems to something like */
+ /* this: */
+ /* */
+ /* { */
+ /* #define FT_ENC_TAG( value, a, b, c, d ) value */
+ /* } */
+ /* */
+ /* to get a simple enumeration without assigning special numbers. */
+ /* */
+
+#ifndef FT_ENC_TAG
+#define FT_ENC_TAG( value, a, b, c, d ) \
+ value = ( ( (FT_UInt32)(a) << 24 ) | \
+ ( (FT_UInt32)(b) << 16 ) | \
+ ( (FT_UInt32)(c) << 8 ) | \
+ (FT_UInt32)(d) )
+
+#endif /* FT_ENC_TAG */
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Encoding */
+ /* */
+ /* */
+ /* An enumeration to specify character sets supported by charmaps. */
+ /* Used in the @FT_Select_Charmap API function. */
+ /* */
+ /* */
+ /* Despite the name, this enumeration lists specific character */
+ /* repertories (i.e., charsets), and not text encoding methods (e.g., */
+ /* UTF-8, UTF-16, etc.). */
+ /* */
+ /* Other encodings might be defined in the future. */
+ /* */
+ /* */
+ /* FT_ENCODING_NONE :: */
+ /* The encoding value~0 is reserved. */
+ /* */
+ /* FT_ENCODING_UNICODE :: */
+ /* The Unicode character set. This value covers all versions of */
+ /* the Unicode repertoire, including ASCII and Latin-1. Most fonts */
+ /* include a Unicode charmap, but not all of them. */
+ /* */
+ /* For example, if you want to access Unicode value U+1F028 (and */
+ /* the font contains it), use value 0x1F028 as the input value for */
+ /* @FT_Get_Char_Index. */
+ /* */
+ /* FT_ENCODING_MS_SYMBOL :: */
+ /* Microsoft Symbol encoding, used to encode mathematical symbols */
+ /* and wingdings. For more information, see */
+ /* `https://www.microsoft.com/typography/otspec/recom.htm', */
+ /* `http://www.kostis.net/charsets/symbol.htm', and */
+ /* `http://www.kostis.net/charsets/wingding.htm'. */
+ /* */
+ /* This encoding uses character codes from the PUA (Private Unicode */
+ /* Area) in the range U+F020-U+F0FF. */
+ /* */
+ /* FT_ENCODING_SJIS :: */
+ /* Shift JIS encoding for Japanese. More info at */
+ /* `https://en.wikipedia.org/wiki/Shift_JIS'. See note on */
+ /* multi-byte encodings below. */
+ /* */
+ /* FT_ENCODING_PRC :: */
+ /* Corresponds to encoding systems mainly for Simplified Chinese as */
+ /* used in People's Republic of China (PRC). The encoding layout */
+ /* is based on GB~2312 and its supersets GBK and GB~18030. */
+ /* */
+ /* FT_ENCODING_BIG5 :: */
+ /* Corresponds to an encoding system for Traditional Chinese as */
+ /* used in Taiwan and Hong Kong. */
+ /* */
+ /* FT_ENCODING_WANSUNG :: */
+ /* Corresponds to the Korean encoding system known as Extended */
+ /* Wansung (MS Windows code page 949). */
+ /* For more information see */
+ /* `https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */
+ /* */
+ /* FT_ENCODING_JOHAB :: */
+ /* The Korean standard character set (KS~C 5601-1992), which */
+ /* corresponds to MS Windows code page 1361. This character set */
+ /* includes all possible Hangul character combinations. */
+ /* */
+ /* FT_ENCODING_ADOBE_LATIN_1 :: */
+ /* Corresponds to a Latin-1 encoding as defined in a Type~1 */
+ /* PostScript font. It is limited to 256 character codes. */
+ /* */
+ /* FT_ENCODING_ADOBE_STANDARD :: */
+ /* Adobe Standard encoding, as found in Type~1, CFF, and */
+ /* OpenType/CFF fonts. It is limited to 256 character codes. */
+ /* */
+ /* FT_ENCODING_ADOBE_EXPERT :: */
+ /* Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF */
+ /* fonts. It is limited to 256 character codes. */
+ /* */
+ /* FT_ENCODING_ADOBE_CUSTOM :: */
+ /* Corresponds to a custom encoding, as found in Type~1, CFF, and */
+ /* OpenType/CFF fonts. It is limited to 256 character codes. */
+ /* */
+ /* FT_ENCODING_APPLE_ROMAN :: */
+ /* Apple roman encoding. Many TrueType and OpenType fonts contain */
+ /* a charmap for this 8-bit encoding, since older versions of Mac */
+ /* OS are able to use it. */
+ /* */
+ /* FT_ENCODING_OLD_LATIN_2 :: */
+ /* This value is deprecated and was neither used nor reported by */
+ /* FreeType. Don't use or test for it. */
+ /* */
+ /* FT_ENCODING_MS_SJIS :: */
+ /* Same as FT_ENCODING_SJIS. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_GB2312 :: */
+ /* Same as FT_ENCODING_PRC. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_BIG5 :: */
+ /* Same as FT_ENCODING_BIG5. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_WANSUNG :: */
+ /* Same as FT_ENCODING_WANSUNG. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_JOHAB :: */
+ /* Same as FT_ENCODING_JOHAB. Deprecated. */
+ /* */
+ /* */
+ /* By default, FreeType automatically synthesizes a Unicode charmap */
+ /* for PostScript fonts, using their glyph name dictionaries. */
+ /* However, it also reports the encodings defined explicitly in the */
+ /* font file, for the cases when they are needed, with the Adobe */
+ /* values as well. */
+ /* */
+ /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */
+ /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */
+ /* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */
+ /* which encoding is really present. If, for example, the */
+ /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */
+ /* the font is encoded in KOI8-R. */
+ /* */
+ /* FT_ENCODING_NONE is always set (with a single exception) by the */
+ /* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */
+ /* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */
+ /* which encoding is really present. For example, */
+ /* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */
+ /* Russian). */
+ /* */
+ /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */
+ /* and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to */
+ /* FT_ENCODING_APPLE_ROMAN). */
+ /* */
+ /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */
+ /* @FT_Get_CMap_Language_ID to query the Mac language ID that may */
+ /* be needed to be able to distinguish Apple encoding variants. See */
+ /* */
+ /* https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt */
+ /* */
+ /* to get an idea how to do that. Basically, if the language ID */
+ /* is~0, don't use it, otherwise subtract 1 from the language ID. */
+ /* Then examine `encoding_id'. If, for example, `encoding_id' is */
+ /* `TT_MAC_ID_ROMAN' and the language ID (minus~1) is */
+ /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */
+ /* `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi */
+ /* variant the Arabic encoding. */
+ /* */
+ typedef enum FT_Encoding_
+ {
+ FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
+
+ FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
+ FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
+
+ FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ),
+ FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ),
+ FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ),
+ FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
+ FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ),
+
+ /* for backward compatibility */
+ FT_ENCODING_GB2312 = FT_ENCODING_PRC,
+ FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
+ FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC,
+ FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
+ FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
+ FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
+
+ FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ),
+ FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ),
+
+ FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
+
+ FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
+
+ } FT_Encoding;
+
+
+ /* these constants are deprecated; use the corresponding `FT_Encoding' */
+ /* values instead */
+#define ft_encoding_none FT_ENCODING_NONE
+#define ft_encoding_unicode FT_ENCODING_UNICODE
+#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
+#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
+#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
+#define ft_encoding_sjis FT_ENCODING_SJIS
+#define ft_encoding_gb2312 FT_ENCODING_PRC
+#define ft_encoding_big5 FT_ENCODING_BIG5
+#define ft_encoding_wansung FT_ENCODING_WANSUNG
+#define ft_encoding_johab FT_ENCODING_JOHAB
+
+#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
+#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
+#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
+#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_CharMapRec */
+ /* */
+ /* */
+ /* The base charmap structure. */
+ /* */
+ /* */
+ /* face :: A handle to the parent face object. */
+ /* */
+ /* encoding :: An @FT_Encoding tag identifying the charmap. Use */
+ /* this with @FT_Select_Charmap. */
+ /* */
+ /* platform_id :: An ID number describing the platform for the */
+ /* following encoding ID. This comes directly from */
+ /* the TrueType specification and gets emulated for */
+ /* other formats. */
+ /* */
+ /* encoding_id :: A platform specific encoding number. This also */
+ /* comes from the TrueType specification and gets */
+ /* emulated similarly. */
+ /* */
+ typedef struct FT_CharMapRec_
+ {
+ FT_Face face;
+ FT_Encoding encoding;
+ FT_UShort platform_id;
+ FT_UShort encoding_id;
+
+ } FT_CharMapRec;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* B A S E O B J E C T C L A S S E S */
+ /* */
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Face_Internal */
+ /* */
+ /* */
+ /* An opaque handle to an `FT_Face_InternalRec' structure that models */
+ /* the private data of a given @FT_Face object. */
+ /* */
+ /* This structure might change between releases of FreeType~2 and is */
+ /* not generally available to client applications. */
+ /* */
+ typedef struct FT_Face_InternalRec_* FT_Face_Internal;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_FaceRec */
+ /* */
+ /* */
+ /* FreeType root face class structure. A face object models a */
+ /* typeface in a font file. */
+ /* */
+ /* */
+ /* num_faces :: The number of faces in the font file. Some */
+ /* font formats can have multiple faces in */
+ /* a single font file. */
+ /* */
+ /* face_index :: This field holds two different values. */
+ /* Bits 0-15 are the index of the face in the */
+ /* font file (starting with value~0). They */
+ /* are set to~0 if there is only one face in */
+ /* the font file. */
+ /* */
+ /* [Since 2.6.1] Bits 16-30 are relevant to GX */
+ /* and OpenType variation fonts only, holding */
+ /* the named instance index for the current */
+ /* face index (starting with value~1; value~0 */
+ /* indicates font access without a named */
+ /* instance). For non-variation fonts, bits */
+ /* 16-30 are ignored. If we have the third */
+ /* named instance of face~4, say, `face_index' */
+ /* is set to 0x00030004. */
+ /* */
+ /* Bit 31 is always zero (this is, */
+ /* `face_index' is always a positive value). */
+ /* */
+ /* [Since 2.9] Changing the design coordinates */
+ /* with @FT_Set_Var_Design_Coordinates or */
+ /* @FT_Set_Var_Blend_Coordinates does not */
+ /* influence the named instance index value */
+ /* (only @FT_Set_Named_Instance does that). */
+ /* */
+ /* face_flags :: A set of bit flags that give important */
+ /* information about the face; see */
+ /* @FT_FACE_FLAG_XXX for the details. */
+ /* */
+ /* style_flags :: The lower 16~bits contain a set of bit */
+ /* flags indicating the style of the face; see */
+ /* @FT_STYLE_FLAG_XXX for the details. */
+ /* */
+ /* [Since 2.6.1] Bits 16-30 hold the number */
+ /* of named instances available for the */
+ /* current face if we have a GX or OpenType */
+ /* variation (sub)font. Bit 31 is always zero */
+ /* (this is, `style_flags' is always a */
+ /* positive value). Note that a variation */
+ /* font has always at least one named */
+ /* instance, namely the default instance. */
+ /* */
+ /* num_glyphs :: The number of glyphs in the face. If the */
+ /* face is scalable and has sbits (see */
+ /* `num_fixed_sizes'), it is set to the number */
+ /* of outline glyphs. */
+ /* */
+ /* For CID-keyed fonts (not in an SFNT */
+ /* wrapper) this value gives the highest CID */
+ /* used in the font. */
+ /* */
+ /* family_name :: The face's family name. This is an ASCII */
+ /* string, usually in English, that describes */
+ /* the typeface's family (like `Times New */
+ /* Roman', `Bodoni', `Garamond', etc). This */
+ /* is a least common denominator used to list */
+ /* fonts. Some formats (TrueType & OpenType) */
+ /* provide localized and Unicode versions of */
+ /* this string. Applications should use the */
+ /* format specific interface to access them. */
+ /* Can be NULL (e.g., in fonts embedded in a */
+ /* PDF file). */
+ /* */
+ /* In case the font doesn't provide a specific */
+ /* family name entry, FreeType tries to */
+ /* synthesize one, deriving it from other name */
+ /* entries. */
+ /* */
+ /* style_name :: The face's style name. This is an ASCII */
+ /* string, usually in English, that describes */
+ /* the typeface's style (like `Italic', */
+ /* `Bold', `Condensed', etc). Not all font */
+ /* formats provide a style name, so this field */
+ /* is optional, and can be set to NULL. As */
+ /* for `family_name', some formats provide */
+ /* localized and Unicode versions of this */
+ /* string. Applications should use the format */
+ /* specific interface to access them. */
+ /* */
+ /* num_fixed_sizes :: The number of bitmap strikes in the face. */
+ /* Even if the face is scalable, there might */
+ /* still be bitmap strikes, which are called */
+ /* `sbits' in that case. */
+ /* */
+ /* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */
+ /* strikes in the face. It is set to NULL if */
+ /* there is no bitmap strike. */
+ /* */
+ /* Note that FreeType tries to sanitize the */
+ /* strike data since they are sometimes sloppy */
+ /* or incorrect, but this can easily fail. */
+ /* */
+ /* num_charmaps :: The number of charmaps in the face. */
+ /* */
+ /* charmaps :: An array of the charmaps of the face. */
+ /* */
+ /* generic :: A field reserved for client uses. See the */
+ /* @FT_Generic type description. */
+ /* */
+ /* bbox :: The font bounding box. Coordinates are */
+ /* expressed in font units (see */
+ /* `units_per_EM'). The box is large enough */
+ /* to contain any glyph from the font. Thus, */
+ /* `bbox.yMax' can be seen as the `maximum */
+ /* ascender', and `bbox.yMin' as the `minimum */
+ /* descender'. Only relevant for scalable */
+ /* formats. */
+ /* */
+ /* Note that the bounding box might be off by */
+ /* (at least) one pixel for hinted fonts. See */
+ /* @FT_Size_Metrics for further discussion. */
+ /* */
+ /* units_per_EM :: The number of font units per EM square for */
+ /* this face. This is typically 2048 for */
+ /* TrueType fonts, and 1000 for Type~1 fonts. */
+ /* Only relevant for scalable formats. */
+ /* */
+ /* ascender :: The typographic ascender of the face, */
+ /* expressed in font units. For font formats */
+ /* not having this information, it is set to */
+ /* `bbox.yMax'. Only relevant for scalable */
+ /* formats. */
+ /* */
+ /* descender :: The typographic descender of the face, */
+ /* expressed in font units. For font formats */
+ /* not having this information, it is set to */
+ /* `bbox.yMin'. Note that this field is */
+ /* negative for values below the baseline. */
+ /* Only relevant for scalable formats. */
+ /* */
+ /* height :: This value is the vertical distance */
+ /* between two consecutive baselines, */
+ /* expressed in font units. It is always */
+ /* positive. Only relevant for scalable */
+ /* formats. */
+ /* */
+ /* If you want the global glyph height, use */
+ /* `ascender - descender'. */
+ /* */
+ /* max_advance_width :: The maximum advance width, in font units, */
+ /* for all glyphs in this face. This can be */
+ /* used to make word wrapping computations */
+ /* faster. Only relevant for scalable */
+ /* formats. */
+ /* */
+ /* max_advance_height :: The maximum advance height, in font units, */
+ /* for all glyphs in this face. This is only */
+ /* relevant for vertical layouts, and is set */
+ /* to `height' for fonts that do not provide */
+ /* vertical metrics. Only relevant for */
+ /* scalable formats. */
+ /* */
+ /* underline_position :: The position, in font units, of the */
+ /* underline line for this face. It is the */
+ /* center of the underlining stem. Only */
+ /* relevant for scalable formats. */
+ /* */
+ /* underline_thickness :: The thickness, in font units, of the */
+ /* underline for this face. Only relevant for */
+ /* scalable formats. */
+ /* */
+ /* glyph :: The face's associated glyph slot(s). */
+ /* */
+ /* size :: The current active size for this face. */
+ /* */
+ /* charmap :: The current active charmap for this face. */
+ /* */
+ /* */
+ /* Fields may be changed after a call to @FT_Attach_File or */
+ /* @FT_Attach_Stream. */
+ /* */
+ /* For an OpenType variation font, the values of the following fields */
+ /* can change after a call to @FT_Set_Var_Design_Coordinates (and */
+ /* friends) if the font contains an `MVAR' table: `ascender', */
+ /* `descender', `height', `underline_position', and */
+ /* `underline_thickness'. */
+ /* */
+ /* Especially for TrueType fonts see also the documentation for */
+ /* @FT_Size_Metrics. */
+ /* */
+ typedef struct FT_FaceRec_
+ {
+ FT_Long num_faces;
+ FT_Long face_index;
+
+ FT_Long face_flags;
+ FT_Long style_flags;
+
+ FT_Long num_glyphs;
+
+ FT_String* family_name;
+ FT_String* style_name;
+
+ FT_Int num_fixed_sizes;
+ FT_Bitmap_Size* available_sizes;
+
+ FT_Int num_charmaps;
+ FT_CharMap* charmaps;
+
+ FT_Generic generic;
+
+ /*# The following member variables (down to `underline_thickness') */
+ /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */
+ /*# for bitmap fonts. */
+ FT_BBox bbox;
+
+ FT_UShort units_per_EM;
+ FT_Short ascender;
+ FT_Short descender;
+ FT_Short height;
+
+ FT_Short max_advance_width;
+ FT_Short max_advance_height;
+
+ FT_Short underline_position;
+ FT_Short underline_thickness;
+
+ FT_GlyphSlot glyph;
+ FT_Size size;
+ FT_CharMap charmap;
+
+ /*@private begin */
+
+ FT_Driver driver;
+ FT_Memory memory;
+ FT_Stream stream;
+
+ FT_ListRec sizes_list;
+
+ FT_Generic autohint; /* face-specific auto-hinter data */
+ void* extensions; /* unused */
+
+ FT_Face_Internal internal;
+
+ /*@private end */
+
+ } FT_FaceRec;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_FACE_FLAG_XXX */
+ /* */
+ /* */
+ /* A list of bit flags used in the `face_flags' field of the */
+ /* @FT_FaceRec structure. They inform client applications of */
+ /* properties of the corresponding face. */
+ /* */
+ /* */
+ /* FT_FACE_FLAG_SCALABLE :: */
+ /* The face contains outline glyphs. Note that a face can contain */
+ /* bitmap strikes also, i.e., a face can have both this flag and */
+ /* @FT_FACE_FLAG_FIXED_SIZES set. */
+ /* */
+ /* FT_FACE_FLAG_FIXED_SIZES :: */
+ /* The face contains bitmap strikes. See also the */
+ /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */
+ /* */
+ /* FT_FACE_FLAG_FIXED_WIDTH :: */
+ /* The face contains fixed-width characters (like Courier, Lucida, */
+ /* MonoType, etc.). */
+ /* */
+ /* FT_FACE_FLAG_SFNT :: */
+ /* The face uses the SFNT storage scheme. For now, this means */
+ /* TrueType and OpenType. */
+ /* */
+ /* FT_FACE_FLAG_HORIZONTAL :: */
+ /* The face contains horizontal glyph metrics. This should be set */
+ /* for all common formats. */
+ /* */
+ /* FT_FACE_FLAG_VERTICAL :: */
+ /* The face contains vertical glyph metrics. This is only */
+ /* available in some formats, not all of them. */
+ /* */
+ /* FT_FACE_FLAG_KERNING :: */
+ /* The face contains kerning information. If set, the kerning */
+ /* distance can be retrieved using the function @FT_Get_Kerning. */
+ /* Otherwise the function always return the vector (0,0). Note */
+ /* that FreeType doesn't handle kerning data from the SFNT `GPOS' */
+ /* table (as present in many OpenType fonts). */
+ /* */
+ /* FT_FACE_FLAG_FAST_GLYPHS :: */
+ /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */
+ /* */
+ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */
+ /* The face contains multiple masters and is capable of */
+ /* interpolating between them. Supported formats are Adobe MM, */
+ /* TrueType GX, and OpenType variation fonts. */
+ /* */
+ /* See the multiple-masters specific API for details. */
+ /* */
+ /* FT_FACE_FLAG_GLYPH_NAMES :: */
+ /* The face contains glyph names, which can be retrieved using */
+ /* @FT_Get_Glyph_Name. Note that some TrueType fonts contain */
+ /* broken glyph name tables. Use the function */
+ /* @FT_Has_PS_Glyph_Names when needed. */
+ /* */
+ /* FT_FACE_FLAG_EXTERNAL_STREAM :: */
+ /* Used internally by FreeType to indicate that a face's stream was */
+ /* provided by the client application and should not be destroyed */
+ /* when @FT_Done_Face is called. Don't read or test this flag. */
+ /* */
+ /* FT_FACE_FLAG_HINTER :: */
+ /* The font driver has a hinting machine of its own. For example, */
+ /* with TrueType fonts, it makes sense to use data from the SFNT */
+ /* `gasp' table only if the native TrueType hinting engine (with */
+ /* the bytecode interpreter) is available and active. */
+ /* */
+ /* FT_FACE_FLAG_CID_KEYED :: */
+ /* The face is CID-keyed. In that case, the face is not accessed */
+ /* by glyph indices but by CID values. For subsetted CID-keyed */
+ /* fonts this has the consequence that not all index values are a */
+ /* valid argument to @FT_Load_Glyph. Only the CID values for which */
+ /* corresponding glyphs in the subsetted font exist make */
+ /* `FT_Load_Glyph' return successfully; in all other cases you get */
+ /* an `FT_Err_Invalid_Argument' error. */
+ /* */
+ /* Note that CID-keyed fonts that are in an SFNT wrapper (this is, */
+ /* all OpenType/CFF fonts) don't have this flag set since the */
+ /* glyphs are accessed in the normal way (using contiguous */
+ /* indices); the `CID-ness' isn't visible to the application. */
+ /* */
+ /* FT_FACE_FLAG_TRICKY :: */
+ /* The face is `tricky', this is, it always needs the font format's */
+ /* native hinting engine to get a reasonable result. A typical */
+ /* example is the old Chinese font `mingli.ttf' (but not */
+ /* `mingliu.ttc') that uses TrueType bytecode instructions to move */
+ /* and scale all of its subglyphs. */
+ /* */
+ /* It is not possible to auto-hint such fonts using */
+ /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */
+ /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */
+ /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
+ /* probably never want this except for demonstration purposes. */
+ /* */
+ /* Currently, there are about a dozen TrueType fonts in the list of */
+ /* tricky fonts; they are hard-coded in file `ttobjs.c'. */
+ /* */
+ /* FT_FACE_FLAG_COLOR :: */
+ /* [Since 2.5.1] The face has color glyph tables. To access color */
+ /* glyphs use @FT_LOAD_COLOR. */
+ /* */
+ /* FT_FACE_FLAG_VARIATION :: */
+ /* [Since 2.9] Set if the current face (or named instance) has been */
+ /* altered with @FT_Set_MM_Design_Coordinates, */
+ /* @FT_Set_Var_Design_Coordinates, or */
+ /* @FT_Set_Var_Blend_Coordinates. This flag is unset by a call to */
+ /* @FT_Set_Named_Instance. */
+ /* */
+#define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
+#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
+#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 )
+#define FT_FACE_FLAG_SFNT ( 1L << 3 )
+#define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 )
+#define FT_FACE_FLAG_VERTICAL ( 1L << 5 )
+#define FT_FACE_FLAG_KERNING ( 1L << 6 )
+#define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 )
+#define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 )
+#define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 )
+#define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 )
+#define FT_FACE_FLAG_HINTER ( 1L << 11 )
+#define FT_FACE_FLAG_CID_KEYED ( 1L << 12 )
+#define FT_FACE_FLAG_TRICKY ( 1L << 13 )
+#define FT_FACE_FLAG_COLOR ( 1L << 14 )
+#define FT_FACE_FLAG_VARIATION ( 1L << 15 )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_HORIZONTAL( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains
+ * horizontal metrics (this is true for all font formats though).
+ *
+ * @also:
+ * @FT_HAS_VERTICAL can be used to check for vertical metrics.
+ *
+ */
+#define FT_HAS_HORIZONTAL( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_HORIZONTAL )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_VERTICAL( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains real
+ * vertical metrics (and not only synthesized ones).
+ *
+ */
+#define FT_HAS_VERTICAL( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_VERTICAL )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_KERNING( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains kerning
+ * data that can be accessed with @FT_Get_Kerning.
+ *
+ */
+#define FT_HAS_KERNING( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_KERNING )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_SCALABLE( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains a scalable
+ * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,
+ * and PFR font formats).
+ *
+ */
+#define FT_IS_SCALABLE( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_SCALABLE )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_SFNT( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains a font
+ * whose format is based on the SFNT storage scheme. This usually
+ * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded
+ * bitmap fonts.
+ *
+ * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
+ * @FT_TRUETYPE_TABLES_H are available.
+ *
+ */
+#define FT_IS_SFNT( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_SFNT )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_FIXED_WIDTH( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains a font face
+ * that contains fixed-width (or `monospace', `fixed-pitch', etc.)
+ * glyphs.
+ *
+ */
+#define FT_IS_FIXED_WIDTH( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_FIXED_SIZES( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains some
+ * embedded bitmaps. See the `available_sizes' field of the
+ * @FT_FaceRec structure.
+ *
+ */
+#define FT_HAS_FIXED_SIZES( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_FAST_GLYPHS( face )
+ *
+ * @description:
+ * Deprecated.
+ *
+ */
+#define FT_HAS_FAST_GLYPHS( face ) 0
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_GLYPH_NAMES( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains some glyph
+ * names that can be accessed through @FT_Get_Glyph_Name.
+ *
+ */
+#define FT_HAS_GLYPH_NAMES( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_MULTIPLE_MASTERS( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains some
+ * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H
+ * are then available to choose the exact design you want.
+ *
+ */
+#define FT_HAS_MULTIPLE_MASTERS( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_NAMED_INSTANCE( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object is a named instance
+ * of a GX or OpenType variation font.
+ *
+ * [Since 2.9] Changing the design coordinates with
+ * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
+ * not influence the return value of this macro (only
+ * @FT_Set_Named_Instance does that).
+ *
+ * @since:
+ * 2.7
+ *
+ */
+#define FT_IS_NAMED_INSTANCE( face ) \
+ ( (face)->face_index & 0x7FFF0000L )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_VARIATION( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object has been altered
+ * by @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or
+ * @FT_Set_Var_Blend_Coordinates.
+ *
+ * @since:
+ * 2.9
+ *
+ */
+#define FT_IS_VARIATION( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_VARIATION )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_CID_KEYED( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains a CID-keyed
+ * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more
+ * details.
+ *
+ * If this macro is true, all functions defined in @FT_CID_H are
+ * available.
+ *
+ */
+#define FT_IS_CID_KEYED( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_CID_KEYED )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_TRICKY( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face represents a `tricky' font.
+ * See the discussion of @FT_FACE_FLAG_TRICKY for more details.
+ *
+ */
+#define FT_IS_TRICKY( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_TRICKY )
+
+
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_COLOR( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains
+ * tables for color glyphs.
+ *
+ * @since:
+ * 2.5.1
+ *
+ */
+#define FT_HAS_COLOR( face ) \
+ ( (face)->face_flags & FT_FACE_FLAG_COLOR )
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_STYLE_FLAG_XXX */
+ /* */
+ /* */
+ /* A list of bit flags to indicate the style of a given face. These */
+ /* are used in the `style_flags' field of @FT_FaceRec. */
+ /* */
+ /* */
+ /* FT_STYLE_FLAG_ITALIC :: */
+ /* The face style is italic or oblique. */
+ /* */
+ /* FT_STYLE_FLAG_BOLD :: */
+ /* The face is bold. */
+ /* */
+ /* */
+ /* The style information as provided by FreeType is very basic. More */
+ /* details are beyond the scope and should be done on a higher level */
+ /* (for example, by analyzing various fields of the `OS/2' table in */
+ /* SFNT based fonts). */
+ /* */
+#define FT_STYLE_FLAG_ITALIC ( 1 << 0 )
+#define FT_STYLE_FLAG_BOLD ( 1 << 1 )
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Size_Internal */
+ /* */
+ /* */
+ /* An opaque handle to an `FT_Size_InternalRec' structure, used to */
+ /* model private data of a given @FT_Size object. */
+ /* */
+ typedef struct FT_Size_InternalRec_* FT_Size_Internal;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Size_Metrics */
+ /* */
+ /* */
+ /* The size metrics structure gives the metrics of a size object. */
+ /* */
+ /* */
+ /* x_ppem :: The width of the scaled EM square in pixels, hence */
+ /* the term `ppem' (pixels per EM). It is also */
+ /* referred to as `nominal width'. */
+ /* */
+ /* y_ppem :: The height of the scaled EM square in pixels, */
+ /* hence the term `ppem' (pixels per EM). It is also */
+ /* referred to as `nominal height'. */
+ /* */
+ /* x_scale :: A 16.16 fractional scaling value to convert */
+ /* horizontal metrics from font units to 26.6 */
+ /* fractional pixels. Only relevant for scalable */
+ /* font formats. */
+ /* */
+ /* y_scale :: A 16.16 fractional scaling value to convert */
+ /* vertical metrics from font units to 26.6 */
+ /* fractional pixels. Only relevant for scalable */
+ /* font formats. */
+ /* */
+ /* ascender :: The ascender in 26.6 fractional pixels, rounded up */
+ /* to an integer value. See @FT_FaceRec for the */
+ /* details. */
+ /* */
+ /* descender :: The descender in 26.6 fractional pixels, rounded */
+ /* down to an integer value. See @FT_FaceRec for the */
+ /* details. */
+ /* */
+ /* height :: The height in 26.6 fractional pixels, rounded to */
+ /* an integer value. See @FT_FaceRec for the */
+ /* details. */
+ /* */
+ /* max_advance :: The maximum advance width in 26.6 fractional */
+ /* pixels, rounded to an integer value. See */
+ /* @FT_FaceRec for the details. */
+ /* */
+ /* */
+ /* The scaling values, if relevant, are determined first during a */
+ /* size changing operation. The remaining fields are then set by the */
+ /* driver. For scalable formats, they are usually set to scaled */
+ /* values of the corresponding fields in @FT_FaceRec. Some values */
+ /* like ascender or descender are rounded for historical reasons; */
+ /* more precise values (for outline fonts) can be derived by scaling */
+ /* the corresponding @FT_FaceRec values manually, with code similar */
+ /* to the following. */
+ /* */
+ /* { */
+ /* scaled_ascender = FT_MulFix( face->ascender, */
+ /* size_metrics->y_scale ); */
+ /* } */
+ /* */
+ /* Note that due to glyph hinting and the selected rendering mode */
+ /* these values are usually not exact; consequently, they must be */
+ /* treated as unreliable with an error margin of at least one pixel! */
+ /* */
+ /* Indeed, the only way to get the exact metrics is to render _all_ */
+ /* glyphs. As this would be a definite performance hit, it is up to */
+ /* client applications to perform such computations. */
+ /* */
+ /* The `FT_Size_Metrics' structure is valid for bitmap fonts also. */
+ /* */
+ /* */
+ /* *TrueType* *fonts* *with* *native* *bytecode* *hinting* */
+ /* */
+ /* All applications that handle TrueType fonts with native hinting */
+ /* must be aware that TTFs expect different rounding of vertical font */
+ /* dimensions. The application has to cater for this, especially if */
+ /* it wants to rely on a TTF's vertical data (for example, to */
+ /* properly align box characters vertically). */
+ /* */
+ /* Only the application knows _in_ _advance_ that it is going to use */
+ /* native hinting for TTFs! FreeType, on the other hand, selects the */
+ /* hinting mode not at the time of creating an @FT_Size object but */
+ /* much later, namely while calling @FT_Load_Glyph. */
+ /* */
+ /* Here is some pseudo code that illustrates a possible solution. */
+ /* */
+ /* { */
+ /* font_format = FT_Get_Font_Format( face ); */
+ /* */
+ /* if ( !strcmp( font_format, "TrueType" ) && */
+ /* do_native_bytecode_hinting ) */
+ /* { */
+ /* ascender = ROUND( FT_MulFix( face->ascender, */
+ /* size_metrics->y_scale ) ); */
+ /* descender = ROUND( FT_MulFix( face->descender, */
+ /* size_metrics->y_scale ) ); */
+ /* } */
+ /* else */
+ /* { */
+ /* ascender = size_metrics->ascender; */
+ /* descender = size_metrics->descender; */
+ /* } */
+ /* */
+ /* height = size_metrics->height; */
+ /* max_advance = size_metrics->max_advance; */
+ /* } */
+ /* */
+ typedef struct FT_Size_Metrics_
+ {
+ FT_UShort x_ppem; /* horizontal pixels per EM */
+ FT_UShort y_ppem; /* vertical pixels per EM */
+
+ FT_Fixed x_scale; /* scaling values used to convert font */
+ FT_Fixed y_scale; /* units to 26.6 fractional pixels */
+
+ FT_Pos ascender; /* ascender in 26.6 frac. pixels */
+ FT_Pos descender; /* descender in 26.6 frac. pixels */
+ FT_Pos height; /* text height in 26.6 frac. pixels */
+ FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */
+
+ } FT_Size_Metrics;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_SizeRec */
+ /* */
+ /* */
+ /* FreeType root size class structure. A size object models a face */
+ /* object at a given size. */
+ /* */
+ /* */
+ /* face :: Handle to the parent face object. */
+ /* */
+ /* generic :: A typeless pointer, unused by the FreeType library or */
+ /* any of its drivers. It can be used by client */
+ /* applications to link their own data to each size */
+ /* object. */
+ /* */
+ /* metrics :: Metrics for this size object. This field is read-only. */
+ /* */
+ typedef struct FT_SizeRec_
+ {
+ FT_Face face; /* parent face object */
+ FT_Generic generic; /* generic pointer for client uses */
+ FT_Size_Metrics metrics; /* size metrics */
+ FT_Size_Internal internal;
+
+ } FT_SizeRec;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_SubGlyph */
+ /* */
+ /* */
+ /* The subglyph structure is an internal object used to describe */
+ /* subglyphs (for example, in the case of composites). */
+ /* */
+ /* */
+ /* The subglyph implementation is not part of the high-level API, */
+ /* hence the forward structure declaration. */
+ /* */
+ /* You can however retrieve subglyph information with */
+ /* @FT_Get_SubGlyph_Info. */
+ /* */
+ typedef struct FT_SubGlyphRec_* FT_SubGlyph;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Slot_Internal */
+ /* */
+ /* */
+ /* An opaque handle to an `FT_Slot_InternalRec' structure, used to */
+ /* model private data of a given @FT_GlyphSlot object. */
+ /* */
+ typedef struct FT_Slot_InternalRec_* FT_Slot_Internal;
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_GlyphSlotRec */
+ /* */
+ /* */
+ /* FreeType root glyph slot class structure. A glyph slot is a */
+ /* container where individual glyphs can be loaded, be they in */
+ /* outline or bitmap format. */
+ /* */
+ /* */
+ /* library :: A handle to the FreeType library instance */
+ /* this slot belongs to. */
+ /* */
+ /* face :: A handle to the parent face object. */
+ /* */
+ /* next :: In some cases (like some font tools), several */
+ /* glyph slots per face object can be a good */
+ /* thing. As this is rare, the glyph slots are */
+ /* listed through a direct, single-linked list */
+ /* using its `next' field. */
+ /* */
+ /* generic :: A typeless pointer unused by the FreeType */
+ /* library or any of its drivers. It can be */
+ /* used by client applications to link their own */
+ /* data to each glyph slot object. */
+ /* */
+ /* metrics :: The metrics of the last loaded glyph in the */
+ /* slot. The returned values depend on the last */
+ /* load flags (see the @FT_Load_Glyph API */
+ /* function) and can be expressed either in 26.6 */
+ /* fractional pixels or font units. */
+ /* */
+ /* Note that even when the glyph image is */
+ /* transformed, the metrics are not. */
+ /* */
+ /* linearHoriAdvance :: The advance width of the unhinted glyph. */
+ /* Its value is expressed in 16.16 fractional */
+ /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */
+ /* when loading the glyph. This field can be */
+ /* important to perform correct WYSIWYG layout. */
+ /* Only relevant for outline glyphs. */
+ /* */
+ /* linearVertAdvance :: The advance height of the unhinted glyph. */
+ /* Its value is expressed in 16.16 fractional */
+ /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */
+ /* when loading the glyph. This field can be */
+ /* important to perform correct WYSIWYG layout. */
+ /* Only relevant for outline glyphs. */
+ /* */
+ /* advance :: This shorthand is, depending on */
+ /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */
+ /* (hinted) advance width for the glyph, in 26.6 */
+ /* fractional pixel format. As specified with */
+ /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */
+ /* `horiAdvance' or the `vertAdvance' value of */
+ /* `metrics' field. */
+ /* */
+ /* format :: This field indicates the format of the image */
+ /* contained in the glyph slot. Typically */
+ /* @FT_GLYPH_FORMAT_BITMAP, */
+ /* @FT_GLYPH_FORMAT_OUTLINE, or */
+ /* @FT_GLYPH_FORMAT_COMPOSITE, but other values */
+ /* are possible. */
+ /* */
+ /* bitmap :: This field is used as a bitmap descriptor. */
+ /* Note that the address and content of the */
+ /* bitmap buffer can change between calls of */
+ /* @FT_Load_Glyph and a few other functions. */
+ /* */
+ /* bitmap_left :: The bitmap's left bearing expressed in */
+ /* integer pixels. */
+ /* */
+ /* bitmap_top :: The bitmap's top bearing expressed in integer */
+ /* pixels. This is the distance from the */
+ /* baseline to the top-most glyph scanline, */
+ /* upwards y~coordinates being *positive*. */
+ /* */
+ /* outline :: The outline descriptor for the current glyph */
+ /* image if its format is */
+ /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */
+ /* loaded, `outline' can be transformed, */
+ /* distorted, emboldened, etc. However, it must */
+ /* not be freed. */
+ /* */
+ /* num_subglyphs :: The number of subglyphs in a composite glyph. */
+ /* This field is only valid for the composite */
+ /* glyph format that should normally only be */
+ /* loaded with the @FT_LOAD_NO_RECURSE flag. */
+ /* */
+ /* subglyphs :: An array of subglyph descriptors for */
+ /* composite glyphs. There are `num_subglyphs' */
+ /* elements in there. Currently internal to */
+ /* FreeType. */
+ /* */
+ /* control_data :: Certain font drivers can also return the */
+ /* control data for a given glyph image (e.g. */
+ /* TrueType bytecode, Type~1 charstrings, etc.). */
+ /* This field is a pointer to such data; it is */
+ /* currently internal to FreeType. */
+ /* */
+ /* control_len :: This is the length in bytes of the control */
+ /* data. Currently internal to FreeType. */
+ /* */
+ /* other :: Reserved. */
+ /* */
+ /* lsb_delta :: The difference between hinted and unhinted */
+ /* left side bearing while auto-hinting is */
+ /* active. Zero otherwise. */
+ /* */
+ /* rsb_delta :: The difference between hinted and unhinted */
+ /* right side bearing while auto-hinting is */
+ /* active. Zero otherwise. */
+ /* */
+ /* */
+ /* If @FT_Load_Glyph is called with default flags (see */
+ /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */
+ /* its native format (e.g., an outline glyph for TrueType and Type~1 */
+ /* formats). [Since 2.9] The prospective bitmap metrics are */
+ /* calculated according to @FT_LOAD_TARGET_XXX and other flags even */
+ /* for the outline glyph, even if @FT_LOAD_RENDER is not set. */
+ /* */
+ /* This image can later be converted into a bitmap by calling */
+ /* @FT_Render_Glyph. This function searches the current renderer for */
+ /* the native image's format, then invokes it. */
+ /* */
+ /* The renderer is in charge of transforming the native image through */
+ /* the slot's face transformation fields, then converting it into a */
+ /* bitmap that is returned in `slot->bitmap'. */
+ /* */
+ /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
+ /* to specify the position of the bitmap relative to the current pen */
+ /* position (e.g., coordinates (0,0) on the baseline). Of course, */
+ /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */
+ /* */
+ /* Here is a small pseudo code fragment that shows how to use */
+ /* `lsb_delta' and `rsb_delta' to do fractional positioning of */
+ /* glyphs: */
+ /* */
+ /* { */
+ /* FT_GlyphSlot slot = face->glyph; */
+ /* FT_Pos origin_x = 0; */
+ /* */
+ /* */
+ /* for all glyphs do */
+ /* */
+ /* */
+ /* FT_Outline_Translate( slot->outline, origin_x & 63, 0 ); */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* origin_x += slot->advance.x; */
+ /* origin_x += slot->rsb_delta - slot->lsb_delta; */
+ /* endfor */
+ /* } */
+ /* */
+ /* Here is another small pseudo code fragment that shows how to use */
+ /* `lsb_delta' and `rsb_delta' to improve integer positioning of */
+ /* glyphs: */
+ /* */
+ /* { */
+ /* FT_GlyphSlot slot = face->glyph; */
+ /* FT_Pos origin_x = 0; */
+ /* FT_Pos prev_rsb_delta = 0; */
+ /* */
+ /* */
+ /* for all glyphs do */
+ /* */
+ /* */
+ /* */
+ /* */
+ /* if ( prev_rsb_delta - slot->lsb_delta > 32 ) */
+ /* origin_x -= 64; */
+ /* else if ( prev_rsb_delta - slot->lsb_delta < -31 ) */
+ /* origin_x += 64; */
+ /* */
+ /* prev_rsb_delta = slot->rsb_delta; */
+ /* */
+ /* */
+ /* */
+ /* origin_x += slot->advance.x; */
+ /* endfor */
+ /* } */
+ /* */
+ /* If you use strong auto-hinting, you *must* apply these delta */
+ /* values! Otherwise you will experience far too large inter-glyph */
+ /* spacing at small rendering sizes in most cases. Note that it */
+ /* doesn't harm to use the above code for other hinting modes also, */
+ /* since the delta values are zero then. */
+ /* */
+ typedef struct FT_GlyphSlotRec_
+ {
+ FT_Library library;
+ FT_Face face;
+ FT_GlyphSlot next;
+ FT_UInt reserved; /* retained for binary compatibility */
+ FT_Generic generic;
+
+ FT_Glyph_Metrics metrics;
+ FT_Fixed linearHoriAdvance;
+ FT_Fixed linearVertAdvance;
+ FT_Vector advance;
+
+ FT_Glyph_Format format;
+
+ FT_Bitmap bitmap;
+ FT_Int bitmap_left;
+ FT_Int bitmap_top;
+
+ FT_Outline outline;
+
+ FT_UInt num_subglyphs;
+ FT_SubGlyph subglyphs;
+
+ void* control_data;
+ long control_len;
+
+ FT_Pos lsb_delta;
+ FT_Pos rsb_delta;
+
+ void* other;
+
+ FT_Slot_Internal internal;
+
+ } FT_GlyphSlotRec;
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* F U N C T I O N S */
+ /* */
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* */
+ /* FT_Init_FreeType */
+ /* */
+ /* */
+ /* Initialize a new FreeType library object. The set of modules */
+ /* that are registered by this function is determined at build time. */
+ /* */
+ /*