nutcracker 0.2.3 → 0.2.4.beta1

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 (296) hide show
  1. data/README.md +53 -5
  2. data/Rakefile +14 -19
  3. data/bin/nutcracker +6 -1
  4. data/ext/nutcracker/ChangeLog +9 -0
  5. data/ext/nutcracker/LICENSE +0 -0
  6. data/ext/nutcracker/Makefile +643 -0
  7. data/ext/nutcracker/Makefile.am +0 -0
  8. data/ext/nutcracker/Makefile.in +66 -149
  9. data/ext/nutcracker/NOTICE +0 -0
  10. data/ext/nutcracker/README.md +13 -11
  11. data/ext/nutcracker/aclocal.m4 +112 -201
  12. data/ext/nutcracker/autom4te.cache/output.0 +18664 -0
  13. data/ext/nutcracker/autom4te.cache/output.1 +18664 -0
  14. data/ext/nutcracker/autom4te.cache/output.2 +18664 -0
  15. data/ext/nutcracker/autom4te.cache/requests +494 -0
  16. data/ext/nutcracker/autom4te.cache/traces.0 +2415 -0
  17. data/ext/nutcracker/autom4te.cache/traces.1 +945 -0
  18. data/ext/nutcracker/autom4te.cache/traces.2 +2415 -0
  19. data/ext/nutcracker/conf/nutcracker.leaf.yml +0 -0
  20. data/ext/nutcracker/conf/nutcracker.root.yml +0 -0
  21. data/ext/nutcracker/conf/nutcracker.yml +0 -0
  22. data/ext/nutcracker/config.h +332 -0
  23. data/ext/nutcracker/config.h.in +15 -0
  24. data/ext/nutcracker/config.log +2684 -0
  25. data/ext/nutcracker/config.status +2317 -0
  26. data/ext/nutcracker/config/config.guess +23 -84
  27. data/ext/nutcracker/config/config.sub +23 -93
  28. data/ext/nutcracker/config/depcomp +35 -81
  29. data/ext/nutcracker/config/install-sh +109 -122
  30. data/ext/nutcracker/config/ltmain.sh +1053 -721
  31. data/ext/nutcracker/config/missing +20 -29
  32. data/ext/nutcracker/configure +2122 -2320
  33. data/ext/nutcracker/configure.ac +35 -3
  34. data/ext/nutcracker/contrib/Makefile +494 -0
  35. data/ext/nutcracker/contrib/Makefile.am +0 -0
  36. data/ext/nutcracker/contrib/Makefile.in +41 -107
  37. data/ext/nutcracker/contrib/yaml-0.1.4.tar.gz +0 -0
  38. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile +736 -0
  39. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.0 +13102 -0
  40. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.1 +13085 -0
  41. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.2 +13085 -0
  42. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/requests +476 -0
  43. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.0 +2339 -0
  44. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.1 +545 -0
  45. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.2 +2339 -0
  46. data/ext/nutcracker/contrib/yaml-0.1.4/config.h +81 -0
  47. data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in~ +80 -0
  48. data/ext/nutcracker/contrib/yaml-0.1.4/config.log +688 -0
  49. data/ext/nutcracker/contrib/yaml-0.1.4/config.status +2032 -0
  50. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/annotated.html +51 -0
  51. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/bc_s.png +0 -0
  52. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/classes.html +41 -0
  53. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/closed.png +0 -0
  54. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.css +656 -0
  55. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.png +0 -0
  56. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/files.html +40 -0
  57. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions.html +91 -0
  58. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x62.html +84 -0
  59. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x63.html +87 -0
  60. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x64.html +83 -0
  61. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x65.html +110 -0
  62. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x66.html +79 -0
  63. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x68.html +80 -0
  64. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x69.html +92 -0
  65. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6b.html +71 -0
  66. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6c.html +88 -0
  67. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6d.html +96 -0
  68. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6e.html +71 -0
  69. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6f.html +80 -0
  70. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x70.html +100 -0
  71. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x71.html +71 -0
  72. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x72.html +87 -0
  73. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x73.html +163 -0
  74. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x74.html +115 -0
  75. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x75.html +71 -0
  76. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x76.html +80 -0
  77. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x77.html +77 -0
  78. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars.html +91 -0
  79. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x62.html +84 -0
  80. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x63.html +87 -0
  81. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x64.html +83 -0
  82. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x65.html +110 -0
  83. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x66.html +79 -0
  84. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x68.html +80 -0
  85. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x69.html +92 -0
  86. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6b.html +71 -0
  87. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6c.html +88 -0
  88. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6d.html +96 -0
  89. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6e.html +71 -0
  90. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6f.html +80 -0
  91. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x70.html +100 -0
  92. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x71.html +71 -0
  93. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x72.html +87 -0
  94. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x73.html +163 -0
  95. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x74.html +115 -0
  96. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x75.html +71 -0
  97. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x76.html +80 -0
  98. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x77.html +77 -0
  99. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals.html +667 -0
  100. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_defs.html +81 -0
  101. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_enum.html +78 -0
  102. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_eval.html +373 -0
  103. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_func.html +196 -0
  104. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_type.html +126 -0
  105. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__basic.html +320 -0
  106. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__emitter.html +819 -0
  107. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__events.html +664 -0
  108. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__export.html +60 -0
  109. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__nodes.html +795 -0
  110. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__parser.html +606 -0
  111. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__styles.html +222 -0
  112. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__tokens.html +246 -0
  113. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__version.html +106 -0
  114. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/index.html +31 -0
  115. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/modules.html +42 -0
  116. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_f.png +0 -0
  117. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_h.png +0 -0
  118. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/open.png +0 -0
  119. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__alias__data__s.html +108 -0
  120. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__document__s.html +235 -0
  121. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__emitter__s.html +1300 -0
  122. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__event__s.html +496 -0
  123. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__mark__s.html +108 -0
  124. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__pair__s.html +91 -0
  125. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__s.html +420 -0
  126. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__parser__s.html +1229 -0
  127. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__simple__key__s.html +97 -0
  128. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__tag__directive__s.html +91 -0
  129. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__token__s.html +413 -0
  130. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__version__directive__s.html +91 -0
  131. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_a.png +0 -0
  132. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_b.png +0 -0
  133. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_h.png +0 -0
  134. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_s.png +0 -0
  135. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tabs.css +59 -0
  136. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/yaml_8h.html +525 -0
  137. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.am +17 -0
  138. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.in +470 -0
  139. data/ext/nutcracker/contrib/yaml-0.1.4/libtool +8890 -0
  140. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile +484 -0
  141. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.lo +12 -0
  142. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.o +0 -0
  143. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.lo +12 -0
  144. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.o +0 -0
  145. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.lo +12 -0
  146. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.o +0 -0
  147. data/ext/nutcracker/contrib/yaml-0.1.4/src/libyaml.la +41 -0
  148. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.lo +12 -0
  149. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.o +0 -0
  150. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.lo +12 -0
  151. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.o +0 -0
  152. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.lo +12 -0
  153. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.o +0 -0
  154. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.lo +12 -0
  155. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.o +0 -0
  156. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.lo +12 -0
  157. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.o +0 -0
  158. data/ext/nutcracker/contrib/yaml-0.1.4/stamp-h1 +1 -0
  159. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile +675 -0
  160. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor +0 -0
  161. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt +0 -0
  162. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.o +0 -0
  163. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.o +0 -0
  164. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter +0 -0
  165. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt +0 -0
  166. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.o +0 -0
  167. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.o +0 -0
  168. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper +0 -0
  169. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.o +0 -0
  170. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter +0 -0
  171. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.o +0 -0
  172. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader +0 -0
  173. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.o +0 -0
  174. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser +0 -0
  175. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.o +0 -0
  176. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner +0 -0
  177. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.o +0 -0
  178. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc +10 -0
  179. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc.in +10 -0
  180. data/ext/nutcracker/extconf.rb +0 -5
  181. data/ext/nutcracker/libtool +9403 -0
  182. data/ext/nutcracker/m4/libtool.m4 +553 -492
  183. data/ext/nutcracker/m4/ltoptions.m4 +7 -6
  184. data/ext/nutcracker/m4/ltversion.m4 +5 -5
  185. data/ext/nutcracker/m4/lt~obsolete.m4 +9 -3
  186. data/ext/nutcracker/notes/c-styleguide.txt +0 -0
  187. data/ext/nutcracker/notes/debug.txt +0 -0
  188. data/ext/nutcracker/notes/memcache.txt +0 -0
  189. data/ext/nutcracker/notes/recommendation.md +21 -2
  190. data/ext/nutcracker/notes/redis.md +9 -9
  191. data/ext/nutcracker/notes/socket.txt +0 -0
  192. data/ext/nutcracker/scripts/nutcracker.init +0 -0
  193. data/ext/nutcracker/scripts/nutcracker.spec +0 -0
  194. data/ext/nutcracker/scripts/redis-check.py +0 -0
  195. data/ext/nutcracker/scripts/redis-check.sh +9 -0
  196. data/ext/nutcracker/src/Makefile +647 -0
  197. data/ext/nutcracker/src/Makefile.am +1 -1
  198. data/ext/nutcracker/src/Makefile.in +74 -153
  199. data/ext/nutcracker/src/hashkit/Makefile +476 -0
  200. data/ext/nutcracker/src/hashkit/Makefile.am +1 -0
  201. data/ext/nutcracker/src/hashkit/Makefile.in +39 -64
  202. data/ext/nutcracker/src/hashkit/libhashkit.a +0 -0
  203. data/ext/nutcracker/src/hashkit/nc_crc16.c +66 -0
  204. data/ext/nutcracker/src/hashkit/nc_crc16.o +0 -0
  205. data/ext/nutcracker/src/hashkit/nc_crc32.c +0 -0
  206. data/ext/nutcracker/src/hashkit/nc_crc32.o +0 -0
  207. data/ext/nutcracker/src/hashkit/nc_fnv.c +0 -0
  208. data/ext/nutcracker/src/hashkit/nc_fnv.o +0 -0
  209. data/ext/nutcracker/src/hashkit/nc_hashkit.h +2 -0
  210. data/ext/nutcracker/src/hashkit/nc_hsieh.c +0 -0
  211. data/ext/nutcracker/src/hashkit/nc_hsieh.o +0 -0
  212. data/ext/nutcracker/src/hashkit/nc_jenkins.c +0 -0
  213. data/ext/nutcracker/src/hashkit/nc_jenkins.o +0 -0
  214. data/ext/nutcracker/src/hashkit/nc_ketama.c +0 -0
  215. data/ext/nutcracker/src/hashkit/nc_ketama.o +0 -0
  216. data/ext/nutcracker/src/hashkit/nc_md5.c +0 -0
  217. data/ext/nutcracker/src/hashkit/nc_md5.o +0 -0
  218. data/ext/nutcracker/src/hashkit/nc_modula.c +18 -6
  219. data/ext/nutcracker/src/hashkit/nc_modula.o +0 -0
  220. data/ext/nutcracker/src/hashkit/nc_murmur.c +0 -0
  221. data/ext/nutcracker/src/hashkit/nc_murmur.o +0 -0
  222. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.c +0 -0
  223. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.o +0 -0
  224. data/ext/nutcracker/src/hashkit/nc_random.c +0 -0
  225. data/ext/nutcracker/src/hashkit/nc_random.o +0 -0
  226. data/ext/nutcracker/src/nc.c +0 -0
  227. data/ext/nutcracker/src/nc.o +0 -0
  228. data/ext/nutcracker/src/nc_array.c +0 -0
  229. data/ext/nutcracker/src/nc_array.h +0 -0
  230. data/ext/nutcracker/src/nc_array.o +0 -0
  231. data/ext/nutcracker/src/nc_client.c +0 -0
  232. data/ext/nutcracker/src/nc_client.h +0 -0
  233. data/ext/nutcracker/src/nc_client.o +0 -0
  234. data/ext/nutcracker/src/nc_conf.c +14 -35
  235. data/ext/nutcracker/src/nc_conf.h +1 -1
  236. data/ext/nutcracker/src/nc_conf.o +0 -0
  237. data/ext/nutcracker/src/nc_connection.c +0 -0
  238. data/ext/nutcracker/src/nc_connection.h +0 -0
  239. data/ext/nutcracker/src/nc_connection.o +0 -0
  240. data/ext/nutcracker/src/nc_core.c +29 -26
  241. data/ext/nutcracker/src/nc_core.h +13 -5
  242. data/ext/nutcracker/src/nc_core.o +0 -0
  243. data/ext/nutcracker/src/{nc_event.c → nc_epoll.c} +94 -30
  244. data/ext/nutcracker/src/nc_epoll.o +0 -0
  245. data/ext/nutcracker/src/nc_event.h +33 -13
  246. data/ext/nutcracker/src/nc_kqueue.c +296 -0
  247. data/ext/nutcracker/src/nc_kqueue.o +0 -0
  248. data/ext/nutcracker/src/nc_log.c +0 -0
  249. data/ext/nutcracker/src/nc_log.h +0 -0
  250. data/ext/nutcracker/src/nc_log.o +0 -0
  251. data/ext/nutcracker/src/nc_mbuf.c +0 -0
  252. data/ext/nutcracker/src/nc_mbuf.h +0 -0
  253. data/ext/nutcracker/src/nc_mbuf.o +0 -0
  254. data/ext/nutcracker/src/nc_message.c +0 -0
  255. data/ext/nutcracker/src/nc_message.h +2 -0
  256. data/ext/nutcracker/src/nc_message.o +0 -0
  257. data/ext/nutcracker/src/nc_proxy.c +8 -8
  258. data/ext/nutcracker/src/nc_proxy.h +0 -0
  259. data/ext/nutcracker/src/nc_proxy.o +0 -0
  260. data/ext/nutcracker/src/nc_queue.h +0 -0
  261. data/ext/nutcracker/src/nc_rbtree.c +0 -0
  262. data/ext/nutcracker/src/nc_rbtree.h +0 -0
  263. data/ext/nutcracker/src/nc_rbtree.o +0 -0
  264. data/ext/nutcracker/src/nc_request.c +3 -3
  265. data/ext/nutcracker/src/nc_request.o +0 -0
  266. data/ext/nutcracker/src/nc_response.c +4 -6
  267. data/ext/nutcracker/src/nc_response.o +0 -0
  268. data/ext/nutcracker/src/nc_server.c +14 -12
  269. data/ext/nutcracker/src/nc_server.h +0 -0
  270. data/ext/nutcracker/src/nc_server.o +0 -0
  271. data/ext/nutcracker/src/nc_signal.c +0 -0
  272. data/ext/nutcracker/src/nc_signal.h +0 -0
  273. data/ext/nutcracker/src/nc_signal.o +0 -0
  274. data/ext/nutcracker/src/nc_stats.c +16 -21
  275. data/ext/nutcracker/src/nc_stats.h +3 -4
  276. data/ext/nutcracker/src/nc_stats.o +0 -0
  277. data/ext/nutcracker/src/nc_string.c +0 -0
  278. data/ext/nutcracker/src/nc_string.h +0 -0
  279. data/ext/nutcracker/src/nc_string.o +0 -0
  280. data/ext/nutcracker/src/nc_util.c +16 -0
  281. data/ext/nutcracker/src/nc_util.h +1 -0
  282. data/ext/nutcracker/src/nc_util.o +0 -0
  283. data/ext/nutcracker/src/nutcracker +0 -0
  284. data/ext/nutcracker/src/proto/Makefile +454 -0
  285. data/ext/nutcracker/src/proto/Makefile.am +0 -0
  286. data/ext/nutcracker/src/proto/Makefile.in +32 -60
  287. data/ext/nutcracker/src/proto/libproto.a +0 -0
  288. data/ext/nutcracker/src/proto/nc_memcache.c +0 -0
  289. data/ext/nutcracker/src/proto/nc_memcache.o +0 -0
  290. data/ext/nutcracker/src/proto/nc_proto.h +0 -0
  291. data/ext/nutcracker/src/proto/nc_redis.c +17 -4
  292. data/ext/nutcracker/src/proto/nc_redis.o +0 -0
  293. data/ext/nutcracker/stamp-h1 +1 -0
  294. data/lib/nutcracker.rb +64 -2
  295. data/lib/nutcracker/version.rb +1 -1
  296. metadata +237 -9
@@ -1,9 +1,10 @@
1
1
  # Generated from ltmain.m4sh.
2
2
 
3
- # ltmain.sh (GNU libtool) 2.2.6
3
+ # libtool (GNU libtool) 2.2.10
4
4
  # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5
5
 
6
- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
6
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
7
+ # 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
7
8
  # This is free software; see the source for copying conditions. There is NO
8
9
  # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
10
 
@@ -32,50 +33,54 @@
32
33
  #
