passenger 6.2.0 → 6.2.1

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 (650) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +33 -1
  3. data/CONTRIBUTING.md +7 -311
  4. data/CONTRIBUTORS +1 -0
  5. data/LICENSE +1 -1
  6. data/README.md +1 -1
  7. data/Rakefile +1 -1
  8. data/bin/passenger +1 -1
  9. data/bin/passenger-config +1 -1
  10. data/bin/passenger-install-apache2-module +1 -1
  11. data/bin/passenger-install-nginx-module +4 -9
  12. data/bin/passenger-memory-stats +1 -1
  13. data/bin/passenger-status +1 -1
  14. data/build/agent.rb +13 -15
  15. data/build/apache2.rb +13 -16
  16. data/build/basics.rb +10 -13
  17. data/build/common_library.rb +5 -9
  18. data/build/cxx_tests.rb +37 -12
  19. data/build/integration_tests.rb +5 -2
  20. data/build/misc.rb +1 -1
  21. data/build/nginx.rb +1 -1
  22. data/build/node_tests.rb +1 -1
  23. data/build/oxt_tests.rb +6 -8
  24. data/build/packaging.rb +1 -1
  25. data/build/ruby_extension.rb +1 -1
  26. data/build/ruby_tests.rb +1 -1
  27. data/build/schema_printer.rb +13 -15
  28. data/build/support/cplusplus.rb +61 -69
  29. data/build/support/cxx_dependency_map.rb +2 -1
  30. data/build/support/general.rb +1 -1
  31. data/build/support/vendor/cxx_hinted_parser/LICENSE.md +1 -1
  32. data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser/parser.rb +1 -1
  33. data/build/support/vendor/cxx_hinted_parser/lib/cxx_hinted_parser.rb +1 -1
  34. data/build/support/vendor/cxxcodebuilder/LICENSE.md +1 -1
  35. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +1 -1
  36. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/initializer_builder.rb +1 -1
  37. data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder.rb +1 -1
  38. data/build/test_basics.rb +1 -1
  39. data/dev/copy_boost_headers +1 -1
  40. data/dev/index_cxx_dependencies.rb +5 -1
  41. data/dev/libev-changes.patch +108 -0
  42. data/dev/nginx_version_sha256 +1 -1
  43. data/dev/ruby_server.rb +1 -6
  44. data/dev/upgrading_libuv.sh +16 -0
  45. data/doc/BasicArchitectureOverview.md +55 -0
  46. data/doc/BuildCaching.md +23 -0
  47. data/doc/BuildSystem.md +49 -0
  48. data/doc/DebuggingAndStressTesting.md +2 -0
  49. data/doc/DesignAspects/LimitedGemDependencies.md +1 -0
  50. data/doc/DevEnvironmentSetup.md +46 -0
  51. data/doc/DevHandbook.md +28 -0
  52. data/doc/Packaging.md +1 -1
  53. data/doc/RunningTests.md +88 -0
  54. data/doc/{TempFileHandling.md → SecureTempFileHandling.md} +1 -1
  55. data/doc/{CxxTestingGuide.md → WritingCxxTests.md} +1 -20
  56. data/src/agent/AgentMain.cpp +1 -1
  57. data/src/agent/Core/ApiServer.h +1 -1
  58. data/src/agent/Core/ApplicationPool/AbstractSession.h +1 -1
  59. data/src/agent/Core/ApplicationPool/BasicGroupInfo.h +1 -1
  60. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +1 -1
  61. data/src/agent/Core/ApplicationPool/Common.h +1 -1
  62. data/src/agent/Core/ApplicationPool/Context.h +1 -1
  63. data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +1 -1
  64. data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +1 -1
  65. data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +1 -1
  66. data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +1 -1
  67. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +1 -1
  68. data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
  69. data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +1 -1
  70. data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +1 -1
  71. data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -1
  72. data/src/agent/Core/ApplicationPool/Group/Verification.cpp +1 -1
  73. data/src/agent/Core/ApplicationPool/Group.h +1 -1
  74. data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -1
  75. data/src/agent/Core/ApplicationPool/Options.h +1 -1
  76. data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +1 -1
  77. data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +1 -1
  78. data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +1 -1
  79. data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +1 -1
  80. data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +1 -1
  81. data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +1 -1
  82. data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +1 -1
  83. data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
  84. data/src/agent/Core/ApplicationPool/Pool.h +1 -1
  85. data/src/agent/Core/ApplicationPool/Process.cpp +1 -1
  86. data/src/agent/Core/ApplicationPool/Process.h +1 -1
  87. data/src/agent/Core/ApplicationPool/Session.h +1 -1
  88. data/src/agent/Core/ApplicationPool/Socket.h +1 -1
  89. data/src/agent/Core/ApplicationPool/TestSession.h +1 -1
  90. data/src/agent/Core/Config.h +3 -2
  91. data/src/agent/Core/ConfigChange.cpp +1 -1
  92. data/src/agent/Core/ConfigChange.h +1 -1
  93. data/src/agent/Core/Controller/AppResponse.h +1 -1
  94. data/src/agent/Core/Controller/BufferBody.cpp +1 -1
  95. data/src/agent/Core/Controller/CheckoutSession.cpp +8 -5
  96. data/src/agent/Core/Controller/Client.h +1 -1
  97. data/src/agent/Core/Controller/Config.cpp +1 -1
  98. data/src/agent/Core/Controller/Config.h +2 -2
  99. data/src/agent/Core/Controller/ForwardResponse.cpp +2 -2
  100. data/src/agent/Core/Controller/Hooks.cpp +12 -9
  101. data/src/agent/Core/Controller/Implementation.cpp +1 -1
  102. data/src/agent/Core/Controller/InitRequest.cpp +1 -1
  103. data/src/agent/Core/Controller/InitializationAndShutdown.cpp +1 -1
  104. data/src/agent/Core/Controller/InternalUtils.cpp +1 -1
  105. data/src/agent/Core/Controller/Miscellaneous.cpp +1 -1
  106. data/src/agent/Core/Controller/Request.h +1 -1
  107. data/src/agent/Core/Controller/SendRequest.cpp +1 -1
  108. data/src/agent/Core/Controller/StateInspection.cpp +1 -1
  109. data/src/agent/Core/Controller/TurboCaching.h +1 -1
  110. data/src/agent/Core/Controller.h +1 -1
  111. data/src/agent/Core/CoreMain.cpp +1 -1
  112. data/src/agent/Core/OptionParser.h +1 -1
  113. data/src/agent/Core/ResponseCache.h +1 -1
  114. data/src/agent/Core/SecurityUpdateChecker.h +1 -1
  115. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
  116. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h.cxxcodebuilder +1 -1
  117. data/src/agent/Core/SpawningKit/Config.h +1 -1
  118. data/src/agent/Core/SpawningKit/Context.h +1 -1
  119. data/src/agent/Core/SpawningKit/DirectSpawner.h +1 -1
  120. data/src/agent/Core/SpawningKit/DummySpawner.h +1 -1
  121. data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
  122. data/src/agent/Core/SpawningKit/Exceptions.h +63 -2
  123. data/src/agent/Core/SpawningKit/Factory.h +1 -1
  124. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
  125. data/src/agent/Core/SpawningKit/Handshake/Perform.h +3 -2
  126. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +1 -1
  127. data/src/agent/Core/SpawningKit/Handshake/Session.h +1 -1
  128. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
  129. data/src/agent/Core/SpawningKit/Journey.h +1 -1
  130. data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
  131. data/src/agent/Core/SpawningKit/README.md +3 -3
  132. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
  133. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h.cxxcodebuilder +1 -1
  134. data/src/agent/Core/SpawningKit/Result.h +1 -1
  135. data/src/agent/Core/SpawningKit/SmartSpawner.h +17 -17
  136. data/src/agent/Core/SpawningKit/Spawner.h +1 -1
  137. data/src/agent/Core/SpawningKit/UserSwitchingRules.h +1 -1
  138. data/src/agent/Core/TelemetryCollector.h +1 -1
  139. data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
  140. data/src/agent/FileReadHelper/FileReadHelperMain.cpp +1 -1
  141. data/src/agent/MainFunctions.h +1 -1
  142. data/src/agent/Shared/ApiAccountUtils.h +4 -3
  143. data/src/agent/Shared/ApiServerUtils.h +1 -2
  144. data/src/agent/Shared/ApplicationPoolApiKey.h +1 -1
  145. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +1 -1
  146. data/src/agent/Shared/Fundamentals/AbortHandler.h +1 -1
  147. data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -1
  148. data/src/agent/Shared/Fundamentals/Initialization.h +1 -1
  149. data/src/agent/Shared/Fundamentals/Utils.cpp +1 -1
  150. data/src/agent/Shared/Fundamentals/Utils.h +1 -1
  151. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
  152. data/src/agent/SystemMetrics/SystemMetricsMain.cpp +1 -1
  153. data/src/agent/TempDirToucher/TempDirToucherMain.cpp +1 -1
  154. data/src/agent/Watchdog/ApiServer.h +7 -6
  155. data/src/agent/Watchdog/Config.h +2 -2
  156. data/src/apache2_module/Bucket.cpp +1 -1
  157. data/src/apache2_module/Bucket.h +1 -1
  158. data/src/apache2_module/CBindings.cpp +1 -1
  159. data/src/apache2_module/Config.cpp +1 -1
  160. data/src/apache2_module/Config.h +1 -1
  161. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +104 -104
  162. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +2 -2
  163. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +1 -1
  164. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp.cxxcodebuilder +1 -1
  165. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +1 -1
  166. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +1 -1
  167. data/src/apache2_module/ConfigGeneral/Common.h +1 -1
  168. data/src/apache2_module/ConfigGeneral/ManifestGeneration.h +1 -1
  169. data/src/apache2_module/ConfigGeneral/SetterFuncs.h +1 -1
  170. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +1 -1
  171. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +1 -1
  172. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +1 -1
  173. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +1 -1
  174. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +1 -1
  175. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
  176. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +1 -1
  177. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +1 -1
  178. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +1 -1
  179. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  180. data/src/apache2_module/DirectoryMapper.h +1 -1
  181. data/src/apache2_module/Hooks.cpp +8 -2
  182. data/src/apache2_module/Hooks.h +1 -1
  183. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +1 -1
  184. data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +1 -1
  185. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +1 -1
  186. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  187. data/src/apache2_module/Utils.h +1 -1
  188. data/src/apache2_module/mod_passenger.c +1 -1
  189. data/src/cxx_supportlib/Algorithms/Hasher.cpp +1 -1
  190. data/src/cxx_supportlib/Algorithms/Hasher.h +1 -1
  191. data/src/cxx_supportlib/Algorithms/MovingAverage.h +1 -1
  192. data/src/cxx_supportlib/AppLocalConfigFileUtils.h +1 -1
  193. data/src/cxx_supportlib/AppTypeDetector/CBindings.cpp +1 -1
  194. data/src/cxx_supportlib/AppTypeDetector/CBindings.h +1 -1
  195. data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
  196. data/src/cxx_supportlib/BackgroundEventLoop.cpp +1 -1
  197. data/src/cxx_supportlib/BackgroundEventLoop.h +1 -1
  198. data/src/cxx_supportlib/ConfigKit/AsyncUtils.h +1 -1
  199. data/src/cxx_supportlib/ConfigKit/Common.h +1 -1
  200. data/src/cxx_supportlib/ConfigKit/ConfigKit.h +1 -1
  201. data/src/cxx_supportlib/ConfigKit/DummyTranslator.h +1 -1
  202. data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +1 -3
  203. data/src/cxx_supportlib/ConfigKit/PrefixTranslator.h +3 -3
  204. data/src/cxx_supportlib/ConfigKit/Schema.h +1 -1
  205. data/src/cxx_supportlib/ConfigKit/SchemaUtils.h +1 -1
  206. data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
  207. data/src/cxx_supportlib/ConfigKit/SubComponentUtils.h +1 -1
  208. data/src/cxx_supportlib/ConfigKit/TableTranslator.h +1 -1
  209. data/src/cxx_supportlib/ConfigKit/Translator.h +1 -1
  210. data/src/cxx_supportlib/ConfigKit/Utils.h +1 -1
  211. data/src/cxx_supportlib/Constants.h +2 -2
  212. data/src/cxx_supportlib/Constants.h.cxxcodebuilder +1 -1
  213. data/src/cxx_supportlib/DataStructures/HashedStaticString.h +1 -1
  214. data/src/cxx_supportlib/DataStructures/LString.cpp +1 -1
  215. data/src/cxx_supportlib/DataStructures/LString.h +1 -1
  216. data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -1
  217. data/src/cxx_supportlib/DataStructures/StringMap.h +1 -1
  218. data/src/cxx_supportlib/Exceptions.cpp +1 -1
  219. data/src/cxx_supportlib/Exceptions.h +1 -1
  220. data/src/cxx_supportlib/FileDescriptor.h +1 -1
  221. data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
  222. data/src/cxx_supportlib/FileTools/FileManip.h +1 -1
  223. data/src/cxx_supportlib/FileTools/PathManip.cpp +1 -1
  224. data/src/cxx_supportlib/FileTools/PathManip.h +1 -1
  225. data/src/cxx_supportlib/FileTools/PathManipCBindings.cpp +1 -1
  226. data/src/cxx_supportlib/FileTools/PathManipCBindings.h +1 -1
  227. data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
  228. data/src/cxx_supportlib/FileTools/PathSecurityCheck.h +1 -1
  229. data/src/cxx_supportlib/Hooks.h +1 -1
  230. data/src/cxx_supportlib/IOTools/BufferedIO.h +1 -1
  231. data/src/cxx_supportlib/IOTools/IOUtils.cpp +10 -10
  232. data/src/cxx_supportlib/IOTools/IOUtils.h +1 -1
  233. data/src/cxx_supportlib/IOTools/MessageIO.h +1 -1
  234. data/src/cxx_supportlib/IOTools/MessageSerialization.h +1 -1
  235. data/src/cxx_supportlib/InstanceDirectory.h +1 -1
  236. data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +1 -1
  237. data/src/cxx_supportlib/JsonTools/Autocast.h +1 -1
  238. data/src/cxx_supportlib/JsonTools/CBindings.cpp +1 -1
  239. data/src/cxx_supportlib/JsonTools/CBindings.h +1 -1
  240. data/src/cxx_supportlib/JsonTools/JsonUtils.h +1 -1
  241. data/src/cxx_supportlib/LoggingKit/Assert.h +1 -1
  242. data/src/cxx_supportlib/LoggingKit/Config.h +2 -1
  243. data/src/cxx_supportlib/LoggingKit/Context.h +1 -1
  244. data/src/cxx_supportlib/LoggingKit/Forward.h +1 -1
  245. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +11 -1
  246. data/src/cxx_supportlib/LoggingKit/Logging.h +1 -1
  247. data/src/cxx_supportlib/LoggingKit/LoggingKit.h +1 -1
  248. data/src/cxx_supportlib/LveLoggingDecorator.h +1 -1
  249. data/src/cxx_supportlib/MemoryKit/mbuf.cpp +1 -1
  250. data/src/cxx_supportlib/MemoryKit/mbuf.h +1 -1
  251. data/src/cxx_supportlib/MemoryKit/palloc.cpp +1 -1
  252. data/src/cxx_supportlib/MemoryKit/palloc.h +1 -1
  253. data/src/cxx_supportlib/ProcessManagement/Ruby.cpp +1 -1
  254. data/src/cxx_supportlib/ProcessManagement/Ruby.h +1 -1
  255. data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +1 -1
  256. data/src/cxx_supportlib/ProcessManagement/Spawn.h +1 -1
  257. data/src/cxx_supportlib/ProcessManagement/Utils.cpp +1 -1
  258. data/src/cxx_supportlib/ProcessManagement/Utils.h +1 -1
  259. data/src/cxx_supportlib/RandomGenerator.h +1 -1
  260. data/src/cxx_supportlib/ResourceLocator.h +1 -1
  261. data/src/cxx_supportlib/SafeLibev.h +1 -1
  262. data/src/cxx_supportlib/SecurityKit/Crypto.cpp +9 -27
  263. data/src/cxx_supportlib/SecurityKit/Crypto.h +2 -2
  264. data/src/cxx_supportlib/SecurityKit/MemZeroGuard.h +1 -1
  265. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +1 -1
  266. data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
  267. data/src/cxx_supportlib/ServerKit/Client.h +1 -1
  268. data/src/cxx_supportlib/ServerKit/ClientRef.h +1 -1
  269. data/src/cxx_supportlib/ServerKit/Config.h +1 -1
  270. data/src/cxx_supportlib/ServerKit/Context.h +1 -1
  271. data/src/cxx_supportlib/ServerKit/CookieUtils.h +1 -1
  272. data/src/cxx_supportlib/ServerKit/Errors.h +1 -1
  273. data/src/cxx_supportlib/ServerKit/FdSinkChannel.h +1 -1
  274. data/src/cxx_supportlib/ServerKit/FdSourceChannel.h +1 -1
  275. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +54 -2
  276. data/src/cxx_supportlib/ServerKit/FileBufferedFdSinkChannel.h +1 -1
  277. data/src/cxx_supportlib/ServerKit/HeaderTable.h +1 -1
  278. data/src/cxx_supportlib/ServerKit/Hooks.h +1 -1
  279. data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParser.h +1 -1
  280. data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParserState.h +1 -1
  281. data/src/cxx_supportlib/ServerKit/HttpClient.h +1 -1
  282. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +1 -1
  283. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +1 -1
  284. data/src/cxx_supportlib/ServerKit/HttpRequest.h +1 -1
  285. data/src/cxx_supportlib/ServerKit/HttpRequestRef.h +1 -1
  286. data/src/cxx_supportlib/ServerKit/HttpServer.h +1 -1
  287. data/src/cxx_supportlib/ServerKit/Implementation.cpp +1 -1
  288. data/src/cxx_supportlib/ServerKit/Server.h +4 -2
  289. data/src/cxx_supportlib/StaticString.h +1 -1
  290. data/src/cxx_supportlib/StrIntTools/DateParsing.h +1 -1
  291. data/src/cxx_supportlib/StrIntTools/StrIntUtils.cpp +1 -1
  292. data/src/cxx_supportlib/StrIntTools/StrIntUtils.h +1 -1
  293. data/src/cxx_supportlib/StrIntTools/StrIntUtilsNoStrictAliasing.cpp +1 -1
  294. data/src/cxx_supportlib/StrIntTools/StringScanning.h +1 -1
  295. data/src/cxx_supportlib/StrIntTools/Template.h +1 -1
  296. data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +1 -1
  297. data/src/cxx_supportlib/SystemTools/ProcessMetricsCollector.h +1 -1
  298. data/src/cxx_supportlib/SystemTools/SystemMetricsCollector.h +1 -1
  299. data/src/cxx_supportlib/SystemTools/SystemTime.cpp +1 -1
  300. data/src/cxx_supportlib/SystemTools/SystemTime.h +1 -1
  301. data/src/cxx_supportlib/SystemTools/UserDatabase.cpp +1 -1
  302. data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
  303. data/src/cxx_supportlib/Utils/AnsiColorConstants.h +1 -1
  304. data/src/cxx_supportlib/Utils/AsyncSignalSafeUtils.h +1 -1
  305. data/src/cxx_supportlib/Utils/BlockingQueue.h +1 -1
  306. data/src/cxx_supportlib/Utils/CachedFileStat.cpp +1 -1
  307. data/src/cxx_supportlib/Utils/CachedFileStat.h +1 -1
  308. data/src/cxx_supportlib/Utils/CachedFileStat.hpp +1 -1
  309. data/src/cxx_supportlib/Utils/ClassUtils.h +1 -1
  310. data/src/cxx_supportlib/Utils/Curl.h +1 -1
  311. data/src/cxx_supportlib/Utils/FastStringStream.h +1 -1
  312. data/src/cxx_supportlib/Utils/FileChangeChecker.h +1 -1
  313. data/src/cxx_supportlib/Utils/HttpConstants.h +1 -1
  314. data/src/cxx_supportlib/Utils/IniFile.h +1 -1
  315. data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
  316. data/src/cxx_supportlib/Utils/OptionParsing.h +1 -1
  317. data/src/cxx_supportlib/Utils/ReleaseableScopedPointer.h +1 -1
  318. data/src/cxx_supportlib/Utils/ScopeGuard.h +1 -1
  319. data/src/cxx_supportlib/Utils/SpeedMeter.h +1 -1
  320. data/src/cxx_supportlib/Utils/Timer.h +1 -1
  321. data/src/cxx_supportlib/Utils/VariantMap.h +1 -1
  322. data/src/cxx_supportlib/Utils.cpp +1 -1
  323. data/src/cxx_supportlib/Utils.h +1 -1
  324. data/src/cxx_supportlib/WatchdogLauncher.cpp +1 -1
  325. data/src/cxx_supportlib/WatchdogLauncher.h +1 -1
  326. data/src/cxx_supportlib/WrapperRegistry/CBindings.cpp +1 -1
  327. data/src/cxx_supportlib/WrapperRegistry/CBindings.h +1 -1
  328. data/src/cxx_supportlib/WrapperRegistry/Entry.h +1 -1
  329. data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
  330. data/src/cxx_supportlib/oxt/backtrace.hpp +1 -1
  331. data/src/cxx_supportlib/oxt/detail/backtrace_disabled.hpp +1 -1
  332. data/src/cxx_supportlib/oxt/detail/backtrace_enabled.hpp +1 -1
  333. data/src/cxx_supportlib/oxt/detail/context.hpp +1 -1
  334. data/src/cxx_supportlib/oxt/detail/tracable_exception_disabled.hpp +1 -1
  335. data/src/cxx_supportlib/oxt/detail/tracable_exception_enabled.hpp +1 -1
  336. data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +1 -1
  337. data/src/cxx_supportlib/oxt/implementation.cpp +1 -1
  338. data/src/cxx_supportlib/oxt/initialize.hpp +1 -1
  339. data/src/cxx_supportlib/oxt/macros.hpp +1 -1
  340. data/src/cxx_supportlib/oxt/spin_lock.hpp +1 -1
  341. data/src/cxx_supportlib/oxt/system_calls.cpp +1 -1
  342. data/src/cxx_supportlib/oxt/system_calls.hpp +1 -1
  343. data/src/cxx_supportlib/oxt/thread.hpp +1 -1
  344. data/src/cxx_supportlib/oxt/tracable_exception.hpp +1 -1
  345. data/src/cxx_supportlib/vendor-copy/adhoc_lve.h +1 -1
  346. data/src/cxx_supportlib/vendor-copy/libuv/AUTHORS +353 -3
  347. data/src/cxx_supportlib/vendor-copy/libuv/ChangeLog +3981 -2
  348. data/src/cxx_supportlib/vendor-copy/libuv/LICENSE +1 -28
  349. data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-docs +396 -0
  350. data/src/cxx_supportlib/vendor-copy/libuv/LICENSE-extra +36 -0
  351. data/src/cxx_supportlib/vendor-copy/libuv/Makefile.am +275 -58
  352. data/src/cxx_supportlib/vendor-copy/libuv/Makefile.in +4380 -2125
  353. data/src/cxx_supportlib/vendor-copy/libuv/aclocal.m4 +425 -221
  354. data/src/cxx_supportlib/vendor-copy/libuv/ar-lib +30 -10
  355. data/src/cxx_supportlib/vendor-copy/libuv/compile +31 -14
  356. data/src/cxx_supportlib/vendor-copy/libuv/config.guess +1084 -690
  357. data/src/cxx_supportlib/vendor-copy/libuv/config.sub +1844 -1297
  358. data/src/cxx_supportlib/vendor-copy/libuv/configure +6935 -3664
  359. data/src/cxx_supportlib/vendor-copy/libuv/configure.ac +43 -19
  360. data/src/cxx_supportlib/vendor-copy/libuv/depcomp +12 -11
  361. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-darwin.h → uv/darwin.h} +3 -3
  362. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-errno.h → uv/errno.h} +119 -60
  363. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-linux.h → uv/linux.h} +1 -1
  364. data/src/cxx_supportlib/vendor-copy/libuv/include/uv/os390.h +33 -0
  365. data/src/cxx_supportlib/vendor-copy/libuv/include/uv/posix.h +31 -0
  366. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-threadpool.h → uv/threadpool.h} +1 -1
  367. data/src/cxx_supportlib/vendor-copy/libuv/include/{tree.h → uv/tree.h} +3 -250
  368. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-unix.h → uv/unix.h} +186 -60
  369. data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-version.h → uv/version.h} +3 -3
  370. data/src/cxx_supportlib/vendor-copy/libuv/include/uv/win.h +703 -0
  371. data/src/cxx_supportlib/vendor-copy/libuv/include/uv.h +528 -40
  372. data/src/cxx_supportlib/vendor-copy/libuv/install-sh +110 -70
  373. data/src/cxx_supportlib/vendor-copy/libuv/libuv-static.pc.in +12 -0
  374. data/src/cxx_supportlib/vendor-copy/libuv/libuv.pc.in +4 -2
  375. data/src/cxx_supportlib/vendor-copy/libuv/ltmain.sh +995 -619
  376. data/src/cxx_supportlib/vendor-copy/libuv/m4/ax_pthread.m4 +485 -0
  377. data/src/cxx_supportlib/vendor-copy/libuv/m4/libtool.m4 +438 -289
  378. data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-flags.m4 +21 -4
  379. data/src/cxx_supportlib/vendor-copy/libuv/m4/libuv-check-versions.m4 +7 -0
  380. data/src/cxx_supportlib/vendor-copy/libuv/m4/ltoptions.m4 +69 -39
  381. data/src/cxx_supportlib/vendor-copy/libuv/m4/ltsugar.m4 +1 -1
  382. data/src/cxx_supportlib/vendor-copy/libuv/m4/ltversion.m4 +7 -6
  383. data/src/cxx_supportlib/vendor-copy/libuv/m4/lt~obsolete.m4 +2 -2
  384. data/src/cxx_supportlib/vendor-copy/libuv/missing +55 -34
  385. data/src/cxx_supportlib/vendor-copy/libuv/src/fs-poll.c +52 -20
  386. data/src/cxx_supportlib/vendor-copy/libuv/src/idna.c +560 -0
  387. data/src/cxx_supportlib/vendor-copy/libuv/src/idna.h +31 -0
  388. data/src/cxx_supportlib/vendor-copy/libuv/src/inet.c +5 -16
  389. data/src/cxx_supportlib/vendor-copy/libuv/src/queue.h +68 -86
  390. data/src/cxx_supportlib/vendor-copy/libuv/src/random.c +123 -0
  391. data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.c +38 -0
  392. data/src/cxx_supportlib/vendor-copy/libuv/src/strscpy.h +39 -0
  393. data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.c +52 -0
  394. data/src/cxx_supportlib/vendor-copy/libuv/src/strtok.h +27 -0
  395. data/src/cxx_supportlib/vendor-copy/libuv/src/thread-common.c +175 -0
  396. data/src/cxx_supportlib/vendor-copy/libuv/src/threadpool.c +172 -57
  397. data/src/cxx_supportlib/vendor-copy/libuv/src/{unix/timer.c → timer.c} +57 -29
  398. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix-common.c +89 -0
  399. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/aix.c +418 -256
  400. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/async.c +168 -129
  401. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-ifaddrs.c +163 -0
  402. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/bsd-proctitle.c +99 -0
  403. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/core.c +1312 -378
  404. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/cygwin.c +93 -0
  405. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-proctitle.c +18 -32
  406. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-stub.h +97 -0
  407. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin-syscalls.h +17 -0
  408. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/darwin.c +41 -139
  409. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/dl.c +1 -1
  410. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/freebsd.c +75 -235
  411. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fs.c +1308 -299
  412. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/fsevents.c +150 -148
  413. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getaddrinfo.c +58 -8
  414. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/getnameinfo.c +3 -2
  415. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/haiku.c +172 -0
  416. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/hurd.c +172 -0
  417. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/ibmi.c +542 -0
  418. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/internal.h +297 -106
  419. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/kqueue.c +325 -94
  420. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux.c +2708 -0
  421. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop-watcher.c +11 -11
  422. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/loop.c +105 -24
  423. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/netbsd.c +51 -157
  424. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-fsevents.c +42 -0
  425. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/no-proctitle.c +45 -0
  426. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/openbsd.c +42 -183
  427. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-proctitle.c +136 -0
  428. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.c +536 -0
  429. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390-syscalls.h +75 -0
  430. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/os390.c +1070 -0
  431. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pipe.c +324 -55
  432. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/poll.c +58 -11
  433. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-hrtime.c +36 -0
  434. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/posix-poll.c +385 -0
  435. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/process.c +795 -248
  436. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/procfs-exepath.c +45 -0
  437. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/proctitle.c +77 -22
  438. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/qnx.c +142 -0
  439. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-devurandom.c +93 -0
  440. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getentropy.c +57 -0
  441. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-getrandom.c +86 -0
  442. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/random-sysctl-linux.c +99 -0
  443. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/signal.c +147 -39
  444. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/stream.c +426 -474
  445. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sunos.c +240 -98
  446. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-loadavg.c +36 -0
  447. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/sysinfo-memory.c +42 -0
  448. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tcp.c +402 -91
  449. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/thread.c +497 -145
  450. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/tty.c +269 -45
  451. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/udp.c +695 -165
  452. data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.c +463 -61
  453. data/src/cxx_supportlib/vendor-copy/libuv/src/uv-common.h +248 -44
  454. data/src/cxx_supportlib/vendor-copy/libuv/src/uv-data-getter-setters.c +119 -0
  455. data/src/cxx_supportlib/vendor-copy/libuv/tsansupp.txt +2 -0
  456. data/src/cxx_supportlib/vendor-modified/libev/Changes +109 -0
  457. data/src/cxx_supportlib/vendor-modified/libev/Makefile.am +2 -1
  458. data/src/cxx_supportlib/vendor-modified/libev/Makefile.in +47 -33
  459. data/src/cxx_supportlib/vendor-modified/libev/README +2 -1
  460. data/src/cxx_supportlib/vendor-modified/libev/aclocal.m4 +1653 -1224
  461. data/src/cxx_supportlib/vendor-modified/libev/config.guess +376 -316
  462. data/src/cxx_supportlib/vendor-modified/libev/config.h.in +13 -2
  463. data/src/cxx_supportlib/vendor-modified/libev/config.sub +156 -154
  464. data/src/cxx_supportlib/vendor-modified/libev/configure +1431 -940
  465. data/src/cxx_supportlib/vendor-modified/libev/configure.ac +3 -3
  466. data/src/cxx_supportlib/vendor-modified/libev/depcomp +5 -5
  467. data/src/cxx_supportlib/vendor-modified/libev/ev++.h +109 -107
  468. data/src/cxx_supportlib/vendor-modified/libev/ev.c +807 -319
  469. data/src/cxx_supportlib/vendor-modified/libev/ev.h +111 -105
  470. data/src/cxx_supportlib/vendor-modified/libev/ev_epoll.c +42 -29
  471. data/src/cxx_supportlib/vendor-modified/libev/ev_iouring.c +694 -0
  472. data/src/cxx_supportlib/vendor-modified/libev/ev_kqueue.c +15 -9
  473. data/src/cxx_supportlib/vendor-modified/libev/ev_linuxaio.c +620 -0
  474. data/src/cxx_supportlib/vendor-modified/libev/ev_poll.c +19 -14
  475. data/src/cxx_supportlib/vendor-modified/libev/ev_port.c +8 -5
  476. data/src/cxx_supportlib/vendor-modified/libev/ev_select.c +6 -6
  477. data/src/cxx_supportlib/vendor-modified/libev/ev_vars.h +48 -3
  478. data/src/cxx_supportlib/vendor-modified/libev/ev_win32.c +2 -2
  479. data/src/cxx_supportlib/vendor-modified/libev/ev_wrap.h +72 -0
  480. data/src/cxx_supportlib/vendor-modified/libev/install-sh +23 -13
  481. data/src/cxx_supportlib/vendor-modified/libev/libev.m4 +6 -1
  482. data/src/cxx_supportlib/vendor-modified/libev/ltmain.sh +3581 -1993
  483. data/src/cxx_supportlib/vendor-modified/libev/missing +8 -8
  484. data/src/cxx_supportlib/vendor-modified/libev/mkinstalldirs +3 -3
  485. data/src/cxx_supportlib/vendor-modified/modp_b64_strict_aliasing.cpp +1 -1
  486. data/src/helper-scripts/backtrace-sanitizer.rb +1 -1
  487. data/src/helper-scripts/crash-watch.rb +1 -1
  488. data/src/helper-scripts/download_binaries/extconf.rb +1 -1
  489. data/src/helper-scripts/meteor-loader.rb +1 -1
  490. data/src/helper-scripts/node-loader.js +1 -1
  491. data/src/helper-scripts/prespawn +1 -1
  492. data/src/helper-scripts/rack-loader.rb +1 -1
  493. data/src/helper-scripts/rack-preloader.rb +1 -1
  494. data/src/helper-scripts/wsgi-loader.py +1 -1
  495. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +1 -1
  496. data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c.cxxcodebuilder +1 -1
  497. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +1 -1
  498. data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c.cxxcodebuilder +1 -1
  499. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +1 -1
  500. data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c.cxxcodebuilder +1 -1
  501. data/src/nginx_module/Configuration.c +1 -1
  502. data/src/nginx_module/Configuration.h +1 -1
  503. data/src/nginx_module/ContentHandler.c +1 -1
  504. data/src/nginx_module/ContentHandler.h +1 -1
  505. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +1 -1
  506. data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
  507. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +1 -1
  508. data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c.cxxcodebuilder +1 -1
  509. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +1 -1
  510. data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
  511. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +1 -1
  512. data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c.cxxcodebuilder +1 -1
  513. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +1 -1
  514. data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  515. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +1 -1
  516. data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c.cxxcodebuilder +1 -1
  517. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +1 -1
  518. data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c.cxxcodebuilder +1 -1
  519. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +1 -1
  520. data/src/nginx_module/MainConfig/AutoGeneratedStruct.h.cxxcodebuilder +1 -1
  521. data/src/nginx_module/StaticContentHandler.c +1 -1
  522. data/src/nginx_module/StaticContentHandler.h +1 -1
  523. data/src/nginx_module/ngx_http_passenger_module.c +1 -1
  524. data/src/nginx_module/ngx_http_passenger_module.h +1 -1
  525. data/src/nodejs_supportlib/phusion_passenger/line_reader.js +1 -1
  526. data/src/ruby_native_extension/extconf.rb +1 -1
  527. data/src/ruby_native_extension/passenger_native_support.c +1 -1
  528. data/src/ruby_supportlib/phusion_passenger/abstract_installer.rb +1 -1
  529. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +1 -1
  530. data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +1 -1
  531. data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +2 -12
  532. data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +1 -1
  533. data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -1
  534. data/src/ruby_supportlib/phusion_passenger/apache2/config_utils.rb +1 -1
  535. data/src/ruby_supportlib/phusion_passenger/common_library.rb +8 -10
  536. data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +1 -1
  537. data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +1 -1
  538. data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +1 -1
  539. data/src/ruby_supportlib/phusion_passenger/config/build_native_support_command.rb +1 -1
  540. data/src/ruby_supportlib/phusion_passenger/config/command.rb +1 -1
  541. data/src/ruby_supportlib/phusion_passenger/config/compile_agent_command.rb +1 -1
  542. data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +1 -1
  543. data/src/ruby_supportlib/phusion_passenger/config/detach_process_command.rb +1 -1
  544. data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +1 -1
  545. data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +1 -1
  546. data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +1 -1
  547. data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +1 -1
  548. data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +1 -1
  549. data/src/ruby_supportlib/phusion_passenger/config/list_instances_command.rb +1 -1
  550. data/src/ruby_supportlib/phusion_passenger/config/main.rb +1 -1
  551. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +3 -2
  552. data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +6 -1
  553. data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +1 -1
  554. data/src/ruby_supportlib/phusion_passenger/config/system_metrics_command.rb +1 -1
  555. data/src/ruby_supportlib/phusion_passenger/config/system_properties_command.rb +1 -1
  556. data/src/ruby_supportlib/phusion_passenger/config/utils.rb +1 -1
  557. data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +1 -1
  558. data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +1 -1
  559. data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -1
  560. data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +1 -1
  561. data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +1 -1
  562. data/src/ruby_supportlib/phusion_passenger/message_channel.rb +1 -1
  563. data/src/ruby_supportlib/phusion_passenger/message_client.rb +1 -1
  564. data/src/ruby_supportlib/phusion_passenger/native_support.rb +1 -1
  565. data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +1 -1
  566. data/src/ruby_supportlib/phusion_passenger/packaging.rb +4 -3
  567. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +1 -1
  568. data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +1 -1
  569. data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +1 -1
  570. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +195 -11
  571. data/src/ruby_supportlib/phusion_passenger/platform_info/crypto.rb +1 -1
  572. data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +1 -1
  573. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +1 -1
  574. data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +1 -1
  575. data/src/ruby_supportlib/phusion_passenger/platform_info/networking.rb +1 -1
  576. data/src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb +1 -1
  577. data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +1 -1
  578. data/src/ruby_supportlib/phusion_passenger/platform_info/pcre.rb +1 -1
  579. data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +1 -1
  580. data/src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb +1 -1
  581. data/src/ruby_supportlib/phusion_passenger/platform_info.rb +1 -1
  582. data/src/ruby_supportlib/phusion_passenger/plugin.rb +1 -1
  583. data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +1 -1
  584. data/src/ruby_supportlib/phusion_passenger/public_api.rb +1 -1
  585. data/src/ruby_supportlib/phusion_passenger/rack/handler.rb +1 -1
  586. data/src/ruby_supportlib/phusion_passenger/rack/out_of_band_gc.rb +1 -1
  587. data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +1 -1
  588. data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +1 -1
  589. data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +2 -7
  590. data/src/ruby_supportlib/phusion_passenger/request_handler.rb +1 -1
  591. data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +1 -1
  592. data/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb +1 -1
  593. data/src/ruby_supportlib/phusion_passenger/simple_benchmarking.rb +1 -1
  594. data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +1 -1
  595. data/src/ruby_supportlib/phusion_passenger/standalone/command.rb +1 -1
  596. data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +1 -1
  597. data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +1 -1
  598. data/src/ruby_supportlib/phusion_passenger/standalone/control_utils.rb +1 -1
  599. data/src/ruby_supportlib/phusion_passenger/standalone/main.rb +1 -1
  600. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +2 -2
  601. data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +4 -8
  602. data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -1
  603. data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +1 -1
  604. data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +1 -1
  605. data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +1 -1
  606. data/src/ruby_supportlib/phusion_passenger/utils/ansi_colors.rb +1 -1
  607. data/src/ruby_supportlib/phusion_passenger/utils/download.rb +1 -1
  608. data/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb +1 -1
  609. data/src/ruby_supportlib/phusion_passenger/utils/hosts_file_parser.rb +1 -1
  610. data/src/ruby_supportlib/phusion_passenger/utils/lock.rb +1 -1
  611. data/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb +1 -1
  612. data/src/ruby_supportlib/phusion_passenger/utils/progress_bar.rb +1 -1
  613. data/src/ruby_supportlib/phusion_passenger/utils/strscan.rb +1 -1
  614. data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +1 -1
  615. data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +3 -13
  616. data/src/ruby_supportlib/phusion_passenger/utils.rb +1 -1
  617. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/app.rb +1 -1
  618. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/base.rb +1 -1
  619. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/gdb_controller.rb +1 -1
  620. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/lldb_controller.rb +1 -1
  621. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/utils.rb +1 -1
  622. data/src/ruby_supportlib/phusion_passenger/vendor/crash_watch/version.rb +1 -1
  623. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/lock_file.rb +8 -6
  624. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/spawn.rb +4 -3
  625. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller/version.rb +6 -4
  626. data/src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb +395 -579
  627. data/src/ruby_supportlib/phusion_passenger.rb +8 -8
  628. data/src/schema_printer/SchemaPrinterMain.cpp +1 -1
  629. data/src/schema_printer/SchemaPrinterMain.cpp.cxxcodebuilder +1 -1
  630. metadata +69 -32
  631. data/doc/DeveloperQuickstart.md +0 -70
  632. data/src/README.md +0 -7
  633. data/src/cxx_supportlib/vendor-copy/libuv/README.md +0 -245
  634. data/src/cxx_supportlib/vendor-copy/libuv/checksparse.sh +0 -234
  635. data/src/cxx_supportlib/vendor-copy/libuv/common.gypi +0 -210
  636. data/src/cxx_supportlib/vendor-copy/libuv/gyp_uv.py +0 -93
  637. data/src/cxx_supportlib/vendor-copy/libuv/include/android-ifaddrs.h +0 -54
  638. data/src/cxx_supportlib/vendor-copy/libuv/include/pthread-fixes.h +0 -72
  639. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/android-ifaddrs.c +0 -703
  640. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/atomic-ops.h +0 -77
  641. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-core.c +0 -899
  642. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-inotify.c +0 -285
  643. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.c +0 -471
  644. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/linux-syscalls.h +0 -158
  645. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/pthread-fixes.c +0 -104
  646. data/src/cxx_supportlib/vendor-copy/libuv/src/unix/spinlock.h +0 -53
  647. data/src/cxx_supportlib/vendor-copy/libuv/uv.gyp +0 -508
  648. /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-aix.h → uv/aix.h} +0 -0
  649. /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-bsd.h → uv/bsd.h} +0 -0
  650. /data/src/cxx_supportlib/vendor-copy/libuv/include/{uv-sunos.h → uv/sunos.h} +0 -0
