libwz 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/binding.gyp +149 -0
  4. package/deps/tiny-aes/.github/workflows/c-cpp.yml +27 -0
  5. package/deps/tiny-aes/CMakeLists.txt +17 -0
  6. package/deps/tiny-aes/Makefile +61 -0
  7. package/deps/tiny-aes/README.md +83 -0
  8. package/deps/tiny-aes/aes.c +572 -0
  9. package/deps/tiny-aes/aes.h +91 -0
  10. package/deps/tiny-aes/aes.hpp +12 -0
  11. package/deps/tiny-aes/conanfile.py +73 -0
  12. package/deps/tiny-aes/library.json +19 -0
  13. package/deps/tiny-aes/library.properties +11 -0
  14. package/deps/tiny-aes/test.c +316 -0
  15. package/deps/tiny-aes/test.cpp +2 -0
  16. package/deps/tiny-aes/test_package/CMakeLists.txt +11 -0
  17. package/deps/tiny-aes/test_package/conanfile.py +17 -0
  18. package/deps/tiny-aes/unlicense.txt +24 -0
  19. package/deps/zlib/.cmake-format.yaml +245 -0
  20. package/deps/zlib/.github/workflows/c-std.yml +268 -0
  21. package/deps/zlib/.github/workflows/cmake.yml +147 -0
  22. package/deps/zlib/.github/workflows/configure.yml +146 -0
  23. package/deps/zlib/.github/workflows/contribs.yml +64 -0
  24. package/deps/zlib/.github/workflows/fuzz.yml +25 -0
  25. package/deps/zlib/.github/workflows/msys-cygwin.yml +92 -0
  26. package/deps/zlib/.github/workflows/others.yml +153 -0
  27. package/deps/zlib/BUILD.bazel +134 -0
  28. package/deps/zlib/CMakeLists.txt +310 -0
  29. package/deps/zlib/ChangeLog +1669 -0
  30. package/deps/zlib/FAQ +371 -0
  31. package/deps/zlib/INDEX +67 -0
  32. package/deps/zlib/LICENSE +22 -0
  33. package/deps/zlib/MODULE.bazel +9 -0
  34. package/deps/zlib/Makefile.in +426 -0
  35. package/deps/zlib/README +115 -0
  36. package/deps/zlib/README-cmake.md +79 -0
  37. package/deps/zlib/adler32.c +164 -0
  38. package/deps/zlib/amiga/Makefile.pup +69 -0
  39. package/deps/zlib/amiga/Makefile.sas +68 -0
  40. package/deps/zlib/compress.c +99 -0
  41. package/deps/zlib/configure +1078 -0
  42. package/deps/zlib/contrib/CMakeLists.txt +61 -0
  43. package/deps/zlib/contrib/README.contrib +57 -0
  44. package/deps/zlib/contrib/ada/CMakeLists.txt +217 -0
  45. package/deps/zlib/contrib/ada/buffer_demo.adb +106 -0
  46. package/deps/zlib/contrib/ada/cmake/Modules/CMakeADACompiler.cmake.in +23 -0
  47. package/deps/zlib/contrib/ada/cmake/Modules/CMakeADAInformation.cmake +133 -0
  48. package/deps/zlib/contrib/ada/cmake/Modules/CMakeDetermineADACompiler.cmake +33 -0
  49. package/deps/zlib/contrib/ada/cmake/Modules/CMakeTestADACompiler.cmake +46 -0
  50. package/deps/zlib/contrib/ada/cmake/binder_helper.cmake +47 -0
  51. package/deps/zlib/contrib/ada/cmake/compile_helper.cmake +32 -0
  52. package/deps/zlib/contrib/ada/cmake/exe_link_helper.cmake +53 -0
  53. package/deps/zlib/contrib/ada/cmake/shared_link_helper.cmake +52 -0
  54. package/deps/zlib/contrib/ada/cmake/static_link_helper.cmake +25 -0
  55. package/deps/zlib/contrib/ada/mtest.adb +156 -0
  56. package/deps/zlib/contrib/ada/read.adb +156 -0
  57. package/deps/zlib/contrib/ada/readme.txt +65 -0
  58. package/deps/zlib/contrib/ada/test.adb +463 -0
  59. package/deps/zlib/contrib/ada/zlib-streams.adb +225 -0
  60. package/deps/zlib/contrib/ada/zlib-streams.ads +114 -0
  61. package/deps/zlib/contrib/ada/zlib-thin.adb +142 -0
  62. package/deps/zlib/contrib/ada/zlib-thin.ads +450 -0
  63. package/deps/zlib/contrib/ada/zlib.adb +701 -0
  64. package/deps/zlib/contrib/ada/zlib.ads +328 -0
  65. package/deps/zlib/contrib/ada/zlib.gpr +20 -0
  66. package/deps/zlib/contrib/blast/CMakeLists.txt +166 -0
  67. package/deps/zlib/contrib/blast/Makefile +14 -0
  68. package/deps/zlib/contrib/blast/README +4 -0
  69. package/deps/zlib/contrib/blast/blast-test.c +42 -0
  70. package/deps/zlib/contrib/blast/blast.c +422 -0
  71. package/deps/zlib/contrib/blast/blast.h +84 -0
  72. package/deps/zlib/contrib/blast/blastConfig.cmake.in +18 -0
  73. package/deps/zlib/contrib/blast/test/CMakeLists.txt +193 -0
  74. package/deps/zlib/contrib/blast/test/add_subdirectory_exclude_test.cmake.in +27 -0
  75. package/deps/zlib/contrib/blast/test/add_subdirectory_test.cmake.in +25 -0
  76. package/deps/zlib/contrib/blast/test/find_package_no_components_test.cmake.in +24 -0
  77. package/deps/zlib/contrib/blast/test/find_package_test.cmake.in +24 -0
  78. package/deps/zlib/contrib/blast/test/find_package_wrong_components_test.cmake.in +24 -0
  79. package/deps/zlib/contrib/blast/test.pk +0 -0
  80. package/deps/zlib/contrib/blast/test.txt +1 -0
  81. package/deps/zlib/contrib/blast/tester.cmake +28 -0
  82. package/deps/zlib/contrib/crc32vx/CMakeLists.txt +67 -0
  83. package/deps/zlib/contrib/crc32vx/README +9 -0
  84. package/deps/zlib/contrib/crc32vx/crc32_vx.c +254 -0
  85. package/deps/zlib/contrib/crc32vx/crc32_vx_hooks.h +9 -0
  86. package/deps/zlib/contrib/delphi/ZLib.pas +557 -0
  87. package/deps/zlib/contrib/delphi/ZLibConst.pas +11 -0
  88. package/deps/zlib/contrib/delphi/readme.txt +76 -0
  89. package/deps/zlib/contrib/delphi/zlibd32.mak +99 -0
  90. package/deps/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
  91. package/deps/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
  92. package/deps/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
  93. package/deps/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
  94. package/deps/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
  95. package/deps/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
  96. package/deps/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
  97. package/deps/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
  98. package/deps/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
  99. package/deps/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
  100. package/deps/zlib/contrib/dotzlib/DotZLib.build +33 -0
  101. package/deps/zlib/contrib/dotzlib/DotZLib.chm +0 -0
  102. package/deps/zlib/contrib/dotzlib/DotZLib.sln +21 -0
  103. package/deps/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  104. package/deps/zlib/contrib/dotzlib/readme.txt +58 -0
  105. package/deps/zlib/contrib/gcc_gvmat64/CMakeLists.txt +19 -0
  106. package/deps/zlib/contrib/gcc_gvmat64/gvmat64.S +570 -0
  107. package/deps/zlib/contrib/infback9/CMakeLists.txt +19 -0
  108. package/deps/zlib/contrib/infback9/README +1 -0
  109. package/deps/zlib/contrib/infback9/infback9.c +603 -0
  110. package/deps/zlib/contrib/infback9/infback9.h +37 -0
  111. package/deps/zlib/contrib/infback9/inffix9.h +107 -0
  112. package/deps/zlib/contrib/infback9/inflate9.h +47 -0
  113. package/deps/zlib/contrib/infback9/inftree9.c +319 -0
  114. package/deps/zlib/contrib/infback9/inftree9.h +61 -0
  115. package/deps/zlib/contrib/iostream/test.cpp +24 -0
  116. package/deps/zlib/contrib/iostream/zfstream.cpp +329 -0
  117. package/deps/zlib/contrib/iostream/zfstream.h +128 -0
  118. package/deps/zlib/contrib/iostream2/zstream.h +306 -0
  119. package/deps/zlib/contrib/iostream2/zstream_test.cpp +25 -0
  120. package/deps/zlib/contrib/iostream3/CMakeLists.txt +200 -0
  121. package/deps/zlib/contrib/iostream3/README +35 -0
  122. package/deps/zlib/contrib/iostream3/TODO +17 -0
  123. package/deps/zlib/contrib/iostream3/iostream3Config.cmake.in +23 -0
  124. package/deps/zlib/contrib/iostream3/test/CMakeLists.txt +191 -0
  125. package/deps/zlib/contrib/iostream3/test/add_subdirectory_exclude_test.cmake.in +27 -0
  126. package/deps/zlib/contrib/iostream3/test/add_subdirectory_test.cmake.in +25 -0
  127. package/deps/zlib/contrib/iostream3/test/find_package_no_components_test.cmake.in +24 -0
  128. package/deps/zlib/contrib/iostream3/test/find_package_test.cmake.in +24 -0
  129. package/deps/zlib/contrib/iostream3/test/find_package_wrong_components_test.cmake.in +24 -0
  130. package/deps/zlib/contrib/iostream3/test.cc +50 -0
  131. package/deps/zlib/contrib/iostream3/zfstream.cc +479 -0
  132. package/deps/zlib/contrib/iostream3/zfstream.h +466 -0
  133. package/deps/zlib/contrib/minizip/CMakeLists.txt +387 -0
  134. package/deps/zlib/contrib/minizip/LICENSE.Info-Zip +58 -0
  135. package/deps/zlib/contrib/minizip/Makefile +33 -0
  136. package/deps/zlib/contrib/minizip/Makefile.am +45 -0
  137. package/deps/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
  138. package/deps/zlib/contrib/minizip/MiniZip64_info.txt +69 -0
  139. package/deps/zlib/contrib/minizip/configure.ac +32 -0
  140. package/deps/zlib/contrib/minizip/crypt.h +125 -0
  141. package/deps/zlib/contrib/minizip/ints.h +57 -0
  142. package/deps/zlib/contrib/minizip/ioapi.c +231 -0
  143. package/deps/zlib/contrib/minizip/ioapi.h +183 -0
  144. package/deps/zlib/contrib/minizip/iowin32.c +447 -0
  145. package/deps/zlib/contrib/minizip/iowin32.h +27 -0
  146. package/deps/zlib/contrib/minizip/make_vms.com +25 -0
  147. package/deps/zlib/contrib/minizip/miniunz.c +647 -0
  148. package/deps/zlib/contrib/minizip/miniunzip.1 +63 -0
  149. package/deps/zlib/contrib/minizip/minizip.1 +46 -0
  150. package/deps/zlib/contrib/minizip/minizip.c +511 -0
  151. package/deps/zlib/contrib/minizip/minizip.pc.in +13 -0
  152. package/deps/zlib/contrib/minizip/minizip.pc.txt +13 -0
  153. package/deps/zlib/contrib/minizip/minizipConfig.cmake.in +27 -0
  154. package/deps/zlib/contrib/minizip/mztools.c +294 -0
  155. package/deps/zlib/contrib/minizip/mztools.h +37 -0
  156. package/deps/zlib/contrib/minizip/skipset.h +366 -0
  157. package/deps/zlib/contrib/minizip/test/CMakeLists.txt +176 -0
  158. package/deps/zlib/contrib/minizip/test/add_subdirectory_exclude_test.cmake.in +29 -0
  159. package/deps/zlib/contrib/minizip/test/add_subdirectory_test.cmake.in +28 -0
  160. package/deps/zlib/contrib/minizip/test/find_package_no_components_test.cmake.in +26 -0
  161. package/deps/zlib/contrib/minizip/test/find_package_test.cmake.in +26 -0
  162. package/deps/zlib/contrib/minizip/test/find_package_wrong_components_test.cmake.in +26 -0
  163. package/deps/zlib/contrib/minizip/test/test_helper.cm +32 -0
  164. package/deps/zlib/contrib/minizip/unzip.c +1984 -0
  165. package/deps/zlib/contrib/minizip/unzip.h +442 -0
  166. package/deps/zlib/contrib/minizip/zip.c +2246 -0
  167. package/deps/zlib/contrib/minizip/zip.h +371 -0
  168. package/deps/zlib/contrib/nuget/nuget.csproj +45 -0
  169. package/deps/zlib/contrib/nuget/nuget.sln +22 -0
  170. package/deps/zlib/contrib/pascal/example.pas +599 -0
  171. package/deps/zlib/contrib/pascal/readme.txt +76 -0
  172. package/deps/zlib/contrib/pascal/zlibd32.mak +99 -0
  173. package/deps/zlib/contrib/pascal/zlibpas.pas +276 -0
  174. package/deps/zlib/contrib/puff/CMakeLists.txt +154 -0
  175. package/deps/zlib/contrib/puff/Makefile +42 -0
  176. package/deps/zlib/contrib/puff/README +63 -0
  177. package/deps/zlib/contrib/puff/bin-writer.c +26 -0
  178. package/deps/zlib/contrib/puff/puff.c +840 -0
  179. package/deps/zlib/contrib/puff/puff.h +35 -0
  180. package/deps/zlib/contrib/puff/puffConfig.cmake.in +18 -0
  181. package/deps/zlib/contrib/puff/pufftest.c +168 -0
  182. package/deps/zlib/contrib/puff/test/CMakeLists.txt +262 -0
  183. package/deps/zlib/contrib/puff/test/add_subdirectory_exclude_test.cmake.in +26 -0
  184. package/deps/zlib/contrib/puff/test/add_subdirectory_test.cmake.in +25 -0
  185. package/deps/zlib/contrib/puff/test/find_package_no_components_test.cmake.in +24 -0
  186. package/deps/zlib/contrib/puff/test/find_package_test.cmake.in +24 -0
  187. package/deps/zlib/contrib/puff/test/find_package_wrong_components_test.cmake.in +24 -0
  188. package/deps/zlib/contrib/puff/test/tester-cov.cmake +58 -0
  189. package/deps/zlib/contrib/puff/test/tester.cmake +16 -0
  190. package/deps/zlib/contrib/puff/zeros.raw +0 -0
  191. package/deps/zlib/contrib/testzlib/CMakeLists.txt +44 -0
  192. package/deps/zlib/contrib/testzlib/testzlib.c +275 -0
  193. package/deps/zlib/contrib/testzlib/testzlib.txt +10 -0
  194. package/deps/zlib/contrib/vstudio/readme.txt +22 -0
  195. package/deps/zlib/contrib/zlib1-dll/CMakeLists.txt +196 -0
  196. package/deps/zlib/contrib/zlib1-dll/readme.txt +21 -0
  197. package/deps/zlib/crc32.c +983 -0
  198. package/deps/zlib/crc32.h +9446 -0
  199. package/deps/zlib/deflate.c +2185 -0
  200. package/deps/zlib/deflate.h +383 -0
  201. package/deps/zlib/doc/algorithm.txt +209 -0
  202. package/deps/zlib/doc/crc-doc.1.0.pdf +0 -0
  203. package/deps/zlib/doc/rfc1950.txt +619 -0
  204. package/deps/zlib/doc/rfc1951.txt +955 -0
  205. package/deps/zlib/doc/rfc1952.txt +675 -0
  206. package/deps/zlib/doc/txtvsbin.txt +107 -0
  207. package/deps/zlib/examples/README.examples +54 -0
  208. package/deps/zlib/examples/enough.c +597 -0
  209. package/deps/zlib/examples/fitblk.c +233 -0
  210. package/deps/zlib/examples/gun.c +702 -0
  211. package/deps/zlib/examples/gzappend.c +504 -0
  212. package/deps/zlib/examples/gzjoin.c +449 -0
  213. package/deps/zlib/examples/gzlog.c +1061 -0
  214. package/deps/zlib/examples/gzlog.h +91 -0
  215. package/deps/zlib/examples/gznorm.c +474 -0
  216. package/deps/zlib/examples/zlib_how.html +550 -0
  217. package/deps/zlib/examples/zpipe.c +206 -0
  218. package/deps/zlib/examples/zran.c +546 -0
  219. package/deps/zlib/examples/zran.h +53 -0
  220. package/deps/zlib/gzclose.c +23 -0
  221. package/deps/zlib/gzguts.h +216 -0
  222. package/deps/zlib/gzlib.c +609 -0
  223. package/deps/zlib/gzread.c +668 -0
  224. package/deps/zlib/gzwrite.c +700 -0
  225. package/deps/zlib/infback.c +581 -0
  226. package/deps/zlib/inffast.c +321 -0
  227. package/deps/zlib/inffast.h +11 -0
  228. package/deps/zlib/inffixed.h +94 -0
  229. package/deps/zlib/inflate.c +1413 -0
  230. package/deps/zlib/inflate.h +126 -0
  231. package/deps/zlib/inftrees.c +424 -0
  232. package/deps/zlib/inftrees.h +64 -0
  233. package/deps/zlib/make_vms.com +867 -0
  234. package/deps/zlib/msdos/Makefile.bor +115 -0
  235. package/deps/zlib/msdos/Makefile.dj2 +104 -0
  236. package/deps/zlib/msdos/Makefile.emx +69 -0
  237. package/deps/zlib/msdos/Makefile.msc +112 -0
  238. package/deps/zlib/msdos/Makefile.tc +100 -0
  239. package/deps/zlib/os400/README400 +48 -0
  240. package/deps/zlib/os400/bndsrc +144 -0
  241. package/deps/zlib/os400/make.sh +383 -0
  242. package/deps/zlib/os400/zlibfixed.rpgle +578 -0
  243. package/deps/zlib/os400/zlibfree.rpgle +634 -0
  244. package/deps/zlib/qnx/package.qpg +141 -0
  245. package/deps/zlib/test/CMakeLists.txt +318 -0
  246. package/deps/zlib/test/add_subdirectory_exclude_test.cmake.in +29 -0
  247. package/deps/zlib/test/add_subdirectory_test.cmake.in +28 -0
  248. package/deps/zlib/test/example.c +552 -0
  249. package/deps/zlib/test/find_package_no_components_test.cmake.in +27 -0
  250. package/deps/zlib/test/find_package_test.cmake.in +27 -0
  251. package/deps/zlib/test/find_package_wrong_components_test.cmake.in +27 -0
  252. package/deps/zlib/test/infcover.c +672 -0
  253. package/deps/zlib/test/minigzip.c +592 -0
  254. package/deps/zlib/treebuild.xml +116 -0
  255. package/deps/zlib/trees.c +1119 -0
  256. package/deps/zlib/trees.h +128 -0
  257. package/deps/zlib/uncompr.c +101 -0
  258. package/deps/zlib/watcom/watcom_f.mak +43 -0
  259. package/deps/zlib/watcom/watcom_l.mak +43 -0
  260. package/deps/zlib/win32/DLL_FAQ.txt +381 -0
  261. package/deps/zlib/win32/Makefile.bor +109 -0
  262. package/deps/zlib/win32/Makefile.gcc +177 -0
  263. package/deps/zlib/win32/Makefile.msc +159 -0
  264. package/deps/zlib/win32/README-WIN32.txt +103 -0
  265. package/deps/zlib/win32/VisualC.txt +3 -0
  266. package/deps/zlib/win32/zlib.def +104 -0
  267. package/deps/zlib/win32/zlib1.rc +37 -0
  268. package/deps/zlib/zconf.h.in +551 -0
  269. package/deps/zlib/zlib.3 +149 -0
  270. package/deps/zlib/zlib.3.pdf +0 -0
  271. package/deps/zlib/zlib.h +2057 -0
  272. package/deps/zlib/zlib.map +116 -0
  273. package/deps/zlib/zlib.pc.cmakein +14 -0
  274. package/deps/zlib/zlib.pc.in +14 -0
  275. package/deps/zlib/zlibConfig.cmake.in +18 -0
  276. package/deps/zlib/zutil.c +313 -0
  277. package/deps/zlib/zutil.h +331 -0
  278. package/dist/index.d.ts +266 -0
  279. package/dist/index.js +1146 -0
  280. package/dist/libwz.js +5632 -0
  281. package/dist/libwz.wasm +0 -0
  282. package/include/wz/CRC32.h +182 -0
  283. package/include/wz/PngUtility.h +72 -0
  284. package/include/wz/PortalType.h +124 -0
  285. package/include/wz/Properties/WzBinaryProperty.h +70 -0
  286. package/include/wz/Properties/WzCanvasProperty.h +55 -0
  287. package/include/wz/Properties/WzConvexProperty.h +34 -0
  288. package/include/wz/Properties/WzDoubleProperty.h +32 -0
  289. package/include/wz/Properties/WzFloatProperty.h +30 -0
  290. package/include/wz/Properties/WzIntProperty.h +30 -0
  291. package/include/wz/Properties/WzLongProperty.h +30 -0
  292. package/include/wz/Properties/WzLuaProperty.h +31 -0
  293. package/include/wz/Properties/WzNullProperty.h +15 -0
  294. package/include/wz/Properties/WzPngProperty.h +53 -0
  295. package/include/wz/Properties/WzRawDataProperty.h +46 -0
  296. package/include/wz/Properties/WzShortProperty.h +31 -0
  297. package/include/wz/Properties/WzStringProperty.h +32 -0
  298. package/include/wz/Properties/WzSubProperty.h +35 -0
  299. package/include/wz/Properties/WzUOLProperty.h +44 -0
  300. package/include/wz/Properties/WzVectorProperty.h +40 -0
  301. package/include/wz/Properties/WzVideoProperty.h +43 -0
  302. package/include/wz/Result.h +58 -0
  303. package/include/wz/Util/Defines.h +16 -0
  304. package/include/wz/Util/ListFileParser.h +20 -0
  305. package/include/wz/Util/WzBinaryReader.h +95 -0
  306. package/include/wz/Util/WzBinaryWriter.h +72 -0
  307. package/include/wz/Util/WzBlobDataSource.h +30 -0
  308. package/include/wz/Util/WzDataSource.h +49 -0
  309. package/include/wz/Util/WzKeyGenerator.h +28 -0
  310. package/include/wz/Util/WzMutableKey.h +39 -0
  311. package/include/wz/Util/WzPath.h +37 -0
  312. package/include/wz/Util/WzStream.h +86 -0
  313. package/include/wz/Util/WzTool.h +42 -0
  314. package/include/wz/WzAESConstant.h +17 -0
  315. package/include/wz/WzDirectory.h +97 -0
  316. package/include/wz/WzEnums.h +76 -0
  317. package/include/wz/WzFile.h +99 -0
  318. package/include/wz/WzHeader.h +47 -0
  319. package/include/wz/WzImage.h +97 -0
  320. package/include/wz/WzImageProperty.h +92 -0
  321. package/include/wz/WzObject.h +55 -0
  322. package/include/wz/WzPropertyCollection.h +115 -0
  323. package/include/wz/wz.h +41 -0
  324. package/include/wz/wz_api.h +432 -0
  325. package/package.json +93 -0
  326. package/src/PngUtility.cpp +328 -0
  327. package/src/Properties/WzBinaryProperty.cpp +183 -0
  328. package/src/Properties/WzCanvasProperty.cpp +262 -0
  329. package/src/Properties/WzConvexProperty.cpp +159 -0
  330. package/src/Properties/WzDoubleProperty.cpp +12 -0
  331. package/src/Properties/WzFloatProperty.cpp +17 -0
  332. package/src/Properties/WzIntProperty.cpp +12 -0
  333. package/src/Properties/WzLongProperty.cpp +12 -0
  334. package/src/Properties/WzLuaProperty.cpp +37 -0
  335. package/src/Properties/WzNullProperty.cpp +11 -0
  336. package/src/Properties/WzPngProperty.cpp +637 -0
  337. package/src/Properties/WzRawDataProperty.cpp +116 -0
  338. package/src/Properties/WzShortProperty.cpp +12 -0
  339. package/src/Properties/WzStringProperty.cpp +44 -0
  340. package/src/Properties/WzSubProperty.cpp +129 -0
  341. package/src/Properties/WzUOLProperty.cpp +136 -0
  342. package/src/Properties/WzVectorProperty.cpp +22 -0
  343. package/src/Properties/WzVideoProperty.cpp +115 -0
  344. package/src/Util/ListFileParser.cpp +48 -0
  345. package/src/Util/WzBinaryReader.cpp +368 -0
  346. package/src/Util/WzBinaryWriter.cpp +305 -0
  347. package/src/Util/WzBlobDataSource.cpp +47 -0
  348. package/src/Util/WzDataSource.cpp +61 -0
  349. package/src/Util/WzKeyGenerator.cpp +43 -0
  350. package/src/Util/WzMutableKey.cpp +59 -0
  351. package/src/Util/WzStream.cpp +196 -0
  352. package/src/Util/WzTool.cpp +266 -0
  353. package/src/WzAESConstant.cpp +12 -0
  354. package/src/WzDirectory.cpp +669 -0
  355. package/src/WzEnums.cpp +20 -0
  356. package/src/WzFile.cpp +450 -0
  357. package/src/WzImage.cpp +350 -0
  358. package/src/WzImageProperty.cpp +469 -0
  359. package/src/WzObject.cpp +174 -0
  360. package/src/WzPropertyCollection.cpp +84 -0
  361. package/src/capi/wz_api.cpp +1996 -0
  362. package/src/node/binding.cpp +1776 -0