33
34
  # Provide generalized library-building support services.
34
35
  #
35
- # --config show all configuration variables
36
- # --debug enable verbose shell tracing
37
- # -n, --dry-run display commands without modifying any files
38
- # --features display basic configuration information and exit
39
- # --mode=MODE use operation mode MODE
40
- # --preserve-dup-deps don't remove duplicate dependency libraries
41
- # --quiet, --silent don't print informational messages
42
- # --tag=TAG use configuration variables from tag TAG
43
- # -v, --verbose print informational messages (default)
44
- # --version print version information
45
- # -h, --help print short or long help message
36
+ # --config show all configuration variables
37
+ # --debug enable verbose shell tracing
38
+ # -n, --dry-run display commands without modifying any files
39
+ # --features display basic configuration information and exit
40
+ # --mode=MODE use operation mode MODE
41
+ # --preserve-dup-deps don't remove duplicate dependency libraries
42
+ # --quiet, --silent don't print informational messages
43
+ # --no-quiet, --no-silent
44
+ # print informational messages (default)
45
+ # --tag=TAG use configuration variables from tag TAG
46
+ # -v, --verbose print more informational messages than default
47
+ # --no-verbose don't print the extra informational messages
48
+ # --version print version information
49
+ # -h, --help, --help-all print short, long, or detailed help message
46
50
  #
47
51
  # MODE must be one of the following:
48
52
  #
49
- # clean remove files from the build directory
50
- # compile compile a source file into a libtool object
51
- # execute automatically set library path, then run a program
52
- # finish complete the installation of libtool libraries
53
- # install install libraries or executables
54
- # link create a library or an executable
55
- # uninstall remove libraries from an installed directory
53
+ # clean remove files from the build directory
54
+ # compile compile a source file into a libtool object
55
+ # execute automatically set library path, then run a program
56
+ # finish complete the installation of libtool libraries
57
+ # install install libraries or executables
58
+ # link create a library or an executable
59
+ # uninstall remove libraries from an installed directory
56
60
  #
57
- # MODE-ARGS vary depending on the MODE.
61
+ # MODE-ARGS vary depending on the MODE. When passed as first option,
62
+ # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
58
63
  # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
59
64
  #
60
65
  # When reporting a bug, please describe a test case to reproduce it and
61
66
  # include the following information:
62
67
  #
63
- # host-triplet: $host
64
- # shell: $SHELL
65
- # compiler: $LTCC
66
- # compiler flags: $LTCFLAGS
67
- # linker: $LD (gnu? $with_gnu_ld)
68
- # $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4
69
- # automake: $automake_version
70
- # autoconf: $autoconf_version
68
+ # host-triplet: $host
69
+ # shell: $SHELL
70
+ # compiler: $LTCC
71
+ # compiler flags: $LTCFLAGS
72
+ # linker: $LD (gnu? $with_gnu_ld)
73
+ # $progname: (GNU libtool) 2.2.10
74
+ # automake: $automake_version
75
+ # autoconf: $autoconf_version
71
76
  #
72
77
  # Report bugs to <bug-libtool@gnu.org>.
73
78
 
74
- PROGRAM=ltmain.sh
79
+ PROGRAM=libtool
75
80
  PACKAGE=libtool
76
- VERSION="2.2.6 Debian-2.2.6a-4"
81
+ VERSION=2.2.10
77
82
  TIMESTAMP=""
78
- package_revision=1.3012
83
+ package_revision=1.3175
79
84
 
80
85
  # Be Bourne compatible
81
86
  if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -91,10 +96,15 @@ fi
91
96
  BIN_SH=xpg4; export BIN_SH # for Tru64
92
97
  DUALCASE=1; export DUALCASE # for MKS sh
93
98
 
99
+ # A function that is used when there is no print builtin or printf.
100
+ func_fallback_echo ()
101
+ {
102
+ eval 'cat <<_LTECHO_EOF
103
+ $1
104
+ _LTECHO_EOF'
105
+ }
106
+
94
107
  # NLS nuisances: We save the old values to restore during execute mode.
95
- # Only set LANG and LC_ALL to C if already set.
96
- # These must not be set unconditionally because not all systems understand
97
- # e.g. LANG=C (notably SCO).
98
108
  lt_user_locale=
99
109
  lt_safe_locale=
100
110
  for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
@@ -107,24 +117,33 @@ do
107
117
  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
108
118
  fi"
109
119
  done
120
+ LC_ALL=C
121
+ LANGUAGE=C
122
+ export LANGUAGE LC_ALL
110
123
 
111
124
  $lt_unset CDPATH
112
125
 
113
126
 
127
+ # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
128
+ # is ksh but when the shell is invoked as "sh" and the current value of
129
+ # the _XPG environment variable is not equal to 1 (one), the special
130
+ # positional parameter $0, within a function call, is the name of the
131
+ # function.
132
+ progpath="$0"
114
133
 
115
134
 
116
135
 
117
136
  : ${CP="cp -f"}
118
- : ${ECHO="echo"}
119
- : ${EGREP="/bin/grep -E"}
120
- : ${FGREP="/bin/grep -F"}
121
- : ${GREP="/bin/grep"}
137
+ test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
138
+ : ${EGREP="/usr/bin/grep -E"}
139
+ : ${FGREP="/usr/bin/grep -F"}
140
+ : ${GREP="/usr/bin/grep"}
122
141
  : ${LN_S="ln -s"}
123
142
  : ${MAKE="make"}
124
143
  : ${MKDIR="mkdir"}
125
144
  : ${MV="mv -f"}
126
145
  : ${RM="rm -f"}
127
- : ${SED="/bin/sed"}
146
+ : ${SED="/usr/bin/sed"}
128
147
  : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
129
148
  : ${Xsed="$SED -e 1s/^X//"}
130
149
 
@@ -159,32 +178,168 @@ basename="s,^.*/,,"
159
178
  func_dirname_and_basename ()
160
179
  {
161
180
  # Extract subdirectory from the argument.
162
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
181
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
163
182
  if test "X$func_dirname_result" = "X${1}"; then
164
183
  func_dirname_result="${3}"
165
184
  else
166
185
  func_dirname_result="$func_dirname_result${2}"
167
186
  fi
168
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
187
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
169
188
  }
170
189
 
171
190
  # Generated shell functions inserted here.
172
191
 
173
- # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
174
- # is ksh but when the shell is invoked as "sh" and the current value of
175
- # the _XPG environment variable is not equal to 1 (one), the special
176
- # positional parameter $0, within a function call, is the name of the
177
- # function.
178
- progpath="$0"
192
+ # These SED scripts presuppose an absolute path with a trailing slash.
193
+ pathcar='s,^/\([^/]*\).*$,\1,'
194
+ pathcdr='s,^/[^/]*,,'
195
+ removedotparts=':dotsl
196
+ s@/\./@/@g
197
+ t dotsl
198
+ s,/\.$,/,'
199
+ collapseslashes='s@/\{1,\}@/@g'
200
+ finalslash='s,/*$,/,'
201
+
202
+ # func_normal_abspath PATH
203
+ # Remove doubled-up and trailing slashes, "." path components,
204
+ # and cancel out any ".." path components in PATH after making
205
+ # it an absolute path.
206
+ # value returned in "$func_normal_abspath_result"
207
+ func_normal_abspath ()
208
+ {
209
+ # Start from root dir and reassemble the path.
210
+ func_normal_abspath_result=
211
+ func_normal_abspath_tpath=$1
212
+ func_normal_abspath_altnamespace=
213
+ case $func_normal_abspath_tpath in
214
+ "")
215
+ # Empty path, that just means $cwd.
216
+ func_stripname '' '/' "`pwd`"
217
+ func_normal_abspath_result=$func_stripname_result
218
+ return
219
+ ;;
220
+ # The next three entries are used to spot a run of precisely
221
+ # two leading slashes without using negated character classes;
222
+ # we take advantage of case's first-match behaviour.
223
+ ///*)
224
+ # Unusual form of absolute path, do nothing.
225
+ ;;
226
+ //*)
227
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
228
+ # and for example Cygwin uses it to access remote file shares
229
+ # over CIFS/SMB, so we conserve a leading double slash if found.
230
+ func_normal_abspath_altnamespace=/
231
+ ;;
232
+ /*)
233
+ # Absolute path, do nothing.
234
+ ;;
235
+ *)
236
+ # Relative path, prepend $cwd.
237
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
238
+ ;;
239
+ esac
240
+ # Cancel out all the simple stuff to save iterations. We also want
241
+ # the path to end with a slash for ease of parsing, so make sure
242
+ # there is one (and only one) here.
243
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
244
+ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
245
+ while :; do
246
+ # Processed it all yet?
247
+ if test "$func_normal_abspath_tpath" = / ; then
248
+ # If we ascended to the root using ".." the result may be empty now.
249
+ if test -z "$func_normal_abspath_result" ; then
250
+ func_normal_abspath_result=/
251
+ fi
252
+ break
253
+ fi
254
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
255
+ -e "$pathcar"`
256
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
257
+ -e "$pathcdr"`
258
+ # Figure out what to do with it
259
+ case $func_normal_abspath_tcomponent in
260
+ "")
261
+ # Trailing empty path component, ignore it.
262
+ ;;
263
+ ..)
264
+ # Parent dir; strip last assembled component from result.
265
+ func_dirname "$func_normal_abspath_result"
266
+ func_normal_abspath_result=$func_dirname_result
267
+ ;;
268
+ *)
269
+ # Actual path component, append it.
270
+ func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
271
+ ;;
272
+ esac
273
+ done
274
+ # Restore leading double-slash if one was found on entry.
275
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
276
+ }
277
+
278
+ # func_relative_path SRCDIR DSTDIR
279
+ # generates a relative path from SRCDIR to DSTDIR, with a trailing
280
+ # slash if non-empty, suitable for immediately appending a filename
281
+ # without needing to append a separator.
282
+ # value returned in "$func_relative_path_result"
283
+ func_relative_path ()
284
+ {
285
+ func_relative_path_result=
286
+ func_normal_abspath "$1"
287
+ func_relative_path_tlibdir=$func_normal_abspath_result
288
+ func_normal_abspath "$2"
289
+ func_relative_path_tbindir=$func_normal_abspath_result
290
+
291
+ # Ascend the tree starting from libdir
292
+ while :; do
293
+ # check if we have found a prefix of bindir
294
+ case $func_relative_path_tbindir in
295
+ $func_relative_path_tlibdir)
296
+ # found an exact match
297
+ func_relative_path_tcancelled=
298
+ break
299
+ ;;
300
+ $func_relative_path_tlibdir*)
301
+ # found a matching prefix
302
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
303
+ func_relative_path_tcancelled=$func_stripname_result
304
+ if test -z "$func_relative_path_result"; then
305
+ func_relative_path_result=.
306
+ fi
307
+ break
308
+ ;;
309
+ *)
310
+ func_dirname $func_relative_path_tlibdir
311
+ func_relative_path_tlibdir=${func_dirname_result}
312
+ if test "x$func_relative_path_tlibdir" = x ; then
313
+ # Have to descend all the way to the root!
314
+ func_relative_path_result=../$func_relative_path_result
315
+ func_relative_path_tcancelled=$func_relative_path_tbindir
316
+ break
317
+ fi
318
+ func_relative_path_result=../$func_relative_path_result
319
+ ;;
320
+ esac
321
+ done
322
+
323
+ # Now calculate path; take care to avoid doubling-up slashes.
324
+ func_stripname '' '/' "$func_relative_path_result"
325
+ func_relative_path_result=$func_stripname_result
326
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
327
+ if test "x$func_stripname_result" != x ; then
328
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
329
+ fi
330
+
331
+ # Normalisation. If bindir is libdir, return empty string,
332
+ # else relative path ending with a slash; either way, target
333
+ # file name can be directly appended.
334
+ if test ! -z "$func_relative_path_result"; then
335
+ func_stripname './' '' "$func_relative_path_result/"
336
+ func_relative_path_result=$func_stripname_result
337
+ fi
338
+ }
179
339
 
180
340
  # The name of this program:
181
- # In the unlikely event $progname began with a '-', it would play havoc with
182
- # func_echo (imagine progname=-n), so we prepend ./ in that case:
183
341
  func_dirname_and_basename "$progpath"
184
342
  progname=$func_basename_result
185
- case $progname in
186
- -*) progname=./$progname ;;
187
- esac
188
343
 
189
344
  # Make sure we have an absolute path for reexecution:
190
345
  case $progpath in
@@ -258,6 +413,13 @@ func_verbose ()
258
413
  :
259
414
  }
260
415
 
416
+ # func_echo_all arg...
417
+ # Invoke $ECHO with all args, space-separated.
418
+ func_echo_all ()
419
+ {
420
+ $ECHO "$*"
421
+ }
422
+
261
423
  # func_error arg...
262
424
  # Echo program name prefixed message to standard error.
263
425
  func_error ()
@@ -326,9 +488,9 @@ func_mkdir_p ()
326
488
  case $my_directory_path in */*) ;; *) break ;; esac
327
489
 
328
490
  # ...otherwise throw away the child directory and loop
329
- my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
491
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
330
492
  done
331
- my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
493
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
332
494
 
333
495
  save_mkdir_p_IFS="$IFS"; IFS=':'
334
496
  for my_dir in $my_dir_list; do
@@ -378,7 +540,7 @@ func_mktempdir ()
378
540
  func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
379
541
  fi
380
542
 
381
- $ECHO "X$my_tmpdir" | $Xsed
543
+ $ECHO "$my_tmpdir"
382
544
  }
383
545
 
384
546
 