@@ -1,12 +1,12 @@
1
- #! /bin/sh
1
+ #! /usr/bin/env sh
2
2
  ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
3
- ## by inline-source v2014-01-03.01
3
+ ## by inline-source v2019-02-19.15
4
4
 
5
- # libtool (GNU libtool) 2.4.6
5
+ # libtool (GNU libtool) 2.5.4
6
6
  # Provide generalized library-building support services.
7
7
  # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8
8
 
9
- # Copyright (C) 1996-2015 Free Software Foundation, Inc.
9
+ # Copyright (C) 1996-2019, 2021-2024 Free Software Foundation, Inc.
10
10
  # This is free software; see the source for copying conditions. There is NO
11
11
  # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
12
 
@@ -31,8 +31,8 @@
31
31
 
32
32
  PROGRAM=libtool
33
33
  PACKAGE=libtool
34
- VERSION=2.4.6
35
- package_revision=2.4.6
34
+ VERSION="2.5.4 Debian-2.5.4-9"
35
+ package_revision=2.5.4
36
36
 
37
37
 
38
38
  ## ------ ##
@@ -64,34 +64,25 @@ package_revision=2.4.6
64
64
  # libraries, which are installed to $pkgauxdir.
65
65
 
66
66
  # Set a version string for this script.
67
- scriptversion=2015-01-20.17; # UTC
67
+ scriptversion=2024-12-01.17; # UTC
68
68
 