@@ -0,0 +1,1078 @@
1
+ #!/bin/sh
2
+ # configure script for zlib.
3
+ #
4
+ # Normally configure builds both a static and a shared library.
5
+ # If you want to build just a static library, use: ./configure --static
6
+ #
7
+ # To impose specific compiler or flags or install directory, use for example:
8
+ # prefix=$HOME CC=cc CFLAGS="-O4" ./configure
9
+ # or for csh/tcsh users:
10
+ # (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
11
+
12
+ # Incorrect settings of CC or CFLAGS may prevent creating a shared library.
13
+ # If you have problems, try without defining CC and CFLAGS before reporting
14
+ # an error.
15
+
16
+ # start off configure.log
17
+ echo -------------------- >> configure.log
18
+ echo $0 $* >> configure.log
19
+ date >> configure.log
20
+
21
+ # get source directory
22
+ SRCDIR=`dirname $0`
23
+ if test $SRCDIR = "."; then
24
+ ZINC=""
25
+ ZINCOUT="-I."
26
+ SRCDIR=""
27
+ else
28
+ ZINC='-I. -include zconf.h'
29
+ ZINCOUT='-I. -I$(SRCDIR)'
30
+ SRCDIR="$SRCDIR/"
31
+ fi
32
+
33
+ # set command prefix for cross-compilation
34
+ if [ -n "${CHOST}" ]; then
35
+ uname=${CHOST}
36
+ mname=${CHOST}
37
+ CROSS_PREFIX="${CHOST}-"
38
+ else
39
+ mname=`(uname -a || echo unknown) 2>/dev/null`
40
+ fi
41
+
42
+ # destination name for static library
43
+ STATICLIB=libz.a
44
+
45
+ # extract zlib version numbers from zlib.h
46
+ VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h`
47
+ VER3=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,2\}\).*/\1/p'`
48
+ VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'`
49
+
50
+ # establish commands for library building
51
+ if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
52
+ AR=${AR-"${CROSS_PREFIX}ar"}
53
+ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
54
+ else
55
+ AR=${AR-"ar"}
56
+ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
57
+ fi
58
+ ARFLAGS=${ARFLAGS-"rc"}
59
+ if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
60
+ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
61
+ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
62
+ else
63
+ RANLIB=${RANLIB-"ranlib"}
64
+ fi
65
+ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
66
+ NM=${NM-"${CROSS_PREFIX}nm"}
67
+ test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
68
+ else
69
+ NM=${NM-"nm"}
70
+ fi
71
+
72
+ # set defaults before processing command line options
73
+ LDCONFIG=${LDCONFIG-"ldconfig"}
74
+ LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
75
+ ARCHS=
76
+ prefix=${prefix-/usr/local}
77
+ exec_prefix=${exec_prefix-'${prefix}'}
78
+ libdir=${libdir-'${exec_prefix}/lib'}
79
+ sharedlibdir=${sharedlibdir-'${libdir}'}
80
+ includedir=${includedir-'${prefix}/include'}
81
+ mandir=${mandir-'${prefix}/share/man'}
82
+ shared_ext='.so'
83
+ shared=1
84
+ solo=0
85
+ cover=0
86
+ zprefix=0
87
+ zconst=0
88
+ build64=0
89
+ gcc=0
90
+ clang=0
91
+ warn=0
92
+ debug=0
93
+ address=0
94
+ memory=0
95
+ undefined=0
96
+ insecure=0
97
+ unknown=0
98
+ enable_crcvx=1
99
+ old_cc="$CC"
100
+ old_cflags="$CFLAGS"
101
+ OBJC='$(OBJZ) $(OBJG)'
102
+ PIC_OBJC='$(PIC_OBJZ) $(PIC_OBJG)'
103
+
104
+ # leave this script, optionally in a bad way
105
+ leave()
106
+ {
107
+ if test "$*" != "0"; then
108
+ echo "** $0 aborting." | tee -a configure.log
109
+ fi
110
+ rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version
111
+ echo -------------------- >> configure.log
112
+ echo >> configure.log
113
+ echo >> configure.log
114
+ exit $1
115
+ }
116
+
117
+ # process command line options
118
+ while test $# -ge 1
119
+ do
120
+ case "$1" in
121
+ -h* | --help)
122
+ echo 'usage:' | tee -a configure.log
123
+ echo ' configure [--const] [--zprefix] [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log
124
+ echo ' [--insecure] [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log
125
+ echo ' [--includedir=INCLUDEDIR] [--mandir=MANDIR]' | tee -a configure.log
126
+ echo ' [--archs="-arch i386 -arch x86_64"] [--disable-crcvx]' | tee -a configure.log
127
+ exit 0 ;;
128
+ -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[^=]*=//'`; shift ;;
129
+ -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[^=]*=//'`; shift ;;
130
+ -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[^=]*=//'`; shift ;;
131
+ --sharedlibdir=*) sharedlibdir=`echo $1 | sed 's/[^=]*=//'`; shift ;;
132
+ -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[^=]*=//'`;shift ;;
133
+ -m*=* | --mandir=*) mandir=`echo $1 | sed 's/[^=]*=//'`;shift ;;
134
+ -u*=* | --uname=*) uname=`echo $1 | sed 's/[^=]*=//'`;shift ;;
135
+ -p* | --prefix) prefix="$2"; shift; shift ;;
136
+ -e* | --eprefix) exec_prefix="$2"; shift; shift ;;
137
+ -l* | --libdir) libdir="$2"; shift; shift ;;
138
+ --sharedlibdir) sharedlibdir="$2"; shift; shift ;;
139
+ -i* | --includedir) includedir="$2"; shift; shift ;;
140
+ -m* | --mandir) mandir="$2"; shift; shift ;;
141
+ -u* | --uname) uname="$2"; shift; shift ;;
142
+ -s* | --shared | --enable-shared) shared=1; shift ;;
143
+ -t | --static | --disable-shared) shared=0; shift ;;
144
+ --solo) solo=1; shift ;;
145
+ --cover) cover=1; shift ;;
146
+ -z* | --zprefix) zprefix=1; shift ;;
147
+ -6* | --64) build64=1; shift ;;
148
+ -a*=* | --archs=*) ARCHS=`echo $1 | sed 's/[^=]*=//'`; shift ;;
149
+ -a* | --archs) ARCHS="$2"; shift; shift ;;
150
+ --sysconfdir=*) echo "ignored option: --sysconfdir" | tee -a configure.log; shift ;;
151
+ --localstatedir=*) echo "ignored option: --localstatedir" | tee -a configure.log; shift ;;
152
+ -c* | --const) zconst=1; shift ;;
153
+ -w* | --warn) warn=$((warn + 1)); shift ;;
154
+ -d* | --debug) debug=1; shift ;;
155
+ --sanitize) address=1; shift ;;
156
+ --address) address=1; shift ;;
157
+ --memory) memory=1; shift ;;
158
+ --undefined) undefined=1; shift ;;
159
+ --insecure) insecure=1; shift ;;
160
+ --disable-crcvx) enable_crcvx=0; shift ;;
161
+ *) unknown=1; echo "unknown option ignored: $1" | tee -a configure.log; shift;;
162
+ esac
163
+ done
164
+ if test $unknown -eq 1; then
165
+ echo "$0 --help for help" | tee -a configure.log
166
+ fi
167
+
168
+ # temporary file name
169
+ test=ztest$$
170
+
171
+ # put arguments in log, also put test file in log if used in arguments
172
+ show()
173
+ {
174
+ case "$*" in
175
+ *$test.c*)
176
+ echo === $test.c === >> configure.log
177
+ cat $test.c >> configure.log
178
+ echo === >> configure.log;;
179
+ esac
180
+ echo $* >> configure.log
181
+ }
182
+
183
+ # check for gcc vs. cc and set compile and link flags based on the system identified by uname
184
+ cat > $test.c <<EOF
185
+ extern int getchar();
186
+ int hello() {return getchar();}
187
+ EOF
188
+
189
+ if test -z "$CC"; then
190
+ echo Checking for ${CROSS_PREFIX}gcc... | tee -a configure.log
191
+ if ${CROSS_PREFIX}gcc -v >/dev/null 2>&1; then
192
+ cc=${CROSS_PREFIX}gcc
193
+ else
194
+ cc=${CROSS_PREFIX}cc
195
+ fi
196
+ else
197
+ cc=${CC}
198
+ fi
199
+
200
+ case "$cc" in
201
+ *gcc*) gcc=1
202
+ GCOV="gcov" ;;
203
+ *clang*) gcc=1
204
+ clang=1 ;;
205
+ esac
206
+ case `$cc -v 2>&1` in
207
+ *gcc*) gcc=1
208
+ GCOV="gcov" ;;
209
+ *clang*) gcc=1
210
+ clang=1 ;;
211
+ esac
212
+
213
+ if test $cover -eq 1; then
214
+ if test "$clang" -eq 1; then
215
+ if test "$cc" = "clang"; then
216
+ if command -v llvm-cov >/dev/null 2>&1; then
217
+ GCOV="llvm-cov"
218
+ LLVM_GCOV_FLAG="gcov"
219
+ GCOV="llvm-cov"
220
+ LLVM_GCOV_FLAG="gcov"
221
+ echo "Using ${GCOV} for coverage"
222
+ else
223
+ cover=0
224
+ GCOV=""
225
+ LLVM_GCOV_FLAG=""
226
+ echo "Deactivating cover as no suitable gcov can be found"
227
+ fi
228
+ else
229
+ clangV=`echo "$cc" | sed -e 's/^.*-//'`
230
+ if command -v llvm-cov-${clangV} >/dev/null 2>&1; then
231
+ GCOV="llvm-cov-${clangV}"
232
+ LLVM_GCOV_FLAG="gcov"
233
+ echo "Using ${GCOV} for coverage"
234
+ else
235
+ cover=0
236
+ GCOV=""
237
+ LLVM_GCOV_FLAG=""
238
+ echo "Deactivating cover as no suitable gcov can be found"
239
+ fi
240
+ fi
241
+ fi
242
+ fi
243
+
244
+ show $cc -c $test.c
245
+ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
246
+ echo ... using gcc >> configure.log
247
+ CC="$cc"
248
+ CFLAGS="${CFLAGS--O3} -fPIC"
249
+ SFLAGS="${CFLAGS--O3}"
250
+ if test "$ARCHS"; then
251
+ CFLAGS="${CFLAGS} ${ARCHS}"
252
+ SFLAGS="${SFLAGS} ${ARCHS}"
253
+ LDFLAGS="${LDFLAGS} ${ARCHS}"
254
+ fi
255
+ if test $build64 -eq 1; then
256
+ CFLAGS="${CFLAGS} -m64"
257
+ SFLAGS="${SFLAGS} -m64"
258
+ fi
259
+ if test "$warn" -ge 1; then
260
+ CFLAGS="${CFLAGS} -Wall -Wextra"
261
+ if test "$warn" -ge 2; then
262
+ CFLAGS="${CFLAGS} -Wconversion -Wshadow -Wundef"
263
+ fi
264
+ fi
265
+ if test "$zconst" -eq 1; then
266
+ if test "$warn" -ge 1; then
267
+ CFLAGS="${CFLAGS} -Wcast-qual"
268
+ fi
269
+ CFLAGS="${CFLAGS} -DZLIB_CONST"
270
+ fi
271
+ if test $address -eq 1; then
272
+ CFLAGS="${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer"
273
+ fi
274
+ if test $memory -eq 1; then
275
+ CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer"
276
+ fi
277
+ if test $undefined -eq 1; then
278
+ CFLAGS="${CFLAGS} -g -fsanitize=undefined -fno-omit-frame-pointer"
279
+ fi
280
+ if test $insecure -eq 1; then
281
+ CFLAGS="${CFLAGS} -DZLIB_INSECURE"
282
+ SFLAGS="${SFLAGS} -DZLIB_INSECURE"
283
+ fi
284
+ if test $debug -eq 1; then
285
+ CFLAGS="${CFLAGS} -DZLIB_DEBUG"
286
+ SFLAGS="${SFLAGS} -DZLIB_DEBUG"
287
+ fi
288
+ if test -z "$uname"; then
289
+ uname=`(uname -s || echo unknown) 2>/dev/null`
290
+ fi
291
+ case "$uname" in
292
+ Linux* | linux* | *-linux* | GNU | GNU/* | solaris* | Haiku)
293
+ case "$mname" in
294
+ *sparc*)
295
+ LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
296
+ esac
297
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
298
+ *BSD | *bsd* | DragonFly)
299
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
300
+ LDCONFIG="ldconfig -m" ;;
301
+ CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*)
302
+ EXE='.exe' ;;
303
+ MINGW* | mingw* | *-mingw*)
304
+ rm -f $test.[co] $test $test$shared_ext
305
+ echo "If this doesn't work for you, try win32/Makefile.gcc." | tee -a configure.log
306
+ LDSHARED=${LDSHARED-"$cc -shared"}
307
+ LDSHAREDLIBC=""
308
+ EXE='.exe' ;;
309
+ QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
310
+ # (alain.bonnefoy@icbt.com)
311
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
312
+ HP-UX*)
313
+ LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
314
+ case `(uname -m || echo unknown) 2>/dev/null` in
315
+ ia64)
316
+ shared_ext='.so'
317
+ SHAREDLIB='libz.so' ;;
318
+ *)
319
+ shared_ext='.sl'
320
+ SHAREDLIB='libz.sl' ;;
321
+ esac ;;
322
+ AIX*)
323
+ LDSHARED=${LDSHARED-"$cc -shared"}
324
+ LDFLAGS="${LDFLAGS} -Wl,-brtl" ;;
325
+ Darwin* | darwin* | *-darwin*)
326
+ shared_ext='.dylib'
327
+ SHAREDLIB=libz$shared_ext
328
+ SHAREDLIBV=libz.$VER$shared_ext
329
+ SHAREDLIBM=libz.$VER1$shared_ext
330
+ LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
331
+ if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then
332
+ AR="${CROSS_PREFIX}libtool"
333
+ elif libtool -V 2>&1 | grep Apple > /dev/null; then
334
+ AR="libtool"
335
+ else
336
+ AR="/usr/bin/libtool"
337
+ fi
338
+ ARFLAGS="-o" ;;
339
+ *)
340
+ LDSHARED=${LDSHARED-"$cc -shared"} ;;
341
+ esac
342
+ else
343
+ # find system name and corresponding cc options
344
+ CC=${CC-cc}
345
+ gcc=0
346
+ echo ... using $CC >> configure.log
347
+ if test -z "$uname"; then
348
+ uname=`(uname -sr || echo unknown) 2>/dev/null`
349
+ fi
350
+ case "$uname" in
351
+ HP-UX*) SFLAGS=${CFLAGS-"-O +z"}
352
+ CFLAGS=${CFLAGS-"-O"}
353
+ # LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
354
+ LDSHARED=${LDSHARED-"ld -b"}
355
+ case `(uname -m || echo unknown) 2>/dev/null` in
356
+ ia64)
357
+ shared_ext='.so'
358
+ SHAREDLIB='libz.so' ;;
359
+ *)
360
+ shared_ext='.sl'
361
+ SHAREDLIB='libz.sl' ;;
362
+ esac ;;
363
+ IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
364
+ CFLAGS=${CFLAGS-"-ansi -O2"}
365
+ LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;;
366
+ OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
367
+ CFLAGS=${CFLAGS-"-O -std1"}
368
+ LDFLAGS="${LDFLAGS} -Wl,-rpath,."
369
+ LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;;
370
+ OSF1*) SFLAGS=${CFLAGS-"-O -std1"}
371
+ CFLAGS=${CFLAGS-"-O -std1"}
372
+ LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;;
373
+ QNX*) SFLAGS=${CFLAGS-"-4 -O"}
374
+ CFLAGS=${CFLAGS-"-4 -O"}
375
+ LDSHARED=${LDSHARED-"cc"}
376
+ RANLIB=${RANLIB-"true"}
377
+ AR="cc"
378
+ ARFLAGS="-A" ;;
379
+ SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
380
+ CFLAGS=${CFLAGS-"-O3"}
381
+ LDSHARED=${LDSHARED-"cc -dy -KPIC -G"} ;;
382
+ SunOS\ 5* | solaris*)
383
+ LDSHARED=${LDSHARED-"cc -G -h libz$shared_ext.$VER1"}
384
+ SFLAGS=${CFLAGS-"-fast -KPIC"}
385
+ CFLAGS=${CFLAGS-"-fast"}
386
+ if test $build64 -eq 1; then
387
+ # old versions of SunPRO/Workshop/Studio don't support -m64,
388
+ # but newer ones do. Check for it.
389
+ flag64=`$CC -flags | egrep -- '^-m64'`
390
+ if test x"$flag64" != x"" ; then
391
+ CFLAGS="${CFLAGS} -m64"
392
+ SFLAGS="${SFLAGS} -m64"
393
+ else
394
+ case `(uname -m || echo unknown) 2>/dev/null` in
395
+ i86*)
396
+ SFLAGS="$SFLAGS -xarch=amd64"
397
+ CFLAGS="$CFLAGS -xarch=amd64" ;;
398
+ *)
399
+ SFLAGS="$SFLAGS -xarch=v9"
400
+ CFLAGS="$CFLAGS -xarch=v9" ;;
401
+ esac
402
+ fi
403
+ fi
404
+ if test -n "$ZINC"; then
405
+ ZINC='-I- -I. -I$(SRCDIR)'
406
+ fi
407
+ ;;
408
+ SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
409
+ CFLAGS=${CFLAGS-"-O2"}
410
+ LDSHARED=${LDSHARED-"ld"} ;;
411
+ SunStudio\ 9*) SFLAGS=${CFLAGS-"-fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"}
412
+ CFLAGS=${CFLAGS-"-fast -xtarget=ultra3 -xarch=v9b"}
413
+ LDSHARED=${LDSHARED-"cc -xarch=v9b"} ;;
414
+ UNIX_System_V\ 4.2.0)
415
+ SFLAGS=${CFLAGS-"-KPIC -O"}
416
+ CFLAGS=${CFLAGS-"-O"}
417
+ LDSHARED=${LDSHARED-"cc -G"} ;;
418
+ UNIX_SV\ 4.2MP)
419
+ SFLAGS=${CFLAGS-"-Kconform_pic -O"}
420
+ CFLAGS=${CFLAGS-"-O"}
421
+ LDSHARED=${LDSHARED-"cc -G"} ;;
422
+ OpenUNIX\ 5)
423
+ SFLAGS=${CFLAGS-"-KPIC -O"}
424
+ CFLAGS=${CFLAGS-"-O"}
425
+ LDSHARED=${LDSHARED-"cc -G"} ;;
426
+ AIX*) # Courtesy of dbakker@arrayasolutions.com
427
+ SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
428
+ CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
429
+ LDSHARED=${LDSHARED-"xlc -G"}
430
+ if test $build64 -eq 1; then
431
+ CFLAGS="${CFLAGS} -q64"
432
+ SFLAGS="${SFLAGS} -q64"
433
+ ARFLAGS="-X64 ${ARFLAGS}"
434
+ fi ;;
435
+ # send working options for other systems to zlib@gzip.org
436
+ *) SFLAGS=${CFLAGS-"-O"}
437
+ CFLAGS=${CFLAGS-"-O"}
438
+ LDSHARED=${LDSHARED-"cc -shared"} ;;
439
+ esac
440
+ fi
441
+
442
+ # destination names for shared library if not defined above
443
+ SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
444
+ SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
445
+ SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
446
+
447
+ echo >> configure.log
448
+
449
+ # define functions for testing compiler and library characteristics and logging the results
450
+
451
+ cat > $test.c <<EOF
452
+ #error error
453
+ EOF
454
+ if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
455
+ try()
456
+ {
457
+ show $*
458
+ test "`( $* ) 2>&1 | tee -a configure.log`" = ""
459
+ }
460
+ echo - using any output from compiler to indicate an error >> configure.log
461
+ else
462
+ try()
463
+ {
464
+ show $*
465
+ got=`( $* ) 2>&1`
466
+ ret=$?
467
+ if test "$got" != ""; then
468
+ printf "%s\n" "$got" >> configure.log
469
+ fi
470
+ if test $ret -ne 0; then
471
+ echo "(exit code "$ret")" >> configure.log
472
+ fi
473
+ return $ret
474
+ }
475
+ fi
476
+
477
+ tryboth()
478
+ {
479
+ show $*
480
+ got=`( $* ) 2>&1`
481
+ ret=$?
482
+ if test "$got" != ""; then
483
+ printf "%s\n" "$got" >> configure.log
484
+ fi
485
+ if test $ret -ne 0; then
486
+ echo "(exit code "$ret")" >> configure.log
487
+ return $ret
488
+ fi
489
+ test "$got" = ""
490
+ }
491
+
492
+ cat > $test.c << EOF
493
+ int foo() { return 0; }
494
+ EOF
495
+ echo "Checking for compiler..." >> configure.log
496
+ if try $CC -c $test.c; then
497
+ :
498
+ else
499
+ echo "Missing or broken C compiler." | tee -a configure.log
500
+ leave 1
501
+ fi
502
+ echo "Checking for obsessive-compulsive compiler options..." >> configure.log
503
+ if try $CC -c $CFLAGS $test.c; then
504
+ :
505
+ else
506
+ echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log
507
+ leave 1
508
+ fi
509
+
510
+ echo >> configure.log
511
+
512
+ # see if shared library build supported
513
+ cat > $test.c <<EOF
514
+ extern int getchar();
515
+ int hello() {return getchar();}
516
+ EOF
517
+ if test $shared -eq 1; then
518
+ echo Checking for shared library support... | tee -a configure.log
519
+ # we must test in two steps (cc then ld), required at least on SunOS 4.x
520
+ if try $CC -c $SFLAGS $test.c &&
521
+ try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test.o; then
522
+ echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log
523
+ elif test -z "$old_cc" -a -z "$old_cflags"; then
524
+ echo No shared library support. | tee -a configure.log
525
+ shared=0;
526
+ else
527
+ echo 'No shared library support; try without defining CC and CFLAGS' | tee -a configure.log
528
+ shared=0;
529
+ fi
530
+ fi
531
+ if test $shared -eq 0; then
532
+ LDSHARED="$CC"
533
+ ALL="static"
534
+ TEST="all teststatic"
535
+ SHAREDLIB=""
536
+ SHAREDLIBV=""
537
+ SHAREDLIBM=""
538
+ echo Building static library $STATICLIB version $VER with $CC. | tee -a configure.log
539
+ else
540
+ ALL="static shared"
541
+ TEST="all teststatic testshared"
542
+ fi
543
+
544
+ echo >> configure.log
545
+
546
+ # check for size_t
547
+ cat > $test.c <<EOF
548
+ #include <stdio.h>
549
+ #include <stdlib.h>
550
+ size_t dummy = 0;
551
+ EOF
552
+ if try $CC -c $CFLAGS $test.c; then
553
+ echo "Checking for size_t... Yes." | tee -a configure.log
554
+ else
555
+ echo "Checking for size_t... No." | tee -a configure.log
556
+ # find a size_t integer type
557
+ # check for long long
558
+ cat > $test.c << EOF
559
+ long long dummy = 0;
560
+ EOF
561
+ if try $CC -c $CFLAGS $test.c; then
562
+ echo "Checking for long long... Yes." | tee -a configure.log
563
+ cat > $test.c <<EOF
564
+ #include <stdio.h>
565
+ int main(void) {
566
+ if (sizeof(void *) <= sizeof(int)) puts("int");
567
+ else if (sizeof(void *) <= sizeof(long)) puts("long");
568
+ else puts("z_longlong");
569
+ return 0;
570
+ }
571
+ EOF
572
+ else
573
+ echo "Checking for long long... No." | tee -a configure.log
574
+ cat > $test.c <<EOF
575
+ #include <stdio.h>
576
+ int main(void) {
577
+ if (sizeof(void *) <= sizeof(int)) puts("int");
578
+ else puts("long");
579
+ return 0;
580
+ }
581
+ EOF
582
+ fi
583
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
584
+ sizet=`./$test`
585
+ echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log
586
+ CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
587
+ SFLAGS="${SFLAGS} -DNO_SIZE_T=${sizet}"
588
+ else
589
+ echo "Checking for a pointer-size integer type... not found." | tee -a configure.log
590
+ fi
591
+ fi
592
+
593
+ echo >> configure.log
594
+
595
+ # check for large file support, and if none, check for fseeko()
596
+ cat > $test.c <<EOF
597
+ #include <sys/types.h>
598
+ off64_t dummy = 0;
599
+ EOF
600
+ if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then
601
+ CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1"
602
+ SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1"
603
+ ALL="${ALL} all64"
604
+ TEST="${TEST} test64"
605
+ echo "Checking for off64_t... Yes." | tee -a configure.log
606
+ echo "Checking for fseeko... Yes." | tee -a configure.log
607
+ else
608
+ echo "Checking for off64_t... No." | tee -a configure.log
609
+ echo >> configure.log
610
+ cat > $test.c <<EOF
611
+ #include <stdio.h>
612
+ int main(void) {
613
+ fseeko(NULL, 0, 0);
614
+ return 0;
615
+ }
616
+ EOF
617
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
618
+ echo "Checking for fseeko... Yes." | tee -a configure.log
619
+ else
620
+ CFLAGS="${CFLAGS} -DNO_FSEEKO"
621
+ SFLAGS="${SFLAGS} -DNO_FSEEKO"
622
+ echo "Checking for fseeko... No." | tee -a configure.log
623
+ fi
624
+ fi
625
+
626
+ echo >> configure.log
627
+
628
+ # check for strerror() for use by gz* functions
629
+ cat > $test.c <<EOF
630
+ #include <string.h>
631
+ #include <errno.h>
632
+ int main() { return strlen(strerror(errno)); }
633
+ EOF
634
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
635
+ echo "Checking for strerror... Yes." | tee -a configure.log
636
+ else
637
+ CFLAGS="${CFLAGS} -DNO_STRERROR"
638
+ SFLAGS="${SFLAGS} -DNO_STRERROR"
639
+ echo "Checking for strerror... No." | tee -a configure.log
640
+ fi
641
+
642
+ # copy clean zconf.h for subsequent edits
643
+ cp -p ${SRCDIR}zconf.h.in zconf.h
644
+
645
+ echo >> configure.log
646
+
647
+ # check for unistd.h and save result in zconf.h
648
+ cat > $test.c <<EOF
649
+ #include <unistd.h>
650
+ int main() { return 0; }
651
+ EOF
652
+ if try $CC -c $CFLAGS $test.c; then
653
+ sed < zconf.h "/^#if HAVE_UNISTD_H-0.* may be/s/ HAVE_UNISTD_H-0\(.*\) may be/ 1\1 was/" > zconf.temp.h
654
+ mv zconf.temp.h zconf.h
655
+ echo "Checking for unistd.h... Yes." | tee -a configure.log
656
+ else
657
+ echo "Checking for unistd.h... No." | tee -a configure.log
658
+ fi
659
+
660
+ echo >> configure.log
661
+
662
+ # check for stdarg.h and save result in zconf.h
663
+ cat > $test.c <<EOF
664
+ #include <stdarg.h>
665
+ int main() { return 0; }
666
+ EOF
667
+ if try $CC -c $CFLAGS $test.c; then
668
+ sed < zconf.h "/^#if HAVE_STDARG_H-0.* may be/s/ HAVE_STDARG_H-0\(.*\) may be/ 1\1 was/" > zconf.temp.h
669
+ mv zconf.temp.h zconf.h
670
+ echo "Checking for stdarg.h... Yes." | tee -a configure.log
671
+ else
672
+ echo "Checking for stdarg.h... No." | tee -a configure.log
673
+ fi
674
+
675
+ # if the z_ prefix was requested, save that in zconf.h
676
+ if test $zprefix -eq 1; then
677
+ sed < zconf.h "/#ifdef Z_PREFIX.* may be/s/def Z_PREFIX\(.*\) may be/ 1\1 was/" > zconf.temp.h
678
+ mv zconf.temp.h zconf.h
679
+ echo >> configure.log
680
+ echo "Using z_ prefix on all symbols." | tee -a configure.log
681
+ fi
682
+
683
+ # if --solo compilation was requested, save that in zconf.h and remove gz stuff from object lists
684
+ if test $solo -eq 1; then
685
+ sed '/#define ZCONF_H/a\
686
+ #define Z_SOLO
687
+
688
+ ' < zconf.h > zconf.temp.h
689
+ mv zconf.temp.h zconf.h
690
+ OBJC='$(OBJZ)'
691
+ PIC_OBJC='$(PIC_OBJZ)'
692
+ fi
693
+
694
+ # if code coverage testing was requested, use older gcc if defined, e.g. "gcc-4.2" on Mac OS X
695
+ if test $cover -eq 1; then
696
+ if test -n "$GCC_CLASSIC"; then
697
+ CC=$GCC_CLASSIC
698
+ fi
699
+ fi
700
+
701
+ echo >> configure.log
702
+
703
+ # conduct a series of tests to resolve eight possible cases of using "vs" or "s" printf functions
704
+ # (using stdarg or not), with or without "n" (proving size of buffer), and with or without a
705
+ # return value. The most secure result is vsnprintf() with a return value. snprintf() with a
706
+ # return value is secure as well, but then gzprintf() will be limited to 20 arguments.
707
+ cat > $test.c <<EOF
708
+ #include <stdio.h>
709
+ #include <stdarg.h>
710
+ #include "zconf.h"
711
+ int main()
712
+ {
713
+ #ifndef STDC
714
+ choke me
715
+ #endif
716
+ return 0;
717
+ }
718
+ EOF
719
+ if try $CC -c $CFLAGS $test.c; then
720
+ echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." | tee -a configure.log
721
+
722
+ echo >> configure.log
723
+ cat > $test.c <<EOF
724
+ #include <stdio.h>
725
+ #include <stdarg.h>
726
+ int mytest(const char *fmt, ...)
727
+ {
728
+ char buf[20];
729
+ va_list ap;
730
+ va_start(ap, fmt);
731
+ vsnprintf(buf, sizeof(buf), fmt, ap);
732
+ va_end(ap);
733
+ return 0;
734
+ }
735
+ int main()
736
+ {
737
+ return (mytest("Hello%d\n", 1));
738
+ }
739
+ EOF
740
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
741
+ echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log
742
+
743
+ echo >> configure.log
744
+ cat >$test.c <<EOF
745
+ #include <stdio.h>
746
+ #include <stdarg.h>
747
+ int mytest(const char *fmt, ...)
748
+ {
749
+ int n;
750
+ char buf[20];
751
+ va_list ap;
752
+ va_start(ap, fmt);
753
+ n = vsnprintf(buf, sizeof(buf), fmt, ap);
754
+ va_end(ap);
755
+ return n;
756
+ }
757
+ int main()
758
+ {
759
+ return (mytest("Hello%d\n", 1));
760
+ }
761
+ EOF
762
+
763
+ if try $CC -c $CFLAGS $test.c; then
764
+ echo "Checking for return value of vsnprintf()... Yes." | tee -a configure.log
765
+ else
766
+ CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
767
+ SFLAGS="$SFLAGS -DHAS_vsnprintf_void"
768
+ echo "Checking for return value of vsnprintf()... No." | tee -a configure.log
769
+ echo " WARNING: apparently vsnprintf() does not return a value. zlib" | tee -a configure.log
770
+ echo " can build but will be open to possible string-format security" | tee -a configure.log
771
+ echo " vulnerabilities." | tee -a configure.log
772
+ fi
773
+ else
774
+ CFLAGS="$CFLAGS -DNO_vsnprintf"
775
+ SFLAGS="$SFLAGS -DNO_vsnprintf"
776
+ echo "Checking for vsnprintf() in stdio.h... No." | tee -a configure.log
777
+ echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" | tee -a configure.log
778
+ echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log
779
+ echo " vulnerabilities." | tee -a configure.log
780
+ if test $insecure -ne 1; then
781
+ echo " The --insecure option must be provided to ./configure in order to" | tee -a configure.log
782
+ echo " compile using the insecure vsprintf() function." | tee -a configure.log
783
+ fi
784
+ echo >> configure.log
785
+ cat >$test.c <<EOF
786
+ #include <stdio.h>
787
+ #include <stdarg.h>
788
+ int mytest(const char *fmt, ...)
789
+ {
790
+ int n;
791
+ char buf[20];
792
+ va_list ap;
793
+ va_start(ap, fmt);
794
+ n = vsprintf(buf, fmt, ap);
795
+ va_end(ap);
796
+ return n;
797
+ }
798
+ int main()
799
+ {
800
+ return (mytest("Hello%d\n", 1));
801
+ }
802
+ EOF
803
+
804
+ if try $CC -c $CFLAGS $test.c; then
805
+ echo "Checking for return value of vsprintf()... Yes." | tee -a configure.log
806
+ else
807
+ CFLAGS="$CFLAGS -DHAS_vsprintf_void"
808
+ SFLAGS="$SFLAGS -DHAS_vsprintf_void"
809
+ echo "Checking for return value of vsprintf()... No." | tee -a configure.log
810
+ echo " WARNING: apparently vsprintf() does not return a value. zlib" | tee -a configure.log
811
+ echo " can build but will be open to possible string-format security" | tee -a configure.log
812
+ echo " vulnerabilities." | tee -a configure.log
813
+ fi
814
+ fi
815
+ else
816
+ echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." | tee -a configure.log
817
+
818
+ echo >> configure.log
819
+ cat >$test.c <<EOF
820
+ #include <stdio.h>
821
+ int mytest()
822
+ {
823
+ char buf[20];
824
+ snprintf(buf, sizeof(buf), "%s", "foo");
825
+ return 0;
826
+ }
827
+ int main()
828
+ {
829
+ return (mytest());
830
+ }
831
+ EOF
832
+
833
+ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
834
+ echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log
835
+
836
+ echo >> configure.log
837
+ cat >$test.c <<EOF
838
+ #include <stdio.h>
839
+ int mytest()
840
+ {
841
+ char buf[20];
842
+ return snprintf(buf, sizeof(buf), "%s", "foo");
843
+ }
844
+ int main()
845
+ {
846
+ return (mytest());
847
+ }
848
+ EOF
849
+
850
+ if try $CC -c $CFLAGS $test.c; then
851
+ echo "Checking for return value of snprintf()... Yes." | tee -a configure.log
852
+ else
853
+ CFLAGS="$CFLAGS -DHAS_snprintf_void"
854
+ SFLAGS="$SFLAGS -DHAS_snprintf_void"
855
+ echo "Checking for return value of snprintf()... No." | tee -a configure.log
856
+ echo " WARNING: apparently snprintf() does not return a value. zlib" | tee -a configure.log
857
+ echo " can build but will be open to possible string-format security" | tee -a configure.log
858
+ echo " vulnerabilities." | tee -a configure.log
859
+ fi
860
+ else
861
+ CFLAGS="$CFLAGS -DNO_snprintf"
862
+ SFLAGS="$SFLAGS -DNO_snprintf"
863
+ echo "Checking for snprintf() in stdio.h... No." | tee -a configure.log
864
+ echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" | tee -a configure.log
865
+ echo " can build but will be open to possible buffer-overflow security" | tee -a configure.log
866
+ echo " vulnerabilities." | tee -a configure.log
867
+ if test $insecure -ne 1; then
868
+ echo " The --insecure option must be provided to ./configure in order to" | tee -a configure.log
869
+ echo " compile using the insecure sprintf() function." | tee -a configure.log
870
+ fi
871
+ echo >> configure.log
872
+ cat >$test.c <<EOF
873
+ #include <stdio.h>
874
+ int mytest()
875
+ {
876
+ char buf[20];
877
+ return sprintf(buf, "%s", "foo");
878
+ }
879
+ int main()
880
+ {
881
+ return (mytest());
882
+ }
883
+ EOF
884
+
885
+ if try $CC -c $CFLAGS $test.c; then
886
+ echo "Checking for return value of sprintf()... Yes." | tee -a configure.log
887
+ else
888
+ CFLAGS="$CFLAGS -DHAS_sprintf_void"
889
+ SFLAGS="$SFLAGS -DHAS_sprintf_void"
890
+ echo "Checking for return value of sprintf()... No." | tee -a configure.log
891
+ echo " WARNING: apparently sprintf() does not return a value. zlib" | tee -a configure.log
892
+ echo " can build but will be open to possible string-format security" | tee -a configure.log
893
+ echo " vulnerabilities." | tee -a configure.log
894
+ fi
895
+ fi
896
+ fi
897
+
898
+ # see if we can hide zlib internal symbols that are linked between separate source files
899
+ if test "$gcc" -eq 1; then
900
+ echo >> configure.log
901
+ cat > $test.c <<EOF
902
+ #define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
903
+ int ZLIB_INTERNAL foo;
904
+ int main()
905
+ {
906
+ return 0;
907
+ }
908
+ EOF
909
+ if tryboth $CC -c $CFLAGS $test.c; then
910
+ CFLAGS="$CFLAGS -DHAVE_HIDDEN"
911
+ SFLAGS="$SFLAGS -DHAVE_HIDDEN"
912
+ echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log
913
+ else
914
+ echo "Checking for attribute(visibility) support... No." | tee -a configure.log
915
+ fi
916
+ fi
917
+
918
+ # check for ibm s390x build
919
+ HAVE_S390X=0
920
+ cat > $test.c << EOF
921
+ #ifndef __s390x__
922
+ #error
923
+ #endif
924
+ EOF
925
+ if try $CC -c $CFLAGS $test.c; then
926
+ echo "Checking for s390x build ... Yes." | tee -a configure.log
927
+ HAVE_S390X=1
928
+ else
929
+ echo "Checking for s390x build ... No." | tee -a configure.log
930
+ fi
931
+
932
+ # check for ibm s390x vx vector extensions
933
+ HAVE_S390X_VX=0
934
+ if test $HAVE_S390X -eq 1 && test $enable_crcvx -eq 1 ; then
935
+ # preset the compiler specific flags
936
+ if test $clang -eq 1; then
937
+ VGFMAFLAG=-fzvector
938
+ else
939
+ VGFMAFLAG=-mzarch
940
+ fi
941
+
942
+ cat > $test.c <<EOF
943
+ #ifndef __s390x__
944
+ #error
945
+ #endif
946
+ #include <vecintrin.h>
947
+ int main(void) {
948
+ unsigned long long a __attribute__((vector_size(16))) = { 0 };
949
+ unsigned long long b __attribute__((vector_size(16))) = { 0 };
950
+ unsigned char c __attribute__((vector_size(16))) = { 0 };
951
+ c = vec_gfmsum_accum_128(a, b, c);
952
+ return c[0];
953
+ }
954
+ EOF
955
+
956
+ # cflags already contains a valid march
957
+ if try $CC -c $CFLAGS $VGFMAFLAG $test.c; then
958
+ echo "Checking for s390x vx vector extension ... Yes." | tee -a configure.log
959
+ HAVE_S390X_VX=1
960
+ # or set march for our compile units
961
+ elif try $CC -c $CFLAGS $VGFMAFLAG -march=z13 $test.c; then
962
+ echo "Checking for s390x vx vector extension (march=z13) ... Yes." | tee -a configure.log
963
+ HAVE_S390X_VX=1
964
+ VGFMAFLAG="$VGFMAFLAG -march=z13"
965
+ # else we are not on s390x
966
+ else
967
+ echo "Checking for s390x vx vector extension ... No." | tee -a configure.log
968
+ fi
969
+
970
+ # prepare compiling for s390x
971
+ if test $HAVE_S390X_VX -eq 1; then
972
+ CFLAGS="$CFLAGS -DHAVE_S390X_VX"
973
+ SFLAGS="$SFLAGS -DHAVE_S390X_VX"
974
+ OBJC="$OBJC crc32_vx.o"
975
+ PIC_OBJC="$PIC_OBJC crc32_vx.lo"
976
+ else
977
+ # target has no vx extension
978
+ VGFMAFLAG=""
979
+ fi
980
+ fi
981
+
982
+ # show the results in the log
983
+ echo >> configure.log
984
+ echo ALL = $ALL >> configure.log
985
+ echo AR = $AR >> configure.log
986
+ echo ARFLAGS = $ARFLAGS >> configure.log
987
+ echo CC = $CC >> configure.log
988
+ echo CFLAGS = $CFLAGS >> configure.log
989
+ echo CPP = $CPP >> configure.log
990
+ echo EXE = $EXE >> configure.log
991
+ echo LDCONFIG = $LDCONFIG >> configure.log
992
+ echo LDFLAGS = $LDFLAGS >> configure.log
993
+ echo LDSHARED = $LDSHARED >> configure.log
994
+ echo LDSHAREDLIBC = $LDSHAREDLIBC >> configure.log
995
+ echo OBJC = $OBJC >> configure.log
996
+ echo PIC_OBJC = $PIC_OBJC >> configure.log
997
+ echo RANLIB = $RANLIB >> configure.log
998
+ echo SFLAGS = $SFLAGS >> configure.log
999
+ echo SHAREDLIB = $SHAREDLIB >> configure.log
1000
+ echo SHAREDLIBM = $SHAREDLIBM >> configure.log
1001
+ echo SHAREDLIBV = $SHAREDLIBV >> configure.log
1002
+ echo STATICLIB = $STATICLIB >> configure.log
1003
+ echo TEST = $TEST >> configure.log
1004
+ echo VER = $VER >> configure.log
1005
+ echo SRCDIR = $SRCDIR >> configure.log
1006
+ echo exec_prefix = $exec_prefix >> configure.log
1007
+ echo includedir = $includedir >> configure.log
1008
+ echo libdir = $libdir >> configure.log
1009
+ echo mandir = $mandir >> configure.log
1010
+ echo prefix = $prefix >> configure.log
1011
+ echo sharedlibdir = $sharedlibdir >> configure.log
1012
+ echo uname = $uname >> configure.log
1013
+ echo HAVE_S390X = $HAVE_S390X >> configure.log
1014
+ echo HAVE_S390X_VX = $HAVE_S390X_VX >> configure.log
1015
+ echo VGFMAFLAG = $VGFMAFLAG >> configure.log
1016
+
1017
+ # update Makefile with the configure results
1018
+ sed < ${SRCDIR}Makefile.in "
1019
+ /^CC *=/s#=.*#=$CC#
1020
+ /^GCOV *=/s#=.*#=$GCOV#
1021
+ /^LLVM_GCOV_FLAG *=/s#=.*#=$LLVM_GCOV_FLAG#
1022
+ /^CFLAGS *=/s#=.*#=$CFLAGS#
1023
+ /^SFLAGS *=/s#=.*#=$SFLAGS#
1024
+ /^LDFLAGS *=/s#=.*#=$LDFLAGS#
1025
+ /^LDSHARED *=/s#=.*#=$LDSHARED#
1026
+ /^CPP *=/s#=.*#=$CPP#
1027
+ /^STATICLIB *=/s#=.*#=$STATICLIB#
1028
+ /^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
1029
+ /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
1030
+ /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
1031
+ /^AR *=/s#=.*#=$AR#
1032
+ /^ARFLAGS *=/s#=.*#=$ARFLAGS#
1033
+ /^RANLIB *=/s#=.*#=$RANLIB#
1034
+ /^LDCONFIG *=/s#=.*#=$LDCONFIG#
1035
+ /^LDSHAREDLIBC *=/s#=.*#=$LDSHAREDLIBC#
1036
+ /^EXE *=/s#=.*#=$EXE#
1037
+ /^SRCDIR *=/s#=.*#=$SRCDIR#
1038
+ /^ZINC *=/s#=.*#=$ZINC#
1039
+ /^ZINCOUT *=/s#=.*#=$ZINCOUT#
1040
+ /^prefix *=/s#=.*#=$prefix#
1041
+ /^exec_prefix *=/s#=.*#=$exec_prefix#
1042
+ /^libdir *=/s#=.*#=$libdir#
1043
+ /^sharedlibdir *=/s#=.*#=$sharedlibdir#
1044
+ /^includedir *=/s#=.*#=$includedir#
1045
+ /^mandir *=/s#=.*#=$mandir#
1046
+ /^OBJC *=/s#=.*#= $OBJC#
1047
+ /^PIC_OBJC *=/s#=.*#= $PIC_OBJC#
1048
+ /^all: */s#:.*#: $ALL#
1049
+ /^test: */s#:.*#: $TEST#
1050
+ " > Makefile
1051
+
1052
+ # create zlib.pc with the configure results
1053
+ sed < ${SRCDIR}zlib.pc.in "
1054
+ /^CC *=/s#=.*#=$CC#
1055
+ /^CFLAGS *=/s#=.*#=$CFLAGS#
1056
+ /^CPP *=/s#=.*#=$CPP#
1057
+ /^LDSHARED *=/s#=.*#=$LDSHARED#
1058
+ /^STATICLIB *=/s#=.*#=$STATICLIB#
1059
+ /^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
1060
+ /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
1061
+ /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
1062
+ /^AR *=/s#=.*#=$AR#
1063
+ /^ARFLAGS *=/s#=.*#=$ARFLAGS#
1064
+ /^RANLIB *=/s#=.*#=$RANLIB#
1065
+ /^EXE *=/s#=.*#=$EXE#
1066
+ /^prefix *=/s#=.*#=$prefix#
1067
+ /^exec_prefix *=/s#=.*#=$exec_prefix#
1068
+ /^libdir *=/s#=.*#=$libdir#
1069
+ /^sharedlibdir *=/s#=.*#=$sharedlibdir#
1070
+ /^includedir *=/s#=.*#=$includedir#
1071
+ /^mandir *=/s#=.*#=$mandir#
1072
+ /^LDFLAGS *=/s#=.*#=$LDFLAGS#
1073
+ " | sed -e "
1074
+ s/\@VERSION\@/$VER/g;
1075
+ " > zlib.pc
1076
+
1077
+ # done
1078
+ leave 0