@@ -392,7 +554,7 @@ func_quote_for_eval ()
392
554
  {
393
555
  case $1 in
394
556
  *[\\\`\"\$]*)
395
- func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
557
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
396
558
  *)
397
559
  func_quote_for_eval_unquoted_result="$1" ;;
398
560
  esac
@@ -419,7 +581,7 @@ func_quote_for_expand ()
419
581
  {
420
582
  case $1 in
421
583
  *[\\\`\"]*)
422
- my_arg=`$ECHO "X$1" | $Xsed \
584
+ my_arg=`$ECHO "$1" | $SED \
423
585
  -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
424
586
  *)
425
587
  my_arg="$1" ;;
@@ -489,14 +651,19 @@ func_show_eval_locale ()
489
651
  }
490
652
 
491
653
 
492
-
493
-
494
-
495
654
  # func_version
496
655
  # Echo version message to standard output and exit.
497
656
  func_version ()
498
657
  {
499
- $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
658
+ $SED -n '/(C)/!b go
659
+ :more
660
+ /\./!{
661
+ N
662
+ s/\n# / /
663
+ b more
664
+ }
665
+ :go
666
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
500
667
  s/^# //
501
668
  s/^# *$//
502
669
  s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
@@ -509,19 +676,20 @@ func_version ()
509
676
  # Echo short help message to standard output and exit.
510
677
  func_usage ()
511
678
  {
512
- $SED -n '/^# Usage:/,/# -h/ {
679
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
513
680
  s/^# //
514
681
  s/^# *$//
515
682
  s/\$progname/'$progname'/
516
683
  p
517
684
  }' < "$progpath"
518
- $ECHO
685
+ echo
519
686
  $ECHO "run \`$progname --help | more' for full usage"
520
687
  exit $?
521
688
  }
522
689
 
523
- # func_help
524
- # Echo long help message to standard output and exit.
690
+ # func_help [NOEXIT]
691
+ # Echo long help message to standard output and exit,
692
+ # unless 'noexit' is passed as argument.
525
693
  func_help ()
526
694
  {
527
695
  $SED -n '/^# Usage:/,/# Report bugs to/ {
@@ -538,7 +706,10 @@ func_help ()
538
706
  s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
539
707
  p
540
708
  }' < "$progpath"
541
- exit $?
709
+ ret=$?
710
+ if test -z "$1"; then
711
+ exit $ret
712
+ fi
542
713
  }
543
714
 
544
715
  # func_missing_arg argname
@@ -546,7 +717,7 @@ func_help ()
546
717
  # exit_cmd.
547
718
  func_missing_arg ()
548
719
  {
549
- func_error "missing argument for $1"
720
+ func_error "missing argument for $1."
550
721
  exit_cmd=exit
551
722
  }
552
723
 
@@ -556,29 +727,6 @@ exit_cmd=:
556
727
 
557
728
 
558
729
 
559
- # Check that we have a working $ECHO.
560
- if test "X$1" = X--no-reexec; then
561
- # Discard the --no-reexec flag, and continue.
562
- shift
563
- elif test "X$1" = X--fallback-echo; then
564
- # Avoid inline document here, it may be left over
565
- :
566
- elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
567
- # Yippee, $ECHO works!
568
- :
569
- else
570
- # Restart under the correct shell, and then maybe $ECHO will work.
571
- exec $SHELL "$progpath" --no-reexec ${1+"$@"}
572
- fi
573
-
574
- if test "X$1" = X--fallback-echo; then
575
- # used as fallback echo
576
- shift
577
- cat <<EOF
578
- $*
579
- EOF
580
- exit $EXIT_SUCCESS
581
- fi
582
730
 
583
731
  magic="%%%MAGIC variable%%%"
584
732
  magic_exe="%%%MAGIC EXE variable%%%"
@@ -636,16 +784,16 @@ func_config ()
636
784
  # Display the features supported by this script.
637
785
  func_features ()
638
786
  {
639
- $ECHO "host: $host"
787
+ echo "host: $host"
640
788
  if test "$build_libtool_libs" = yes; then
641
- $ECHO "enable shared libraries"
789
+ echo "enable shared libraries"
642
790
  else
643
- $ECHO "disable shared libraries"
791
+ echo "disable shared libraries"
644
792
  fi
645
793
  if test "$build_old_libs" = yes; then
646
- $ECHO "enable static libraries"
794
+ echo "enable static libraries"
647
795
  else
648
- $ECHO "disable static libraries"
796
+ echo "disable static libraries"
649
797
  fi
650
798
 
651
799
  exit $?
@@ -772,10 +920,21 @@ func_enable_tag ()
772
920
 
773
921
  --quiet|--silent) preserve_args="$preserve_args $opt"
774
922
  opt_silent=:
923
+ opt_verbose=false
924
+ ;;
925
+
926
+ --no-quiet|--no-silent)
927
+ preserve_args="$preserve_args $opt"
928
+ opt_silent=false
775
929
  ;;
776
930
 
777
931
  --verbose| -v) preserve_args="$preserve_args $opt"
778
932
  opt_silent=false
933
+ opt_verbose=:
934
+ ;;
935
+
936
+ --no-verbose) preserve_args="$preserve_args $opt"
937
+ opt_verbose=false
779
938
  ;;
780
939
 
781
940
  --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
@@ -793,6 +952,7 @@ func_enable_tag ()
793
952
 
794
953
  -\?|-h) func_usage ;;
795
954
  --help) opt_help=: ;;
955
+ --help-all) opt_help=': help-all' ;;
796
956
  --version) func_version ;;
797
957
 
798
958
  -*) func_fatal_help "unrecognized option \`$opt'" ;;
@@ -1016,10 +1176,13 @@ func_infer_tag ()
1016
1176
  func_quote_for_eval "$arg"
1017
1177
  CC_quoted="$CC_quoted $func_quote_for_eval_result"
1018
1178
  done
1179
+ CC_expanded=`func_echo_all $CC`
1180
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
1019
1181
  case $@ in
1020
1182
  # Blanks in the command may have been stripped by the calling shell,
1021
1183
  # but not from the CC environment variable when configure was run.
1022
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1184
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1185
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
1023
1186
  # Blanks at the start of $base_compile will cause this to fail
1024
1187
  # if we don't check for them as well.
1025
1188
  *)
@@ -1033,8 +1196,11 @@ func_infer_tag ()
1033
1196
  func_quote_for_eval "$arg"
1034
1197
  CC_quoted="$CC_quoted $func_quote_for_eval_result"
1035
1198
  done
1199
+ CC_expanded=`func_echo_all $CC`
1200
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
1036
1201
  case "$@ " in
1037
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1202
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1203
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
1038
1204
  # The compiler in the base compile command matches
1039
1205
  # the one in the tagged configuration.
1040
1206
  # Assume this is the tagged configuration we want.
@@ -1213,7 +1379,7 @@ func_mode_compile ()
1213
1379
  *.[cCFSifmso] | \
1214
1380
  *.ada | *.adb | *.ads | *.asm | \
1215
1381
  *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1216
- *.[fF][09]? | *.for | *.java | *.obj | *.sx)
1382
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
1217
1383
  func_xform "$libobj"
1218
1384
  libobj=$func_xform_result
1219
1385
  ;;
@@ -1288,7 +1454,7 @@ func_mode_compile ()
1288
1454
  # Calculate the filename of the output object if compiler does
1289
1455
  # not support -o with -c
1290
1456
  if test "$compiler_c_o" = no; then
1291
- output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1457
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
1292
1458
  lockfile="$output_obj.lock"
1293
1459
  else
1294
1460
  output_obj=
@@ -1445,7 +1611,7 @@ compiler."
1445
1611
  }
1446
1612
 
1447
1613
  $opt_help || {
1448
- test "$mode" = compile && func_mode_compile ${1+"$@"}
1614
+ test "$mode" = compile && func_mode_compile ${1+"$@"}
1449
1615
  }
1450
1616
 
1451
1617
  func_mode_help ()
@@ -1482,10 +1648,11 @@ This mode accepts the following additional options:
1482
1648
 
1483
1649
  -o OUTPUT-FILE set the output file name to OUTPUT-FILE
1484
1650
  -no-suppress do not suppress compiler output for multiple passes
1485
- -prefer-pic try to building PIC objects only
1486
- -prefer-non-pic try to building non-PIC objects only
1651
+ -prefer-pic try to build PIC objects only
1652
+ -prefer-non-pic try to build non-PIC objects only
1487
1653
  -shared do not build a \`.o' file suitable for static linking
1488
1654
  -static only build a \`.o' file suitable for static linking
1655
+ -Wc,FLAG pass FLAG directly to the compiler
1489
1656
 
1490
1657
  COMPILE-COMMAND is a command to be used in creating a \`standard' object file
1491
1658
  from the given SOURCEFILE.
@@ -1538,7 +1705,7 @@ either the \`install' or \`cp' program.
1538
1705
 
1539
1706
  The following components of INSTALL-COMMAND are treated specially:
1540
1707
 
1541
- -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
1708
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
1542
1709
 
1543
1710
  The rest of the components are interpreted as arguments to that command (only
1544
1711
  BSD-compatible install options are recognized)."
@@ -1558,6 +1725,8 @@ The following components of LINK-COMMAND are treated specially:
1558
1725
 
1559
1726
  -all-static do not do any dynamic linking at all
1560
1727
  -avoid-version do not add a version suffix if possible
1728
+ -bindir BINDIR specify path to binaries directory (for systems where
1729
+ libraries must be found in the PATH setting at runtime)
1561
1730
  -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
1562
1731
  -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
1563
1732
  -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
@@ -1586,6 +1755,11 @@ The following components of LINK-COMMAND are treated specially:
1586
1755
  -version-info CURRENT[:REVISION[:AGE]]
1587
1756
  specify library version info [each variable defaults to 0]
1588
1757
  -weak LIBNAME declare that the target provides the LIBNAME interface
1758
+ -Wc,FLAG
1759
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
1760
+ -Wl,FLAG
1761
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
1762
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
1589
1763
 
1590
1764
  All other options (arguments beginning with \`-') are ignored.
1591
1765
 
@@ -1623,14 +1797,40 @@ Otherwise, only FILE itself is deleted using RM."
1623
1797
  ;;
1624
1798
  esac
1625
1799
 
1626
- $ECHO
1800
+ echo
1627
1801
  $ECHO "Try \`$progname --help' for more information about other modes."
1628
-
1629
- exit $?
1630
1802
  }
1631
1803
 
1632
- # Now that we've collected a possible --mode arg, show help if necessary
1633
- $opt_help && func_mode_help
1804
+ # Now that we've collected a possible --mode arg, show help if necessary
1805
+ if $opt_help; then
1806
+ if test "$opt_help" = :; then
1807
+ func_mode_help
1808
+ else
1809
+ {
1810
+ func_help noexit
1811
+ for mode in compile link execute install finish uninstall clean; do
1812
+ func_mode_help
1813
+ done
1814
+ } | sed -n '1p; 2,$s/^Usage:/ or: /p'
1815
+ {
1816
+ func_help noexit
1817
+ for mode in compile link execute install finish uninstall clean; do
1818
+ echo
1819
+ func_mode_help
1820
+ done
1821
+ } |
1822
+ sed '1d
1823
+ /^When reporting/,/^Report/{
1824
+ H
1825
+ d
1826
+ }
1827
+ $x
1828
+ /information about other modes/d
1829
+ /more detailed .*MODE/d
1830
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
1831
+ fi
1832
+ exit $?
1833
+ fi
1634
1834
 
1635
1835
 
1636
1836
  # func_mode_execute arg...
@@ -1712,7 +1912,7 @@ func_mode_execute ()
1712
1912
  for file
1713
1913
  do
1714
1914
  case $file in
1715
- -*) ;;
1915
+ -* | *.la | *.lo ) ;;
1716
1916
  *)
1717
1917
  # Do a test to see if this is really a libtool program.
1718
1918
  if func_ltwrapper_script_p "$file"; then
@@ -1754,7 +1954,7 @@ func_mode_execute ()
1754
1954
  # Display what would be done.
1755
1955
  if test -n "$shlibpath_var"; then
1756
1956
  eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1757
- $ECHO "export $shlibpath_var"
1957
+ echo "export $shlibpath_var"
1758
1958
  fi
1759
1959
  $ECHO "$cmd$args"
1760
1960
  exit $EXIT_SUCCESS
@@ -1795,23 +1995,23 @@ func_mode_finish ()
1795
1995
  # Exit here if they wanted silent mode.
1796
1996
  $opt_silent && exit $EXIT_SUCCESS
1797
1997
 
1798
- $ECHO "X----------------------------------------------------------------------" | $Xsed
1799
- $ECHO "Libraries have been installed in:"
1998
+ echo "----------------------------------------------------------------------"
1999
+ echo "Libraries have been installed in:"
1800
2000
  for libdir in $libdirs; do
1801
2001
  $ECHO " $libdir"
1802
2002
  done
1803
- $ECHO
1804
- $ECHO "If you ever happen to want to link against installed libraries"
1805
- $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1806
- $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1807
- $ECHO "flag during linking and do at least one of the following:"
2003
+ echo
2004
+ echo "If you ever happen to want to link against installed libraries"
2005
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
2006
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2007
+ echo "flag during linking and do at least one of the following:"
1808
2008
  if test -n "$shlibpath_var"; then
1809
- $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1810
- $ECHO " during execution"
2009
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2010
+ echo " during execution"
1811
2011
  fi
1812
2012
  if test -n "$runpath_var"; then
1813
- $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1814
- $ECHO " during linking"
2013
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
2014
+ echo " during linking"
1815
2015
  fi
1816
2016
  if test -n "$hardcode_libdir_flag_spec"; then
1817
2017
  libdir=LIBDIR
@@ -1823,21 +2023,21 @@ func_mode_finish ()
1823
2023
  $ECHO " - have your system administrator run these commands:$admincmds"
1824
2024
  fi
1825
2025
  if test -f /etc/ld.so.conf; then
1826
- $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2026
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1827
2027
  fi
1828
- $ECHO
2028
+ echo
1829
2029
 
1830
- $ECHO "See any operating system documentation about shared libraries for"
2030
+ echo "See any operating system documentation about shared libraries for"
1831
2031
  case $host in
1832
2032
  solaris2.[6789]|solaris2.1[0-9])
1833
- $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1834
- $ECHO "pages."
2033
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2034
+ echo "pages."
1835
2035
  ;;
1836
2036
  *)
1837
- $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
2037
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
1838
2038
  ;;
1839
2039
  esac
1840
- $ECHO "X----------------------------------------------------------------------" | $Xsed
2040
+ echo "----------------------------------------------------------------------"
1841
2041
  exit $EXIT_SUCCESS
1842
2042
  }
1843
2043
 
@@ -1852,7 +2052,7 @@ func_mode_install ()
1852
2052
  # install_prog (especially on Windows NT).
1853
2053
  if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
1854
2054
  # Allow the use of GNU shtool's install command.
1855
- $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
2055
+ case $nonopt in *shtool*) :;; *) false;; esac; then
1856
2056
  # Aesthetically quote it.
1857
2057
  func_quote_for_eval "$nonopt"
1858
2058
  install_prog="$func_quote_for_eval_result "
@@ -1867,6 +2067,11 @@ func_mode_install ()
1867
2067
  # Aesthetically quote it.
1868
2068
  func_quote_for_eval "$arg"
1869
2069
  install_prog="$install_prog$func_quote_for_eval_result"
2070
+ install_shared_prog=$install_prog
2071
+ case " $install_prog " in
2072
+ *[\\\ /]cp\ *) install_cp=: ;;
2073
+ *) install_cp=false ;;
2074
+ esac
1870
2075
 
1871
2076
  # We need to accept at least all the BSD install flags.
1872
2077
  dest=
@@ -1876,8 +2081,10 @@ func_mode_install ()
1876
2081
  install_type=
1877
2082
  isdir=no
1878
2083
  stripme=
2084
+ no_mode=:
1879
2085
  for arg
1880
2086
  do
2087
+ arg2=
1881
2088
  if test -n "$dest"; then
1882
2089
  files="$files $dest"
1883
2090
  dest=$arg
@@ -1887,10 +2094,9 @@ func_mode_install ()
1887
2094
  case $arg in
1888
2095
  -d) isdir=yes ;;
1889
2096
  -f)
1890
- case " $install_prog " in
1891
- *[\\\ /]cp\ *) ;;
1892
- *) prev=$arg ;;
1893
- esac
2097
+ if $install_cp; then :; else
2098
+ prev=$arg
2099
+ fi
1894
2100
  ;;
1895
2101
  -g | -m | -o)
1896
2102
  prev=$arg
@@ -1904,6 +2110,10 @@ func_mode_install ()
1904
2110
  *)
1905
2111
  # If the previous option needed an argument, then skip it.
1906
2112
  if test -n "$prev"; then
2113
+ if test "x$prev" = x-m && test -n "$install_override_mode"; then
2114
+ arg2=$install_override_mode
2115
+ no_mode=false
2116
+ fi
1907
2117
  prev=
1908
2118
  else
1909
2119
  dest=$arg
@@ -1915,6 +2125,10 @@ func_mode_install ()
1915
2125
  # Aesthetically quote the argument.
1916
2126
  func_quote_for_eval "$arg"
1917
2127
  install_prog="$install_prog $func_quote_for_eval_result"
2128
+ if test -n "$arg2"; then
2129
+ func_quote_for_eval "$arg2"
2130
+ fi
2131
+ install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
1918
2132
  done
1919
2133
 
1920
2134
  test -z "$install_prog" && \
@@ -1923,6 +2137,13 @@ func_mode_install ()
1923
2137
  test -n "$prev" && \
1924
2138
  func_fatal_help "the \`$prev' option requires an argument"
1925
2139
 
2140
+ if test -n "$install_override_mode" && $no_mode; then
2141
+ if $install_cp; then :; else
2142
+ func_quote_for_eval "$install_override_mode"
2143
+ install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
2144
+ fi
2145
+ fi
2146
+
1926
2147
  if test -z "$files"; then
1927
2148
  if test -z "$dest"; then
1928
2149
  func_fatal_help "no file or destination specified"
@@ -2010,7 +2231,7 @@ func_mode_install ()
2010
2231
 
2011
2232
  if test -n "$relink_command"; then
2012
2233
  # Determine the prefix the user has applied to our future dir.
2013
- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2234
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
2014
2235
 
2015
2236
  # Don't allow the user to place us outside of our expected
2016
2237
  # location b/c this prevents finding dependent libraries that
@@ -2023,9 +2244,9 @@ func_mode_install ()
2023
2244
 
2024
2245
  if test -n "$inst_prefix_dir"; then
2025
2246
  # Stick the inst_prefix_dir data into the link command.
2026
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2247
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2027
2248
  else
2028
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2249
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
2029
2250
  fi
2030
2251
 
2031
2252
  func_warning "relinking \`$file'"
@@ -2043,7 +2264,7 @@ func_mode_install ()
2043
2264
  test -n "$relink_command" && srcname="$realname"T
2044
2265
 
2045
2266
  # Install the shared library and build the symlinks.
2046
- func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
2267
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
2047
2268
  'exit $?'
2048
2269
  tstripme="$stripme"
2049
2270
  case $host_os in
@@ -2183,7 +2404,7 @@ func_mode_install ()
2183
2404
  if test -f "$lib"; then
2184
2405
  func_source "$lib"
2185
2406
  fi
2186
- libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
2407
+ libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
2187
2408
  if test -n "$libdir" && test ! -f "$libfile"; then
2188
2409
  func_warning "\`$lib' has not been installed in \`$libdir'"
2189
2410
  finalize=no
@@ -2202,7 +2423,7 @@ func_mode_install ()
2202
2423
  file="$func_basename_result"
2203
2424
  outputname="$tmpdir/$file"
2204
2425
  # Replace the output file specification.
2205
- relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
2426
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
2206
2427
 
2207
2428
  $opt_silent || {
2208
2429
  func_quote_for_expand "$relink_command"
@@ -2221,7 +2442,7 @@ func_mode_install ()
2221
2442
  }
2222
2443
  else
2223
2444
  # Install the binary that we compiled earlier.
2224
- file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
2445
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
2225
2446
  fi
2226
2447
  fi
2227
2448
 
@@ -2323,6 +2544,10 @@ func_generate_dlsyms ()
2323
2544
  extern \"C\" {
2324
2545
  #endif
2325
2546
 
2547
+ #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
2548
+ #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
2549
+ #endif
2550
+
2326
2551
  /* External symbol declarations for the compiler. */\
2327
2552
  "
2328
2553
 
@@ -2332,7 +2557,7 @@ extern \"C\" {
2332
2557
  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
2333
2558
 
2334
2559
  # Add our own program objects to the symbol list.
2335
- progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2560
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
2336
2561
  for progfile in $progfiles; do
2337
2562
  func_verbose "extracting global C symbols from \`$progfile'"
2338
2563
  $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
@@ -2371,7 +2596,7 @@ extern \"C\" {
2371
2596
  eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
2372
2597
  eval '$MV "$nlist"T "$nlist"'
2373
2598
  case $host in
2374
- *cygwin | *mingw* | *cegcc* )
2599
+ *cygwin* | *mingw* | *cegcc* )
2375
2600
  eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
2376
2601
  eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
2377
2602
  ;;
@@ -2415,10 +2640,10 @@ extern \"C\" {
2415
2640
  if test -f "$nlist"S; then
2416
2641
  eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
2417
2642
  else
2418
- $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
2643
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
2419
2644
  fi
2420
2645
 
2421
- $ECHO >> "$output_objdir/$my_dlsyms" "\
2646
+ echo >> "$output_objdir/$my_dlsyms" "\
2422
2647
 
2423
2648
  /* The mapping between symbol names and symbols. */
2424
2649
  typedef struct {
@@ -2428,7 +2653,7 @@ typedef struct {
2428
2653
  "
2429
2654
  case $host in
2430
2655
  *cygwin* | *mingw* | *cegcc* )
2431
- $ECHO >> "$output_objdir/$my_dlsyms" "\
2656
+ echo >> "$output_objdir/$my_dlsyms" "\
2432
2657
  /* DATA imports from DLLs on WIN32 con't be const, because
2433
2658
  runtime relocations are performed -- see ld's documentation
2434
2659
  on pseudo-relocs. */"
@@ -2441,7 +2666,7 @@ typedef struct {
2441
2666
  lt_dlsym_const=const ;;
2442
2667
  esac
2443
2668
 
2444
- $ECHO >> "$output_objdir/$my_dlsyms" "\
2669
+ echo >> "$output_objdir/$my_dlsyms" "\
2445
2670
  extern $lt_dlsym_const lt_dlsymlist
2446
2671
  lt_${my_prefix}_LTX_preloaded_symbols[];
2447
2672
  $lt_dlsym_const lt_dlsymlist
@@ -2457,7 +2682,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] =
2457
2682
  eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
2458
2683
  ;;
2459
2684
  esac
2460
- $ECHO >> "$output_objdir/$my_dlsyms" "\
2685
+ echo >> "$output_objdir/$my_dlsyms" "\
2461
2686
  {0, (void *) 0}
2462
2687
  };
2463
2688
 
@@ -2515,16 +2740,16 @@ static const void *lt_preloaded_setup() {
2515
2740
  case $host in
2516
2741
  *cygwin* | *mingw* | *cegcc* )
2517
2742
  if test -f "$output_objdir/$my_outputname.def"; then
2518
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2519
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2743
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2744
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2520
2745
  else
2521
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2522
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2746
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2747
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2523
2748
  fi
2524
2749
  ;;
2525
2750
  *)
2526
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2527
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2751
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2752
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
2528
2753
  ;;
2529
2754
  esac
2530
2755
  ;;
@@ -2538,8 +2763,8 @@ static const void *lt_preloaded_setup() {
2538
2763
  # really was required.
2539
2764
 
2540
2765
  # Nullify the symbol file.
2541
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2542
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2766
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
2767
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
2543
2768
  fi
2544
2769
  }
2545
2770
 
@@ -2549,6 +2774,7 @@ static const void *lt_preloaded_setup() {
2549
2774
  # Need a lot of goo to handle *both* DLLs and import libs
2550
2775
  # Has to be a shell function in order to 'eat' the argument
2551
2776
  # that is supplied when $file_magic_command is called.
2777
+ # Despite the name, also deal with 64 bit binaries.
2552
2778
  func_win32_libid ()
2553
2779
  {
2554
2780
  $opt_debug
@@ -2559,8 +2785,9 @@ func_win32_libid ()
2559
2785
  win32_libid_type="x86 archive import"
2560
2786
  ;;
2561
2787
  *ar\ archive*) # could be an import, or static
2788
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
2562
2789
  if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2563
- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2790
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
2564
2791
  win32_nmres=`eval $NM -f posix -A $1 |
2565
2792
  $SED -n -e '
2566
2793
  1,100{
@@ -2598,7 +2825,18 @@ func_extract_an_archive ()
2598
2825
  $opt_debug
2599
2826
  f_ex_an_ar_dir="$1"; shift
2600
2827
  f_ex_an_ar_oldlib="$1"
2601
- func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
2828
+ if test "$lock_old_archive_extraction" = yes; then
2829
+ lockfile=$f_ex_an_ar_oldlib.lock
2830
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
2831
+ func_echo "Waiting for $lockfile to be removed"
2832
+ sleep 2
2833
+ done
2834
+ fi
2835
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
2836
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
2837
+ if test "$lock_old_archive_extraction" = yes; then
2838
+ $opt_dry_run || rm -f "$lockfile"
2839
+ fi
2602
2840
  if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
2603
2841
  :
2604
2842
  else
@@ -2669,7 +2907,7 @@ func_extract_archives ()
2669
2907
  darwin_file=
2670
2908
  darwin_files=
2671
2909
  for darwin_file in $darwin_filelist; do
2672
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
2910
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
2673
2911
  $LIPO -create -output "$darwin_file" $darwin_files
2674
2912
  done # $darwin_filelist
2675
2913
  $RM -rf unfat-$$
@@ -2684,25 +2922,30 @@ func_extract_archives ()
2684
2922
  func_extract_an_archive "$my_xdir" "$my_xabs"
2685
2923
  ;;
2686
2924
  esac
2687
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
2925
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
2688
2926
  done
2689
2927
 
2690
2928
  func_extract_archives_result="$my_oldobjs"
2691
2929
  }
2692
2930
 
2693
2931
 
2694
-
2695
- # func_emit_wrapper_part1 [arg=no]
2932
+ # func_emit_wrapper [arg=no]
2696
2933
  #
2697
- # Emit the first part of a libtool wrapper script on stdout.
2698
- # For more information, see the description associated with
2699
- # func_emit_wrapper(), below.
2700
- func_emit_wrapper_part1 ()
2934
+ # Emit a libtool wrapper script on stdout.
2935
+ # Don't directly open a file because we may want to
2936
+ # incorporate the script contents within a cygwin/mingw
2937
+ # wrapper executable. Must ONLY be called from within
2938
+ # func_mode_link because it depends on a number of variables
2939
+ # set therein.
2940
+ #
2941
+ # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
2942
+ # variable will take. If 'yes', then the emitted script
2943
+ # will assume that the directory in which it is stored is
2944
+ # the $objdir directory. This is a cygwin/mingw-specific
2945
+ # behavior.
2946
+ func_emit_wrapper ()
2701
2947
  {
2702
- func_emit_wrapper_part1_arg1=no
2703
- if test -n "$1" ; then
2704
- func_emit_wrapper_part1_arg1=$1
2705
- fi
2948
+ func_emit_wrapper_arg1=${1-no}
2706
2949
 
2707
2950
  $ECHO "\
2708
2951
  #! $SHELL
@@ -2718,7 +2961,6 @@ func_emit_wrapper_part1 ()
2718
2961
 
2719
2962
  # Sed substitution that helps us do robust quoting. It backslashifies
2720
2963
  # metacharacters that are still active within double-quoted strings.
2721
- Xsed='${SED} -e 1s/^X//'
2722
2964
  sed_quote_subst='$sed_quote_subst'
2723
2965
 
2724
2966
  # Be Bourne compatible
@@ -2749,31 +2991,132 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then
2749
2991
  else
2750
2992
  # When we are sourced in execute mode, \$file and \$ECHO are already set.
2751
2993
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
2752
- ECHO=\"$qecho\"
2753
- file=\"\$0\"
2754
- # Make sure echo works.
2755
- if test \"X\$1\" = X--no-reexec; then
2756
- # Discard the --no-reexec flag, and continue.
2757
- shift
2758
- elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2759
- # Yippee, \$ECHO works!
2760
- :
2761
- else
2762
- # Restart under the correct shell, and then maybe \$ECHO will work.
2763
- exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2764
- fi
2765
- fi\
2994
+ file=\"\$0\""
2995
+
2996
+ qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
2997
+ $ECHO "\
2998
+
2999
+ # A function that is used when there is no print builtin or printf.
3000
+ func_fallback_echo ()
3001
+ {
3002
+ eval 'cat <<_LTECHO_EOF
3003
+ \$1
3004
+ _LTECHO_EOF'
3005
+ }
3006
+ ECHO=\"$qECHO\"
3007
+ fi
3008
+
3009
+ # Very basic option parsing. These options are (a) specific to
3010
+ # the libtool wrapper, (b) are identical between the wrapper
3011
+ # /script/ and the wrapper /executable/ which is used only on
3012
+ # windows platforms, and (c) all begin with the string "--lt-"
3013
+ # (application programs are unlikely to have options which match
3014
+ # this pattern).
3015
+ #
3016
+ # There are only two supported options: --lt-debug and
3017
+ # --lt-dump-script. There is, deliberately, no --lt-help.
3018
+ #
3019
+ # The first argument to this parsing function should be the
3020
+ # script's $0 value, followed by "$@".
3021
+ lt_option_debug=
3022
+ func_parse_lt_options ()
3023
+ {
3024
+ lt_script_arg0=\$0
3025
+ shift
3026
+ for lt_opt
3027
+ do
3028
+ case \"\$lt_opt\" in
3029
+ --lt-debug) lt_option_debug=1 ;;
3030
+ --lt-dump-script)
3031
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
3032
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
3033
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
3034
+ cat \"\$lt_dump_D/\$lt_dump_F\"
3035
+ exit 0
3036
+ ;;
3037
+ --lt-*)
3038
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
3039
+ exit 1
3040
+ ;;
3041
+ esac
3042
+ done
3043
+
3044
+ # Print the debug banner immediately:
3045
+ if test -n \"\$lt_option_debug\"; then
3046
+ echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
3047
+ fi
3048
+ }
3049
+
3050
+ # Used when --lt-debug. Prints its arguments to stdout
3051
+ # (redirection is the responsibility of the caller)
3052
+ func_lt_dump_args ()
3053
+ {
3054
+ lt_dump_args_N=1;
3055
+ for lt_arg
3056
+ do
3057
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
3058
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
3059
+ done
3060
+ }
3061
+
3062
+ # Core function for launching the target application
3063
+ func_exec_program_core ()
3064
+ {
2766
3065
  "
2767
- $ECHO "\
3066
+ case $host in
3067
+ # Backslashes separate directories on plain windows
3068
+ *-*-mingw | *-*-os2* | *-cegcc*)
3069
+ $ECHO "\
3070
+ if test -n \"\$lt_option_debug\"; then
3071
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
3072
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
3073
+ fi
3074
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3075
+ "
3076
+ ;;
3077
+
3078
+ *)
3079
+ $ECHO "\
3080
+ if test -n \"\$lt_option_debug\"; then
3081
+ \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
3082
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
3083
+ fi
3084
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
3085
+ "
3086
+ ;;
3087
+ esac
3088
+ $ECHO "\
3089
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
3090
+ exit 1
3091
+ }
3092
+
3093
+ # A function to encapsulate launching the target application
3094
+ # Strips options in the --lt-* namespace from \$@ and
3095
+ # launches target application with the remaining arguments.
3096
+ func_exec_program ()
3097
+ {
3098
+ for lt_wr_arg
3099
+ do
3100
+ case \$lt_wr_arg in
3101
+ --lt-*) ;;
3102
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3103
+ esac
3104
+ shift
3105
+ done
3106
+ func_exec_program_core \${1+\"\$@\"}
3107
+ }
3108
+
3109
+ # Parse options
3110
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
2768
3111
 