69
69
  # General shell script boiler plate, and helper functions.
70
70
  # Written by Gary V. Vaughan, 2004
71
71
 
72
- # Copyright (C) 2004-2015 Free Software Foundation, Inc.
73
- # This is free software; see the source for copying conditions. There is NO
74
- # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
75
-
76
- # This program is free software; you can redistribute it and/or modify
77
- # it under the terms of the GNU General Public License as published by
78
- # the Free Software Foundation; either version 3 of the License, or
79
- # (at your option) any later version.
80
-
81
- # As a special exception to the GNU General Public License, if you distribute
82
- # this file as part of a program or library that is built using GNU Libtool,
83
- # you may include this file under the same distribution terms that you use
84
- # for the rest of that program.
85
-
86
- # This program is distributed in the hope that it will be useful,
87
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
88
- # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
89
- # General Public License for more details.
90
-
91
- # You should have received a copy of the GNU General Public License
92
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
72
+ # This is free software. There is NO warranty; not even for
73
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
+ #
75
+ # Copyright (C) 2004-2019, 2021, 2023-2024 Bootstrap Authors
76
+ #
77
+ # This file is dual licensed under the terms of the MIT license
78
+ # <https://opensource.org/licenses/MIT>, and GPL version 2 or later
79
+ # <https://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
80
+ # these licenses when using or redistributing this software or any of
81
+ # the files within it. See the URLs above, or the file `LICENSE`
82
+ # included in the Bootstrap distribution for the full license texts.
93
83
 
94
- # Please report bugs or propose patches to gary@gnu.org.
84
+ # Please report bugs or propose patches to:
85
+ # <https://github.com/gnulib-modules/bootstrap/issues>
95
86
 
96
87
 
97
88
  ## ------ ##
@@ -139,9 +130,12 @@ do
139
130
  _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
140
131
  fi"
141
132
  done
142
-
143
- # CDPATH.
144
- (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
133
+ # These NLS vars are set unconditionally (bootstrap issue #24). Unset those
134
+ # in case the environment reset is needed later and the $save_* variant is not
135
+ # defined (see the code above).
136
+ LC_ALL=C
137
+ LANGUAGE=C
138
+ export LANGUAGE LC_ALL
145
139
 
146
140
  # Make sure IFS has a sensible default
147
141
  sp=' '
@@ -149,7 +143,7 @@ nl='
149
143
  '
150
144
  IFS="$sp $nl"
151
145
 
152
- # There are apparently some retarded systems that use ';' as a PATH separator!
146
+ # There are apparently some systems that use ';' as a PATH separator!
153
147
  if test "${PATH_SEPARATOR+set}" != set; then
154
148
  PATH_SEPARATOR=:
155
149
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
@@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then
159
153
  fi
160
154
 
161
155
 
156
+ # func_unset VAR
157
+ # --------------
158
+ # Portably unset VAR.
159
+ # In some shells, an 'unset VAR' statement leaves a non-zero return
160
+ # status if VAR is already unset, which might be problematic if the
161
+ # statement is used at the end of a function (thus poisoning its return
162
+ # value) or when 'set -e' is active (causing even a spurious abort of
163
+ # the script in this case).
164
+ func_unset ()
165
+ {
166
+ { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
167
+ }
168
+
169
+
170
+ # Make sure CDPATH doesn't cause `cd` commands to output the target dir.
171
+ func_unset CDPATH
172
+
173
+ # Make sure ${,E,F}GREP behave sanely.
174
+ func_unset GREP_OPTIONS
175
+
162
176
 
163
177
  ## ------------------------- ##
164
178
  ## Locate command utilities. ##
@@ -259,7 +273,7 @@ test -z "$SED" && {
259
273
  rm -f conftest.in conftest.tmp conftest.nl conftest.out
260
274
  }
261
275
 
262
- func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
276
+ func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
263
277
  rm -f conftest.sed
264
278
  SED=$func_path_progs_result
265
279
  }
@@ -295,7 +309,7 @@ test -z "$GREP" && {
295
309
  rm -f conftest.in conftest.tmp conftest.nl conftest.out
296
310
  }
297
311
 
298
- func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
312
+ func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
299
313
  GREP=$func_path_progs_result
300
314
  }
301
315
 
@@ -360,6 +374,35 @@ sed_double_backslash="\
360
374
  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
361
375
  s/\n//g"
362
376
 
377
+ # require_check_ifs_backslash
378
+ # ---------------------------
379
+ # Check if we can use backslash as IFS='\' separator, and set
380
+ # $check_ifs_backshlash_broken to ':' or 'false'.
381
+ require_check_ifs_backslash=func_require_check_ifs_backslash
382
+ func_require_check_ifs_backslash ()
383
+ {
384
+ _G_save_IFS=$IFS
385
+ IFS='\'
386
+ _G_check_ifs_backshlash='a\\b'
387
+ for _G_i in $_G_check_ifs_backshlash
388
+ do
389
+ case $_G_i in
390
+ a)
391
+ check_ifs_backshlash_broken=false
392
+ ;;
393
+ '')
394
+ break
395
+ ;;
396
+ *)
397
+ check_ifs_backshlash_broken=:
398
+ break
399
+ ;;
400
+ esac
401
+ done
402
+ IFS=$_G_save_IFS
403
+ require_check_ifs_backslash=:
404
+ }
405
+
363
406
 
364
407
  ## ----------------- ##
365
408
  ## Global variables. ##
@@ -387,7 +430,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
387
430
  # putting '$debug_cmd' at the start of all your functions, you can get
388
431
  # bash to show function call trace with:
389
432
  #
390
- # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
433
+ # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
391
434
  debug_cmd=${debug_cmd-":"}
392
435
  exit_cmd=:
393
436
 
@@ -529,27 +572,16 @@ func_require_term_colors ()
529
572
  # ---------------------
530
573
  # Append VALUE onto the existing contents of VAR.
531
574
 
532
- # We should try to minimise forks, especially on Windows where they are
533
- # unreasonably slow, so skip the feature probes when bash or zsh are
534
- # being used:
535
- if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
536
- : ${_G_HAVE_ARITH_OP="yes"}
537
- : ${_G_HAVE_XSI_OPS="yes"}
538
- # The += operator was introduced in bash 3.1
539
- case $BASH_VERSION in
540
- [12].* | 3.0 | 3.0*) ;;
541
- *)
542
- : ${_G_HAVE_PLUSEQ_OP="yes"}
543
- ;;
544
- esac
545
- fi
546
575
 
547
576
  # _G_HAVE_PLUSEQ_OP
548
577
  # Can be empty, in which case the shell is probed, "yes" if += is
549
- # useable or anything else if it does not work.
550
- test -z "$_G_HAVE_PLUSEQ_OP" \
551
- && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
552
- && _G_HAVE_PLUSEQ_OP=yes
578
+ # usable or anything else if it does not work.
579
+ if test -z "$_G_HAVE_PLUSEQ_OP" && \
580
+ __PLUSEQ_TEST="a" && \
581
+ __PLUSEQ_TEST+=" b" 2>/dev/null && \
582
+ test "a b" = "$__PLUSEQ_TEST"; then
583
+ _G_HAVE_PLUSEQ_OP=yes
584
+ fi
553
585
 
554
586
  if test yes = "$_G_HAVE_PLUSEQ_OP"
555
587
  then
@@ -580,16 +612,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then
580
612
  {
581
613
  $debug_cmd
582
614
 
583
- func_quote_for_eval "$2"
584
- eval "$1+=\\ \$func_quote_for_eval_result"
615
+ func_quote_arg pretty "$2"
616
+ eval "$1+=\\ \$func_quote_arg_result"
585
617
  }'
586
618
  else
587
619
  func_append_quoted ()
588
620
  {
589
621
  $debug_cmd
590
622
 
591
- func_quote_for_eval "$2"
592
- eval "$1=\$$1\\ \$func_quote_for_eval_result"
623
+ func_quote_arg pretty "$2"
624
+ eval "$1=\$$1\\ \$func_quote_arg_result"
593
625
  }
594
626
  fi
595
627
 
@@ -696,7 +728,7 @@ eval 'func_dirname ()
696
728
  # to NONDIR_REPLACEMENT.
697
729
  # value returned in "$func_dirname_result"
698
730
  # basename: Compute filename of FILE.
699
- # value retuned in "$func_basename_result"
731
+ # value returned in "$func_basename_result"
700
732
  # For efficiency, we do not delegate to the functions above but instead
701
733
  # duplicate the functionality here.
702
734
  eval 'func_dirname_and_basename ()
@@ -854,7 +886,7 @@ func_mkdir_p ()
854
886
  # While some portion of DIR does not yet exist...
855
887
  while test ! -d "$_G_directory_path"; do
856
888
  # ...make a list in topmost first order. Use a colon delimited
857
- # list incase some portion of path contains whitespace.
889
+ # list in case some portion of path contains whitespace.
858
890
  _G_dir_list=$_G_directory_path:$_G_dir_list
859
891
 
860
892
  # If the last portion added has no slash in it, the list is done
@@ -1091,85 +1123,203 @@ func_relative_path ()
1091
1123
  }
1092
1124
 
1093
1125
 
1094
- # func_quote_for_eval ARG...
1095
- # --------------------------
1096
- # Aesthetically quote ARGs to be evaled later.
1097
- # This function returns two values:
1098
- # i) func_quote_for_eval_result
1099
- # double-quoted, suitable for a subsequent eval
1100
- # ii) func_quote_for_eval_unquoted_result
1101
- # has all characters that are still active within double
1102
- # quotes backslashified.
1103
- func_quote_for_eval ()
1126
+ # func_quote_portable EVAL ARG
1127
+ # ----------------------------
1128
+ # Internal function to portably implement func_quote_arg. Note that we still
1129
+ # keep attention to performance here so we as much as possible try to avoid
1130
+ # calling sed binary (so far O(N) complexity as long as func_append is O(1)).
1131
+ func_quote_portable ()
1104
1132
  {
1105
1133
  $debug_cmd
1106
1134
 
1107
- func_quote_for_eval_unquoted_result=
1108
- func_quote_for_eval_result=
1109
- while test 0 -lt $#; do
1110
- case $1 in
1111
- *[\\\`\"\$]*)
1112
- _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1113
- *)
1114
- _G_unquoted_arg=$1 ;;
1115
- esac
1116
- if test -n "$func_quote_for_eval_unquoted_result"; then
1117
- func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1118
- else
1119
- func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
1135
+ $require_check_ifs_backslash
1136
+
1137
+ func_quote_portable_result=$2
1138
+
1139
+ # one-time-loop (easy break)
1140
+ while true
1141
+ do
1142
+ if $1; then
1143
+ func_quote_portable_result=`$ECHO "$2" | $SED \
1144
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
1145
+ break
1120
1146
  fi
1121
1147
 
1122
- case $_G_unquoted_arg in
1123
- # Double-quote args containing shell metacharacters to delay
1124
- # word splitting, command substitution and variable expansion
1125
- # for a subsequent eval.
1126
- # Many Bourne shells cannot handle close brackets correctly
1127
- # in scan sets, so we specify it separately.
1128
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1129
- _G_quoted_arg=\"$_G_unquoted_arg\"
1148
+ # Quote for eval.
1149
+ case $func_quote_portable_result in
1150
+ *[\\\`\"\$]*)
1151
+ # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
1152
+ # contains the shell wildcard characters.
1153
+ case $check_ifs_backshlash_broken$func_quote_portable_result in
1154
+ :*|*[\[\*\?]*)
1155
+ func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
1156
+ | $SED "$sed_quote_subst"`
1157
+ break
1158
+ ;;
1159
+ esac
1160
+
1161
+ func_quote_portable_old_IFS=$IFS
1162
+ for _G_char in '\' '`' '"' '$'
1163
+ do
1164
+ # STATE($1) PREV($2) SEPARATOR($3)
1165
+ set start "" ""
1166
+ func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
1167
+ IFS=$_G_char
1168
+ for _G_part in $func_quote_portable_result
1169
+ do
1170
+ case $1 in
1171
+ quote)
1172
+ func_append func_quote_portable_result "$3$2"
1173
+ set quote "$_G_part" "\\$_G_char"
1174
+ ;;
1175
+ start)
1176
+ set first "" ""
1177
+ func_quote_portable_result=
1178
+ ;;
1179
+ first)
1180
+ set quote "$_G_part" ""
1181
+ ;;
1182
+ esac
1183
+ done
1184
+ done
1185
+ IFS=$func_quote_portable_old_IFS
1130
1186
  ;;
1131
- *)
1132
- _G_quoted_arg=$_G_unquoted_arg
1133
- ;;
1187
+ *) ;;
1134
1188
  esac
1135
-
1136
- if test -n "$func_quote_for_eval_result"; then
1137
- func_append func_quote_for_eval_result " $_G_quoted_arg"
1138
- else
1139
- func_append func_quote_for_eval_result "$_G_quoted_arg"
1140
- fi
1141
- shift
1189
+ break
1142
1190
  done
1191
+
1192
+ func_quote_portable_unquoted_result=$func_quote_portable_result
1193
+ case $func_quote_portable_result in
1194
+ # double-quote args containing shell metacharacters to delay
1195
+ # word splitting, command substitution and variable expansion
1196
+ # for a subsequent eval.
1197
+ # many bourne shells cannot handle close brackets correctly
1198
+ # in scan sets, so we specify it separately.
1199
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1200
+ func_quote_portable_result=\"$func_quote_portable_result\"
1201
+ ;;
1202
+ esac
1143
1203
  }
1144
1204
 
1145
1205
 
1146
- # func_quote_for_expand ARG
1147
- # -------------------------
1148
- # Aesthetically quote ARG to be evaled later; same as above,
1149
- # but do not quote variable references.
1150
- func_quote_for_expand ()
1151
- {
1152
- $debug_cmd
1206
+ # func_quotefast_eval ARG
1207
+ # -----------------------
1208
+ # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
1209
+ # but optimized for speed. Result is stored in $func_quotefast_eval.
1210
+ if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
1211
+ printf -v _GL_test_printf_tilde %q '~'
1212
+ if test '\~' = "$_GL_test_printf_tilde"; then
1213
+ func_quotefast_eval ()
1214
+ {
1215
+ printf -v func_quotefast_eval_result %q "$1"
1216
+ }
1217
+ else
1218
+ # Broken older Bash implementations. Make those faster too if possible.
1219
+ func_quotefast_eval ()
1220
+ {
1221
+ case $1 in
1222
+ '~'*)
1223
+ func_quote_portable false "$1"
1224
+ func_quotefast_eval_result=$func_quote_portable_result
1225
+ ;;
1226
+ *)
1227
+ printf -v func_quotefast_eval_result %q "$1"
1228
+ ;;
1229
+ esac
1230
+ }
1231
+ fi
1232
+ else
1233
+ func_quotefast_eval ()
1234
+ {
1235
+ func_quote_portable false "$1"
1236
+ func_quotefast_eval_result=$func_quote_portable_result
1237
+ }
1238
+ fi
1153
1239
 
1154
- case $1 in
1155
- *[\\\`\"]*)
1156
- _G_arg=`$ECHO "$1" | $SED \
1157
- -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
1158
- *)
1159
- _G_arg=$1 ;;
1240
+
1241
+ # func_quote_arg MODEs ARG
1242
+ # ------------------------
1243
+ # Quote one ARG to be evaled later. MODEs argument may contain zero or more
1244
+ # specifiers listed below separated by ',' character. This function returns two
1245
+ # values:
1246
+ # i) func_quote_arg_result
1247
+ # double-quoted (when needed), suitable for a subsequent eval
1248
+ # ii) func_quote_arg_unquoted_result
1249
+ # has all characters that are still active within double
1250
+ # quotes backslashified. Available only if 'unquoted' is specified.
1251
+ #
1252
+ # Available modes:
1253
+ # ----------------
1254
+ # 'eval' (default)
1255
+ # - escape shell special characters
1256
+ # 'expand'
1257
+ # - the same as 'eval'; but do not quote variable references
1258
+ # 'pretty'
1259
+ # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
1260
+ # be used later in func_quote to get output like: 'echo "a b"' instead
1261
+ # of 'echo a\ b'. This is slower than default on some shells.
1262
+ # 'unquoted'
1263
+ # - produce also $func_quote_arg_unquoted_result which does not contain
1264
+ # wrapping double-quotes.
1265
+ #
1266
+ # Examples for 'func_quote_arg pretty,unquoted string':
1267
+ #
1268
+ # string | *_result | *_unquoted_result
1269
+ # ------------+-----------------------+-------------------
1270
+ # " | \" | \"
1271
+ # a b | "a b" | a b
1272
+ # "a b" | "\"a b\"" | \"a b\"
1273
+ # * | "*" | *
1274
+ # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
1275
+ #
1276
+ # Examples for 'func_quote_arg pretty,unquoted,expand string':
1277
+ #
1278
+ # string | *_result | *_unquoted_result
1279
+ # --------------+---------------------+--------------------
1280
+ # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
1281
+ func_quote_arg ()
1282
+ {
1283
+ _G_quote_expand=false
1284
+ case ,$1, in
1285
+ *,expand,*)
1286
+ _G_quote_expand=:
1287
+ ;;
1160
1288
  esac
1161
1289
 
1162
- case $_G_arg in
1163
- # Double-quote args containing shell metacharacters to delay
1164
- # word splitting and command substitution for a subsequent eval.
1165
- # Many Bourne shells cannot handle close brackets correctly
1166
- # in scan sets, so we specify it separately.
1167
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1168
- _G_arg=\"$_G_arg\"
1290
+ case ,$1, in
1291
+ *,pretty,*|*,expand,*|*,unquoted,*)
1292
+ func_quote_portable $_G_quote_expand "$2"
1293
+ func_quote_arg_result=$func_quote_portable_result
1294
+ func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
1295
+ ;;
1296
+ *)
1297
+ # Faster quote-for-eval for some shells.
1298
+ func_quotefast_eval "$2"
1299
+ func_quote_arg_result=$func_quotefast_eval_result
1169
1300
  ;;
1170
1301
  esac
1302
+ }
1303
+
1171
1304
 