2769
3112
  # Find the directory that this script lives in.
2770
- thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3113
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
2771
3114
  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2772
3115
 
2773
3116
  # Follow symbolic links until we get to the real thisdir.
2774
- file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
3117
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
2775
3118
  while test -n \"\$file\"; do
2776
- destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3119
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
2777
3120
 
2778
3121
  # If there was a directory component, then change thisdir.
2779
3122
  if test \"x\$destdir\" != \"x\$file\"; then
@@ -2783,30 +3126,13 @@ else
2783
3126
  esac
2784
3127
  fi
2785
3128
 
2786
- file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2787
- file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
3129
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
3130
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
2788
3131
  done
2789
- "
2790
- }
2791
- # end: func_emit_wrapper_part1
2792
-
2793
- # func_emit_wrapper_part2 [arg=no]
2794
- #
2795
- # Emit the second part of a libtool wrapper script on stdout.
2796
- # For more information, see the description associated with
2797
- # func_emit_wrapper(), below.
2798
- func_emit_wrapper_part2 ()
2799
- {
2800
- func_emit_wrapper_part2_arg1=no
2801
- if test -n "$1" ; then
2802
- func_emit_wrapper_part2_arg1=$1
2803
- fi
2804
-
2805
- $ECHO "\
2806
3132
 
2807
3133
  # Usually 'no', except on cygwin/mingw when embedded into
2808
3134
  # the cwrapper.
2809
- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
3135
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
2810
3136
  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2811
3137
  # special case for '.'
2812
3138
  if test \"\$thisdir\" = \".\"; then
@@ -2814,7 +3140,7 @@ func_emit_wrapper_part2 ()
2814
3140
  fi
2815
3141
  # remove .libs from thisdir
2816
3142
  case \"\$thisdir\" in
2817
- *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
3143
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
2818
3144
  $objdir ) thisdir=. ;;
2819
3145
  esac
2820
3146
  fi
@@ -2877,7 +3203,7 @@ func_emit_wrapper_part2 ()
2877
3203
 
2878
3204
  # Some systems cannot cope with colon-terminated $shlibpath_var
2879
3205
  # The second colon is a workaround for a bug in BeOS R4 sed
2880
- $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3206
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
2881
3207
 
2882
3208
  export $shlibpath_var
2883
3209
  "
@@ -2894,64 +3220,18 @@ func_emit_wrapper_part2 ()
2894
3220
  $ECHO "\
2895
3221
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
2896
3222
  # Run the actual program with our arguments.
2897
- "
2898
- case $host in
2899
- # Backslashes separate directories on plain windows
2900
- *-*-mingw | *-*-os2* | *-cegcc*)
2901
- $ECHO "\
2902
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
2903
- "
2904
- ;;
2905
-
2906
- *)
2907
- $ECHO "\
2908
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
2909
- "
2910
- ;;
2911
- esac
2912
- $ECHO "\
2913
- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
2914
- exit 1
3223
+ func_exec_program \${1+\"\$@\"}
2915
3224
  fi
2916
3225
  else
2917
3226
  # The program doesn't exist.
2918
3227
  \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
2919
3228
  \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
2920
- $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
3229
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
2921
3230
  exit 1
2922
3231
  fi
2923
3232
  fi\
2924
3233
  "
2925
3234
  }
2926
- # end: func_emit_wrapper_part2
2927
-
2928
-
2929
- # func_emit_wrapper [arg=no]
2930
- #
2931
- # Emit a libtool wrapper script on stdout.
2932
- # Don't directly open a file because we may want to
2933
- # incorporate the script contents within a cygwin/mingw
2934
- # wrapper executable. Must ONLY be called from within
2935
- # func_mode_link because it depends on a number of variables
2936
- # set therein.
2937
- #
2938
- # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
2939
- # variable will take. If 'yes', then the emitted script
2940
- # will assume that the directory in which it is stored is
2941
- # the $objdir directory. This is a cygwin/mingw-specific
2942
- # behavior.
2943
- func_emit_wrapper ()
2944
- {
2945
- func_emit_wrapper_arg1=no
2946
- if test -n "$1" ; then
2947
- func_emit_wrapper_arg1=$1
2948
- fi
2949
-
2950
- # split this up so that func_emit_cwrapperexe_src
2951
- # can call each part independently.
2952
- func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
2953
- func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
2954
- }
2955
3235
 
2956
3236
 
2957
3237
  # func_to_host_path arg
@@ -2978,23 +3258,19 @@ func_emit_wrapper ()
2978
3258
  func_to_host_path ()
2979
3259
  {
2980
3260
  func_to_host_path_result="$1"
2981
- if test -n "$1" ; then
3261
+ if test -n "$1"; then
2982
3262
  case $host in
2983
3263
  *mingw* )
2984
3264
  lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2985
3265
  case $build in
2986
3266
  *mingw* ) # actually, msys
2987
3267
  # awkward: cmd appends spaces to result
2988
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
2989
- func_to_host_path_tmp1=`( cmd //c echo "$1" |\
2990
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2991
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2992
- $SED -e "$lt_sed_naive_backslashify"`
3268
+ func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
3269
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
2993
3270
  ;;
2994
3271
  *cygwin* )
2995
- func_to_host_path_tmp1=`cygpath -w "$1"`
2996
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2997
- $SED -e "$lt_sed_naive_backslashify"`
3272
+ func_to_host_path_result=`cygpath -w "$1" |
3273
+ $SED -e "$lt_sed_naive_backslashify"`
2998
3274
  ;;
2999
3275
  * )
3000
3276
  # Unfortunately, winepath does not exit with a non-zero
@@ -3006,17 +3282,17 @@ func_to_host_path ()
3006
3282
  # the odd construction:
3007
3283
  func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3008
3284
  if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3009
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3285
+ func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
3010
3286
  $SED -e "$lt_sed_naive_backslashify"`
3011
3287
  else
3012
3288
  # Allow warning below.
3013
- func_to_host_path_result=""
3289
+ func_to_host_path_result=
3014
3290
  fi
3015
3291
  ;;
3016
3292
  esac
3017
3293
  if test -z "$func_to_host_path_result" ; then
3018
3294
  func_error "Could not determine host path corresponding to"
3019
- func_error " '$1'"
3295
+ func_error " \`$1'"
3020
3296
  func_error "Continuing, but uninstalled executables may not work."
3021
3297
  # Fallback:
3022
3298
  func_to_host_path_result="$1"
@@ -3049,30 +3325,24 @@ func_to_host_path ()
3049
3325
  func_to_host_pathlist ()
3050
3326
  {
3051
3327
  func_to_host_pathlist_result="$1"
3052
- if test -n "$1" ; then
3328
+ if test -n "$1"; then
3053
3329
  case $host in
3054
3330
  *mingw* )
3055
3331
  lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3056
3332
  # Remove leading and trailing path separator characters from
3057
3333
  # ARG. msys behavior is inconsistent here, cygpath turns them
3058
3334
  # into '.;' and ';.', and winepath ignores them completely.
3059
- func_to_host_pathlist_tmp2="$1"
3060
- # Once set for this call, this variable should not be
3061
- # reassigned. It is used in tha fallback case.
3062
- func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3063
- $SED -e 's|^:*||' -e 's|:*$||'`
3335
+ func_stripname : : "$1"
3336
+ func_to_host_pathlist_tmp1=$func_stripname_result
3064
3337
  case $build in
3065
3338
  *mingw* ) # Actually, msys.
3066
3339
  # Awkward: cmd appends spaces to result.
3067
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3068
- func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3069
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3070
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3071
- $SED -e "$lt_sed_naive_backslashify"`
3340
+ func_to_host_pathlist_result=`
3341
+ ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
3342
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3072
3343
  ;;
3073
3344
  *cygwin* )
3074
- func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3075
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3345
+ func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
3076
3346
  $SED -e "$lt_sed_naive_backslashify"`
3077
3347
  ;;
3078
3348
  * )
@@ -3088,18 +3358,17 @@ func_to_host_pathlist ()
3088
3358
  if test -z "$func_to_host_pathlist_result" ; then
3089
3359
  func_to_host_pathlist_result="$func_to_host_path_result"
3090
3360
  else
3091
- func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3361
+ func_append func_to_host_pathlist_result ";$func_to_host_path_result"
3092
3362
  fi
3093
3363
  fi
3094
3364
  fi
3095
- IFS=:
3096
3365
  done
3097
3366
  IFS=$func_to_host_pathlist_oldIFS
3098
3367
  ;;
3099
3368
  esac
3100
- if test -z "$func_to_host_pathlist_result" ; then
3369
+ if test -z "$func_to_host_pathlist_result"; then
3101
3370
  func_error "Could not determine the host path(s) corresponding to"
3102
- func_error " '$1'"
3371
+ func_error " \`$1'"
3103
3372
  func_error "Continuing, but uninstalled executables may not work."
3104
3373
  # Fallback. This may break if $1 contains DOS-style drive
3105
3374
  # specifications. The fix is not to complicate the expression
@@ -3116,7 +3385,7 @@ func_to_host_pathlist ()
3116
3385
  ;;
3117
3386
  esac
3118
3387
  case "$1" in
3119
- *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
3388
+ *: ) func_append func_to_host_pathlist_result ";"
3120
3389
  ;;
3121
3390
  esac
3122
3391
  ;;
@@ -3141,31 +3410,23 @@ func_emit_cwrapperexe_src ()
3141
3410
 
3142
3411
  This wrapper executable should never be moved out of the build directory.
3143
3412
  If it is, it will not operate correctly.
3144
-
3145
- Currently, it simply execs the wrapper *script* "$SHELL $output",
3146
- but could eventually absorb all of the scripts functionality and
3147
- exec $objdir/$outputname directly.
3148
3413
  */
3149
3414
  EOF
3150
3415
  cat <<"EOF"
3416
+ #ifdef _MSC_VER
3417
+ # define _CRT_SECURE_NO_DEPRECATE 1
3418
+ #endif
3151
3419
  #include <stdio.h>
3152
3420
  #include <stdlib.h>
3153
3421
  #ifdef _MSC_VER
3154
3422
  # include <direct.h>
3155
3423
  # include <process.h>
3156
3424
  # include <io.h>
3157
- # define setmode _setmode
3158
3425
  #else
3159
3426
  # include <unistd.h>
3160
3427
  # include <stdint.h>
3161
3428
  # ifdef __CYGWIN__
3162
3429
  # include <io.h>
3163
- # define HAVE_SETENV
3164
- # ifdef __STRICT_ANSI__
3165
- char *realpath (const char *, char *);
3166
- int putenv (char *);
3167
- int setenv (const char *, const char *, int);
3168
- # endif
3169
3430
  # endif
3170
3431
  #endif
3171
3432
  #include <malloc.h>
@@ -3177,6 +3438,44 @@ int setenv (const char *, const char *, int);
3177
3438
  #include <fcntl.h>
3178
3439
  #include <sys/stat.h>
3179
3440
 
3441
+ /* declarations of non-ANSI functions */
3442
+ #if defined(__MINGW32__)
3443
+ # ifdef __STRICT_ANSI__
3444
+ int _putenv (const char *);
3445
+ # endif
3446
+ #elif defined(__CYGWIN__)
3447
+ # ifdef __STRICT_ANSI__
3448
+ char *realpath (const char *, char *);
3449
+ int putenv (char *);
3450
+ int setenv (const char *, const char *, int);
3451
+ # endif
3452
+ /* #elif defined (other platforms) ... */
3453
+ #endif
3454
+
3455
+ /* portability defines, excluding path handling macros */
3456
+ #if defined(_MSC_VER)
3457
+ # define setmode _setmode
3458
+ # define stat _stat
3459
+ # define chmod _chmod
3460
+ # define getcwd _getcwd
3461
+ # define putenv _putenv
3462
+ # define S_IXUSR _S_IEXEC
3463
+ # ifndef _INTPTR_T_DEFINED
3464
+ # define _INTPTR_T_DEFINED
3465
+ # define intptr_t int
3466
+ # endif
3467
+ #elif defined(__MINGW32__)
3468
+ # define setmode _setmode
3469
+ # define stat _stat
3470
+ # define chmod _chmod
3471
+ # define getcwd _getcwd
3472
+ # define putenv _putenv
3473
+ #elif defined(__CYGWIN__)
3474
+ # define HAVE_SETENV
3475
+ # define FOPEN_WB "wb"
3476
+ /* #elif defined (other platforms) ... */
3477
+ #endif
3478
+
3180
3479
  #if defined(PATH_MAX)
3181
3480
  # define LT_PATHMAX PATH_MAX
3182
3481
  #elif defined(MAXPATHLEN)
@@ -3192,14 +3491,7 @@ int setenv (const char *, const char *, int);
3192
3491
  # define S_IXGRP 0
3193
3492
  #endif
3194
3493
 
3195
- #ifdef _MSC_VER
3196
- # define S_IXUSR _S_IEXEC
3197
- # define stat _stat
3198
- # ifndef _INTPTR_T_DEFINED
3199
- # define intptr_t int
3200
- # endif
3201
- #endif
3202
-
3494
+ /* path handling portability macros */
3203
3495
  #ifndef DIR_SEPARATOR
3204
3496
  # define DIR_SEPARATOR '/'
3205
3497
  # define PATH_SEPARATOR ':'
@@ -3230,10 +3522,6 @@ int setenv (const char *, const char *, int);
3230
3522
  # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
3231
3523
  #endif /* PATH_SEPARATOR_2 */
3232
3524
 
3233
- #ifdef __CYGWIN__
3234
- # define FOPEN_WB "wb"
3235
- #endif
3236
-
3237
3525
  #ifndef FOPEN_WB
3238
3526
  # define FOPEN_WB "w"
3239
3527
  #endif
@@ -3246,22 +3534,13 @@ int setenv (const char *, const char *, int);
3246
3534
  if (stale) { free ((void *) stale); stale = 0; } \
3247
3535
  } while (0)
3248
3536
 
3249
- #undef LTWRAPPER_DEBUGPRINTF
3250
- #if defined DEBUGWRAPPER
3251
- # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3252
- static void
3253
- ltwrapper_debugprintf (const char *fmt, ...)
3254
- {
3255
- va_list args;
3256
- va_start (args, fmt);
3257
- (void) vfprintf (stderr, fmt, args);
3258
- va_end (args);
3259
- }
3537
+ #if defined(LT_DEBUGWRAPPER)
3538
+ static int lt_debug = 1;
3260
3539
  #else
3261
- # define LTWRAPPER_DEBUGPRINTF(args)
3540
+ static int lt_debug = 0;
3262
3541
  #endif
3263
3542
 
3264
- const char *program_name = NULL;
3543
+ const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
3265
3544
 
3266
3545
  void *xmalloc (size_t num);
3267
3546
  char *xstrdup (const char *string);
@@ -3271,31 +3550,17 @@ char *chase_symlinks (const char *pathspec);
3271
3550
  int make_executable (const char *path);
3272
3551
  int check_executable (const char *path);
3273
3552
  char *strendzap (char *str, const char *pat);
3274
- void lt_fatal (const char *message, ...);
3553
+ void lt_debugprintf (const char *file, int line, const char *fmt, ...);
3554
+ void lt_fatal (const char *file, int line, const char *message, ...);
3555
+ static const char *nonnull (const char *s);
3556
+ static const char *nonempty (const char *s);
3275
3557
  void lt_setenv (const char *name, const char *value);
3276
3558
  char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3277
- void lt_opt_process_env_set (const char *arg);
3278
- void lt_opt_process_env_prepend (const char *arg);
3279
- void lt_opt_process_env_append (const char *arg);
3280
- int lt_split_name_value (const char *arg, char** name, char** value);
3281
3559
  void lt_update_exe_path (const char *name, const char *value);
3282
3560
  void lt_update_lib_path (const char *name, const char *value);
3283
-
3284
- static const char *script_text_part1 =
3285
- EOF
3286
-
3287
- func_emit_wrapper_part1 yes |
3288
- $SED -e 's/\([\\"]\)/\\\1/g' \
3289
- -e 's/^/ "/' -e 's/$/\\n"/'
3290
- echo ";"
3291
- cat <<EOF
3292
-
3293
- static const char *script_text_part2 =
3561
+ char **prepare_spawn (char **argv);
3562
+ void lt_dump_script (FILE *f);
3294
3563
  EOF
3295
- func_emit_wrapper_part2 yes |
3296
- $SED -e 's/\([\\"]\)/\\\1/g' \
3297
- -e 's/^/ "/' -e 's/$/\\n"/'
3298
- echo ";"
3299
3564
 
3300
3565
  cat <<EOF
3301
3566
  const char * MAGIC_EXE = "$magic_exe";
@@ -3340,24 +3605,10 @@ EOF
3340
3605
  cat <<"EOF"
3341
3606
 
3342
3607
  #define LTWRAPPER_OPTION_PREFIX "--lt-"
3343
- #define LTWRAPPER_OPTION_PREFIX_LENGTH 5
3344
3608
 
3345
- static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
3346
3609
  static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
3347
-
3348
3610
  static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3349
-
3350
- static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3351
- static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3352
- /* argument is putenv-style "foo=bar", value of foo is set to bar */
3353
-
3354
- static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3355
- static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3356
- /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3357
-
3358
- static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3359
- static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3360
- /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
3611
+ static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
3361
3612
 
3362
3613
  int
3363
3614
  main (int argc, char *argv[])
@@ -3374,10 +3625,13 @@ main (int argc, char *argv[])
3374
3625
  int i;
3375
3626
 
3376
3627
  program_name = (char *) xstrdup (base_name (argv[0]));
3377
- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
3378
- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
3628
+ newargz = XMALLOC (char *, argc + 1);
3379
3629
 
3380
- /* very simple arg parsing; don't want to rely on getopt */
3630
+ /* very simple arg parsing; don't want to rely on getopt
3631
+ * also, copy all non cwrapper options to newargz, except
3632
+ * argz[0], which is handled differently
3633
+ */
3634
+ newargc=0;
3381
3635
  for (i = 1; i < argc; i++)
3382
3636
  {
3383
3637
  if (strcmp (argv[i], dumpscript_opt) == 0)
@@ -3391,25 +3645,57 @@ EOF
3391
3645
  esac
3392
3646
 
3393
3647
  cat <<"EOF"
3394
- printf ("%s", script_text_part1);
3395
- printf ("%s", script_text_part2);
3648
+ lt_dump_script (stdout);
3396
3649
  return 0;
3397
3650
  }
3651
+ if (strcmp (argv[i], debug_opt) == 0)
3652
+ {
3653
+ lt_debug = 1;
3654
+ continue;
3655
+ }
3656
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
3657
+ {
3658
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3659
+ namespace, but it is not one of the ones we know about and
3660
+ have already dealt with, above (inluding dump-script), then
3661
+ report an error. Otherwise, targets might begin to believe
3662
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3663
+ namespace. The first time any user complains about this, we'll
3664
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3665
+ or a configure.ac-settable value.
3666
+ */
3667
+ lt_fatal (__FILE__, __LINE__,
3668
+ "unrecognized %s option: '%s'",
3669
+ ltwrapper_option_prefix, argv[i]);
3670
+ }
3671
+ /* otherwise ... */
3672
+ newargz[++newargc] = xstrdup (argv[i]);
3398
3673
  }
3674
+ newargz[++newargc] = NULL;
3675
+
3676
+ EOF
3677
+ cat <<EOF
3678
+ /* The GNU banner must be the first non-error debug message */
3679
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
3680
+ EOF
3681
+ cat <<"EOF"
3682
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
3683
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
3399
3684
 
3400
- newargz = XMALLOC (char *, argc + 1);
3401
3685
  tmp_pathspec = find_executable (argv[0]);
3402
3686
  if (tmp_pathspec == NULL)
3403
- lt_fatal ("Couldn't find %s", argv[0]);
3404
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
3405
- tmp_pathspec));
3687
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
3688
+ lt_debugprintf (__FILE__, __LINE__,
3689
+ "(main) found exe (before symlink chase) at: %s\n",
3690
+ tmp_pathspec);
3406
3691
 
3407
3692
  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
3408
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
3409
- actual_cwrapper_path));
3693
+ lt_debugprintf (__FILE__, __LINE__,
3694
+ "(main) found exe (after symlink chase) at: %s\n",
3695
+ actual_cwrapper_path);
3410
3696
  XFREE (tmp_pathspec);
3411
3697
 
3412
- actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
3698
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
3413
3699
  strendzap (actual_cwrapper_path, actual_cwrapper_name);
3414
3700
 
3415
3701
  /* wrapper name transforms */
@@ -3427,8 +3713,9 @@ EOF
3427
3713
  target_name = tmp_pathspec;
3428
3714
  tmp_pathspec = 0;
3429
3715
 
3430
- LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
3431
- target_name));
3716
+ lt_debugprintf (__FILE__, __LINE__,
3717
+ "(main) libtool target name: %s\n",
3718
+ target_name);
3432
3719
  EOF