1172
- func_quote_for_expand_result=$_G_arg
1305
+ # func_quote MODEs ARGs...
1306
+ # ------------------------
1307
+ # Quote all ARGs to be evaled later and join them into single command. See
1308
+ # func_quote_arg's description for more info.
1309
+ func_quote ()
1310
+ {
1311
+ $debug_cmd
1312
+ _G_func_quote_mode=$1 ; shift
1313
+ func_quote_result=
1314
+ while test 0 -lt $#; do
1315
+ func_quote_arg "$_G_func_quote_mode" "$1"
1316
+ if test -n "$func_quote_result"; then
1317
+ func_append func_quote_result " $func_quote_arg_result"
1318
+ else
1319
+ func_append func_quote_result "$func_quote_arg_result"
1320
+ fi
1321
+ shift
1322
+ done
1173
1323
  }
1174
1324
 
1175
1325
 
@@ -1215,8 +1365,8 @@ func_show_eval ()
1215
1365
  _G_cmd=$1
1216
1366
  _G_fail_exp=${2-':'}
1217
1367
 
1218
- func_quote_for_expand "$_G_cmd"
1219
- eval "func_notquiet $func_quote_for_expand_result"
1368
+ func_quote_arg pretty,expand "$_G_cmd"
1369
+ eval "func_notquiet $func_quote_arg_result"
1220
1370
 
1221
1371
  $opt_dry_run || {
1222
1372
  eval "$_G_cmd"
@@ -1241,8 +1391,8 @@ func_show_eval_locale ()
1241
1391
  _G_fail_exp=${2-':'}
1242
1392
 
1243
1393
  $opt_quiet || {
1244
- func_quote_for_expand "$_G_cmd"
1245
- eval "func_echo $func_quote_for_expand_result"
1394
+ func_quote_arg expand,pretty "$_G_cmd"
1395
+ eval "func_echo $func_quote_arg_result"
1246
1396
  }
1247
1397
 
1248
1398
  $opt_dry_run || {
@@ -1369,30 +1519,26 @@ func_lt_ver ()
1369
1519
  # End:
1370
1520
  #! /bin/sh
1371
1521
 
1372
- # Set a version string for this script.
1373
- scriptversion=2014-01-07.03; # UTC
1374
-
1375
1522
  # A portable, pluggable option parser for Bourne shell.
1376
1523
  # Written by Gary V. Vaughan, 2010
1377
1524
 
1378
- # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1379
- # This is free software; see the source for copying conditions. There is NO
1380
- # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1381
-
1382
- # This program is free software: you can redistribute it and/or modify
1383
- # it under the terms of the GNU General Public License as published by
1384
- # the Free Software Foundation, either version 3 of the License, or
1385
- # (at your option) any later version.
1386
-
1387
- # This program is distributed in the hope that it will be useful,
1388
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
1389
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1390
- # GNU General Public License for more details.
1525
+ # This is free software. There is NO warranty; not even for
1526
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1527
+ #
1528
+ # Copyright (C) 2010-2019, 2021, 2023-2024 Bootstrap Authors
1529
+ #
1530
+ # This file is dual licensed under the terms of the MIT license
1531
+ # <https://opensource.org/licenses/MIT>, and GPL version 2 or later
1532
+ # <https://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
1533
+ # these licenses when using or redistributing this software or any of
1534
+ # the files within it. See the URLs above, or the file `LICENSE`
1535
+ # included in the Bootstrap distribution for the full license texts.
1391
1536
 
1392
- # You should have received a copy of the GNU General Public License
1393
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
1537
+ # Please report bugs or propose patches to:
1538
+ # <https://github.com/gnulib-modules/bootstrap/issues>
1394
1539
 
1395
- # Please report bugs or propose patches to gary@gnu.org.
1540
+ # Set a version string for this script.
1541
+ scriptversion=2019-02-19.15; # UTC
1396
1542
 
1397
1543
 
1398
1544
  ## ------ ##
@@ -1415,7 +1561,7 @@ scriptversion=2014-01-07.03; # UTC
1415
1561
  #
1416
1562
  # In order for the '--version' option to work, you will need to have a
1417
1563
  # suitably formatted comment like the one at the top of this file
1418
- # starting with '# Written by ' and ending with '# warranty; '.
1564
+ # starting with '# Written by ' and ending with '# Copyright'.
1419
1565
  #
1420
1566
  # For '-h' and '--help' to work, you will also need a one line
1421
1567
  # description of your script's purpose in a comment directly above the
@@ -1427,7 +1573,7 @@ scriptversion=2014-01-07.03; # UTC
1427
1573
  # to display verbose messages only when your user has specified
1428
1574
  # '--verbose'.
1429
1575
  #
1430
- # After sourcing this file, you can plug processing for additional
1576
+ # After sourcing this file, you can plug in processing for additional
1431
1577
  # options by amending the variables from the 'Configuration' section
1432
1578
  # below, and following the instructions in the 'Option parsing'
1433
1579
  # section further down.
@@ -1476,8 +1622,8 @@ fatal_help="Try '\$progname --help' for more information."
1476
1622
  ## ------------------------- ##
1477
1623
 
1478
1624
  # This section contains functions for adding, removing, and running hooks
1479
- # to the main code. A hook is just a named list of of function, that can
1480
- # be run in order later on.
1625
+ # in the main code. A hook is just a list of function names that can be
1626
+ # run in order later on.
1481
1627
 
1482
1628
  # func_hookable FUNC_NAME
1483
1629
  # -----------------------
@@ -1510,7 +1656,8 @@ func_add_hook ()
1510
1656
 
1511
1657
  # func_remove_hook FUNC_NAME HOOK_FUNC
1512
1658
  # ------------------------------------
1513
- # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1659
+ # Remove HOOK_FUNC from the list of hook functions to be called by
1660
+ # FUNC_NAME.
1514
1661
  func_remove_hook ()
1515
1662
  {
1516
1663
  $debug_cmd
@@ -1519,10 +1666,28 @@ func_remove_hook ()
1519
1666
  }
1520
1667
 
1521
1668
 
1669
+ # func_propagate_result FUNC_NAME_A FUNC_NAME_B
1670
+ # ---------------------------------------------
1671
+ # If the *_result variable of FUNC_NAME_A _is set_, assign its value to
1672
+ # *_result variable of FUNC_NAME_B.
1673
+ func_propagate_result ()
1674
+ {
1675
+ $debug_cmd
1676
+
1677
+ func_propagate_result_result=:
1678
+ if eval "test \"\${${1}_result+set}\" = set"
1679
+ then
1680
+ eval "${2}_result=\$${1}_result"
1681
+ else
1682
+ func_propagate_result_result=false
1683
+ fi
1684
+ }
1685
+
1686
+
1522
1687
  # func_run_hooks FUNC_NAME [ARG]...
1523
1688
  # ---------------------------------
1524
1689
  # Run all hook functions registered to FUNC_NAME.
1525
- # It is assumed that the list of hook functions contains nothing more
1690
+ # It's assumed that the list of hook functions contains nothing more
1526
1691
  # than a whitespace-delimited list of legal shell function names, and
1527
1692
  # no effort is wasted trying to catch shell meta-characters or preserve
1528
1693
  # whitespace.
@@ -1530,24 +1695,23 @@ func_run_hooks ()
1530
1695
  {
1531
1696
  $debug_cmd
1532
1697
 
1698
+ _G_rc_run_hooks=false
1699
+
1533
1700
  case " $hookable_fns " in
1534
1701
  *" $1 "*) ;;
1535
- *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1702
+ *) func_fatal_error "'$1' does not support hook functions." ;;
1536
1703
  esac
1537
1704
 
1538
1705
  eval _G_hook_fns=\$$1_hooks; shift
1539
1706
 
1540
1707
  for _G_hook in $_G_hook_fns; do
1541
- eval $_G_hook '"$@"'
1542
-
1543
- # store returned options list back into positional
1544
- # parameters for next 'cmd' execution.
1545
- eval _G_hook_result=\$${_G_hook}_result
1546
- eval set dummy "$_G_hook_result"; shift
1708
+ func_unset "${_G_hook}_result"
1709
+ eval $_G_hook '${1+"$@"}'
1710
+ func_propagate_result $_G_hook func_run_hooks
1711
+ if $func_propagate_result_result; then
1712
+ eval set dummy "$func_run_hooks_result"; shift
1713
+ fi
1547
1714
  done
1548
-
1549
- func_quote_for_eval ${1+"$@"}
1550
- func_run_hooks_result=$func_quote_for_eval_result
1551
1715
  }
1552
1716
 
1553
1717
 
@@ -1557,10 +1721,18 @@ func_run_hooks ()
1557
1721
  ## --------------- ##
1558
1722
 
1559
1723
  # In order to add your own option parsing hooks, you must accept the
1560
- # full positional parameter list in your hook function, remove any
1561
- # options that you action, and then pass back the remaining unprocessed
1562
- # options in '<hooked_function_name>_result', escaped suitably for
1563
- # 'eval'. Like this:
1724
+ # full positional parameter list from your hook function. You may remove
1725
+ # or edit any options that you action, and then pass back the remaining
1726
+ # unprocessed options in '<hooked_function_name>_result', escaped
1727
+ # suitably for 'eval'.
1728
+ #
1729
+ # The '<hooked_function_name>_result' variable is automatically unset
1730
+ # before your hook gets called; for best performance, only set the
1731
+ # *_result variable when necessary (i.e. don't call the 'func_quote'
1732
+ # function unnecessarily because it can be an expensive operation on some
1733
+ # machines).
1734
+ #
1735
+ # Like this:
1564
1736
  #
1565
1737
  # my_options_prep ()
1566
1738
  # {
@@ -1570,9 +1742,8 @@ func_run_hooks ()
1570
1742
  # usage_message=$usage_message'
1571
1743
  # -s, --silent don'\''t print informational messages
1572
1744
  # '
1573
- #
1574
- # func_quote_for_eval ${1+"$@"}
1575
- # my_options_prep_result=$func_quote_for_eval_result
1745
+ # # No change in '$@' (ignored completely by this hook). Leave
1746
+ # # my_options_prep_result variable intact.
1576
1747
  # }
1577
1748
  # func_add_hook func_options_prep my_options_prep
1578
1749
  #
@@ -1581,25 +1752,36 @@ func_run_hooks ()
1581
1752
  # {
1582
1753
  # $debug_cmd
1583
1754
  #
1584
- # # Note that for efficiency, we parse as many options as we can
1755
+ # args_changed=false
1756
+ #
1757
+ # # Note that, for efficiency, we parse as many options as we can
1585
1758
  # # recognise in a loop before passing the remainder back to the
1586
1759
  # # caller on the first unrecognised argument we encounter.
1587
1760
  # while test $# -gt 0; do
1588
1761
  # opt=$1; shift
1589
1762
  # case $opt in
1590
- # --silent|-s) opt_silent=: ;;
1763
+ # --silent|-s) opt_silent=:
1764
+ # args_changed=:
1765
+ # ;;
1591
1766
  # # Separate non-argument short options:
1592
1767
  # -s*) func_split_short_opt "$_G_opt"
1593
1768
  # set dummy "$func_split_short_opt_name" \
1594
1769
  # "-$func_split_short_opt_arg" ${1+"$@"}
1595
1770
  # shift
1771
+ # args_changed=:
1596
1772
  # ;;
1597
- # *) set dummy "$_G_opt" "$*"; shift; break ;;
1773
+ # *) # Make sure the first unrecognised option "$_G_opt"
1774
+ # # is added back to "$@" in case we need it later,
1775
+ # # if $args_changed was set to 'true'.
1776
+ # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1598
1777
  # esac
1599
1778
  # done
1600
1779
  #
1601
- # func_quote_for_eval ${1+"$@"}
1602
- # my_silent_option_result=$func_quote_for_eval_result
1780
+ # # Only call 'func_quote' here if we processed at least one argument.
1781
+ # if $args_changed; then
1782
+ # func_quote eval ${1+"$@"}
1783
+ # my_silent_option_result=$func_quote_result
1784
+ # fi
1603
1785
  # }
1604
1786
  # func_add_hook func_parse_options my_silent_option
1605
1787
  #
@@ -1610,17 +1792,26 @@ func_run_hooks ()
1610
1792
  #
1611
1793
  # $opt_silent && $opt_verbose && func_fatal_help "\
1612
1794
  # '--silent' and '--verbose' options are mutually exclusive."
1613
- #
1614
- # func_quote_for_eval ${1+"$@"}
1615
- # my_option_validation_result=$func_quote_for_eval_result
1616
1795
  # }
1617
1796
  # func_add_hook func_validate_options my_option_validation
1618
1797
  #
1619
- # You'll alse need to manually amend $usage_message to reflect the extra
1798
+ # You'll also need to manually amend $usage_message to reflect the extra
1620
1799
  # options you parse. It's preferable to append if you can, so that
1621
1800
  # multiple option parsing hooks can be added safely.
1622
1801
 
1623
1802
 
1803
+ # func_options_finish [ARG]...
1804
+ # ----------------------------
1805
+ # Finishing the option parse loop (call 'func_options' hooks ATM).
1806
+ func_options_finish ()
1807
+ {
1808
+ $debug_cmd
1809
+
1810
+ func_run_hooks func_options ${1+"$@"}
1811
+ func_propagate_result func_run_hooks func_options_finish
1812
+ }
1813
+
1814
+
1624
1815
  # func_options [ARG]...
1625
1816
  # ---------------------
1626
1817
  # All the functions called inside func_options are hookable. See the
@@ -1630,17 +1821,27 @@ func_options ()
1630
1821
  {
1631
1822
  $debug_cmd
1632
1823
 
1633
- func_options_prep ${1+"$@"}
1634
- eval func_parse_options \
1635
- ${func_options_prep_result+"$func_options_prep_result"}
1636
- eval func_validate_options \
1637
- ${func_parse_options_result+"$func_parse_options_result"}
1824
+ _G_options_quoted=false
1638
1825
 
1639
- eval func_run_hooks func_options \
1640
- ${func_validate_options_result+"$func_validate_options_result"}
1826
+ for my_func in options_prep parse_options validate_options options_finish
1827
+ do
1828
+ func_unset func_${my_func}_result
1829
+ func_unset func_run_hooks_result
1830
+ eval func_$my_func '${1+"$@"}'
1831
+ func_propagate_result func_$my_func func_options
1832
+ if $func_propagate_result_result; then
1833
+ eval set dummy "$func_options_result"; shift
1834
+ _G_options_quoted=:
1835
+ fi
1836
+ done
1641
1837
 
1642
- # save modified positional parameters for caller
1643
- func_options_result=$func_run_hooks_result
1838
+ $_G_options_quoted || {
1839
+ # As we (func_options) are top-level options-parser function and
1840
+ # nobody quoted "$@" for us yet, we need to do it explicitly for
1841
+ # caller.
1842
+ func_quote eval ${1+"$@"}
1843
+ func_options_result=$func_quote_result
1844
+ }
1644
1845
  }
1645
1846
 
1646
1847
 
@@ -1649,9 +1850,8 @@ func_options ()
1649
1850
  # All initialisations required before starting the option parse loop.
1650
1851
  # Note that when calling hook functions, we pass through the list of
1651
1852
  # positional parameters. If a hook function modifies that list, and
1652
- # needs to propogate that back to rest of this script, then the complete
1653
- # modified list must be put in 'func_run_hooks_result' before
1654
- # returning.
1853
+ # needs to propagate that back to rest of this script, then the complete
1854
+ # modified list must be put in 'func_run_hooks_result' before returning.
1655
1855
  func_hookable func_options_prep
1656
1856
  func_options_prep ()
1657
1857
  {
@@ -1662,9 +1862,7 @@ func_options_prep ()
1662
1862
  opt_warning_types=
1663
1863
 
1664
1864
  func_run_hooks func_options_prep ${1+"$@"}
1665
-
1666
- # save modified positional parameters for caller
1667
- func_options_prep_result=$func_run_hooks_result
1865
+ func_propagate_result func_run_hooks func_options_prep
1668
1866
  }
1669
1867
 
1670
1868
 
@@ -1676,25 +1874,32 @@ func_parse_options ()
1676
1874
  {
1677
1875
  $debug_cmd
1678
1876
 
1679
- func_parse_options_result=
1680
-
1877
+ _G_parse_options_requote=false
1681
1878
  # this just eases exit handling
1682
1879
  while test $# -gt 0; do
1683
1880
  # Defer to hook functions for initial option parsing, so they
1684
1881
  # get priority in the event of reusing an option name.
1685
1882
  func_run_hooks func_parse_options ${1+"$@"}
1686
-
1687
- # Adjust func_parse_options positional parameters to match
1688
- eval set dummy "$func_run_hooks_result"; shift
1883
+ func_propagate_result func_run_hooks func_parse_options
1884
+ if $func_propagate_result_result; then
1885
+ eval set dummy "$func_parse_options_result"; shift
1886
+ # Even though we may have changed "$@", we passed the "$@" array
1887
+ # down into the hook and it quoted it for us (because we are in
1888
+ # this if-branch). No need to quote it again.
1889
+ _G_parse_options_requote=false
1890
+ fi
1689
1891
 
1690
1892
  # Break out of the loop if we already parsed every option.
1691
1893
  test $# -gt 0 || break
1692
1894
 
1895
+ # We expect that one of the options parsed in this function matches
1896
+ # and thus we remove _G_opt from "$@" and need to re-quote.
1897
+ _G_match_parse_options=:
1693
1898
  _G_opt=$1
1694
1899
  shift
1695
1900
  case $_G_opt in
1696
1901
  --debug|-x) debug_cmd='set -x'
1697
- func_echo "enabling shell trace mode"
1902
+ func_echo "enabling shell trace mode" >&2
1698
1903
  $debug_cmd
1699
1904
  ;;
1700
1905
 
@@ -1704,7 +1909,10 @@ func_parse_options ()
1704
1909
  ;;
1705
1910
 
1706
1911
  --warnings|--warning|-W)
1707
- test $# = 0 && func_missing_arg $_G_opt && break
1912
+ if test $# = 0 && func_missing_arg $_G_opt; then
1913
+ _G_parse_options_requote=:
1914
+ break
1915
+ fi
1708
1916
  case " $warning_categories $1" in
1709
1917
  *" $1 "*)
1710
1918
  # trailing space prevents matching last $1 above
@@ -1757,15 +1965,24 @@ func_parse_options ()
1757
1965
  shift
1758
1966
  ;;
1759
1967
 
1760
- --) break ;;
1968
+ --) _G_parse_options_requote=: ; break ;;
1761
1969
  -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1762
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1970
+ *) set dummy "$_G_opt" ${1+"$@"}; shift
1971
+ _G_match_parse_options=false
1972
+ break
1973
+ ;;
1763
1974
  esac
1975
+
1976
+ if $_G_match_parse_options; then
1977
+ _G_parse_options_requote=:
1978
+ fi
1764
1979
  done
1765
1980
 
1766
- # save modified positional parameters for caller
1767
- func_quote_for_eval ${1+"$@"}
1768
- func_parse_options_result=$func_quote_for_eval_result
1981
+ if $_G_parse_options_requote; then
1982
+ # save modified positional parameters for caller
1983
+ func_quote eval ${1+"$@"}
1984
+ func_parse_options_result=$func_quote_result
1985
+ fi
1769
1986
  }
1770
1987
 
1771
1988
 
@@ -1782,12 +1999,10 @@ func_validate_options ()
1782
1999
  test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1783
2000
 
1784
2001
  func_run_hooks func_validate_options ${1+"$@"}
2002
+ func_propagate_result func_run_hooks func_validate_options
1785
2003
 
1786
2004
  # Bail if the options were screwed!
1787
2005
  $exit_cmd $EXIT_FAILURE
1788
-
1789
- # save modified positional parameters for caller
1790
- func_validate_options_result=$func_run_hooks_result
1791
2006
  }
1792
2007
 
1793
2008
 
@@ -1843,8 +2058,8 @@ func_missing_arg ()
1843
2058
 
1844
2059
  # func_split_equals STRING
1845
2060
  # ------------------------
1846
- # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1847
- # splitting STRING at the '=' sign.
2061
+ # Set func_split_equals_lhs and func_split_equals_rhs shell variables
2062
+ # after splitting STRING at the '=' sign.
1848
2063
  test -z "$_G_HAVE_XSI_OPS" \