3433
3720
 
3434
3721
  cat <<EOF
@@ -3481,77 +3768,12 @@ EOF
3481
3768
  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3482
3769
  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
3483
3770
 
3484
- newargc=0;
3485
- for (i = 1; i < argc; i++)
3486
- {
3487
- if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3488
- {
3489
- if (argv[i][env_set_opt_len] == '=')
3490
- {
3491
- const char *p = argv[i] + env_set_opt_len + 1;
3492
- lt_opt_process_env_set (p);
3493
- }
3494
- else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3495
- {
3496
- lt_opt_process_env_set (argv[++i]); /* don't copy */
3497
- }
3498
- else
3499
- lt_fatal ("%s missing required argument", env_set_opt);
3500
- continue;
3501
- }
3502
- if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3503
- {
3504
- if (argv[i][env_prepend_opt_len] == '=')
3505
- {
3506
- const char *p = argv[i] + env_prepend_opt_len + 1;
3507
- lt_opt_process_env_prepend (p);
3508
- }
3509
- else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3510
- {
3511
- lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3512
- }
3513
- else
3514
- lt_fatal ("%s missing required argument", env_prepend_opt);
3515
- continue;
3516
- }
3517
- if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3518
- {
3519
- if (argv[i][env_append_opt_len] == '=')
3520
- {
3521
- const char *p = argv[i] + env_append_opt_len + 1;
3522
- lt_opt_process_env_append (p);
3523
- }
3524
- else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3525
- {
3526
- lt_opt_process_env_append (argv[++i]); /* don't copy */
3527
- }
3528
- else
3529
- lt_fatal ("%s missing required argument", env_append_opt);
3530
- continue;
3531
- }
3532
- if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3533
- {
3534
- /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3535
- namespace, but it is not one of the ones we know about and
3536
- have already dealt with, above (inluding dump-script), then
3537
- report an error. Otherwise, targets might begin to believe
3538
- they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3539
- namespace. The first time any user complains about this, we'll
3540
- need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3541
- or a configure.ac-settable value.
3542
- */
3543
- lt_fatal ("Unrecognized option in %s namespace: '%s'",
3544
- ltwrapper_option_prefix, argv[i]);
3545
- }
3546
- /* otherwise ... */
3547
- newargz[++newargc] = xstrdup (argv[i]);
3548
- }
3549
- newargz[++newargc] = NULL;
3550
-
3551
- LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
3771
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
3772
+ nonnull (lt_argv_zero));
3552
3773
  for (i = 0; i < newargc; i++)
3553
3774
  {
3554
- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
3775
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
3776
+ i, nonnull (newargz[i]));
3555
3777
  }
3556
3778
 
3557
3779
  EOF
@@ -3560,11 +3782,14 @@ EOF
3560
3782
  mingw*)
3561
3783
  cat <<"EOF"
3562
3784
  /* execv doesn't actually work on mingw as expected on unix */
3785
+ newargz = prepare_spawn (newargz);
3563
3786
  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
3564
3787
  if (rval == -1)
3565
3788
  {
3566
3789
  /* failed to start process */
3567
- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
3790
+ lt_debugprintf (__FILE__, __LINE__,
3791
+ "(main) failed to launch target \"%s\": %s\n",
3792
+ lt_argv_zero, nonnull (strerror (errno)));
3568
3793
  return 127;
3569
3794
  }
3570
3795
  return rval;
@@ -3586,7 +3811,7 @@ xmalloc (size_t num)
3586
3811
  {
3587
3812
  void *p = (void *) malloc (num);
3588
3813
  if (!p)
3589
- lt_fatal ("Memory exhausted");
3814
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
3590
3815
 
3591
3816
  return p;
3592
3817
  }
@@ -3620,8 +3845,8 @@ check_executable (const char *path)
3620
3845
  {
3621
3846
  struct stat st;
3622
3847
 
3623
- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
3624
- path ? (*path ? path : "EMPTY!") : "NULL!"));
3848
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
3849
+ nonempty (path));
3625
3850
  if ((!path) || (!*path))
3626
3851
  return 0;
3627
3852
 
@@ -3638,8 +3863,8 @@ make_executable (const char *path)
3638
3863
  int rval = 0;
3639
3864
  struct stat st;
3640
3865
 
3641
- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
3642
- path ? (*path ? path : "EMPTY!") : "NULL!"));
3866
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
3867
+ nonempty (path));
3643
3868
  if ((!path) || (!*path))
3644
3869
  return 0;
3645
3870
 
@@ -3665,8 +3890,8 @@ find_executable (const char *wrapper)
3665
3890
  int tmp_len;
3666
3891
  char *concat_name;
3667
3892
 
3668
- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
3669
- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
3893
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
3894
+ nonempty (wrapper));
3670
3895
 
3671
3896
  if ((wrapper == NULL) || (*wrapper == '\0'))
3672
3897
  return NULL;
@@ -3719,7 +3944,8 @@ find_executable (const char *wrapper)
3719
3944
  {
3720
3945
  /* empty path: current directory */
3721
3946
  if (getcwd (tmp, LT_PATHMAX) == NULL)
3722
- lt_fatal ("getcwd failed");
3947
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
3948
+ nonnull (strerror (errno)));
3723
3949
  tmp_len = strlen (tmp);
3724
3950
  concat_name =
3725
3951
  XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
@@ -3744,7 +3970,8 @@ find_executable (const char *wrapper)
3744
3970
  }
3745
3971
  /* Relative path | not found in path: prepend cwd */
3746
3972
  if (getcwd (tmp, LT_PATHMAX) == NULL)
3747
- lt_fatal ("getcwd failed");
3973
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
3974
+ nonnull (strerror (errno)));
3748
3975
  tmp_len = strlen (tmp);
3749
3976
  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
3750
3977
  memcpy (concat_name, tmp, tmp_len);
@@ -3770,8 +3997,9 @@ chase_symlinks (const char *pathspec)
3770
3997
  int has_symlinks = 0;
3771
3998
  while (strlen (tmp_pathspec) && !has_symlinks)
3772
3999
  {
3773
- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
3774
- tmp_pathspec));
4000
+ lt_debugprintf (__FILE__, __LINE__,
4001
+ "checking path component for symlinks: %s\n",
4002
+ tmp_pathspec);
3775
4003
  if (lstat (tmp_pathspec, &s) == 0)
3776
4004
  {
3777
4005
  if (S_ISLNK (s.st_mode) != 0)
@@ -3793,8 +4021,9 @@ chase_symlinks (const char *pathspec)
3793
4021
  }
3794
4022
  else
3795
4023
  {
3796
- char *errstr = strerror (errno);
3797
- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
4024
+ lt_fatal (__FILE__, __LINE__,
4025
+ "error accessing file \"%s\": %s",
4026
+ tmp_pathspec, nonnull (strerror (errno)));
3798
4027
  }
3799
4028
  }
3800
4029
  XFREE (tmp_pathspec);
@@ -3807,7 +4036,8 @@ chase_symlinks (const char *pathspec)
3807
4036
  tmp_pathspec = realpath (pathspec, buf);
3808
4037
  if (tmp_pathspec == 0)
3809
4038
  {
3810
- lt_fatal ("Could not follow symlinks for %s", pathspec);
4039
+ lt_fatal (__FILE__, __LINE__,
4040
+ "could not follow symlinks for %s", pathspec);
3811
4041
  }
3812
4042
  return xstrdup (tmp_pathspec);
3813
4043
  #endif
@@ -3833,11 +4063,25 @@ strendzap (char *str, const char *pat)
3833
4063
  return str;
3834
4064
  }
3835
4065
 
4066
+ void
4067
+ lt_debugprintf (const char *file, int line, const char *fmt, ...)
4068
+ {
4069
+ va_list args;
4070
+ if (lt_debug)
4071
+ {
4072
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4073
+ va_start (args, fmt);
4074
+ (void) vfprintf (stderr, fmt, args);
4075
+ va_end (args);
4076
+ }
4077
+ }
4078
+
3836
4079
  static void
3837
- lt_error_core (int exit_status, const char *mode,
4080
+ lt_error_core (int exit_status, const char *file,
4081
+ int line, const char *mode,
3838
4082
  const char *message, va_list ap)
3839
4083
  {
3840
- fprintf (stderr, "%s: %s: ", program_name, mode);
4084
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
3841
4085
  vfprintf (stderr, message, ap);
3842
4086
  fprintf (stderr, ".\n");
3843
4087
 
@@ -3846,20 +4090,32 @@ lt_error_core (int exit_status, const char *mode,
3846
4090
  }
3847
4091
 
3848
4092
  void
3849
- lt_fatal (const char *message, ...)
4093
+ lt_fatal (const char *file, int line, const char *message, ...)
3850
4094
  {
3851
4095
  va_list ap;
3852
4096
  va_start (ap, message);
3853
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
4097
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
3854
4098
  va_end (ap);
3855
4099
  }
3856
4100
 
4101
+ static const char *
4102
+ nonnull (const char *s)
4103
+ {
4104
+ return s ? s : "(null)";
4105
+ }
4106
+
4107
+ static const char *
4108
+ nonempty (const char *s)
4109
+ {
4110
+ return (s && !*s) ? "(empty)" : nonnull (s);
4111
+ }
4112
+
3857
4113
  void
3858
4114
  lt_setenv (const char *name, const char *value)
3859
4115
  {
3860
- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
3861
- (name ? name : "<NULL>"),
3862
- (value ? value : "<NULL>")));
4116
+ lt_debugprintf (__FILE__, __LINE__,
4117
+ "(lt_setenv) setting '%s' to '%s'\n",
4118
+ nonnull (name), nonnull (value));
3863
4119
  {
3864
4120
  #ifdef HAVE_SETENV
3865
4121
  /* always make a copy, for consistency with !HAVE_SETENV */
@@ -3904,95 +4160,12 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
3904
4160
  return new_value;
3905
4161
  }
3906
4162
 
3907
- int
3908
- lt_split_name_value (const char *arg, char** name, char** value)
3909
- {
3910
- const char *p;
3911
- int len;
3912
- if (!arg || !*arg)
3913
- return 1;
3914
-
3915
- p = strchr (arg, (int)'=');
3916
-
3917
- if (!p)
3918
- return 1;
3919
-
3920
- *value = xstrdup (++p);
3921
-
3922
- len = strlen (arg) - strlen (*value);
3923
- *name = XMALLOC (char, len);
3924
- strncpy (*name, arg, len-1);
3925
- (*name)[len - 1] = '\0';
3926
-
3927
- return 0;
3928
- }
3929
-
3930
- void
3931
- lt_opt_process_env_set (const char *arg)
3932
- {
3933
- char *name = NULL;
3934
- char *value = NULL;
3935
-
3936
- if (lt_split_name_value (arg, &name, &value) != 0)
3937
- {
3938
- XFREE (name);
3939
- XFREE (value);
3940
- lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
3941
- }
3942
-
3943
- lt_setenv (name, value);
3944
- XFREE (name);
3945
- XFREE (value);
3946
- }
3947
-
3948
- void
3949
- lt_opt_process_env_prepend (const char *arg)
3950
- {
3951
- char *name = NULL;
3952
- char *value = NULL;
3953
- char *new_value = NULL;
3954
-
3955
- if (lt_split_name_value (arg, &name, &value) != 0)
3956
- {
3957
- XFREE (name);
3958
- XFREE (value);
3959
- lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
3960
- }
3961
-
3962
- new_value = lt_extend_str (getenv (name), value, 0);
3963
- lt_setenv (name, new_value);
3964
- XFREE (new_value);
3965
- XFREE (name);
3966
- XFREE (value);
3967
- }
3968
-
3969
- void
3970
- lt_opt_process_env_append (const char *arg)
3971
- {
3972
- char *name = NULL;
3973
- char *value = NULL;
3974
- char *new_value = NULL;
3975
-
3976
- if (lt_split_name_value (arg, &name, &value) != 0)
3977
- {
3978
- XFREE (name);
3979
- XFREE (value);
3980
- lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
3981
- }
3982
-
3983
- new_value = lt_extend_str (getenv (name), value, 1);
3984
- lt_setenv (name, new_value);
3985
- XFREE (new_value);
3986
- XFREE (name);
3987
- XFREE (value);
3988
- }
3989
-
3990
4163
  void
3991
4164
  lt_update_exe_path (const char *name, const char *value)
3992
4165
  {
3993
- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
3994
- (name ? name : "<NULL>"),
3995
- (value ? value : "<NULL>")));
4166
+ lt_debugprintf (__FILE__, __LINE__,
4167
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4168
+ nonnull (name), nonnull (value));
3996
4169
 
3997
4170
  if (name && *name && value && *value)
3998
4171
  {
@@ -4011,9 +4184,9 @@ lt_update_exe_path (const char *name, const char *value)
4011
4184
  void
4012
4185
  lt_update_lib_path (const char *name, const char *value)
4013
4186
  {
4014
- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4015
- (name ? name : "<NULL>"),
4016
- (value ? value : "<NULL>")));
4187
+ lt_debugprintf (__FILE__, __LINE__,
4188
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4189
+ nonnull (name), nonnull (value));
4017
4190
 
4018
4191
  if (name && *name && value && *value)
4019
4192
  {
@@ -4023,11 +4196,152 @@ lt_update_lib_path (const char *name, const char *value)
4023
4196
  }
4024
4197
  }
4025
4198
 
4199
+ EOF
4200
+ case $host_os in
4201
+ mingw*)
4202
+ cat <<"EOF"
4203
+
4204
+ /* Prepares an argument vector before calling spawn().
4205
+ Note that spawn() does not by itself call the command interpreter
4206
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4207
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4208
+ GetVersionEx(&v);
4209
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4210
+ }) ? "cmd.exe" : "command.com").
4211
+ Instead it simply concatenates the arguments, separated by ' ', and calls
4212
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4213
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4214
+ special way:
4215
+ - Space and tab are interpreted as delimiters. They are not treated as
4216
+ delimiters if they are surrounded by double quotes: "...".
4217
+ - Unescaped double quotes are removed from the input. Their only effect is
4218
+ that within double quotes, space and tab are treated like normal
4219
+ characters.
4220
+ - Backslashes not followed by double quotes are not special.
4221
+ - But 2*n+1 backslashes followed by a double quote become
4222
+ n backslashes followed by a double quote (n >= 0):
4223
+ \" -> "
4224
+ \\\" -> \"
4225
+ \\\\\" -> \\"
4226
+ */
4227
+ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4228
+ #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4229
+ char **
4230
+ prepare_spawn (char **argv)
4231
+ {
4232
+ size_t argc;
4233
+ char **new_argv;
4234
+ size_t i;
4235
+
4236
+ /* Count number of arguments. */
4237
+ for (argc = 0; argv[argc] != NULL; argc++)
4238
+ ;
4239
+
4240
+ /* Allocate new argument vector. */
4241
+ new_argv = XMALLOC (char *, argc + 1);
4242
+
4243
+ /* Put quoted arguments into the new argument vector. */
4244
+ for (i = 0; i < argc; i++)
4245
+ {
4246
+ const char *string = argv[i];
4247
+
4248
+ if (string[0] == '\0')
4249
+ new_argv[i] = xstrdup ("\"\"");
4250
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
4251
+ {
4252
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
4253
+ size_t length;
4254
+ unsigned int backslashes;
4255
+ const char *s;
4256
+ char *quoted_string;
4257
+ char *p;
4258
+
4259
+ length = 0;
4260
+ backslashes = 0;
4261
+ if (quote_around)
4262
+ length++;
4263
+ for (s = string; *s != '\0'; s++)
4264
+ {
4265
+ char c = *s;
4266
+ if (c == '"')
4267
+ length += backslashes + 1;
4268
+ length++;
4269
+ if (c == '\\')
4270
+ backslashes++;
4271
+ else
4272
+ backslashes = 0;
4273
+ }
4274
+ if (quote_around)
4275
+ length += backslashes + 1;
4276
+
4277
+ quoted_string = XMALLOC (char, length + 1);
4278
+
4279
+ p = quoted_string;
4280
+ backslashes = 0;
4281
+ if (quote_around)
4282
+ *p++ = '"';
4283
+ for (s = string; *s != '\0'; s++)
4284
+ {
4285
+ char c = *s;
4286
+ if (c == '"')
4287
+ {
4288
+ unsigned int j;
4289
+ for (j = backslashes + 1; j > 0; j--)
4290
+ *p++ = '\\';
4291
+ }
4292
+ *p++ = c;
4293
+ if (c == '\\')
4294
+ backslashes++;
4295
+ else
4296
+ backslashes = 0;
4297
+ }
4298
+ if (quote_around)
4299
+ {
4300
+ unsigned int j;
4301
+ for (j = backslashes; j > 0; j--)
4302
+ *p++ = '\\';
4303
+ *p++ = '"';
4304
+ }
4305
+ *p = '\0';
4306
+
4307
+ new_argv[i] = quoted_string;
4308
+ }
4309
+ else
4310
+ new_argv[i] = (char *) string;
4311
+ }
4312
+ new_argv[argc] = NULL;
4313
+
4314
+ return new_argv;
4315
+ }
4316
+ EOF
4317
+ ;;
4318
+ esac
4319
+
4320
+ cat <<"EOF"
4321
+ void lt_dump_script (FILE* f)
4322
+ {
4323
+ EOF
4324
+ func_emit_wrapper yes |
4325
+ $SED -e 's/\([\\"]\)/\\\1/g' \
4326
+ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
4026
4327
 
4328
+ cat <<"EOF"
4329
+ }
4027
4330
  EOF