1849
2064
  && (eval 'x=a/b/c;
1850
2065
  test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
@@ -1859,8 +2074,9 @@ then
1859
2074
 
1860
2075
  func_split_equals_lhs=${1%%=*}
1861
2076
  func_split_equals_rhs=${1#*=}
1862
- test "x$func_split_equals_lhs" = "x$1" \
1863
- && func_split_equals_rhs=
2077
+ if test "x$func_split_equals_lhs" = "x$1"; then
2078
+ func_split_equals_rhs=
2079
+ fi
1864
2080
  }'
1865
2081
  else
1866
2082
  # ...otherwise fall back to using expr, which is often a shell builtin.
@@ -1870,7 +2086,7 @@ else
1870
2086
 
1871
2087
  func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1872
2088
  func_split_equals_rhs=
1873
- test "x$func_split_equals_lhs" = "x$1" \
2089
+ test "x$func_split_equals_lhs=" = "x$1" \
1874
2090
  || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1875
2091
  }
1876
2092
  fi #func_split_equals
@@ -1896,7 +2112,7 @@ else
1896
2112
  {
1897
2113
  $debug_cmd
1898
2114
 
1899
- func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
2115
+ func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
1900
2116
  func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1901
2117
  }
1902
2118
  fi #func_split_short_opt
@@ -1938,31 +2154,44 @@ func_usage_message ()
1938
2154
  # func_version
1939
2155
  # ------------
1940
2156
  # Echo version message to standard output and exit.
2157
+ # The version message is extracted from the calling file's header
2158
+ # comments, with leading '# ' stripped:
2159
+ # 1. First display the progname and version
2160
+ # 2. Followed by the header comment line matching /^# Written by /
2161
+ # 3. Then a blank line followed by the first following line matching
2162
+ # /^# Copyright /
2163
+ # 4. Immediately followed by any lines between the previous matches,
2164
+ # except lines preceding the intervening completely blank line.
2165
+ # For example, see the header comments of this file.
1941
2166
  func_version ()
1942
2167
  {
1943
2168
  $debug_cmd
1944
2169
 
1945
2170
  printf '%s\n' "$progname $scriptversion"
1946
2171
  $SED -n '
1947
- /(C)/!b go
1948
- :more
1949
- /\./!{
1950
- N
1951
- s|\n# | |
1952
- b more
1953
- }
1954
- :go
1955
- /^# Written by /,/# warranty; / {
1956
- s|^# ||
1957
- s|^# *$||
1958
- s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1959
- p
2172
+ /^# Written by /!b
2173
+ s|^# ||; p; n
2174
+
2175
+ :fwd2blnk
2176
+ /./ {
2177
+ n
2178
+ b fwd2blnk
1960
2179
  }
1961
- /^# Written by / {
1962
- s|^# ||
1963
- p
2180
+ p; n
2181
+
2182
+ :holdwrnt
2183
+ s|^# ||
2184
+ s|^# *$||
2185
+ /^Copyright /!{
2186
+ /./H
2187
+ n
2188
+ b holdwrnt
1964
2189
  }
1965
- /^warranty; /q' < "$progpath"
2190
+
2191
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
2192
+ G
2193
+ s|\(\n\)\n*|\1|g
2194
+ p; q' < "$progpath"
1966
2195
 
1967
2196
  exit $?
1968
2197
  }
@@ -1972,12 +2201,35 @@ func_version ()
1972
2201
  # mode: shell-script
1973
2202
  # sh-indentation: 2
1974
2203
  # eval: (add-hook 'before-save-hook 'time-stamp)
1975
- # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
2204
+ # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1976
2205
  # time-stamp-time-zone: "UTC"
1977
2206
  # End:
1978
2207
 
1979
2208
  # Set a version string.
1980
- scriptversion='(GNU libtool) 2.4.6'
2209
+ scriptversion='(GNU libtool) 2.5.4'
2210
+
2211
+ # func_version
2212
+ # ------------
2213
+ # Echo version message to standard output and exit.
2214
+ func_version ()
2215
+ {
2216
+ $debug_cmd
2217
+
2218
+ year=`date +%Y`
2219
+
2220
+ cat <<EOF
2221
+ $progname $scriptversion Debian-2.5.4-9
2222
+ Copyright (C) $year Free Software Foundation, Inc.
2223
+ License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl.html>
2224
+ This is free software: you are free to change and redistribute it.
2225
+ There is NO WARRANTY, to the extent permitted by law.
2226
+
2227
+ Originally written by Gordon Matzigkeit, 1996
2228
+ (See AUTHORS for complete contributor listing)
2229
+ EOF
2230
+
2231
+ exit $?
2232
+ }
1981
2233
 
1982
2234
 
1983
2235
  # func_echo ARG...
@@ -2000,18 +2252,6 @@ func_echo ()
2000
2252
  }
2001
2253
 
2002
2254
 
2003
- # func_warning ARG...
2004
- # -------------------
2005
- # Libtool warnings are not categorized, so override funclib.sh
2006
- # func_warning with this simpler definition.
2007
- func_warning ()
2008
- {
2009
- $debug_cmd
2010
-
2011
- $warning_func ${1+"$@"}
2012
- }
2013
-
2014
-
2015
2255
  ## ---------------- ##
2016
2256
  ## Options parsing. ##
2017
2257
  ## ---------------- ##
@@ -2023,19 +2263,23 @@ usage='$progpath [OPTION]... [MODE-ARG]...'
2023
2263
 
2024
2264
  # Short help message in response to '-h'.
2025
2265
  usage_message="Options:
2026
- --config show all configuration variables
2027
- --debug enable verbose shell tracing
2028
- -n, --dry-run display commands without modifying any files
2029
- --features display basic configuration information and exit
2030
- --mode=MODE use operation mode MODE
2031
- --no-warnings equivalent to '-Wnone'
2032
- --preserve-dup-deps don't remove duplicate dependency libraries
2033
- --quiet, --silent don't print informational messages
2034
- --tag=TAG use configuration variables from tag TAG
2035
- -v, --verbose print more informational messages than default
2036
- --version print version information
2037
- -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2038
- -h, --help, --help-all print short, long, or detailed help message
2266
+ --config show all configuration variables
2267
+ --debug enable verbose shell tracing
2268
+ -n, --dry-run display commands without modifying any files
2269
+ --features display basic configuration information
2270
+ --finish use operation '--mode=finish'
2271
+ --mode=MODE use operation mode MODE
2272
+ --no-finish don't update shared library cache
2273
+ --no-quiet, --no-silent print default informational messages
2274
+ --no-warnings equivalent to '-Wnone'
2275
+ --preserve-dup-deps don't remove duplicate dependency libraries
2276
+ --quiet, --silent don't print informational messages
2277
+ --reorder-cache=DIRS reorder shared library cache for preferred DIRS
2278
+ --tag=TAG use configuration variables from tag TAG
2279
+ -v, --verbose print more informational messages than default
2280
+ --version print version information
2281
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2282
+ -h, --help, --help-all print short, long, or detailed help message
2039
2283
  "
2040
2284
 
2041
2285
  # Additional text appended to 'usage_message' in response to '--help'.
@@ -2068,13 +2312,13 @@ include the following information:
2068
2312
  compiler: $LTCC
2069
2313
  compiler flags: $LTCFLAGS
2070
2314
  linker: $LD (gnu? $with_gnu_ld)
2071
- version: $progname (GNU libtool) 2.4.6
2315
+ version: $progname $scriptversion Debian-2.5.4-9
2072
2316
  automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2073
2317
  autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2074
2318
 
2075
2319
  Report bugs to <bug-libtool@gnu.org>.
2076
- GNU libtool home page: <http://www.gnu.org/software/libtool/>.
2077
- General help using GNU software: <http://www.gnu.org/gethelp/>."
2320
+ GNU libtool home page: <https://www.gnu.org/s/libtool/>.
2321
+ General help using GNU software: <https://www.gnu.org/gethelp/>."
2078
2322
  exit 0
2079
2323
  }
2080
2324
 
@@ -2124,7 +2368,7 @@ fi
2124
2368
  # a configuration failure hint, and exit.
2125
2369
  func_fatal_configuration ()
2126
2370
  {
2127
- func__fatal_error ${1+"$@"} \
2371
+ func_fatal_error ${1+"$@"} \
2128
2372
  "See the $PACKAGE documentation for more information." \
2129
2373
  "Fatal configuration error."
2130
2374
  }
@@ -2264,12 +2508,19 @@ libtool_options_prep ()
2264
2508
  opt_dry_run=false
2265
2509
  opt_help=false
2266
2510
  opt_mode=
2511
+ opt_reorder_cache=false
2267
2512
  opt_preserve_dup_deps=false
2268
2513
  opt_quiet=false
2514
+ opt_finishing=true
2515
+ opt_warning=
2269
2516
 
2270
2517
  nonopt=
2271
2518
  preserve_args=
2272
2519
 
2520
+ _G_rc_lt_options_prep=:
2521
+
2522
+ _G_rc_lt_options_prep=:
2523
+
2273
2524
  # Shorthand for --mode=foo, only valid as the first argument
2274
2525
  case $1 in
2275
2526
  clean|clea|cle|cl)
@@ -2293,11 +2544,16 @@ libtool_options_prep ()
2293
2544
  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2294
2545
  shift; set dummy --mode uninstall ${1+"$@"}; shift
2295
2546
  ;;
2547
+ *)
2548
+ _G_rc_lt_options_prep=false
2549
+ ;;
2296
2550
  esac
2297
2551
 
2298
- # Pass back the list of options.
2299
- func_quote_for_eval ${1+"$@"}
2300
- libtool_options_prep_result=$func_quote_for_eval_result
2552
+ if $_G_rc_lt_options_prep; then
2553
+ # Pass back the list of options.
2554
+ func_quote eval ${1+"$@"}
2555
+ libtool_options_prep_result=$func_quote_result
2556
+ fi
2301
2557
  }
2302
2558
  func_add_hook func_options_prep libtool_options_prep
2303
2559
 
@@ -2309,9 +2565,12 @@ libtool_parse_options ()
2309
2565
  {
2310
2566
  $debug_cmd
2311
2567
 
2568
+ _G_rc_lt_parse_options=false
2569
+
2312
2570
  # Perform our own loop to consume as many options as possible in
2313
2571
  # each iteration.
2314
2572
  while test $# -gt 0; do
2573
+ _G_match_lt_parse_options=:
2315
2574
  _G_opt=$1
2316
2575
  shift
2317
2576
  case $_G_opt in
@@ -2345,14 +2604,18 @@ libtool_parse_options ()
2345
2604
  clean|compile|execute|finish|install|link|relink|uninstall) ;;
2346
2605
 
2347
2606
  # Catch anything else as an error
2348
- *) func_error "invalid argument for $_G_opt"
2607
+ *) func_error "invalid argument '$1' for $_G_opt"
2349
2608
  exit_cmd=exit
2350
- break
2351
2609
  ;;
2352
2610
  esac
2353
2611
  shift
2354
2612
  ;;
2355
2613
 
2614
+ --no-finish)
2615
+ opt_finishing=false
2616
+ func_append preserve_args " $_G_opt"
2617
+ ;;
2618
+
2356
2619
  --no-silent|--no-quiet)
2357
2620
  opt_quiet=false
2358
2621
  func_append preserve_args " $_G_opt"
@@ -2368,6 +2631,24 @@ libtool_parse_options ()
2368
2631
  func_append preserve_args " $_G_opt"
2369
2632
  ;;
2370
2633
 