4028
4331
  }
4029
4332
  # end: func_emit_cwrapperexe_src
4030
4333
 
4334
+ # func_win32_import_lib_p ARG
4335
+ # True if ARG is an import lib, as indicated by $file_magic_cmd
4336
+ func_win32_import_lib_p ()
4337
+ {
4338
+ $opt_debug
4339
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
4340
+ *import*) : ;;
4341
+ *) false ;;
4342
+ esac
4343
+ }
4344
+
4031
4345
  # func_mode_link arg...
4032
4346
  func_mode_link ()
4033
4347
  {
@@ -4072,6 +4386,7 @@ func_mode_link ()
4072
4386
  new_inherited_linker_flags=
4073
4387
 
4074
4388
  avoid_version=no
4389
+ bindir=
4075
4390
  dlfiles=
4076
4391
  dlprefiles=
4077
4392
  dlself=no
@@ -4164,6 +4479,11 @@ func_mode_link ()
4164
4479
  esac
4165
4480
 
4166
4481
  case $prev in
4482
+ bindir)
4483
+ bindir="$arg"
4484
+ prev=
4485
+ continue
4486
+ ;;
4167
4487
  dlfiles|dlprefiles)
4168
4488
  if test "$preload" = no; then
4169
4489
  # Add the symbol object into the linking commands.
@@ -4425,6 +4745,11 @@ func_mode_link ()
4425
4745
  continue
4426
4746
  ;;
4427
4747
 
4748
+ -bindir)
4749
+ prev=bindir
4750
+ continue
4751
+ ;;
4752
+
4428
4753
  -dlopen)
4429
4754
  prev=dlfiles
4430
4755
  continue
@@ -4503,7 +4828,7 @@ func_mode_link ()
4503
4828
  esac
4504
4829
  case $host in
4505
4830
  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4506
- testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
4831
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
4507
4832
  case :$dllsearchpath: in
4508
4833
  *":$dir:"*) ;;
4509
4834
  ::) dllsearchpath=$dir;;
@@ -4522,7 +4847,7 @@ func_mode_link ()
4522
4847
  -l*)
4523
4848
  if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
4524
4849
  case $host in
4525
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
4850
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
4526
4851
  # These systems don't actually have a C or math library (as such)
4527
4852
  continue
4528
4853
  ;;
@@ -4708,7 +5033,7 @@ func_mode_link ()
4708
5033
  for flag in $args; do
4709
5034
  IFS="$save_ifs"
4710
5035
  func_quote_for_eval "$flag"
4711
- arg="$arg $wl$func_quote_for_eval_result"
5036
+ arg="$arg $func_quote_for_eval_result"
4712
5037
  compiler_flags="$compiler_flags $func_quote_for_eval_result"
4713
5038
  done
4714
5039
  IFS="$save_ifs"
@@ -4754,18 +5079,19 @@ func_mode_link ()
4754
5079
  arg="$func_quote_for_eval_result"
4755
5080
  ;;
4756
5081
 
4757
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4758
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
4759
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4760
- # +DA*, +DD* enable 64-bit mode on the HP compiler
4761
- # -q* pass through compiler args for the IBM compiler
4762
- # -m*, -t[45]*, -txscale* pass through architecture-specific
4763
- # compiler args for GCC
4764
- # -F/path gives path to uninstalled frameworks, gcc on darwin
4765
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4766
- # @file GCC response files
5082
+ # Flags to be passed through unchanged, with rationale:
5083
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5084
+ # -r[0-9][0-9]* specify processor for the SGI compiler
5085
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5086
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
5087
+ # -q* compiler args for the IBM compiler
5088
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5089
+ # -F/path path to uninstalled frameworks, gcc on darwin
5090
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5091
+ # @file GCC response files
5092
+ # -tp=* Portland pgcc target processor selection
4767
5093
  -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4768
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
5094
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
4769
5095
  func_quote_for_eval "$arg"
4770
5096
  arg="$func_quote_for_eval_result"
4771
5097
  func_append compile_command " $arg"
@@ -4925,7 +5251,7 @@ func_mode_link ()
4925
5251
 
4926
5252
  if test -n "$shlibpath_var"; then
4927
5253
  # get the directories listed in $shlibpath_var
4928
- eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
5254
+ eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
4929
5255
  else
4930
5256
  shlib_search_path=
4931
5257
  fi
@@ -5033,10 +5359,7 @@ func_mode_link ()
5033
5359
  case $pass in
5034
5360
  dlopen) libs="$dlfiles" ;;
5035
5361
  dlpreopen) libs="$dlprefiles" ;;
5036
- link)
5037
- libs="$deplibs %DEPLIBS%"
5038
- test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
5039
- ;;
5362
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
5040
5363
  esac
5041
5364
  fi
5042
5365
  if test "$linkmode,$pass" = "lib,dlpreopen"; then
@@ -5051,7 +5374,8 @@ func_mode_link ()
5051
5374
  # Collect preopened libtool deplibs, except any this library
5052
5375
  # has declared as weak libs
5053
5376
  for deplib in $dependency_libs; do
5054
- deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
5377
+ func_basename "$deplib"
5378
+ deplib_base=$func_basename_result
5055
5379
  case " $weak_libs " in
5056
5380
  *" $deplib_base "*) ;;
5057
5381
  *) deplibs="$deplibs $deplib" ;;
@@ -5230,7 +5554,7 @@ func_mode_link ()
5230
5554
  match_pattern*)
5231
5555
  set dummy $deplibs_check_method; shift
5232
5556
  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
5233
- if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
5557
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
5234
5558
  | $EGREP "$match_pattern_regex" > /dev/null; then
5235
5559
  valid_a_lib=yes
5236
5560
  fi
@@ -5240,15 +5564,15 @@ func_mode_link ()
5240
5564
  ;;
5241
5565
  esac
5242
5566
  if test "$valid_a_lib" != yes; then
5243
- $ECHO
5567
+ echo
5244
5568
  $ECHO "*** Warning: Trying to link with static lib archive $deplib."
5245
- $ECHO "*** I have the capability to make that library automatically link in when"
5246
- $ECHO "*** you link to this library. But I can only do this if you have a"
5247
- $ECHO "*** shared version of the library, which you do not appear to have"
5248
- $ECHO "*** because the file extensions .$libext of this argument makes me believe"
5249
- $ECHO "*** that it is just a static archive that I should not use here."
5569
+ echo "*** I have the capability to make that library automatically link in when"
5570
+ echo "*** you link to this library. But I can only do this if you have a"
5571
+ echo "*** shared version of the library, which you do not appear to have"
5572
+ echo "*** because the file extensions .$libext of this argument makes me believe"
5573
+ echo "*** that it is just a static archive that I should not use here."
5250
5574
  else
5251
- $ECHO
5575
+ echo
5252
5576
  $ECHO "*** Warning: Linking the shared library $output against the"
5253
5577
  $ECHO "*** static library $deplib is not portable!"
5254
5578
  deplibs="$deplib $deplibs"
@@ -5321,7 +5645,7 @@ func_mode_link ()
5321
5645
 
5322
5646
  # Convert "-framework foo" to "foo.ltframework"
5323
5647
  if test -n "$inherited_linker_flags"; then
5324
- tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
5648
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
5325
5649
  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
5326
5650
  case " $new_inherited_linker_flags " in
5327
5651
  *" $tmp_inherited_linker_flag "*) ;;
@@ -5329,7 +5653,7 @@ func_mode_link ()
5329
5653
  esac
5330
5654
  done
5331
5655
  fi
5332
- dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
5656
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
5333
5657
  if test "$linkmode,$pass" = "lib,link" ||
5334
5658
  test "$linkmode,$pass" = "prog,scan" ||
5335
5659
  { test "$linkmode" != prog && test "$linkmode" != lib; }; then
@@ -5347,19 +5671,19 @@ func_mode_link ()
5347
5671
  # It is a libtool convenience library, so add in its objects.
5348
5672
  convenience="$convenience $ladir/$objdir/$old_library"
5349
5673
  old_convenience="$old_convenience $ladir/$objdir/$old_library"
5350
- tmp_libs=
5351
- for deplib in $dependency_libs; do
5352
- deplibs="$deplib $deplibs"
5353
- if $opt_duplicate_deps ; then
5354
- case "$tmp_libs " in
5355
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5356
- esac
5357
- fi
5358
- tmp_libs="$tmp_libs $deplib"
5359
- done
5360
5674
  elif test "$linkmode" != prog && test "$linkmode" != lib; then
5361
5675
  func_fatal_error "\`$lib' is not a convenience library"
5362
5676
  fi
5677
+ tmp_libs=
5678
+ for deplib in $dependency_libs; do
5679
+ deplibs="$deplib $deplibs"
5680
+ if $opt_duplicate_deps ; then
5681
+ case "$tmp_libs " in
5682
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5683
+ esac
5684
+ fi
5685
+ tmp_libs="$tmp_libs $deplib"
5686
+ done
5363
5687
  continue
5364
5688
  fi # $pass = conv
5365
5689
 
@@ -5583,7 +5907,7 @@ func_mode_link ()
5583
5907
  fi
5584
5908
  done
5585
5909
  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5586
- $ECHO
5910
+ echo
5587
5911
  if test "$linkmode" = prog; then
5588
5912
  $ECHO "*** Warning: Linking the executable $output against the loadable module"
5589
5913
  else
@@ -5686,9 +6010,9 @@ func_mode_link ()
5686
6010
  if test "X$dlopenmodule" != "X$lib"; then
5687
6011
  $ECHO "*** Warning: lib $linklib is a module, not a shared library"
5688
6012
  if test -z "$old_library" ; then
5689
- $ECHO
5690
- $ECHO "*** And there doesn't seem to be a static archive available"
5691
- $ECHO "*** The link will probably fail, sorry"
6013
+ echo
6014
+ echo "*** And there doesn't seem to be a static archive available"
6015
+ echo "*** The link will probably fail, sorry"
5692
6016
  else
5693
6017
  add="$dir/$old_library"
5694
6018
  fi
@@ -5828,21 +6152,21 @@ func_mode_link ()
5828
6152
 
5829
6153
  # Just print a warning and add the library to dependency_libs so
5830
6154
  # that the program can be linked against the static library.
5831
- $ECHO
6155
+ echo
5832
6156
  $ECHO "*** Warning: This system can not link to static lib archive $lib."
5833
- $ECHO "*** I have the capability to make that library automatically link in when"
5834
- $ECHO "*** you link to this library. But I can only do this if you have a"
5835
- $ECHO "*** shared version of the library, which you do not appear to have."
6157
+ echo "*** I have the capability to make that library automatically link in when"
6158
+ echo "*** you link to this library. But I can only do this if you have a"
6159
+ echo "*** shared version of the library, which you do not appear to have."
5836
6160
  if test "$module" = yes; then
5837
- $ECHO "*** But as you try to build a module library, libtool will still create "
5838
- $ECHO "*** a static module, that should work as long as the dlopening application"
5839
- $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
6161
+ echo "*** But as you try to build a module library, libtool will still create "
6162
+ echo "*** a static module, that should work as long as the dlopening application"
6163
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
5840
6164
  if test -z "$global_symbol_pipe"; then
5841
- $ECHO
5842
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
5843
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5844
- $ECHO "*** not find such a program. So, this module is probably useless."
5845
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6165
+ echo
6166
+ echo "*** However, this would only work if libtool was able to extract symbol"
6167
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6168
+ echo "*** not find such a program. So, this module is probably useless."
6169
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
5846
6170
  fi
5847
6171
  if test "$build_old_libs" = no; then
5848
6172
  build_libtool_libs=module
@@ -5962,7 +6286,7 @@ func_mode_link ()
5962
6286
  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
5963
6287
  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
5964
6288
  else
5965
- compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6289
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
5966
6290
  fi
5967
6291
  fi
5968
6292
  dependency_libs="$newdependency_libs"
@@ -6130,7 +6454,7 @@ func_mode_link ()
6130
6454
  if test "$deplibs_check_method" != pass_all; then
6131
6455
  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
6132
6456
  else
6133
- $ECHO
6457
+ echo
6134
6458
  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
6135
6459
  $ECHO "*** objects $objs is not portable!"
6136
6460
  libobjs="$libobjs $objs"
@@ -6198,7 +6522,7 @@ func_mode_link ()
6198
6522
  age="$number_minor"
6199
6523
  revision="$number_revision"
6200
6524
  ;;
6201
- freebsd-aout|freebsd-elf|sunos)
6525
+ freebsd-aout|freebsd-elf|qnx|sunos)
6202
6526
  current="$number_major"
6203
6527
  revision="$number_minor"
6204
6528
  age="0"
@@ -6210,9 +6534,6 @@ func_mode_link ()
6210
6534
  revision="$number_minor"
6211
6535
  lt_irix_increment=no
6212
6536
  ;;
6213
- *)
6214
- func_fatal_configuration "$modename: unknown library version type \`$version_type'"
6215
- ;;
6216
6537
  esac
6217
6538
  ;;
6218
6539
  no)
@@ -6435,14 +6756,14 @@ func_mode_link ()
6435
6756
  oldlibs="$oldlibs $output_objdir/$libname.$libext"
6436
6757
 
6437
6758
  # Transform .lo files to .o files.
6438
- oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
6759
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
6439
6760
  fi
6440
6761
 
6441
6762
  # Eliminate all temporary directories.
6442
6763
  #for path in $notinst_path; do
6443
- # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6444
- # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6445
- # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
6764
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
6765
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
6766
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
6446
6767
  #done
6447
6768
 
6448
6769
  if test -n "$xrpath"; then
@@ -6483,7 +6804,7 @@ func_mode_link ()
6483
6804
  if test "$build_libtool_libs" = yes; then
6484
6805
  if test -n "$rpath"; then
6485
6806
  case $host in
6486
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
6807
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
6487
6808
  # these systems don't actually have a c library (as such)!
6488
6809
  ;;
6489
6810
  *-*-rhapsody* | *-*-darwin1.[012])
@@ -6568,13 +6889,13 @@ EOF
6568
6889
  newdeplibs="$newdeplibs $i"
6569
6890
  else
6570
6891
  droppeddeps=yes
6571
- $ECHO
6892
+ echo
6572
6893
  $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6573
- $ECHO "*** I have the capability to make that library automatically link in when"
6574
- $ECHO "*** you link to this library. But I can only do this if you have a"
6575
- $ECHO "*** shared version of the library, which I believe you do not have"
6576
- $ECHO "*** because a test_compile did reveal that the linker did not use it for"
6577
- $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
6894
+ echo "*** I have the capability to make that library automatically link in when"
6895
+ echo "*** you link to this library. But I can only do this if you have a"
6896
+ echo "*** shared version of the library, which I believe you do not have"
6897
+ echo "*** because a test_compile did reveal that the linker did not use it for"
6898
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
6578
6899
  fi
6579
6900
  fi
6580
6901
  ;;
@@ -6611,22 +6932,22 @@ EOF
6611
6932
  newdeplibs="$newdeplibs $i"
6612
6933
  else
6613
6934
  droppeddeps=yes
6614
- $ECHO
6935
+ echo
6615
6936
  $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6616
- $ECHO "*** I have the capability to make that library automatically link in when"
6617
- $ECHO "*** you link to this library. But I can only do this if you have a"
6618
- $ECHO "*** shared version of the library, which you do not appear to have"
6619
- $ECHO "*** because a test_compile did reveal that the linker did not use this one"
6620
- $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
6937
+ echo "*** I have the capability to make that library automatically link in when"
6938
+ echo "*** you link to this library. But I can only do this if you have a"
6939
+ echo "*** shared version of the library, which you do not appear to have"
6940
+ echo "*** because a test_compile did reveal that the linker did not use this one"
6941
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
6621
6942
  fi
6622
6943
  fi
6623
6944
  else
6624
6945
  droppeddeps=yes
6625
- $ECHO
6946
+ echo
6626
6947
  $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6627
- $ECHO "*** make it link in! You will probably need to install it or some"
6628
- $ECHO "*** library that it depends on before this library will be fully"
6629
- $ECHO "*** functional. Installing it before continuing would be even better."
6948
+ echo "*** make it link in! You will probably need to install it or some"
6949
+ echo "*** library that it depends on before this library will be fully"
6950
+ echo "*** functional. Installing it before continuing would be even better."
6630
6951
  fi
6631
6952
  ;;
6632
6953
  *)
@@ -6672,7 +6993,7 @@ EOF
6672
6993
  potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
6673
6994
  case $potliblink in
6674
6995
  [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6675
- *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
6996
+ *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
6676
6997
  esac
6677
6998
  done
6678
6999
  if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
@@ -6687,12 +7008,12 @@ EOF
6687
7008
  fi
6688
7009
  if test -n "$a_deplib" ; then
6689
7010
  droppeddeps=yes
6690
- $ECHO
7011
+ echo
6691
7012
  $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6692
- $ECHO "*** I have the capability to make that library automatically link in when"
6693
- $ECHO "*** you link to this library. But I can only do this if you have a"
6694
- $ECHO "*** shared version of the library, which you do not appear to have"
6695
- $ECHO "*** because I did check the linker path looking for a file starting"
7013
+ echo "*** I have the capability to make that library automatically link in when"
7014
+ echo "*** you link to this library. But I can only do this if you have a"
7015
+ echo "*** shared version of the library, which you do not appear to have"
7016
+ echo "*** because I did check the linker path looking for a file starting"
6696
7017
  if test -z "$potlib" ; then
6697
7018
  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
6698
7019
  else
@@ -6730,7 +7051,7 @@ EOF
6730
7051
  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6731
7052
  for potent_lib in $potential_libs; do
6732
7053
  potlib="$potent_lib" # see symlink-check above in file_magic test
6733
- if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
7054
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
6734
7055
  $EGREP "$match_pattern_regex" > /dev/null; then
6735
7056
  newdeplibs="$newdeplibs $a_deplib"
6736
7057
  a_deplib=""
@@ -6741,12 +7062,12 @@ EOF
6741
7062
  fi
6742
7063
  if test -n "$a_deplib" ; then
6743
7064
  droppeddeps=yes
6744
- $ECHO
7065
+ echo
6745
7066
  $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6746
- $ECHO "*** I have the capability to make that library automatically link in when"
6747
- $ECHO "*** you link to this library. But I can only do this if you have a"
6748
- $ECHO "*** shared version of the library, which you do not appear to have"
6749
- $ECHO "*** because I did check the linker path looking for a file starting"
7067
+ echo "*** I have the capability to make that library automatically link in when"
7068
+ echo "*** you link to this library. But I can only do this if you have a"
7069
+ echo "*** shared version of the library, which you do not appear to have"
7070
+ echo "*** because I did check the linker path looking for a file starting"
6750
7071
  if test -z "$potlib" ; then
6751
7072
  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
6752
7073
  else
@@ -6764,25 +7085,25 @@ EOF
6764
7085
  ;;
6765
7086
  none | unknown | *)
6766
7087
  newdeplibs=""
6767
- tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6768
- -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
7088
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
6769
7089
  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6770
7090
  for i in $predeps $postdeps ; do
6771
7091
  # can't use Xsed below, because $i might contain '/'
6772
- tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
7092
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
6773
7093
  done
6774
7094
  fi
6775
- if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6776
- $GREP . >/dev/null; then
6777
- $ECHO
7095
+ case $tmp_deplibs in
7096
+ *[!\ \ ]*)
7097
+ echo
6778
7098
  if test "X$deplibs_check_method" = "Xnone"; then
6779
- $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
7099
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
6780
7100
  else
6781
- $ECHO "*** Warning: inter-library dependencies are not known to be supported."
7101
+ echo "*** Warning: inter-library dependencies are not known to be supported."
6782
7102
  fi
6783
- $ECHO "*** All declared inter-library dependencies are being dropped."
7103
+ echo "*** All declared inter-library dependencies are being dropped."
6784
7104
  droppeddeps=yes
6785
- fi
7105
+ ;;
7106
+ esac
6786
7107
  ;;
6787
7108
  esac
6788
7109
  versuffix=$versuffix_save
@@ -6794,23 +7115,23 @@ EOF
6794
7115
  case $host in
6795
7116
  *-*-rhapsody* | *-*-darwin1.[012])
6796
7117
  # On Rhapsody replace the C library with the System framework
6797
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7118
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
6798
7119
  ;;
6799
7120
  esac
6800
7121
 
6801
7122
  if test "$droppeddeps" = yes; then
6802
7123
  if test "$module" = yes; then
6803
- $ECHO
6804
- $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
7124
+ echo
7125
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
6805
7126
  $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6806
- $ECHO "*** a static module, that should work as long as the dlopening"
6807
- $ECHO "*** application is linked with the -dlopen flag."
7127
+ echo "*** a static module, that should work as long as the dlopening"
7128
+ echo "*** application is linked with the -dlopen flag."
6808
7129
  if test -z "$global_symbol_pipe"; then
6809
- $ECHO
6810
- $ECHO "*** However, this would only work if libtool was able to extract symbol"
6811
- $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6812
- $ECHO "*** not find such a program. So, this module is probably useless."
6813
- $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
7130
+ echo
7131
+ echo "*** However, this would only work if libtool was able to extract symbol"
7132
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7133
+ echo "*** not find such a program. So, this module is probably useless."
7134
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
6814
7135
  fi
6815
7136
  if test "$build_old_libs" = no; then
6816
7137
  oldlibs="$output_objdir/$libname.$libext"
@@ -6820,16 +7141,16 @@ EOF
6820
7141
  build_libtool_libs=no
6821
7142
  fi
6822
7143
  else
6823
- $ECHO "*** The inter-library dependencies that have been dropped here will be"
6824
- $ECHO "*** automatically added whenever a program is linked with this library"
6825
- $ECHO "*** or is declared to -dlopen it."
7144
+ echo "*** The inter-library dependencies that have been dropped here will be"
7145
+ echo "*** automatically added whenever a program is linked with this library"
7146
+ echo "*** or is declared to -dlopen it."
6826
7147
 
6827
7148
  if test "$allow_undefined" = no; then
6828
- $ECHO
6829
- $ECHO "*** Since this library must not contain undefined symbols,"
6830
- $ECHO "*** because either the platform does not support them or"
6831
- $ECHO "*** it was explicitly requested with -no-undefined,"
6832
- $ECHO "*** libtool will only create a static version of it."
7149
+ echo
7150
+ echo "*** Since this library must not contain undefined symbols,"
7151
+ echo "*** because either the platform does not support them or"
7152
+ echo "*** it was explicitly requested with -no-undefined,"
7153
+ echo "*** libtool will only create a static version of it."
6833
7154
  if test "$build_old_libs" = no; then
6834
7155
  oldlibs="$output_objdir/$libname.$libext"
6835
7156
  build_libtool_libs=module
@@ -6846,9 +7167,9 @@ EOF
6846
7167
  # Time to change all our "foo.ltframework" stuff back to "-framework foo"
6847
7168
  case $host in
6848
7169
  *-*-darwin*)
6849
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6850
- new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6851
- deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7170
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7171
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7172
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
6852
7173
  ;;
6853
7174
  esac
6854
7175
 
@@ -6970,7 +7291,7 @@ EOF
6970
7291
  done
6971
7292
 
6972
7293
  # Use standard objects if they are pic
6973
- test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7294
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
6974
7295
  test "X$libobjs" = "X " && libobjs=
6975
7296
 
6976
7297
  delfiles=
@@ -7036,7 +7357,7 @@ EOF
7036
7357
  if test -n "$export_symbols" && test -n "$include_expsyms"; then
7037
7358
  tmp_export_symbols="$export_symbols"
7038
7359
  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7039
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7360
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
7040
7361
  fi
7041
7362
 
7042
7363
  if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
@@ -7137,7 +7458,8 @@ EOF
7137
7458
  save_libobjs=$libobjs
7138
7459
  fi
7139
7460
  save_output=$output
7140
- output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
7461
+ func_basename "$output"
7462
+ output_la=$func_basename_result
7141
7463
 
7142
7464
  # Clear the reloadable object creation command queue and
7143
7465
  # initialize k to one.
@@ -7150,12 +7472,12 @@ EOF
7150
7472
  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
7151
7473
  output=${output_objdir}/${output_la}.lnkscript
7152
7474
  func_verbose "creating GNU ld script: $output"
7153
- $ECHO 'INPUT (' > $output
7475
+ echo 'INPUT (' > $output
7154
7476
  for obj in $save_libobjs
7155
7477
  do
7156
7478
  $ECHO "$obj" >> $output
7157
7479
  done
7158
- $ECHO ')' >> $output
7480
+ echo ')' >> $output
7159
7481
  delfiles="$delfiles $output"
7160
7482
  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
7161
7483
  output=${output_objdir}/${output_la}.lnk
@@ -7197,17 +7519,19 @@ EOF
7197
7519
  # command to the queue.
7198
7520
  if test "$k" -eq 1 ; then
7199
7521
  # The first file doesn't have a previous command to add.
7200
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
7522
+ reload_objs=$objlist
7523
+ eval concat_cmds=\"$reload_cmds\"
7201
7524
  else
7202
7525
  # All subsequent reloadable object files will link in
7203
7526
  # the last one created.
7204
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
7527
+ reload_objs="$objlist $last_robj"
7528
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
7205
7529
  fi
7206
7530
  last_robj=$output_objdir/$output_la-${k}.$objext
7207
7531
  func_arith $k + 1
7208
7532
  k=$func_arith_result
7209
7533
  output=$output_objdir/$output_la-${k}.$objext
7210
- objlist=$obj
7534
+ objlist=" $obj"
7211
7535
  func_len " $last_robj"
7212
7536
  func_arith $len0 + $func_len_result
7213
7537
  len=$func_arith_result
@@ -7217,7 +7541,8 @@ EOF
7217
7541
  # reloadable object file. All subsequent reloadable object
7218
7542
  # files will link in the last one created.
7219
7543
  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7220
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
7544
+ reload_objs="$objlist $last_robj"
7545
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
7221
7546
  if test -n "$last_robj"; then
7222
7547
  eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
7223
7548
  fi
@@ -7276,7 +7601,7 @@ EOF
7276
7601
  if test -n "$export_symbols" && test -n "$include_expsyms"; then
7277
7602
  tmp_export_symbols="$export_symbols"
7278
7603
  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7279
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
7604
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
7280
7605
  fi
7281
7606
 
7282
7607
  if test -n "$orig_export_symbols"; then
@@ -7441,7 +7766,7 @@ EOF
7441
7766
  if test -n "$convenience"; then
7442
7767
  if test -n "$whole_archive_flag_spec"; then
7443
7768
  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
7444
- reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
7769
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
7445
7770
  else
7446
7771
  gentop="$output_objdir/${obj}x"
7447
7772
  generated="$generated $gentop"
@@ -7452,7 +7777,7 @@ EOF
7452
7777
  fi
7453
7778
 
7454
7779
  # Create the old-style object.
7455
- reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
7780
+ reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
7456
7781
 
7457
7782
  output="$obj"
7458
7783
  func_execute_cmds "$reload_cmds" 'exit $?'
@@ -7512,8 +7837,8 @@ EOF
7512
7837
  case $host in
7513
7838
  *-*-rhapsody* | *-*-darwin1.[012])
7514
7839
  # On Rhapsody replace the C library is the System framework
7515
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7516
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7840
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
7841
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
7517
7842
  ;;
7518
7843
  esac
7519
7844
 
@@ -7530,8 +7855,8 @@ EOF
7530
7855
  esac
7531
7856
  fi
7532
7857
  # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7533
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7534
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7858
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7859
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
7535
7860
  ;;
7536
7861
  esac
7537
7862
 
@@ -7668,8 +7993,8 @@ EOF
7668
7993
 
7669
7994
  if test -n "$libobjs" && test "$build_old_libs" = yes; then
7670
7995
  # Transform all the library objects into standard objects.
7671
- compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7672
- finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7996
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
7997
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
7673
7998
  fi
7674
7999
 
7675
8000
  func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
@@ -7681,15 +8006,15 @@ EOF
7681
8006
 
7682
8007
  wrappers_required=yes
7683
8008
  case $host in
8009
+ *cegcc* | *mingw32ce*)
8010
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8011
+ wrappers_required=no
8012
+ ;;
7684
8013
  *cygwin* | *mingw* )
7685
8014
  if test "$build_libtool_libs" != yes; then
7686
8015
  wrappers_required=no
7687
8016
  fi
7688
8017
  ;;
7689
- *cegcc)
7690
- # Disable wrappers for cegcc, we are cross compiling anyway.
7691
- wrappers_required=no
7692
- ;;
7693
8018
  *)
7694
8019
  if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
7695
8020
  wrappers_required=no
@@ -7698,7 +8023,7 @@ EOF
7698
8023
  esac
7699
8024
  if test "$wrappers_required" = no; then
7700
8025
  # Replace the output file specification.
7701
- compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8026
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
7702
8027
  link_command="$compile_command$compile_rpath"
7703
8028
 
7704
8029
  # We have no uninstalled library dependencies, so finalize right now.
@@ -7745,7 +8070,7 @@ EOF
7745
8070
  # We don't need to create a wrapper script.
7746
8071
  link_command="$compile_var$compile_command$compile_rpath"
7747
8072
  # Replace the output file specification.
7748
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8073
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
7749
8074
  # Delete the old output file.
7750
8075
  $opt_dry_run || $RM $output
7751
8076
  # Link the executable and exit
@@ -7764,7 +8089,7 @@ EOF
7764
8089
  if test "$fast_install" != no; then
7765
8090
  link_command="$finalize_var$compile_command$finalize_rpath"
7766
8091
  if test "$fast_install" = yes; then
7767
- relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
8092
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
7768
8093
  else
7769
8094
  # fast_install is set to needless
7770
8095
  relink_command=
@@ -7776,7 +8101,7 @@ EOF
7776
8101
  fi
7777
8102
 
7778
8103
  # Replace the output file specification.
7779
- link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
8104
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
7780
8105
 
7781
8106
  # Delete the old output files.
7782
8107
  $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
@@ -7800,18 +8125,7 @@ EOF
7800
8125
  fi
7801
8126
  done
7802
8127
  relink_command="(cd `pwd`; $relink_command)"
7803
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7804
- fi
7805
-
7806
- # Quote $ECHO for shipping.
7807
- if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7808
- case $progpath in
7809
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7810
- *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7811
- esac
7812
- qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7813
- else
7814
- qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
8128
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
7815
8129
  fi
7816
8130
 
7817
8131
  # Only actually do things if not in dry run mode.
@@ -7932,7 +8246,7 @@ EOF
7932
8246
  done | sort | sort -uc >/dev/null 2>&1); then
7933
8247
  :
7934
8248
  else
7935
- $ECHO "copying selected object files to avoid basename conflicts..."
8249
+ echo "copying selected object files to avoid basename conflicts..."
7936
8250
  gentop="$output_objdir/${outputname}x"
7937
8251
  generated="$generated $gentop"
7938
8252
  func_mkdir_p "$gentop"
@@ -8043,7 +8357,7 @@ EOF
8043
8357
  done
8044
8358
  # Quote the link command for shipping.
8045
8359
  relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8046
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
8360
+ relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
8047
8361
  if test "$hardcode_automatic" = yes ; then
8048
8362
  relink_command=
8049
8363
  fi
@@ -8128,9 +8442,27 @@ EOF
8128
8442
  fi
8129
8443
  $RM $output
8130
8444
  # place dlname in correct position for cygwin
8445
+ # In fact, it would be nice if we could use this code for all target
8446
+ # systems that can't hard-code library paths into their executables
8447
+ # and that have no shared library path variable independent of PATH,
8448
+ # but it turns out we can't easily determine that from inspecting
8449
+ # libtool variables, so we have to hard-code the OSs to which it
8450
+ # applies here; at the moment, that means platforms that use the PE
8451
+ # object format with DLL files. See the long comment at the top of
8452
+ # tests/bindir.at for full details.
8131
8453
  tdlname=$dlname
8132
8454
  case $host,$output,$installed,$module,$dlname in
8133
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
8455
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
8456
+ # If a -bindir argument was supplied, place the dll there.
8457
+ if test "x$bindir" != x ;
8458
+ then
8459
+ func_relative_path "$install_libdir" "$bindir"
8460
+ tdlname=$func_relative_path_result$dlname
8461
+ else
8462
+ # Otherwise fall back on heuristic.
8463
+ tdlname=../bin/$dlname
8464
+ fi
8465
+ ;;
8134
8466
  esac
8135
8467
  $ECHO > $output "\
8136
8468
  # $outputname - a libtool library file