2634
+ --reorder-cache)
2635
+ opt_reorder_cache=true
2636
+ shared_lib_dirs=$1
2637
+ if test -n "$shared_lib_dirs"; then
2638
+ case $1 in
2639
+ # Must begin with /:
2640
+ /*) ;;
2641
+
2642
+ # Catch anything else as an error (relative paths)
2643
+ *) func_error "invalid argument '$1' for $_G_opt"
2644
+ func_error "absolute paths are required for $_G_opt"
2645
+ exit_cmd=exit
2646
+ ;;
2647
+ esac
2648
+ fi
2649
+ shift
2650
+ ;;
2651
+
2371
2652
  --silent|--quiet)
2372
2653
  opt_quiet=:
2373
2654
  opt_verbose=false
@@ -2386,19 +2667,36 @@ libtool_parse_options ()
2386
2667
  func_append preserve_args " $_G_opt"
2387
2668
  ;;
2388
2669
 
2389
- # An option not handled by this hook function:
2390
- *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2670
+ # An option not handled by this hook function:
2671
+ *) set dummy "$_G_opt" ${1+"$@"} ; shift
2672
+ _G_match_lt_parse_options=false
2673
+ break
2674
+ ;;
2391
2675
  esac
2676
+ $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
2392
2677
  done
2393
2678
 
2394
-
2395
- # save modified positional parameters for caller
2396
- func_quote_for_eval ${1+"$@"}
2397
- libtool_parse_options_result=$func_quote_for_eval_result
2679
+ if $_G_rc_lt_parse_options; then
2680
+ # save modified positional parameters for caller
2681
+ func_quote eval ${1+"$@"}
2682
+ libtool_parse_options_result=$func_quote_result
2683
+ fi
2398
2684
  }
2399
2685
  func_add_hook func_parse_options libtool_parse_options
2400
2686
 
2401
2687
 
2688
+ # func_warning ARG...
2689
+ # -------------------
2690
+ # Libtool warnings are not categorized, so override funclib.sh
2691
+ # func_warning with this simpler definition.
2692
+ func_warning ()
2693
+ {
2694
+ if $opt_warning; then
2695
+ $debug_cmd
2696
+ $warning_func ${1+"$@"}
2697
+ fi
2698
+ }
2699
+
2402
2700
 
2403
2701
  # libtool_validate_options [ARG]...
2404
2702
  # ---------------------------------
@@ -2415,10 +2713,10 @@ libtool_validate_options ()
2415
2713
  # preserve --debug
2416
2714
  test : = "$debug_cmd" || func_append preserve_args " --debug"
2417
2715
 
2418
- case $host in
2716
+ case $host_os in
2419
2717
  # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
2420
2718
  # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
2421
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
2719
+ cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*)
2422
2720
  # don't eliminate duplications in $postdeps and $predeps
2423
2721
  opt_duplicate_compiler_generated_deps=:
2424
2722
  ;;
@@ -2451,8 +2749,8 @@ libtool_validate_options ()
2451
2749
  }
2452
2750
 
2453
2751
  # Pass back the unparsed argument list
2454
- func_quote_for_eval ${1+"$@"}
2455
- libtool_validate_options_result=$func_quote_for_eval_result
2752
+ func_quote eval ${1+"$@"}
2753
+ libtool_validate_options_result=$func_quote_result
2456
2754
  }
2457
2755
  func_add_hook func_validate_options libtool_validate_options
2458
2756
 
@@ -2750,7 +3048,7 @@ EOF
2750
3048
 
2751
3049
  # func_convert_core_file_wine_to_w32 ARG
2752
3050
  # Helper function used by file name conversion functions when $build is *nix,
2753
- # and $host is mingw, cygwin, or some other w32 environment. Relies on a
3051
+ # and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
2754
3052
  # correctly configured wine environment available, with the winepath program
2755
3053
  # in $build's $PATH.
2756
3054
  #
@@ -2782,9 +3080,10 @@ func_convert_core_file_wine_to_w32 ()
2782
3080
 
2783
3081
  # func_convert_core_path_wine_to_w32 ARG
2784
3082
  # Helper function used by path conversion functions when $build is *nix, and
2785
- # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2786
- # configured wine environment available, with the winepath program in $build's
2787
- # $PATH. Assumes ARG has no leading or trailing path separator characters.
3083
+ # $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
3084
+ # correctly configured wine environment available, with the winepath program
3085
+ # in $build's $PATH. Assumes ARG has no leading or trailing path separator
3086
+ # characters.
2788
3087
  #
2789
3088
  # ARG is path to be converted from $build format to win32.
2790
3089
  # Result is available in $func_convert_core_path_wine_to_w32_result.
@@ -2927,6 +3226,15 @@ func_convert_path_front_back_pathsep ()
2927
3226
  # end func_convert_path_front_back_pathsep
2928
3227
 
2929
3228
 
3229
+ # func_convert_delimited_path PATH ORIG_DELIMITER NEW_DELIMITER
3230
+ # Replaces a delimiter for a given path.
3231
+ func_convert_delimited_path ()
3232
+ {
3233
+ converted_path=`$ECHO "$1" | $SED "s#$2#$3#g"`
3234
+ }
3235
+ # end func_convert_delimited_path
3236
+
3237
+
2930
3238
  ##################################################
2931
3239
  # $build to $host FILE NAME CONVERSION FUNCTIONS #
2932
3240
  ##################################################
@@ -3261,6 +3569,65 @@ func_dll_def_p ()
3261
3569
  }
3262
3570
 
3263
3571
 
3572
+ # func_reorder_shared_lib_cache DIRS
3573
+ # Reorder the shared library cache by unconfiguring previous shared library cache
3574
+ # and configuring preferred search directories before previous search directories.
3575
+ # Previous shared library cache: /usr/lib /usr/local/lib
3576
+ # Preferred search directories: /tmp/testing
3577
+ # Reordered shared library cache: /tmp/testing /usr/lib /usr/local/lib
3578
+ func_reorder_shared_lib_cache ()
3579
+ {
3580
+ $debug_cmd
3581
+
3582
+ case $host_os in
3583
+ openbsd*)
3584
+ get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"`
3585
+ func_convert_delimited_path "$get_search_directories" ':' '\ '
3586
+ save_search_directories=$converted_path
3587
+ func_convert_delimited_path "$1" ':' '\ '
3588
+
3589
+ # Ensure directories exist
3590
+ for dir in $converted_path; do
3591
+ # Ensure each directory is an absolute path
3592
+ case $dir in
3593
+ /*) ;;
3594
+ *) func_error "Directory '$dir' is not an absolute path"
3595
+ exit $EXIT_FAILURE ;;
3596
+ esac
3597
+ # Ensure no trailing slashes
3598
+ func_stripname '' '/' "$dir"
3599
+ dir=$func_stripname_result
3600
+ if test -d "$dir"; then
3601
+ if test -n "$preferred_search_directories"; then
3602
+ preferred_search_directories="$preferred_search_directories $dir"
3603
+ else
3604
+ preferred_search_directories=$dir
3605
+ fi
3606
+ else
3607
+ func_error "Directory '$dir' does not exist"
3608
+ exit $EXIT_FAILURE
3609
+ fi
3610
+ done
3611
+
3612
+ PATH="$PATH:/sbin" ldconfig -U $save_search_directories
3613
+ PATH="$PATH:/sbin" ldconfig -m $preferred_search_directories $save_search_directories
3614
+ get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"`
3615
+ func_convert_delimited_path "$get_search_directories" ':' '\ '
3616
+ reordered_search_directories=$converted_path
3617
+
3618
+ $ECHO "Original: $save_search_directories"
3619
+ $ECHO "Reordered: $reordered_search_directories"
3620
+ exit $EXIT_SUCCESS
3621
+ ;;
3622
+ *)
3623
+ func_error "--reorder-cache is not supported for host_os=$host_os."
3624
+ exit $EXIT_FAILURE
3625
+ ;;
3626
+ esac
3627
+ }
3628
+ # end func_reorder_shared_lib_cache
3629
+
3630
+
3264
3631
  # func_mode_compile arg...
3265
3632
  func_mode_compile ()
3266
3633
  {
@@ -3418,8 +3785,8 @@ func_mode_compile ()
3418
3785
  esac
3419
3786
  done
3420
3787
 
3421
- func_quote_for_eval "$libobj"
3422
- test "X$libobj" != "X$func_quote_for_eval_result" \
3788
+ func_quote_arg pretty "$libobj"
3789
+ test "X$libobj" != "X$func_quote_arg_result" \
3423
3790
  && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
3424
3791
  && func_warning "libobj name '$libobj' may not contain shell special characters."
3425
3792
  func_dirname_and_basename "$obj" "/" ""
@@ -3439,7 +3806,7 @@ func_mode_compile ()
3439
3806
 
3440
3807
  # On Cygwin there's no "real" PIC flag so we must build both object types
3441
3808
  case $host_os in
3442
- cygwin* | mingw* | pw32* | os2* | cegcc*)
3809
+ cygwin* | mingw* | windows* | pw32* | os2* | cegcc*)
3443
3810
  pic_mode=default
3444
3811
  ;;
3445
3812
  esac
@@ -3492,8 +3859,8 @@ compiler."
3492
3859
 
3493
3860
  func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3494
3861
  srcfile=$func_to_tool_file_result
3495
- func_quote_for_eval "$srcfile"
3496
- qsrcfile=$func_quote_for_eval_result
3862
+ func_quote_arg pretty "$srcfile"
3863
+ qsrcfile=$func_quote_arg_result
3497
3864
 
3498
3865
  # Only build a PIC object if we are building libtool libraries.
3499
3866
  if test yes = "$build_libtool_libs"; then
@@ -3648,7 +4015,8 @@ This mode accepts the following additional options:
3648
4015
  -prefer-non-pic try to build non-PIC objects only
3649
4016
  -shared do not build a '.o' file suitable for static linking
3650
4017
  -static only build a '.o' file suitable for static linking
3651
- -Wc,FLAG pass FLAG directly to the compiler
4018
+ -Wc,FLAG
4019
+ -Xcompiler FLAG pass FLAG directly to the compiler
3652
4020
 
3653
4021
  COMPILE-COMMAND is a command to be used in creating a 'standard' object file
3654
4022
  from the given SOURCEFILE.
@@ -3754,6 +4122,8 @@ The following components of LINK-COMMAND are treated specially:
3754
4122
  -weak LIBNAME declare that the target provides the LIBNAME interface
3755
4123
  -Wc,FLAG
3756
4124
  -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
4125
+ -Wa,FLAG
4126
+ -Xassembler FLAG pass linker-specific FLAG directly to the assembler
3757
4127
  -Wl,FLAG
3758
4128
  -Xlinker FLAG pass linker-specific FLAG directly to the linker
3759
4129
  -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
@@ -3830,6 +4200,12 @@ if $opt_help; then
3830
4200
  fi
3831
4201
 
3832
4202
 
4203
+ # If option '--reorder-cache', reorder the shared library cache and exit.
4204
+ if $opt_reorder_cache; then
4205
+ func_reorder_shared_lib_cache $shared_lib_dirs
4206
+ fi
4207
+
4208
+
3833
4209
  # func_mode_execute arg...
3834
4210
  func_mode_execute ()
3835
4211
  {
@@ -4014,7 +4390,7 @@ func_mode_finish ()
4014
4390
  fi
4015
4391
  fi
4016
4392
 
4017
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4393
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs" && $opt_finishing; then
4018
4394
  for libdir in $libdirs; do
4019
4395
  if test -n "$finish_cmds"; then
4020
4396
  # Do each command in the finish commands.
@@ -4039,6 +4415,12 @@ func_mode_finish ()
4039
4415
  for libdir in $libdirs; do
4040
4416
  $ECHO " $libdir"
4041
4417
  done
4418
+ if test "false" = "$opt_finishing"; then
4419
+ echo
4420
+ echo "NOTE: finish_cmds were not executed during testing, so you must"
4421
+ echo "manually run ldconfig to add a given test directory, LIBDIR, to"
4422
+ echo "the search path for generated executables."
4423
+ fi
4042
4424
  echo
4043
4425
  echo "If you ever happen to want to link against installed libraries"
4044
4426
  echo "in a given directory, LIBDIR, you must either use libtool, and"
@@ -4096,8 +4478,8 @@ func_mode_install ()
4096
4478
  case $nonopt in *shtool*) :;; *) false;; esac
4097
4479
  then
4098
4480
  # Aesthetically quote it.
4099
- func_quote_for_eval "$nonopt"
4100
- install_prog="$func_quote_for_eval_result "
4481
+ func_quote_arg pretty "$nonopt"
4482
+ install_prog="$func_quote_arg_result "
4101
4483
  arg=$1
4102
4484
  shift
4103
4485
  else
@@ -4107,8 +4489,8 @@ func_mode_install ()
4107
4489
 
4108
4490
  # The real first argument should be the name of the installation program.
4109
4491
  # Aesthetically quote it.
4110
- func_quote_for_eval "$arg"
4111
- func_append install_prog "$func_quote_for_eval_result"
4492
+ func_quote_arg pretty "$arg"
4493
+ func_append install_prog "$func_quote_arg_result"
4112
4494
  install_shared_prog=$install_prog
4113
4495
  case " $install_prog " in
4114
4496
  *[\\\ /]cp\ *) install_cp=: ;;
@@ -4165,12 +4547,12 @@ func_mode_install ()
4165
4547
  esac
4166
4548
 
4167
4549
  # Aesthetically quote the argument.
4168
- func_quote_for_eval "$arg"
4169
- func_append install_prog " $func_quote_for_eval_result"
4550
+ func_quote_arg pretty "$arg"
4551
+ func_append install_prog " $func_quote_arg_result"
4170
4552
  if test -n "$arg2"; then
4171
- func_quote_for_eval "$arg2"
4553
+ func_quote_arg pretty "$arg2"
4172
4554
  fi
4173
- func_append install_shared_prog " $func_quote_for_eval_result"
4555
+ func_append install_shared_prog " $func_quote_arg_result"
4174
4556
  done
4175
4557
 
4176
4558
  test -z "$install_prog" && \
@@ -4181,8 +4563,8 @@ func_mode_install ()
4181
4563
 
4182
4564
  if test -n "$install_override_mode" && $no_mode; then
4183
4565
  if $install_cp; then :; else
4184
- func_quote_for_eval "$install_override_mode"
4185
- func_append install_shared_prog " -m $func_quote_for_eval_result"
4566
+ func_quote_arg pretty "$install_override_mode"
4567
+ func_append install_shared_prog " -m $func_quote_arg_result"
4186
4568
  fi
4187
4569
  fi
4188
4570
 
@@ -4275,8 +4657,15 @@ func_mode_install ()
4275
4657
  func_append dir "$objdir"
4276
4658
 
4277
4659
  if test -n "$relink_command"; then
4660
+ # Strip any trailing slash from the destination.
4661
+ func_stripname '' '/' "$libdir"
4662
+ destlibdir=$func_stripname_result
4663
+
4664
+ func_stripname '' '/' "$destdir"
4665
+ s_destdir=$func_stripname_result
4666
+
4278
4667
  # Determine the prefix the user has applied to our future dir.
4279
- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
4668
+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
4280
4669
 
4281
4670
  # Don't allow the user to place us outside of our expected
4282
4671
  # location b/c this prevents finding dependent libraries that
@@ -4313,7 +4702,7 @@ func_mode_install ()
4313
4702
  'exit $?'
4314
4703
  tstripme=$stripme
4315
4704
  case $host_os in
4316
- cygwin* | mingw* | pw32* | cegcc*)
4705
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
4317
4706
  case $realname in
4318
4707
  *.dll.a)
4319
4708
  tstripme=
@@ -4426,7 +4815,7 @@ func_mode_install ()
4426
4815
 
4427
4816
  # Do a test to see if this is really a libtool program.
4428
4817
  case $host in
4429
- *cygwin* | *mingw*)
4818
+ *cygwin* | *mingw* | *windows*)
4430
4819
  if func_ltwrapper_executable_p "$file"; then
4431
4820
  func_ltwrapper_scriptname "$file"
4432
4821
  wrapper=$func_ltwrapper_scriptname_result
@@ -4478,8 +4867,8 @@ func_mode_install ()
4478
4867
  relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
4479
4868
 
4480
4869
  $opt_quiet || {
4481
- func_quote_for_expand "$relink_command"
4482
- eval "func_echo $func_quote_for_expand_result"
4870
+ func_quote_arg expand,pretty "$relink_command"
4871
+ eval "func_echo $func_quote_arg_result"
4483
4872
  }
4484
4873
  if eval "$relink_command"; then :
4485
4874
  else
@@ -4654,7 +5043,7 @@ extern \"C\" {
4654
5043
  $RM $export_symbols
4655
5044
  eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4656
5045
  case $host in
4657
- *cygwin* | *mingw* | *cegcc* )
5046
+ *cygwin* | *mingw* | *windows* | *cegcc* )
4658
5047
  eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4659
5048
  eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4660
5049
  ;;
@@ -4666,7 +5055,7 @@ extern \"C\" {
4666
5055
  eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4667
5056
  eval '$MV "$nlist"T "$nlist"'
4668
5057
  case $host in
4669
- *cygwin* | *mingw* | *cegcc* )
5058
+ *cygwin* | *mingw* | *windows* | *cegcc* )
4670
5059
  eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4671
5060
  eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4672
5061
  ;;
@@ -4680,7 +5069,7 @@ extern \"C\" {
4680
5069
  func_basename "$dlprefile"
4681
5070
  name=$func_basename_result
4682
5071
  case $host in
4683
- *cygwin* | *mingw* | *cegcc* )
5072
+ *cygwin* | *mingw* | *windows* | *cegcc* )
4684
5073
  # if an import library, we need to obtain dlname
4685
5074
  if func_win32_import_lib_p "$dlprefile"; then
4686
5075
  func_tr_sh "$dlprefile"
@@ -4706,8 +5095,16 @@ extern \"C\" {
4706
5095
  eval '$ECHO ": $name " >> "$nlist"'
4707
5096
  fi
4708
5097
  func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
4709
- eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
4710
- $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
5098
+ case $host in
5099
+ i[3456]86-*-mingw32*)
5100
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
5101
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
5102
+ ;;
5103
+ *)
5104
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
5105
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/__nm_//' >> '$nlist'"
5106
+ ;;
5107
+ esac
4711
5108
  }
4712
5109
  else # not an import lib
4713
5110
  $opt_dry_run || {
@@ -4855,7 +5252,7 @@ static const void *lt_preloaded_setup() {
4855
5252
  # Transform the symbol file into the correct name.
4856
5253
  symfileobj=$output_objdir/${my_outputname}S.$objext
4857
5254
  case $host in
4858
- *cygwin* | *mingw* | *cegcc* )
5255
+ *cygwin* | *mingw* | *windows* | *cegcc* )
4859
5256
  if test -f "$output_objdir/$my_outputname.def"; then
4860
5257
  compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
4861
5258
  finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -4931,7 +5328,7 @@ func_win32_libid ()
4931
5328
  *ar\ archive*) # could be an import, or static
4932
5329
  # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
4933
5330
  if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
4934
- $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
5331
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null; then
4935
5332
  case $nm_interface in
4936
5333
  "MS dumpbin")
4937
5334
  if func_cygming_ms_implib_p "$1" ||
@@ -5198,7 +5595,7 @@ func_extract_archives ()
5198
5595
  #
5199
5596
  # Emit a libtool wrapper script on stdout.
5200
5597
  # Don't directly open a file because we may want to
5201
- # incorporate the script contents within a cygwin/mingw
5598
+ # incorporate the script contents within a cygwin/mingw/windows
5202
5599
  # wrapper executable. Must ONLY be called from within
5203
5600
  # func_mode_link because it depends on a number of variables
5204
5601
  # set therein.
@@ -5206,7 +5603,7 @@ func_extract_archives ()
5206
5603
  # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
5207
5604
  # variable will take. If 'yes', then the emitted script
5208
5605
  # will assume that the directory where it is stored is
5209
- # the $objdir directory. This is a cygwin/mingw-specific
5606
+ # the $objdir directory. This is a cygwin/mingw/windows-specific
5210
5607
  # behavior.
5211
5608
  func_emit_wrapper ()
5212
5609
  {
@@ -5258,7 +5655,8 @@ else
5258
5655
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
5259
5656
  file=\"\$0\""
5260
5657
 
5261
- qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
5658
+ func_quote_arg pretty "$ECHO"
5659
+ qECHO=$func_quote_arg_result
5262
5660
  $ECHO "\
5263
5661
 
5264
5662
  # A function that is used when there is no print builtin or printf.
@@ -5268,7 +5666,7 @@ func_fallback_echo ()
5268
5666
  \$1
5269
5667
  _LTECHO_EOF'
5270
5668
  }
5271
- ECHO=\"$qECHO\"
5669
+ ECHO=$qECHO
5272
5670
  fi
5273
5671
 
5274
5672
  # Very basic option parsing. These options are (a) specific to
@@ -5330,7 +5728,7 @@ func_exec_program_core ()
5330
5728
  "
5331
5729
  case $host in
5332
5730
  # Backslashes separate directories on plain windows
5333
- *-*-mingw | *-*-os2* | *-cegcc*)
5731
+ *-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*)
5334
5732
  $ECHO "\
5335
5733
  if test -n \"\$lt_option_debug\"; then
5336
5734
  \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
@@ -5398,7 +5796,7 @@ func_exec_program ()
5398
5796
  file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
5399
5797
  done
5400
5798
 
5401
- # Usually 'no', except on cygwin/mingw when embedded into
5799
+ # Usually 'no', except on cygwin/mingw/windows when embedded into
5402
5800
  # the cwrapper.
5403
5801
  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
5404
5802
  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
@@ -5530,7 +5928,7 @@ EOF
5530
5928
  #endif
5531
5929
  #include <stdio.h>
5532
5930
  #include <stdlib.h>
5533
- #ifdef _MSC_VER
5931
+ #if defined _WIN32 && !defined __GNUC__
5534
5932
  # include <direct.h>
5535
5933
  # include <process.h>
5536
5934
  # include <io.h>
@@ -5555,7 +5953,7 @@ EOF
5555
5953
  /* declarations of non-ANSI functions */
5556
5954
  #if defined __MINGW32__
5557
5955
  # ifdef __STRICT_ANSI__
5558
- int _putenv (const char *);
5956
+ _CRTIMP int __cdecl _putenv (const char *);
5559
5957
  # endif
5560
5958
  #elif defined __CYGWIN__
5561
5959
  # ifdef __STRICT_ANSI__
@@ -5753,7 +6151,7 @@ main (int argc, char *argv[])
5753
6151
  {
5754
6152
  EOF
5755
6153
  case $host in
5756
- *mingw* | *cygwin* )
6154
+ *mingw* | *windows* | *cygwin* )
5757
6155
  # make stdout use "unix" line endings
5758
6156
  echo " setmode(1,_O_BINARY);"
5759
6157
  ;;
@@ -5772,7 +6170,7 @@ EOF
5772
6170
  {
5773
6171
  /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
5774
6172
  namespace, but it is not one of the ones we know about and
5775
- have already dealt with, above (inluding dump-script), then
6173
+ have already dealt with, above (including dump-script), then
5776
6174
  report an error. Otherwise, targets might begin to believe
5777
6175
  they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
5778
6176
  namespace. The first time any user complains about this, we'll
@@ -5856,7 +6254,7 @@ EOF
5856
6254
  EOF
5857
6255
 
5858
6256
  case $host_os in
5859
- mingw*)
6257
+ mingw* | windows*)
5860
6258
  cat <<"EOF"
5861
6259
  {
5862
6260
  char* p;
@@ -5898,7 +6296,7 @@ EOF
5898
6296
  EOF
5899
6297
 
5900
6298
  case $host_os in
5901
- mingw*)
6299
+ mingw* | windows*)
5902
6300
  cat <<"EOF"
5903
6301
  /* execv doesn't actually work on mingw as expected on unix */
5904
6302
  newargz = prepare_spawn (newargz);
@@ -6317,7 +6715,7 @@ lt_update_lib_path (const char *name, const char *value)
6317
6715
 
6318
6716
  EOF
6319
6717
  case $host_os in
6320
- mingw*)
6718
+ mingw* | windows*)
6321
6719
  cat <<"EOF"
6322
6720
 
6323
6721
  /* Prepares an argument vector before calling spawn().
@@ -6492,7 +6890,7 @@ func_mode_link ()
6492
6890
  $debug_cmd
6493
6891
 
6494
6892
  case $host in
6495
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
6893
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
6496
6894
  # It is impossible to link a dll without this setting, and
6497
6895
  # we shouldn't force the makefile maintainer to figure out
6498
6896
  # what system we are compiling for in order to pass an extra
@@ -6516,6 +6914,7 @@ func_mode_link ()
6516
6914
  finalize_command=$nonopt
6517
6915
 
6518
6916
  compile_rpath=
6917
+ compile_rpath_tail=
6519
6918
  finalize_rpath=
6520
6919
  compile_shlibpath=
6521
6920
  finalize_shlibpath=
@@ -6556,10 +6955,12 @@ func_mode_link ()
6556
6955
  xrpath=
6557
6956
  perm_rpath=
6558
6957
  temp_rpath=
6958
+ temp_rpath_tail=
6559
6959
  thread_safe=no
6560
6960
  vinfo=
6561
6961
  vinfo_number=no
6562
6962
  weak_libs=
6963
+ rpath_arg=
6563
6964
  single_module=$wl-single_module
6564
6965
  func_infer_tag $base_compile
6565
6966
 
@@ -6611,9 +7012,9 @@ func_mode_link ()
6611
7012
  while test "$#" -gt 0; do
6612
7013
  arg=$1
6613
7014
  shift
6614
- func_quote_for_eval "$arg"
6615
- qarg=$func_quote_for_eval_unquoted_result
6616
- func_append libtool_args " $func_quote_for_eval_result"
7015
+ func_quote_arg pretty,unquoted "$arg"
7016
+ qarg=$func_quote_arg_unquoted_result
7017
+ func_append libtool_args " $func_quote_arg_result"
6617
7018
 
6618
7019
  # If the previous option needs an argument, assign it.
6619
7020
  if test -n "$prev"; then
@@ -6822,7 +7223,7 @@ func_mode_link ()
6822
7223
  case $arg in
6823
7224
  [\\/]* | [A-Za-z]:[\\/]*) ;;
6824
7225
  *)
6825
- func_fatal_error "only absolute run-paths are allowed"
7226
+ func_fatal_error "argument to -rpath is not absolute: $arg"
6826
7227
  ;;
6827
7228
  esac
6828
7229
  if test rpath = "$prev"; then
@@ -6849,6 +7250,13 @@ func_mode_link ()
6849
7250
  prev=
6850
7251
  continue
6851
7252
  ;;
7253
+ xassembler)
7254
+ func_append compiler_flags " -Xassembler $qarg"
7255
+ prev=
7256
+ func_append compile_command " -Xassembler $qarg"
7257
+ func_append finalize_command " -Xassembler $qarg"
7258
+ continue
7259
+ ;;
6852
7260
  xcclinker)
6853
7261
  func_append linker_flags " $qarg"
6854
7262
  func_append compiler_flags " $qarg"
@@ -6991,7 +7399,7 @@ func_mode_link ()
6991
7399
  ;;
6992
7400
  esac
6993
7401
  case $host in
6994
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
7402
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
6995
7403
  testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
6996
7404
  case :$dllsearchpath: in
6997
7405
  *":$dir:"*) ;;
@@ -7011,7 +7419,7 @@ func_mode_link ()
7011
7419
  -l*)
7012
7420
  if test X-lc = "X$arg" || test X-lm = "X$arg"; then
7013
7421
  case $host in
7014
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
7422
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
7015
7423
  # These systems don't actually have a C or math library (as such)
7016
7424
  continue
7017
7425
  ;;
@@ -7019,7 +7427,7 @@ func_mode_link ()
7019
7427
  # These systems don't actually have a C library (as such)
7020
7428
  test X-lc = "X$arg" && continue
7021
7429
  ;;
7022
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7430
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
7023
7431
  # Do not include libc due to us having libc/libc_r.
7024
7432
  test X-lc = "X$arg" && continue
7025
7433
  ;;
@@ -7039,7 +7447,7 @@ func_mode_link ()
7039
7447
  esac
7040
7448
  elif test X-lc_r = "X$arg"; then
7041
7449
  case $host in
7042
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7450
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
7043
7451
  # Do not include libc_r directly, use -pthread flag.
7044
7452
  continue
7045
7453
  ;;
@@ -7062,16 +7470,29 @@ func_mode_link ()
7062
7470
  # Tru64 UNIX uses -model [arg] to determine the layout of C++
7063
7471
  # classes, name mangling, and exception handling.
7064
7472
  # Darwin uses the -arch flag to determine output architecture.
7065
- -model|-arch|-isysroot|--sysroot)
7473
+ # -q <option> for IBM XL C/C++ compiler.
7474
+ -model|-arch|-isysroot|--sysroot|-q)
7066
7475
  func_append compiler_flags " $arg"
7067
7476
  func_append compile_command " $arg"
7068
7477
  func_append finalize_command " $arg"
7069
7478
  prev=xcompiler
7070
7479
  continue
7071
7480
  ;;
7072
-
7073
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7074
- |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7481
+ # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
7482
+ -pthread)
7483
+ case $host in
7484
+ *solaris2*) ;;
7485
+ *)
7486
+ case "$new_inherited_linker_flags " in
7487
+ *" $arg "*) ;;
7488
+ * ) func_append new_inherited_linker_flags " $arg" ;;
7489
+ esac
7490
+ ;;
7491
+ esac
7492
+ continue
7493
+ ;;
7494
+ -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
7495
+ |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7075
7496
  func_append compiler_flags " $arg"
7076
7497
  func_append compile_command " $arg"
7077
7498
  func_append finalize_command " $arg"
@@ -7094,7 +7515,7 @@ func_mode_link ()
7094
7515
 
7095
7516
  -no-install)
7096
7517
  case $host in
7097
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
7518
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
7098
7519
  # The PATH hackery in wrapper scripts is required on Windows
7099
7520
  # and Darwin in order for the loader to find any dlls it needs.
7100
7521
  func_warning "'-no-install' is ignored for $host"
@@ -7154,7 +7575,7 @@ func_mode_link ()
7154
7575
  dir=$lt_sysroot$func_stripname_result
7155
7576
  ;;
7156
7577
  *)
7157
- func_fatal_error "only absolute run-paths are allowed"
7578
+ func_fatal_error "argument ($arg) to '-R' is not an absolute path: $dir"
7158
7579
  ;;
7159
7580
  esac
7160
7581
  case "$xrpath " in
@@ -7211,9 +7632,9 @@ func_mode_link ()
7211
7632
  save_ifs=$IFS; IFS=,
7212
7633
  for flag in $args; do
7213
7634
  IFS=$save_ifs
7214
- func_quote_for_eval "$flag"
7215
- func_append arg " $func_quote_for_eval_result"
7216
- func_append compiler_flags " $func_quote_for_eval_result"
7635
+ func_quote_arg pretty "$flag"
7636
+ func_append arg " $func_quote_arg_result"
7637
+ func_append compiler_flags " $func_quote_arg_result"
7217
7638
  done
7218
7639
  IFS=$save_ifs
7219
7640
  func_stripname ' ' '' "$arg"
@@ -7227,16 +7648,21 @@ func_mode_link ()
7227
7648
  save_ifs=$IFS; IFS=,
7228
7649
  for flag in $args; do
7229
7650
  IFS=$save_ifs
7230
- func_quote_for_eval "$flag"
7231
- func_append arg " $wl$func_quote_for_eval_result"
7232
- func_append compiler_flags " $wl$func_quote_for_eval_result"
7233
- func_append linker_flags " $func_quote_for_eval_result"
7651
+ func_quote_arg pretty "$flag"
7652
+ func_append arg " $wl$func_quote_arg_result"
7653
+ func_append compiler_flags " $wl$func_quote_arg_result"
7654
+ func_append linker_flags " $func_quote_arg_result"
7234
7655
  done
7235
7656
  IFS=$save_ifs
7236
7657
  func_stripname ' ' '' "$arg"
7237
7658
  arg=$func_stripname_result
7238
7659
  ;;
7239
7660
 
7661
+ -Xassembler)
7662
+ prev=xassembler
7663
+ continue
7664
+ ;;
7665
+
7240
7666
  -Xcompiler)
7241
7667
  prev=xcompiler
7242
7668
  continue
@@ -7254,8 +7680,8 @@ func_mode_link ()
7254
7680
 
7255
7681
  # -msg_* for osf cc
7256
7682
  -msg_*)
7257
- func_quote_for_eval "$arg"
7258
- arg=$func_quote_for_eval_result
7683
+ func_quote_arg pretty "$arg"
7684
+ arg=$func_quote_arg_result
7259
7685
  ;;
7260
7686
 
7261
7687
  # Flags to be passed through unchanged, with rationale:
@@ -7272,12 +7698,33 @@ func_mode_link ()
7272
7698
  # -tp=* Portland pgcc target processor selection
7273
7699
  # --sysroot=* for sysroot support
7274
7700
  # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7701
+ # -specs=* GCC specs files
7275
7702
  # -stdlib=* select c++ std lib with clang
7703
+ # -fdiagnostics-color* simply affects output
7704
+ # -frecord-gcc-switches used to verify flags were respected
7705
+ # -fsanitize=* Clang/GCC memory and address sanitizer
7706
+ # -fno-sanitize* Clang/GCC memory and address sanitizer
7707
+ # -shared-libsan Link with shared sanitizer runtimes (Clang)
7708
+ # -static-libsan Link with static sanitizer runtimes (Clang)
7709
+ # -no-canonical-prefixes Do not expand any symbolic links
7710
+ # -fuse-ld=* Linker select flags for GCC
7711
+ # -static-* direct GCC to link specific libraries statically
7712
+ # -fcilkplus Cilk Plus language extension features for C/C++
7713
+ # -rtlib=* select c runtime lib with clang
7714
+ # --unwindlib=* select unwinder library with clang
7715
+ # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
7716
+ # -Wa,* Pass flags directly to the assembler
7717
+ # -Werror, -Werror=* Report (specified) warnings as errors
7276
7718
  -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
7277
7719
  -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
7278
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
7279
- func_quote_for_eval "$arg"
7280
- arg=$func_quote_for_eval_result
7720
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \
7721
+ -stdlib=*|-rtlib=*|--unwindlib=*| \
7722
+ -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
7723
+ -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
7724
+ -fdiagnostics-color*|-frecord-gcc-switches| \
7725
+ -fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*)
7726
+ func_quote_arg pretty "$arg"
7727
+ arg=$func_quote_arg_result
7281
7728
  func_append compile_command " $arg"
7282
7729
  func_append finalize_command " $arg"
7283
7730
  func_append compiler_flags " $arg"
@@ -7298,15 +7745,15 @@ func_mode_link ()
7298
7745
  continue
7299
7746
  else
7300
7747
  # Otherwise treat like 'Some other compiler flag' below
7301
- func_quote_for_eval "$arg"
7302
- arg=$func_quote_for_eval_result
7748
+ func_quote_arg pretty "$arg"
7749
+ arg=$func_quote_arg_result
7303
7750
  fi
7304
7751
  ;;
7305
7752
 
7306
7753
  # Some other compiler flag.
7307
7754
  -* | +*)
7308
- func_quote_for_eval "$arg"
7309
- arg=$func_quote_for_eval_result
7755
+ func_quote_arg pretty "$arg"
7756
+ arg=$func_quote_arg_result
7310
7757
  ;;
7311
7758
 
7312
7759
  *.$objext)
@@ -7426,15 +7873,27 @@ func_mode_link ()
7426
7873
  *)
7427
7874
  # Unknown arguments in both finalize_command and compile_command need
7428
7875
  # to be aesthetically quoted because they are evaled later.
7429
- func_quote_for_eval "$arg"
7430
- arg=$func_quote_for_eval_result
7876
+ func_quote_arg pretty "$arg"
7877
+ arg=$func_quote_arg_result
7431
7878
  ;;
7432
7879
  esac # arg
7433
7880
 
7434
7881
  # Now actually substitute the argument into the commands.
7435
7882
  if test -n "$arg"; then
7436
- func_append compile_command " $arg"
7437
- func_append finalize_command " $arg"
7883
+ if test -n "$rpath_arg"; then
7884
+ func_append finalize_rpath " ${arg##*,}"
7885
+ unset rpath_arg
7886
+ else
7887
+ case $arg in
7888
+ -Wl,-rpath,*)
7889
+ func_append finalize_rpath " ${arg##*,}";;
7890
+ -Wl,-rpath)
7891
+ rpath_arg=1;;
7892
+ *)
7893
+ func_append compile_command " $arg"
7894
+ func_append finalize_command " $arg"
7895
+ esac
7896
+ fi
7438
7897
  fi
7439
7898
  done # argument parsing loop
7440
7899
 
@@ -7568,7 +8027,10 @@ func_mode_link ()
7568
8027
  case $pass in
7569
8028
  dlopen) libs=$dlfiles ;;
7570
8029
  dlpreopen) libs=$dlprefiles ;;
7571
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
8030
+ link)
8031
+ libs="$deplibs %DEPLIBS%"
8032
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
8033
+ ;;
7572
8034
  esac
7573
8035
  fi
7574
8036
  if test lib,dlpreopen = "$linkmode,$pass"; then
@@ -7605,7 +8067,7 @@ func_mode_link ()
7605
8067
  found=false
7606
8068
  case $deplib in
7607
8069
  -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
7608
- |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
8070
+ |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
7609
8071
  if test prog,link = "$linkmode,$pass"; then
7610
8072
  compile_deplibs="$deplib $compile_deplibs"
7611
8073
  finalize_deplibs="$deplib $finalize_deplibs"
@@ -7782,18 +8244,15 @@ func_mode_link ()
7782
8244
  ;;
7783
8245
  esac
7784
8246
  if $valid_a_lib; then
7785
- echo
7786
- $ECHO "*** Warning: Linking the shared library $output against the"
7787
- $ECHO "*** static library $deplib is not portable!"
8247
+ func_warning "Linking the shared library $output against the static library $deplib is not portable!"
7788
8248
  deplibs="$deplib $deplibs"
7789
8249
  else
7790
- echo
7791
- $ECHO "*** Warning: Trying to link with static lib archive $deplib."
7792
- echo "*** I have the capability to make that library automatically link in when"
7793
- echo "*** you link to this library. But I can only do this if you have a"
7794
- echo "*** shared version of the library, which you do not appear to have"
7795
- echo "*** because the file extensions .$libext of this argument makes me believe"
7796
- echo "*** that it is just a static archive that I should not use here."
8250
+ func_warning "Trying to link with static lib archive $deplib."
8251
+ func_warning "I have the capability to make that library automatically link in when"
8252
+ func_warning "you link to this library. But I can only do this if you have a"
8253
+ func_warning "shared version of the library, which you do not appear to have"
8254
+ func_warning "because the file extensions .$libext of this argument makes me believe"
8255
+ func_warning "that it is just a static archive that I should not use here."
7797
8256
  fi
7798
8257
  ;;
7799
8258
  esac
@@ -7887,19 +8346,19 @@ func_mode_link ()
7887
8346
  # It is a libtool convenience library, so add in its objects.
7888
8347
  func_append convenience " $ladir/$objdir/$old_library"
7889
8348
  func_append old_convenience " $ladir/$objdir/$old_library"
8349
+ tmp_libs=
8350
+ for deplib in $dependency_libs; do
8351
+ deplibs="$deplib $deplibs"
8352
+ if $opt_preserve_dup_deps; then
8353
+ case "$tmp_libs " in
8354
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
8355
+ esac
8356
+ fi
8357
+ func_append tmp_libs " $deplib"
8358
+ done
7890
8359
  elif test prog != "$linkmode" && test lib != "$linkmode"; then
7891
8360
  func_fatal_error "'$lib' is not a convenience library"
7892
8361
  fi
7893
- tmp_libs=
7894
- for deplib in $dependency_libs; do
7895
- deplibs="$deplib $deplibs"
7896
- if $opt_preserve_dup_deps; then
7897
- case "$tmp_libs " in
7898
- *" $deplib "*) func_append specialdeplibs " $deplib" ;;
7899
- esac
7900
- fi
7901
- func_append tmp_libs " $deplib"
7902
- done
7903
8362
  continue
7904
8363
  fi # $pass = conv
7905
8364
 
@@ -7988,7 +8447,7 @@ func_mode_link ()
7988
8447
  fi
7989
8448
  case $host in
7990
8449
  # special handling for platforms with PE-DLLs.
7991
- *cygwin* | *mingw* | *cegcc* )
8450
+ *cygwin* | *mingw* | *windows* | *cegcc* )
7992
8451
  # Linker will automatically link against shared library if both
7993
8452
  # static and shared are present. Therefore, ensure we extract
7994
8453
  # symbols from the import library if a shared library is present
@@ -8088,7 +8547,10 @@ func_mode_link ()
8088
8547
  # Make sure the rpath contains only unique directories.
8089
8548
  case $temp_rpath: in
8090
8549
  *"$absdir:"*) ;;
8091
- *) func_append temp_rpath "$absdir:" ;;
8550
+ *) case $absdir in
8551
+ "$progdir/"*) func_append temp_rpath "$absdir:" ;;
8552
+ *) func_append temp_rpath_tail "$absdir:" ;;
8553
+ esac
8092
8554
  esac
8093
8555
  fi
8094
8556
 
@@ -8098,9 +8560,12 @@ func_mode_link ()
8098
8560
  case " $sys_lib_dlsearch_path " in
8099
8561
  *" $absdir "*) ;;
8100
8562
  *)
8101
- case "$compile_rpath " in
8563
+ case "$compile_rpath$compile_rpath_tail " in
8102
8564
  *" $absdir "*) ;;
8103
- *) func_append compile_rpath " $absdir" ;;
8565
+ *) case $absdir in
8566
+ "$progdir/"*) func_append compile_rpath " $absdir" ;;
8567
+ *) func_append compile_rpath_tail " $absdir" ;;
8568
+ esac
8104
8569
  esac
8105
8570
  ;;
8106
8571
  esac
@@ -8131,8 +8596,8 @@ func_mode_link ()
8131
8596
  fi
8132
8597
  if test -n "$library_names" &&
8133
8598
  { test no = "$use_static_libs" || test -z "$old_library"; }; then
8134
- case $host in
8135
- *cygwin* | *mingw* | *cegcc* | *os2*)
8599
+ case $host_os in
8600
+ cygwin* | mingw* | windows* | cegcc* | os2*)
8136
8601
  # No point in relinking DLLs because paths are not encoded
8137
8602
  func_append notinst_deplibs " $lib"
8138
8603
  need_relink=no
@@ -8158,11 +8623,11 @@ func_mode_link ()
8158
8623
  if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
8159
8624
  echo
8160
8625
  if test prog = "$linkmode"; then
8161
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
8626
+ func_warning "Linking the executable $output against the loadable module"
8162
8627
  else
8163
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
8628
+ func_warning "Linking the shared library $output against the loadable module"
8164
8629
  fi
8165
- $ECHO "*** $linklib is not portable!"
8630
+ func_warning "$linklib is not portable!"
8166
8631
  fi
8167
8632
  if test lib = "$linkmode" &&
8168
8633
  test yes = "$hardcode_into_libs"; then
@@ -8172,9 +8637,12 @@ func_mode_link ()
8172
8637
  case " $sys_lib_dlsearch_path " in
8173
8638
  *" $absdir "*) ;;
8174
8639
  *)
8175
- case "$compile_rpath " in
8640
+ case "$compile_rpath$compile_rpath_tail " in
8176
8641
  *" $absdir "*) ;;
8177
- *) func_append compile_rpath " $absdir" ;;
8642
+ *) case $absdir in
8643
+ "$progdir/"*) func_append compile_rpath " $absdir" ;;
8644
+ *) func_append compile_rpath_tail " $absdir" ;;
8645
+ esac
8178
8646
  esac
8179
8647
  ;;
8180
8648
  esac
@@ -8201,8 +8669,8 @@ func_mode_link ()
8201
8669
  soname=$dlname
8202
8670
  elif test -n "$soname_spec"; then
8203
8671
  # bleh windows
8204
- case $host in
8205
- *cygwin* | mingw* | *cegcc* | *os2*)
8672
+ case $host_os in
8673
+ cygwin* | mingw* | windows* | cegcc* | os2*)
8206
8674
  func_arith $current - $age
8207
8675
  major=$func_arith_result
8208
8676
  versuffix=-$major
@@ -8249,6 +8717,7 @@ func_mode_link ()
8249
8717
  case $host in
8250
8718
  *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
8251
8719
  *-*-sysv4*uw2*) add_dir=-L$dir ;;
8720
+ *-*-emscripten*) add_dir=-L$dir ;;
8252
8721
  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
8253
8722
  *-*-unixware7*) add_dir=-L$dir ;;
8254
8723
  *-*-darwin* )
@@ -8257,11 +8726,10 @@ func_mode_link ()
8257
8726
  if /usr/bin/file -L $add 2> /dev/null |
8258
8727
  $GREP ": [^:]* bundle" >/dev/null; then
8259
8728
  if test "X$dlopenmodule" != "X$lib"; then
8260
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
8729
+ func_warning "lib $linklib is a module, not a shared library"
8261
8730
  if test -z "$old_library"; then
8262
- echo
8263
- echo "*** And there doesn't seem to be a static archive available"
8264
- echo "*** The link will probably fail, sorry"
8731
+ func_warning "And there doesn't seem to be a static archive available"
8732
+ func_warning "The link will probably fail, sorry"
8265
8733
  else
8266
8734
  add=$dir/$old_library
8267
8735
  fi
@@ -8344,7 +8812,7 @@ func_mode_link ()
8344
8812
  test no = "$hardcode_direct_absolute"; then
8345
8813
  add=$libdir/$linklib
8346
8814
  elif test yes = "$hardcode_minus_L"; then
8347
- add_dir=-L$libdir
8815
+ add_dir=-L$lt_sysroot$libdir
8348
8816
  add=-l$name
8349
8817
  elif test yes = "$hardcode_shlibpath_var"; then
8350
8818
  case :$finalize_shlibpath: in
@@ -8361,7 +8829,7 @@ func_mode_link ()
8361
8829
  fi
8362
8830
  else
8363
8831
  # We cannot seem to hardcode it, guess we'll fake it.
8364
- add_dir=-L$libdir
8832
+ add_dir=-L$lt_sysroot$libdir
8365
8833
  # Try looking first in the location we're being installed to.
8366
8834
  if test -n "$inst_prefix_dir"; then
8367
8835
  case $libdir in
@@ -8401,21 +8869,19 @@ func_mode_link ()
8401
8869
 
8402
8870
  # Just print a warning and add the library to dependency_libs so
8403
8871
  # that the program can be linked against the static library.
8404
- echo
8405
- $ECHO "*** Warning: This system cannot link to static lib archive $lib."
8406
- echo "*** I have the capability to make that library automatically link in when"
8407
- echo "*** you link to this library. But I can only do this if you have a"
8408
- echo "*** shared version of the library, which you do not appear to have."
8872
+ func_warning "This system cannot link to static lib archive $lib."
8873
+ func_warning "I have the capability to make that library automatically link in when"
8874
+ func_warning "you link to this library. But I can only do this if you have a"
8875
+ func_warning "shared version of the library, which you do not appear to have."
8409
8876
  if test yes = "$module"; then
8410
- echo "*** But as you try to build a module library, libtool will still create "
8411
- echo "*** a static module, that should work as long as the dlopening application"
8412
- echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
8877
+ func_warning "But as you try to build a module library, libtool will still create "
8878
+ func_warning "a static module, that should work as long as the dlopening application"
8879
+ func_warning "is linked with the -dlopen flag to resolve symbols at runtime."
8413
8880
  if test -z "$global_symbol_pipe"; then
8414
- echo
8415
- echo "*** However, this would only work if libtool was able to extract symbol"
8416
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
8417
- echo "*** not find such a program. So, this module is probably useless."
8418
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
8881
+ func_warning "However, this would only work if libtool was able to extract symbol"
8882
+ func_warning "lists from a program, using 'nm' or equivalent, but libtool could"
8883
+ func_warning "not find such a program. So, this module is probably useless."
8884
+ func_warning "'nm' from GNU binutils and a full rebuild may help."
8419
8885
  fi
8420
8886
  if test no = "$build_old_libs"; then
8421
8887
  build_libtool_libs=module
@@ -8538,6 +9004,10 @@ func_mode_link ()
8538
9004
  fi # link_all_deplibs != no
8539
9005
  fi # linkmode = lib
8540
9006
  done # for deplib in $libs
9007
+
9008
+ func_append temp_rpath "$temp_rpath_tail"
9009
+ func_append compile_rpath "$compile_rpath_tail"
9010
+
8541
9011
  if test link = "$pass"; then
8542
9012
  if test prog = "$linkmode"; then
8543
9013
  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
@@ -8575,42 +9045,46 @@ func_mode_link ()
8575
9045
  # Add libraries to $var in reverse order
8576
9046
  eval tmp_libs=\"\$$var\"
8577
9047
  new_libs=
9048
+ # FIXME: Pedantically, this is the right thing to do, so
9049
+ # that some nasty dependency loop isn't accidentally
9050
+ # broken: new_libs="$deplib $new_libs"
8578
9051
  for deplib in $tmp_libs; do
8579
- # FIXME: Pedantically, this is the right thing to do, so
8580
- # that some nasty dependency loop isn't accidentally
8581
- # broken:
8582
- #new_libs="$deplib $new_libs"
8583
- # Pragmatically, this seems to cause very few problems in
8584
- # practice:
8585
- case $deplib in
8586
- -L*) new_libs="$deplib $new_libs" ;;
8587
- -R*) ;;
8588
- *)
8589
- # And here is the reason: when a library appears more
8590
- # than once as an explicit dependence of a library, or
8591
- # is implicitly linked in more than once by the
8592
- # compiler, it is considered special, and multiple
8593
- # occurrences thereof are not removed. Compare this
8594
- # with having the same library being listed as a
8595
- # dependency of multiple other libraries: in this case,
8596
- # we know (pedantically, we assume) the library does not
8597
- # need to be listed more than once, so we keep only the
8598
- # last copy. This is not always right, but it is rare
8599
- # enough that we require users that really mean to play
8600
- # such unportable linking tricks to link the library
8601
- # using -Wl,-lname, so that libtool does not consider it
8602
- # for duplicate removal.
8603
- case " $specialdeplibs " in
8604
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
9052
+ if $opt_preserve_dup_deps; then
9053
+ new_libs="$deplib $new_libs"
9054
+ else
9055
+ # Pragmatically, this seems to cause very few problems in
9056
+ # practice:
9057
+ case $deplib in
9058
+ -L*) new_libs="$deplib $new_libs" ;;
9059
+ -R*) ;;
8605
9060
  *)
8606
- case " $new_libs " in
8607
- *" $deplib "*) ;;
8608
- *) new_libs="$deplib $new_libs" ;;
8609
- esac
8610
- ;;
9061
+ # And here is the reason: when a library appears more
9062
+ # than once as an explicit dependence of a library, or
9063
+ # is implicitly linked in more than once by the
9064
+ # compiler, it is considered special, and multiple
9065
+ # occurrences thereof are not removed. Compare this
9066
+ # with having the same library being listed as a
9067
+ # dependency of multiple other libraries: in this case,
9068
+ # we know (pedantically, we assume) the library does not
9069
+ # need to be listed more than once, so we keep only the
9070
+ # last copy. This is not always right, but it is rare
9071
+ # enough that we require users that really mean to play
9072
+ # such unportable linking tricks to link the library
9073
+ # using -Wl,-lname, so that libtool does not consider it
9074
+ # for duplicate removal. And if not possible for portability
9075
+ # reasons, then --preserve-dup-deps should be used.
9076
+ case " $specialdeplibs " in
9077
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
9078
+ *)
9079
+ case " $new_libs " in
9080
+ *" $deplib "*) ;;
9081
+ *) new_libs="$deplib $new_libs" ;;
9082
+ esac
9083
+ ;;
9084
+ esac
9085
+ ;;
8611
9086
  esac
8612
- ;;
8613
- esac
9087
+ fi
8614
9088
  done
8615
9089
  tmp_libs=
8616
9090
  for deplib in $new_libs; do
@@ -8632,7 +9106,7 @@ func_mode_link ()
8632
9106
  test CXX = "$tagname" && {
8633
9107
  case $host_os in
8634
9108
  linux*)
8635
- case `$CC -V 2>&1 | sed 5q` in
9109
+ case `$CC -V 2>&1 | $SED 5q` in
8636
9110
  *Sun\ C*) # Sun C++ 5.9
8637
9111
  func_suncc_cstd_abi
8638
9112
 
@@ -8742,9 +9216,7 @@ func_mode_link ()
8742
9216
  if test pass_all != "$deplibs_check_method"; then
8743
9217
  func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
8744
9218
  else
8745
- echo
8746
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
8747
- $ECHO "*** objects $objs is not portable!"
9219
+ func_warning "Linking the shared library $output against the non-libtool objects $objs is not portable!"
8748
9220
  func_append libobjs " $objs"
8749
9221
  fi
8750
9222
  fi
@@ -8805,13 +9277,13 @@ func_mode_link ()
8805
9277
  #
8806
9278
  case $version_type in
8807
9279
  # correct linux to gnu/linux during the next big refactor
8808
- darwin|freebsd-elf|linux|osf|windows|none)
9280
+ darwin|freebsd-elf|linux|midnightbsd-elf|osf|qnx|windows|none)
8809
9281
  func_arith $number_major + $number_minor
8810
9282
  current=$func_arith_result
8811
9283
  age=$number_minor
8812
9284
  revision=$number_revision
8813
9285
  ;;
8814
- freebsd-aout|qnx|sunos)
9286
+ freebsd-aout|sco|sunos)
8815
9287
  current=$number_major
8816
9288
  revision=$number_minor
8817
9289
  age=0
@@ -8823,6 +9295,12 @@ func_mode_link ()
8823
9295
  revision=$number_minor
8824
9296
  lt_irix_increment=no
8825
9297
  ;;
9298
+ *)
9299
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
9300
+ ;;
9301
+ *)
9302
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
9303
+ ;;
8826
9304
  esac
8827
9305
  ;;
8828
9306
  no)
@@ -8896,7 +9374,7 @@ func_mode_link ()
8896
9374
  versuffix=.$current.$revision
8897
9375
  ;;
8898
9376
 
8899
- freebsd-elf)
9377
+ freebsd-elf | midnightbsd-elf)
8900
9378
  func_arith $current - $age
8901
9379
  major=.$func_arith_result
8902
9380
  versuffix=$major.$age.$revision
@@ -8958,8 +9436,9 @@ func_mode_link ()
8958
9436
  ;;
8959
9437
 
8960
9438
  qnx)
8961
- major=.$current
8962
- versuffix=.$current
9439
+ func_arith $current - $age
9440
+ major=.$func_arith_result
9441
+ versuffix=$major.$age.$revision
8963
9442
  ;;
8964
9443
 
8965
9444
  sco)
@@ -9112,7 +9591,7 @@ func_mode_link ()
9112
9591
  if test yes = "$build_libtool_libs"; then
9113
9592
  if test -n "$rpath"; then
9114
9593
  case $host in
9115
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
9594
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
9116
9595
  # these systems don't actually have a c library (as such)!
9117
9596
  ;;
9118
9597
  *-*-rhapsody* | *-*-darwin1.[012])
@@ -9122,7 +9601,7 @@ func_mode_link ()
9122
9601
  *-*-netbsd*)
9123
9602
  # Don't link with libc until the a.out ld.so is fixed.
9124
9603
  ;;
9125
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9604
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
9126
9605
  # Do not include libc due to us having libc/libc_r.
9127
9606
  ;;
9128
9607
  *-*-sco3.2v5* | *-*-sco5v6*)
@@ -9163,108 +9642,6 @@ func_mode_link ()
9163
9642
  # implementing what was already the behavior.
9164
9643
  newdeplibs=$deplibs
9165
9644
  ;;
9166
- test_compile)
9167
- # This code stresses the "libraries are programs" paradigm to its
9168
- # limits. Maybe even breaks it. We compile a program, linking it
9169
- # against the deplibs as a proxy for the library. Then we can check
9170
- # whether they linked in statically or dynamically with ldd.
9171
- $opt_dry_run || $RM conftest.c
9172
- cat > conftest.c <<EOF
9173
- int main() { return 0; }
9174
- EOF
9175
- $opt_dry_run || $RM conftest
9176
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
9177
- ldd_output=`ldd conftest`
9178
- for i in $deplibs; do
9179
- case $i in
9180
- -l*)
9181
- func_stripname -l '' "$i"
9182
- name=$func_stripname_result
9183
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9184
- case " $predeps $postdeps " in
9185
- *" $i "*)
9186
- func_append newdeplibs " $i"
9187
- i=
9188
- ;;
9189
- esac
9190
- fi
9191
- if test -n "$i"; then
9192
- libname=`eval "\\$ECHO \"$libname_spec\""`
9193
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9194
- set dummy $deplib_matches; shift
9195
- deplib_match=$1
9196
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9197
- func_append newdeplibs " $i"
9198
- else
9199
- droppeddeps=yes
9200
- echo
9201
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9202
- echo "*** I have the capability to make that library automatically link in when"
9203
- echo "*** you link to this library. But I can only do this if you have a"
9204
- echo "*** shared version of the library, which I believe you do not have"
9205
- echo "*** because a test_compile did reveal that the linker did not use it for"
9206
- echo "*** its dynamic dependency list that programs get resolved with at runtime."
9207
- fi
9208
- fi
9209
- ;;
9210
- *)
9211
- func_append newdeplibs " $i"
9212
- ;;
9213
- esac
9214
- done
9215
- else
9216
- # Error occurred in the first compile. Let's try to salvage
9217
- # the situation: Compile a separate program for each library.
9218
- for i in $deplibs; do
9219
- case $i in
9220
- -l*)
9221
- func_stripname -l '' "$i"
9222
- name=$func_stripname_result
9223
- $opt_dry_run || $RM conftest
9224
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
9225
- ldd_output=`ldd conftest`
9226
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9227
- case " $predeps $postdeps " in
9228
- *" $i "*)
9229
- func_append newdeplibs " $i"
9230
- i=
9231
- ;;
9232
- esac
9233
- fi
9234
- if test -n "$i"; then
9235
- libname=`eval "\\$ECHO \"$libname_spec\""`
9236
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
9237
- set dummy $deplib_matches; shift
9238
- deplib_match=$1
9239
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
9240
- func_append newdeplibs " $i"
9241
- else
9242
- droppeddeps=yes
9243
- echo
9244
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
9245
- echo "*** I have the capability to make that library automatically link in when"
9246
- echo "*** you link to this library. But I can only do this if you have a"
9247
- echo "*** shared version of the library, which you do not appear to have"
9248
- echo "*** because a test_compile did reveal that the linker did not use this one"
9249
- echo "*** as a dynamic dependency that programs can get resolved with at runtime."
9250
- fi
9251
- fi
9252
- else
9253
- droppeddeps=yes
9254
- echo
9255
- $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
9256
- echo "*** make it link in! You will probably need to install it or some"
9257
- echo "*** library that it depends on before this library will be fully"
9258
- echo "*** functional. Installing it before continuing would be even better."
9259
- fi
9260
- ;;
9261
- *)
9262
- func_append newdeplibs " $i"
9263
- ;;
9264
- esac
9265
- done
9266
- fi
9267
- ;;
9268
9645
  file_magic*)
9269
9646
  set dummy $deplibs_check_method; shift
9270
9647
  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
@@ -9328,17 +9705,16 @@ EOF
9328
9705
  fi
9329
9706
  if test -n "$a_deplib"; then
9330
9707
  droppeddeps=yes
9331
- echo
9332
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9333
- echo "*** I have the capability to make that library automatically link in when"
9334
- echo "*** you link to this library. But I can only do this if you have a"
9335
- echo "*** shared version of the library, which you do not appear to have"
9336
- echo "*** because I did check the linker path looking for a file starting"
9708
+ func_warning "Linker path does not have real file for library $a_deplib."
9709
+ func_warning "I have the capability to make that library automatically link in when"
9710
+ func_warning "you link to this library. But I can only do this if you have a"
9711
+ func_warning "shared version of the library, which you do not appear to have"
9712
+ func_warning "because I did check the linker path looking for a file starting"
9337
9713
  if test -z "$potlib"; then
9338
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
9714
+ func_warning "with $libname but no candidates were found. (...for file magic test)"
9339
9715
  else
9340
- $ECHO "*** with $libname and none of the candidates passed a file format test"
9341
- $ECHO "*** using a file magic. Last file checked: $potlib"
9716
+ func_warning "with $libname and none of the candidates passed a file format test"
9717
+ func_warning "using a file magic. Last file checked: $potlib"
9342
9718
  fi
9343
9719
  fi
9344
9720
  ;;
@@ -9382,17 +9758,16 @@ EOF
9382
9758
  fi
9383
9759
  if test -n "$a_deplib"; then
9384
9760
  droppeddeps=yes
9385
- echo
9386
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
9387
- echo "*** I have the capability to make that library automatically link in when"
9388
- echo "*** you link to this library. But I can only do this if you have a"
9389
- echo "*** shared version of the library, which you do not appear to have"
9390
- echo "*** because I did check the linker path looking for a file starting"
9761
+ func_warning "Linker path does not have real file for library $a_deplib."
9762
+ func_warning "I have the capability to make that library automatically link in when"
9763
+ func_warning "you link to this library. But I can only do this if you have a"
9764
+ func_warning "shared version of the library, which you do not appear to have"
9765
+ func_warning "because I did check the linker path looking for a file starting"
9391
9766
  if test -z "$potlib"; then
9392
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
9767
+ func_warning "with $libname but no candidates were found. (...for regex pattern test)"
9393
9768
  else
9394
- $ECHO "*** with $libname and none of the candidates passed a file format test"
9395
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
9769
+ func_warning "with $libname and none of the candidates passed a file format test"
9770
+ func_warning "using a regex pattern. Last file checked: $potlib"
9396
9771
  fi
9397
9772
  fi
9398
9773
  ;;
@@ -9416,11 +9791,11 @@ EOF
9416
9791
  *[!\ \ ]*)
9417
9792
  echo
9418
9793
  if test none = "$deplibs_check_method"; then
9419
- echo "*** Warning: inter-library dependencies are not supported in this platform."
9794
+ func_warning "Inter-library dependencies are not supported in this platform."
9420
9795
  else
9421
- echo "*** Warning: inter-library dependencies are not known to be supported."
9796
+ func_warning "Inter-library dependencies are not known to be supported."
9422
9797
  fi
9423
- echo "*** All declared inter-library dependencies are being dropped."
9798
+ func_warning "All declared inter-library dependencies are being dropped."
9424
9799
  droppeddeps=yes
9425
9800
  ;;
9426
9801
  esac
@@ -9441,17 +9816,15 @@ EOF
9441
9816
 
9442
9817
  if test yes = "$droppeddeps"; then
9443
9818
  if test yes = "$module"; then
9444
- echo
9445
- echo "*** Warning: libtool could not satisfy all declared inter-library"
9446
- $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
9447
- echo "*** a static module, that should work as long as the dlopening"
9448
- echo "*** application is linked with the -dlopen flag."
9819
+ func_warning "libtool could not satisfy all declared inter-library"
9820
+ func_warning "dependencies of module $libname. Therefore, libtool will create"
9821
+ func_warning "a static module, that should work as long as the dlopening"
9822
+ func_warning "application is linked with the -dlopen flag."
9449
9823
  if test -z "$global_symbol_pipe"; then
9450
- echo
9451
- echo "*** However, this would only work if libtool was able to extract symbol"
9452
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
9453
- echo "*** not find such a program. So, this module is probably useless."
9454
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
9824
+ func_warning "However, this would only work if libtool was able to extract symbol"
9825
+ func_warning "lists from a program, using 'nm' or equivalent, but libtool could"
9826
+ func_warning "not find such a program. So, this module is probably useless."
9827
+ func_warning "'nm' from GNU binutils and a full rebuild may help."
9455
9828
  fi
9456
9829
  if test no = "$build_old_libs"; then
9457
9830
  oldlibs=$output_objdir/$libname.$libext
@@ -9626,7 +9999,7 @@ EOF
9626
9999
 
9627
10000
  orig_export_symbols=
9628
10001
  case $host_os in
9629
- cygwin* | mingw* | cegcc*)
10002
+ cygwin* | mingw* | windows* | cegcc*)
9630
10003
  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
9631
10004
  # exporting using user supplied symfile
9632
10005
  func_dll_def_p "$export_symbols" || {
@@ -9824,20 +10197,7 @@ EOF
9824
10197
  last_robj=
9825
10198
  k=1
9826
10199
 
9827
- if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
9828
- output=$output_objdir/$output_la.lnkscript
9829
- func_verbose "creating GNU ld script: $output"
9830
- echo 'INPUT (' > $output
9831
- for obj in $save_libobjs
9832
- do
9833
- func_to_tool_file "$obj"
9834
- $ECHO "$func_to_tool_file_result" >> $output
9835
- done
9836
- echo ')' >> $output
9837
- func_append delfiles " $output"
9838
- func_to_tool_file "$output"
9839
- output=$func_to_tool_file_result
9840
- elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
10200
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
9841
10201
  output=$output_objdir/$output_la.lnk
9842
10202
  func_verbose "creating linker input file list: $output"
9843
10203
  : > $output
@@ -9856,6 +10216,19 @@ EOF
9856
10216
  func_append delfiles " $output"
9857
10217
  func_to_tool_file "$output"
9858
10218
  output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
10219
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
10220
+ output=$output_objdir/$output_la.lnkscript
10221
+ func_verbose "creating GNU ld script: $output"
10222
+ echo 'INPUT (' > $output
10223
+ for obj in $save_libobjs
10224
+ do
10225
+ func_to_tool_file "$obj"
10226
+ $ECHO "$func_to_tool_file_result" >> $output
10227
+ done
10228
+ echo ')' >> $output
10229
+ func_append delfiles " $output"
10230
+ func_to_tool_file "$output"
10231
+ output=$func_to_tool_file_result
9859
10232
  else
9860
10233
  if test -n "$save_libobjs"; then
9861
10234
  func_verbose "creating reloadable object files..."
@@ -9933,8 +10306,8 @@ EOF
9933
10306
  for cmd in $concat_cmds; do
9934
10307
  IFS=$save_ifs
9935
10308
  $opt_quiet || {
9936
- func_quote_for_expand "$cmd"
9937
- eval "func_echo $func_quote_for_expand_result"
10309
+ func_quote_arg expand,pretty "$cmd"
10310
+ eval "func_echo $func_quote_arg_result"
9938
10311
  }
9939
10312
  $opt_dry_run || eval "$cmd" || {
9940
10313
  lt_exit=$?
@@ -10027,8 +10400,8 @@ EOF
10027
10400
  eval cmd=\"$cmd\"
10028
10401
  IFS=$save_ifs
10029
10402
  $opt_quiet || {
10030
- func_quote_for_expand "$cmd"
10031
- eval "func_echo $func_quote_for_expand_result"
10403
+ func_quote_arg expand,pretty "$cmd"
10404
+ eval "func_echo $func_quote_arg_result"
10032
10405
  }
10033
10406
  $opt_dry_run || eval "$cmd" || {
10034
10407
  lt_exit=$?
@@ -10296,7 +10669,7 @@ EOF
10296
10669
  esac
10297
10670
  fi
10298
10671
  case $host in
10299
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
10672
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
10300
10673
  testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
10301
10674
  case :$dllsearchpath: in
10302
10675
  *":$libdir:"*) ;;
@@ -10374,7 +10747,7 @@ EOF
10374
10747
  # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
10375
10748
  wrappers_required=false
10376
10749
  ;;
10377
- *cygwin* | *mingw* )
10750
+ *cygwin* | *mingw* | *windows* )
10378
10751
  test yes = "$build_libtool_libs" || wrappers_required=false
10379
10752
  ;;
10380
10753
  *)
@@ -10502,12 +10875,13 @@ EOF
10502
10875
  elif eval var_value=\$$var; test -z "$var_value"; then
10503
10876
  relink_command="$var=; export $var; $relink_command"
10504
10877
  else
10505
- func_quote_for_eval "$var_value"
10506
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
10878
+ func_quote_arg pretty "$var_value"
10879
+ relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
10507
10880
  fi
10508
10881
  done
10509
- relink_command="(cd `pwd`; $relink_command)"
10510
- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
10882
+ func_quote eval cd "`pwd`"
10883
+ func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
10884
+ relink_command=$func_quote_arg_unquoted_result
10511
10885
  fi
10512
10886
 
10513
10887
  # Only actually do things if not in dry run mode.
@@ -10527,7 +10901,7 @@ EOF
10527
10901
  *) exeext= ;;
10528
10902
  esac
10529
10903
  case $host in
10530
- *cygwin* | *mingw* )
10904
+ *cygwin* | *mingw* | windows* )
10531
10905
  func_dirname_and_basename "$output" "" "."
10532
10906
  output_name=$func_basename_result
10533
10907
  output_path=$func_dirname_result
@@ -10747,13 +11121,15 @@ EOF
10747
11121
  elif eval var_value=\$$var; test -z "$var_value"; then
10748
11122
  relink_command="$var=; export $var; $relink_command"
10749
11123
  else
10750
- func_quote_for_eval "$var_value"
10751
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
11124
+ func_quote_arg pretty,unquoted "$var_value"
11125
+ relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
10752
11126
  fi
10753
11127
  done
10754
11128
  # Quote the link command for shipping.
10755
- relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10756
- relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
11129
+ func_quote eval cd "`pwd`"
11130
+ relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
11131
+ func_quote_arg pretty,unquoted "$relink_command"
11132
+ relink_command=$func_quote_arg_unquoted_result
10757
11133
  if test yes = "$hardcode_automatic"; then
10758
11134
  relink_command=
10759
11135
  fi
@@ -10859,7 +11235,7 @@ EOF
10859
11235
  # tests/bindir.at for full details.
10860
11236
  tdlname=$dlname
10861
11237
  case $host,$output,$installed,$module,$dlname in
10862
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
11238
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *windows*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
10863
11239
  # If a -bindir argument was supplied, place the dll there.
10864
11240
  if test -n "$bindir"; then
10865
11241
  func_relative_path "$install_libdir" "$bindir"