nutcracker 0.2.4.5 → 0.2.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. data/ext/nutcracker/ChangeLog +0 -0
  2. data/ext/nutcracker/LICENSE +0 -0
  3. data/ext/nutcracker/Makefile.am +0 -0
  4. data/ext/nutcracker/Makefile.in +190 -82
  5. data/ext/nutcracker/NOTICE +0 -0
  6. data/ext/nutcracker/README.md +0 -0
  7. data/ext/nutcracker/aclocal.m4 +231 -122
  8. data/ext/nutcracker/conf/nutcracker.leaf.yml +0 -0
  9. data/ext/nutcracker/conf/nutcracker.root.yml +0 -0
  10. data/ext/nutcracker/conf/nutcracker.yml +0 -0
  11. data/ext/nutcracker/config.h.in +0 -15
  12. data/ext/nutcracker/config/config.guess +278 -248
  13. data/ext/nutcracker/config/config.sub +234 -77
  14. data/ext/nutcracker/config/depcomp +143 -39
  15. data/ext/nutcracker/config/install-sh +136 -116
  16. data/ext/nutcracker/config/ltmain.sh +1704 -788
  17. data/ext/nutcracker/config/missing +29 -65
  18. data/ext/nutcracker/configure +1998 -1052
  19. data/ext/nutcracker/configure.ac +2 -34
  20. data/ext/nutcracker/contrib/Makefile.am +0 -0
  21. data/ext/nutcracker/contrib/Makefile.in +120 -47
  22. data/ext/nutcracker/contrib/yaml-0.1.4.tar.gz +0 -0
  23. data/ext/nutcracker/extconf.rb +5 -2
  24. data/ext/nutcracker/m4/libtool.m4 +960 -396
  25. data/ext/nutcracker/m4/ltoptions.m4 +17 -2
  26. data/ext/nutcracker/m4/ltversion.m4 +6 -6
  27. data/ext/nutcracker/notes/c-styleguide.txt +0 -0
  28. data/ext/nutcracker/notes/debug.txt +0 -0
  29. data/ext/nutcracker/notes/memcache.txt +0 -0
  30. data/ext/nutcracker/notes/recommendation.md +0 -0
  31. data/ext/nutcracker/notes/redis.md +0 -0
  32. data/ext/nutcracker/notes/socket.txt +0 -0
  33. data/ext/nutcracker/scripts/nutcracker.init +0 -0
  34. data/ext/nutcracker/scripts/nutcracker.spec +0 -0
  35. data/ext/nutcracker/scripts/redis-check.py +0 -0
  36. data/ext/nutcracker/src/Makefile.am +1 -1
  37. data/ext/nutcracker/src/Makefile.in +167 -81
  38. data/ext/nutcracker/src/hashkit/Makefile.am +0 -0
  39. data/ext/nutcracker/src/hashkit/Makefile.in +72 -37
  40. data/ext/nutcracker/src/hashkit/nc_crc16.c +0 -0
  41. data/ext/nutcracker/src/hashkit/nc_crc32.c +0 -0
  42. data/ext/nutcracker/src/hashkit/nc_fnv.c +0 -0
  43. data/ext/nutcracker/src/hashkit/nc_hashkit.h +0 -0
  44. data/ext/nutcracker/src/hashkit/nc_hsieh.c +0 -0
  45. data/ext/nutcracker/src/hashkit/nc_jenkins.c +0 -0
  46. data/ext/nutcracker/src/hashkit/nc_ketama.c +0 -0
  47. data/ext/nutcracker/src/hashkit/nc_md5.c +0 -0
  48. data/ext/nutcracker/src/hashkit/nc_modula.c +0 -0
  49. data/ext/nutcracker/src/hashkit/nc_murmur.c +0 -0
  50. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.c +0 -0
  51. data/ext/nutcracker/src/hashkit/nc_random.c +0 -0
  52. data/ext/nutcracker/src/nc.c +0 -0
  53. data/ext/nutcracker/src/nc_array.c +0 -0
  54. data/ext/nutcracker/src/nc_array.h +0 -0
  55. data/ext/nutcracker/src/nc_client.c +0 -0
  56. data/ext/nutcracker/src/nc_client.h +0 -0
  57. data/ext/nutcracker/src/nc_conf.c +0 -0
  58. data/ext/nutcracker/src/nc_conf.h +0 -0
  59. data/ext/nutcracker/src/nc_connection.c +0 -0
  60. data/ext/nutcracker/src/nc_connection.h +0 -0
  61. data/ext/nutcracker/src/nc_core.c +26 -29
  62. data/ext/nutcracker/src/nc_core.h +5 -13
  63. data/ext/nutcracker/src/{nc_epoll.c → nc_event.c} +30 -94
  64. data/ext/nutcracker/src/nc_event.h +13 -33
  65. data/ext/nutcracker/src/nc_log.c +0 -0
  66. data/ext/nutcracker/src/nc_log.h +0 -0
  67. data/ext/nutcracker/src/nc_mbuf.c +0 -0
  68. data/ext/nutcracker/src/nc_mbuf.h +0 -0
  69. data/ext/nutcracker/src/nc_message.c +0 -0
  70. data/ext/nutcracker/src/nc_message.h +0 -0
  71. data/ext/nutcracker/src/nc_proxy.c +8 -8
  72. data/ext/nutcracker/src/nc_proxy.h +0 -0
  73. data/ext/nutcracker/src/nc_queue.h +0 -0
  74. data/ext/nutcracker/src/nc_rbtree.c +0 -0
  75. data/ext/nutcracker/src/nc_rbtree.h +0 -0
  76. data/ext/nutcracker/src/nc_request.c +3 -3
  77. data/ext/nutcracker/src/nc_response.c +6 -4
  78. data/ext/nutcracker/src/nc_server.c +5 -5
  79. data/ext/nutcracker/src/nc_server.h +0 -0
  80. data/ext/nutcracker/src/nc_signal.c +0 -0
  81. data/ext/nutcracker/src/nc_signal.h +0 -0
  82. data/ext/nutcracker/src/nc_stats.c +21 -16
  83. data/ext/nutcracker/src/nc_stats.h +4 -3
  84. data/ext/nutcracker/src/nc_string.c +0 -0
  85. data/ext/nutcracker/src/nc_string.h +0 -0
  86. data/ext/nutcracker/src/nc_util.c +0 -16
  87. data/ext/nutcracker/src/nc_util.h +0 -1
  88. data/ext/nutcracker/src/proto/Makefile.am +0 -0
  89. data/ext/nutcracker/src/proto/Makefile.in +72 -37
  90. data/ext/nutcracker/src/proto/nc_memcache.c +0 -0
  91. data/ext/nutcracker/src/proto/nc_proto.h +0 -0
  92. data/ext/nutcracker/src/proto/nc_redis.c +0 -0
  93. data/lib/nutcracker/version.rb +1 -1
  94. metadata +3 -200
  95. data/ext/nutcracker/Makefile +0 -643
  96. data/ext/nutcracker/autom4te.cache/output.0 +0 -18664
  97. data/ext/nutcracker/autom4te.cache/output.1 +0 -18664
  98. data/ext/nutcracker/autom4te.cache/output.2 +0 -18664
  99. data/ext/nutcracker/autom4te.cache/requests +0 -494
  100. data/ext/nutcracker/autom4te.cache/traces.0 +0 -2415
  101. data/ext/nutcracker/autom4te.cache/traces.1 +0 -945
  102. data/ext/nutcracker/autom4te.cache/traces.2 +0 -2415
  103. data/ext/nutcracker/config.h +0 -332
  104. data/ext/nutcracker/config.log +0 -2684
  105. data/ext/nutcracker/config.status +0 -2317
  106. data/ext/nutcracker/contrib/Makefile +0 -494
  107. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile +0 -736
  108. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.0 +0 -13102
  109. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.1 +0 -13085
  110. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/output.2 +0 -13085
  111. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/requests +0 -476
  112. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.0 +0 -2339
  113. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.1 +0 -545
  114. data/ext/nutcracker/contrib/yaml-0.1.4/autom4te.cache/traces.2 +0 -2339
  115. data/ext/nutcracker/contrib/yaml-0.1.4/config.h +0 -81
  116. data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in~ +0 -80
  117. data/ext/nutcracker/contrib/yaml-0.1.4/config.log +0 -688
  118. data/ext/nutcracker/contrib/yaml-0.1.4/config.status +0 -2032
  119. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/annotated.html +0 -51
  120. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/bc_s.png +0 -0
  121. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/classes.html +0 -41
  122. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/closed.png +0 -0
  123. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.css +0 -656
  124. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/doxygen.png +0 -0
  125. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/files.html +0 -40
  126. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions.html +0 -91
  127. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x62.html +0 -84
  128. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x63.html +0 -87
  129. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x64.html +0 -83
  130. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x65.html +0 -110
  131. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x66.html +0 -79
  132. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x68.html +0 -80
  133. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x69.html +0 -92
  134. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6b.html +0 -71
  135. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6c.html +0 -88
  136. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6d.html +0 -96
  137. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6e.html +0 -71
  138. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x6f.html +0 -80
  139. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x70.html +0 -100
  140. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x71.html +0 -71
  141. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x72.html +0 -87
  142. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x73.html +0 -163
  143. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x74.html +0 -115
  144. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x75.html +0 -71
  145. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x76.html +0 -80
  146. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_0x77.html +0 -77
  147. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars.html +0 -91
  148. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x62.html +0 -84
  149. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x63.html +0 -87
  150. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x64.html +0 -83
  151. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x65.html +0 -110
  152. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x66.html +0 -79
  153. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x68.html +0 -80
  154. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x69.html +0 -92
  155. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6b.html +0 -71
  156. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6c.html +0 -88
  157. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6d.html +0 -96
  158. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6e.html +0 -71
  159. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x6f.html +0 -80
  160. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x70.html +0 -100
  161. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x71.html +0 -71
  162. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x72.html +0 -87
  163. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x73.html +0 -163
  164. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x74.html +0 -115
  165. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x75.html +0 -71
  166. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x76.html +0 -80
  167. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/functions_vars_0x77.html +0 -77
  168. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals.html +0 -667
  169. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_defs.html +0 -81
  170. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_enum.html +0 -78
  171. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_eval.html +0 -373
  172. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_func.html +0 -196
  173. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/globals_type.html +0 -126
  174. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__basic.html +0 -320
  175. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__emitter.html +0 -819
  176. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__events.html +0 -664
  177. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__export.html +0 -60
  178. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__nodes.html +0 -795
  179. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__parser.html +0 -606
  180. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__styles.html +0 -222
  181. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__tokens.html +0 -246
  182. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/group__version.html +0 -106
  183. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/index.html +0 -31
  184. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/modules.html +0 -42
  185. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_f.png +0 -0
  186. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/nav_h.png +0 -0
  187. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/open.png +0 -0
  188. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__alias__data__s.html +0 -108
  189. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__document__s.html +0 -235
  190. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__emitter__s.html +0 -1300
  191. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__event__s.html +0 -496
  192. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__mark__s.html +0 -108
  193. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__pair__s.html +0 -91
  194. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__node__s.html +0 -420
  195. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__parser__s.html +0 -1229
  196. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__simple__key__s.html +0 -97
  197. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__tag__directive__s.html +0 -91
  198. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__token__s.html +0 -413
  199. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/structyaml__version__directive__s.html +0 -91
  200. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_a.png +0 -0
  201. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_b.png +0 -0
  202. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_h.png +0 -0
  203. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tab_s.png +0 -0
  204. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/tabs.css +0 -59
  205. data/ext/nutcracker/contrib/yaml-0.1.4/doc/html/yaml_8h.html +0 -525
  206. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.am +0 -17
  207. data/ext/nutcracker/contrib/yaml-0.1.4/include/Makefile.in +0 -470
  208. data/ext/nutcracker/contrib/yaml-0.1.4/libtool +0 -8890
  209. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile +0 -484
  210. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.lo +0 -12
  211. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.o +0 -0
  212. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.lo +0 -12
  213. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.o +0 -0
  214. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.lo +0 -12
  215. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.o +0 -0
  216. data/ext/nutcracker/contrib/yaml-0.1.4/src/libyaml.la +0 -41
  217. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.lo +0 -12
  218. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.o +0 -0
  219. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.lo +0 -12
  220. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.o +0 -0
  221. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.lo +0 -12
  222. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.o +0 -0
  223. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.lo +0 -12
  224. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.o +0 -0
  225. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.lo +0 -12
  226. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.o +0 -0
  227. data/ext/nutcracker/contrib/yaml-0.1.4/stamp-h1 +0 -1
  228. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile +0 -675
  229. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor +0 -0
  230. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt +0 -0
  231. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.o +0 -0
  232. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.o +0 -0
  233. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter +0 -0
  234. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt +0 -0
  235. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.o +0 -0
  236. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.o +0 -0
  237. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper +0 -0
  238. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.o +0 -0
  239. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter +0 -0
  240. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.o +0 -0
  241. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader +0 -0
  242. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.o +0 -0
  243. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser +0 -0
  244. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.o +0 -0
  245. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner +0 -0
  246. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.o +0 -0
  247. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc +0 -10
  248. data/ext/nutcracker/contrib/yaml-0.1.4/yaml-0.1.pc.in +0 -10
  249. data/ext/nutcracker/exconf.rb +0 -0
  250. data/ext/nutcracker/libtool +0 -9403
  251. data/ext/nutcracker/src/Makefile +0 -647
  252. data/ext/nutcracker/src/hashkit/Makefile +0 -476
  253. data/ext/nutcracker/src/hashkit/libhashkit.a +0 -0
  254. data/ext/nutcracker/src/hashkit/nc_crc16.o +0 -0
  255. data/ext/nutcracker/src/hashkit/nc_crc32.o +0 -0
  256. data/ext/nutcracker/src/hashkit/nc_fnv.o +0 -0
  257. data/ext/nutcracker/src/hashkit/nc_hsieh.o +0 -0
  258. data/ext/nutcracker/src/hashkit/nc_jenkins.o +0 -0
  259. data/ext/nutcracker/src/hashkit/nc_ketama.o +0 -0
  260. data/ext/nutcracker/src/hashkit/nc_md5.o +0 -0
  261. data/ext/nutcracker/src/hashkit/nc_modula.o +0 -0
  262. data/ext/nutcracker/src/hashkit/nc_murmur.o +0 -0
  263. data/ext/nutcracker/src/hashkit/nc_one_at_a_time.o +0 -0
  264. data/ext/nutcracker/src/hashkit/nc_random.o +0 -0
  265. data/ext/nutcracker/src/nc.o +0 -0
  266. data/ext/nutcracker/src/nc_array.o +0 -0
  267. data/ext/nutcracker/src/nc_client.o +0 -0
  268. data/ext/nutcracker/src/nc_conf.o +0 -0
  269. data/ext/nutcracker/src/nc_connection.o +0 -0
  270. data/ext/nutcracker/src/nc_core.o +0 -0
  271. data/ext/nutcracker/src/nc_epoll.o +0 -0
  272. data/ext/nutcracker/src/nc_kqueue.c +0 -296
  273. data/ext/nutcracker/src/nc_kqueue.o +0 -0
  274. data/ext/nutcracker/src/nc_log.o +0 -0
  275. data/ext/nutcracker/src/nc_mbuf.o +0 -0
  276. data/ext/nutcracker/src/nc_message.o +0 -0
  277. data/ext/nutcracker/src/nc_proxy.o +0 -0
  278. data/ext/nutcracker/src/nc_rbtree.o +0 -0
  279. data/ext/nutcracker/src/nc_request.o +0 -0
  280. data/ext/nutcracker/src/nc_response.o +0 -0
  281. data/ext/nutcracker/src/nc_server.o +0 -0
  282. data/ext/nutcracker/src/nc_signal.o +0 -0
  283. data/ext/nutcracker/src/nc_stats.o +0 -0
  284. data/ext/nutcracker/src/nc_string.o +0 -0
  285. data/ext/nutcracker/src/nc_util.o +0 -0
  286. data/ext/nutcracker/src/nutcracker +0 -0
  287. data/ext/nutcracker/src/proto/Makefile +0 -454
  288. data/ext/nutcracker/src/proto/libproto.a +0 -0
  289. data/ext/nutcracker/src/proto/nc_memcache.o +0 -0
  290. data/ext/nutcracker/src/proto/nc_redis.o +0 -0
  291. data/ext/nutcracker/stamp-h1 +0 -1
@@ -1,10 +1,9 @@
1
- # Generated from ltmain.m4sh.
2
1
 
3
- # libtool (GNU libtool) 2.2.10
2
+ # libtool (GNU libtool) 2.4.2
4
3
  # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5
4
 
6
5
  # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
7
- # 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
6
+ # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
8
7
  # This is free software; see the source for copying conditions. There is NO
9
8
  # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
9
 
@@ -42,6 +41,7 @@
42
41
  # --quiet, --silent don't print informational messages
43
42
  # --no-quiet, --no-silent
44
43
  # print informational messages (default)
44
+ # --no-warn don't display warning messages
45
45
  # --tag=TAG use configuration variables from tag TAG
46
46
  # -v, --verbose print more informational messages than default
47
47
  # --no-verbose don't print the extra informational messages
@@ -70,17 +70,19 @@
70
70
  # compiler: $LTCC
71
71
  # compiler flags: $LTCFLAGS
72
72
  # linker: $LD (gnu? $with_gnu_ld)
73
- # $progname: (GNU libtool) 2.2.10
73
+ # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
74
74
  # automake: $automake_version
75
75
  # autoconf: $autoconf_version
76
76
  #
77
77
  # Report bugs to <bug-libtool@gnu.org>.
78
+ # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
79
+ # General help using GNU software: <http://www.gnu.org/gethelp/>.
78
80
 
79
81
  PROGRAM=libtool
80
82
  PACKAGE=libtool
81
- VERSION=2.2.10
83
+ VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
82
84
  TIMESTAMP=""
83
- package_revision=1.3175
85
+ package_revision=1.3337
84
86
 
85
87
  # Be Bourne compatible
86
88
  if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -135,15 +137,10 @@ progpath="$0"
135
137
 
136
138
  : ${CP="cp -f"}
137
139
  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"}
141
- : ${LN_S="ln -s"}
142
140
  : ${MAKE="make"}
143
141
  : ${MKDIR="mkdir"}
144
142
  : ${MV="mv -f"}
145
143
  : ${RM="rm -f"}
146
- : ${SED="/usr/bin/sed"}
147
144
  : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
148
145
  : ${Xsed="$SED -e 1s/^X//"}
149
146
 
@@ -163,6 +160,27 @@ IFS=" $lt_nl"
163
160
  dirname="s,/[^/]*$,,"
164
161
  basename="s,^.*/,,"
165
162
 
163
+ # func_dirname file append nondir_replacement
164
+ # Compute the dirname of FILE. If nonempty, add APPEND to the result,
165
+ # otherwise set result to NONDIR_REPLACEMENT.
166
+ func_dirname ()
167
+ {
168
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
169
+ if test "X$func_dirname_result" = "X${1}"; then
170
+ func_dirname_result="${3}"
171
+ else
172
+ func_dirname_result="$func_dirname_result${2}"
173
+ fi
174
+ } # func_dirname may be replaced by extended shell implementation
175
+
176
+
177
+ # func_basename file
178
+ func_basename ()
179
+ {
180
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
181
+ } # func_basename may be replaced by extended shell implementation
182
+
183
+
166
184
  # func_dirname_and_basename file append nondir_replacement
167
185
  # perform func_basename and func_dirname in a single function
168
186
  # call:
@@ -177,17 +195,31 @@ basename="s,^.*/,,"
177
195
  # those functions but instead duplicate the functionality here.
178
196
  func_dirname_and_basename ()
179
197
  {
180
- # Extract subdirectory from the argument.
181
- func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
182
- if test "X$func_dirname_result" = "X${1}"; then
183
- func_dirname_result="${3}"
184
- else
185
- func_dirname_result="$func_dirname_result${2}"
186
- fi
187
- func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
188
- }
198
+ # Extract subdirectory from the argument.
199
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
200
+ if test "X$func_dirname_result" = "X${1}"; then
201
+ func_dirname_result="${3}"
202
+ else
203
+ func_dirname_result="$func_dirname_result${2}"
204
+ fi
205
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
206
+ } # func_dirname_and_basename may be replaced by extended shell implementation
207
+
208
+
209
+ # func_stripname prefix suffix name
210
+ # strip PREFIX and SUFFIX off of NAME.
211
+ # PREFIX and SUFFIX must not contain globbing or regex special
212
+ # characters, hashes, percent signs, but SUFFIX may contain a leading
213
+ # dot (in which case that matches only a dot).
214
+ # func_strip_suffix prefix name
215
+ func_stripname ()
216
+ {
217
+ case ${2} in
218
+ .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
219
+ *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
220
+ esac
221
+ } # func_stripname may be replaced by extended shell implementation
189
222
 
190
- # Generated shell functions inserted here.
191
223
 
192
224
  # These SED scripts presuppose an absolute path with a trailing slash.
193
225
  pathcar='s,^/\([^/]*\).*$,\1,'
@@ -351,7 +383,7 @@ case $progpath in
351
383
  ;;
352
384
  *)
353
385
  save_IFS="$IFS"
354
- IFS=:
386
+ IFS=${PATH_SEPARATOR-:}
355
387
  for progdir in $PATH; do
356
388
  IFS="$save_IFS"
357
389
  test -x "$progdir/$progname" && break
@@ -370,6 +402,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
370
402
  # Same as above, but do not quote variable references.
371
403
  double_quote_subst='s/\(["`\\]\)/\\\1/g'
372
404
 
405
+ # Sed substitution that turns a string into a regex matching for the
406
+ # string literally.
407
+ sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
408
+
409
+ # Sed substitution that converts a w32 file name or path
410
+ # which contains forward slashes, into one that contains
411
+ # (escaped) backslashes. A very naive implementation.
412
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
413
+
373
414
  # Re-`\' parameter expansions in output of double_quote_subst that were
374
415
  # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
375
416
  # in input to double_quote_subst, that '$' was protected from expansion.
@@ -398,7 +439,7 @@ opt_warning=:
398
439
  # name if it has been set yet.
399
440
  func_echo ()
400
441
  {
401
- $ECHO "$progname${mode+: }$mode: $*"
442
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
402
443
  }
403
444
 
404
445
  # func_verbose arg...
@@ -424,14 +465,14 @@ func_echo_all ()
424
465
  # Echo program name prefixed message to standard error.
425
466
  func_error ()
426
467
  {
427
- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
468
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
428
469
  }
429
470
 
430
471
  # func_warning arg...
431
472
  # Echo program name prefixed warning message to standard error.
432
473
  func_warning ()
433
474
  {
434
- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
475
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
435
476
 
436
477
  # bash bug again:
437
478
  :
@@ -650,11 +691,30 @@ func_show_eval_locale ()
650
691
  fi
651
692
  }
652
693
 
694
+ # func_tr_sh
695
+ # Turn $1 into a string suitable for a shell variable name.
696
+ # Result is stored in $func_tr_sh_result. All characters
697
+ # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
698
+ # if $1 begins with a digit, a '_' is prepended as well.
699
+ func_tr_sh ()
700
+ {
701
+ case $1 in
702
+ [0-9]* | *[!a-zA-Z0-9_]*)
703
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
704
+ ;;
705
+ * )
706
+ func_tr_sh_result=$1
707
+ ;;
708
+ esac
709
+ }
710
+
653
711
 
654
712
  # func_version
655
713
  # Echo version message to standard output and exit.
656
714
  func_version ()
657
715
  {
716
+ $opt_debug
717
+
658
718
  $SED -n '/(C)/!b go
659
719
  :more
660
720
  /\./!{
@@ -676,6 +736,8 @@ func_version ()
676
736
  # Echo short help message to standard output and exit.
677
737
  func_usage ()
678
738
  {
739
+ $opt_debug
740
+
679
741
  $SED -n '/^# Usage:/,/^# *.*--help/ {
680
742
  s/^# //
681
743
  s/^# *$//
@@ -692,7 +754,10 @@ func_usage ()
692
754
  # unless 'noexit' is passed as argument.
693
755
  func_help ()
694
756
  {
757
+ $opt_debug
758
+
695
759
  $SED -n '/^# Usage:/,/# Report bugs to/ {
760
+ :print
696
761
  s/^# //
697
762
  s/^# *$//
698
763
  s*\$progname*'$progname'*
@@ -702,10 +767,14 @@ func_help ()
702
767
  s*\$LTCFLAGS*'"$LTCFLAGS"'*
703
768
  s*\$LD*'"$LD"'*
704
769
  s/\$with_gnu_ld/'"$with_gnu_ld"'/
705
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
706
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
770
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
771
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
707
772
  p
708
- }' < "$progpath"
773
+ d
774
+ }
775
+ /^# .* home page:/b print
776
+ /^# General help using/b print
777
+ ' < "$progpath"
709
778
  ret=$?
710
779
  if test -z "$1"; then
711
780
  exit $ret
@@ -717,12 +786,39 @@ func_help ()
717
786
  # exit_cmd.
718
787
  func_missing_arg ()
719
788
  {
789
+ $opt_debug
790
+
720
791
  func_error "missing argument for $1."
721
792
  exit_cmd=exit
722
793
  }
723
794
 
724
- exit_cmd=:
725
795
 
796
+ # func_split_short_opt shortopt
797
+ # Set func_split_short_opt_name and func_split_short_opt_arg shell
798
+ # variables after splitting SHORTOPT after the 2nd character.
799
+ func_split_short_opt ()
800
+ {
801
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
802
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
803
+
804
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
805
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
806
+ } # func_split_short_opt may be replaced by extended shell implementation
807
+
808
+
809
+ # func_split_long_opt longopt
810
+ # Set func_split_long_opt_name and func_split_long_opt_arg shell
811
+ # variables after splitting LONGOPT at the `=' sign.
812
+ func_split_long_opt ()
813
+ {
814
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
815
+ my_sed_long_arg='1s/^--[^=]*=//'
816
+
817
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
818
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
819
+ } # func_split_long_opt may be replaced by extended shell implementation
820
+
821
+ exit_cmd=:
726
822
 
727
823
 
728
824
 
@@ -732,25 +828,64 @@ magic="%%%MAGIC variable%%%"
732
828
  magic_exe="%%%MAGIC EXE variable%%%"
733
829
 
734
830
  # Global variables.
735
- # $mode is unset
736
831
  nonopt=
737
- execute_dlfiles=
738
832
  preserve_args=
739
833
  lo2o="s/\\.lo\$/.${objext}/"
740
834
  o2lo="s/\\.${objext}\$/.lo/"
741
835
  extracted_archives=
742
836
  extracted_serial=0
743
837
 
744
- opt_dry_run=false
745
- opt_duplicate_deps=false
746
- opt_silent=false
747
- opt_debug=:
748
-
749
838
  # If this variable is set in any of the actions, the command in it
750
839
  # will be execed at the end. This prevents here-documents from being
751
840
  # left over by shells.
752
841
  exec_cmd=
753
842
 
843
+ # func_append var value
844
+ # Append VALUE to the end of shell variable VAR.
845
+ func_append ()
846
+ {
847
+ eval "${1}=\$${1}\${2}"
848
+ } # func_append may be replaced by extended shell implementation
849
+
850
+ # func_append_quoted var value
851
+ # Quote VALUE and append to the end of shell variable VAR, separated
852
+ # by a space.
853
+ func_append_quoted ()
854
+ {
855
+ func_quote_for_eval "${2}"
856
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
857
+ } # func_append_quoted may be replaced by extended shell implementation
858
+
859
+
860
+ # func_arith arithmetic-term...
861
+ func_arith ()
862
+ {
863
+ func_arith_result=`expr "${@}"`
864
+ } # func_arith may be replaced by extended shell implementation
865
+
866
+
867
+ # func_len string
868
+ # STRING may not start with a hyphen.
869
+ func_len ()
870
+ {
871
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
872
+ } # func_len may be replaced by extended shell implementation
873
+
874
+
875
+ # func_lo2o object
876
+ func_lo2o ()
877
+ {
878
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
879
+ } # func_lo2o may be replaced by extended shell implementation
880
+
881
+
882
+ # func_xform libobj-or-source
883
+ func_xform ()
884
+ {
885
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
886
+ } # func_xform may be replaced by extended shell implementation
887
+
888
+
754
889
  # func_fatal_configuration arg...
755
890
  # Echo program name prefixed message to standard error, followed by
756
891
  # a configuration failure hint, and exit.
@@ -840,129 +975,209 @@ func_enable_tag ()
840
975
  esac
841
976
  }
842
977
 
843
- # Parse options once, thoroughly. This comes as soon as possible in
844
- # the script to make things like `libtool --version' happen quickly.
978
+ # func_check_version_match
979
+ # Ensure that we are using m4 macros, and libtool script from the same
980
+ # release of libtool.
981
+ func_check_version_match ()
845
982
  {
983
+ if test "$package_revision" != "$macro_revision"; then
984
+ if test "$VERSION" != "$macro_version"; then
985
+ if test -z "$macro_version"; then
986
+ cat >&2 <<_LT_EOF
987
+ $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
988
+ $progname: definition of this LT_INIT comes from an older release.
989
+ $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
990
+ $progname: and run autoconf again.
991
+ _LT_EOF
992
+ else
993
+ cat >&2 <<_LT_EOF
994
+ $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
995
+ $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
996
+ $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
997
+ $progname: and run autoconf again.
998
+ _LT_EOF
999
+ fi
1000
+ else
1001
+ cat >&2 <<_LT_EOF
1002
+ $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
1003
+ $progname: but the definition of this LT_INIT comes from revision $macro_revision.
1004
+ $progname: You should recreate aclocal.m4 with macros from revision $package_revision
1005
+ $progname: of $PACKAGE $VERSION and run autoconf again.
1006
+ _LT_EOF
1007
+ fi
1008
+
1009
+ exit $EXIT_MISMATCH
1010
+ fi
1011
+ }
846
1012
 
847
- # Shorthand for --mode=foo, only valid as the first argument
848
- case $1 in
849
- clean|clea|cle|cl)
850
- shift; set dummy --mode clean ${1+"$@"}; shift
851
- ;;
852
- compile|compil|compi|comp|com|co|c)
853
- shift; set dummy --mode compile ${1+"$@"}; shift
854
- ;;
855
- execute|execut|execu|exec|exe|ex|e)
856
- shift; set dummy --mode execute ${1+"$@"}; shift
857
- ;;
858
- finish|finis|fini|fin|fi|f)
859
- shift; set dummy --mode finish ${1+"$@"}; shift
860
- ;;
861
- install|instal|insta|inst|ins|in|i)
862
- shift; set dummy --mode install ${1+"$@"}; shift
863
- ;;
864
- link|lin|li|l)
865
- shift; set dummy --mode link ${1+"$@"}; shift
866
- ;;
867
- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
868
- shift; set dummy --mode uninstall ${1+"$@"}; shift
869
- ;;
870
- esac
871
1013
 
872
- # Parse non-mode specific arguments:
873
- while test "$#" -gt 0; do
1014
+ # Shorthand for --mode=foo, only valid as the first argument
1015
+ case $1 in
1016
+ clean|clea|cle|cl)
1017
+ shift; set dummy --mode clean ${1+"$@"}; shift
1018
+ ;;
1019
+ compile|compil|compi|comp|com|co|c)
1020
+ shift; set dummy --mode compile ${1+"$@"}; shift
1021
+ ;;
1022
+ execute|execut|execu|exec|exe|ex|e)
1023
+ shift; set dummy --mode execute ${1+"$@"}; shift
1024
+ ;;
1025
+ finish|finis|fini|fin|fi|f)
1026
+ shift; set dummy --mode finish ${1+"$@"}; shift
1027
+ ;;
1028
+ install|instal|insta|inst|ins|in|i)
1029
+ shift; set dummy --mode install ${1+"$@"}; shift
1030
+ ;;
1031
+ link|lin|li|l)
1032
+ shift; set dummy --mode link ${1+"$@"}; shift
1033
+ ;;
1034
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1035
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
1036
+ ;;
1037
+ esac
1038
+
1039
+
1040
+
1041
+ # Option defaults:
1042
+ opt_debug=:
1043
+ opt_dry_run=false
1044
+ opt_config=false
1045
+ opt_preserve_dup_deps=false
1046
+ opt_features=false
1047
+ opt_finish=false
1048
+ opt_help=false
1049
+ opt_help_all=false
1050
+ opt_silent=:
1051
+ opt_warning=:
1052
+ opt_verbose=:
1053
+ opt_silent=false
1054
+ opt_verbose=false
1055
+
1056
+
1057
+ # Parse options once, thoroughly. This comes as soon as possible in the
1058
+ # script to make things like `--version' happen as quickly as we can.
1059
+ {
1060
+ # this just eases exit handling
1061
+ while test $# -gt 0; do
874
1062
  opt="$1"
875
1063
  shift
876
-
877
1064
  case $opt in
878
- --config) func_config ;;
879
-
880
- --debug) preserve_args="$preserve_args $opt"
1065
+ --debug|-x) opt_debug='set -x'
881
1066
  func_echo "enabling shell trace mode"
882
- opt_debug='set -x'
883
1067
  $opt_debug
884
1068
  ;;
885
-
886
- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
887
- execute_dlfiles="$execute_dlfiles $1"
888
- shift
1069
+ --dry-run|--dryrun|-n)
1070
+ opt_dry_run=:
889
1071
  ;;
890
-
891
- --dry-run | -n) opt_dry_run=: ;;
892
- --features) func_features ;;
893
- --finish) mode="finish" ;;
894
-
895
- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
896
- case $1 in
897
- # Valid mode arguments:
898
- clean) ;;
899
- compile) ;;
900
- execute) ;;
901
- finish) ;;
902
- install) ;;
903
- link) ;;
904
- relink) ;;
905
- uninstall) ;;
906
-
907
- # Catch anything else as an error
908
- *) func_error "invalid argument for $opt"
909
- exit_cmd=exit
910
- break
911
- ;;
912
- esac
913
-
914
- mode="$1"
1072
+ --config)
1073
+ opt_config=:
1074
+ func_config
1075
+ ;;
1076
+ --dlopen|-dlopen)
1077
+ optarg="$1"
1078
+ opt_dlopen="${opt_dlopen+$opt_dlopen
1079
+ }$optarg"
915
1080
  shift
916
1081
  ;;
917
-
918
1082
  --preserve-dup-deps)
919
- opt_duplicate_deps=: ;;
920
-
921
- --quiet|--silent) preserve_args="$preserve_args $opt"
922
- opt_silent=:
923
- opt_verbose=false
1083
+ opt_preserve_dup_deps=:
924
1084
  ;;
925
-
926
- --no-quiet|--no-silent)
927
- preserve_args="$preserve_args $opt"
928
- opt_silent=false
1085
+ --features)
1086
+ opt_features=:
1087
+ func_features
929
1088
  ;;
930
-
931
- --verbose| -v) preserve_args="$preserve_args $opt"
1089
+ --finish)
1090
+ opt_finish=:
1091
+ set dummy --mode finish ${1+"$@"}; shift
1092
+ ;;
1093
+ --help)
1094
+ opt_help=:
1095
+ ;;
1096
+ --help-all)
1097
+ opt_help_all=:
1098
+ opt_help=': help-all'
1099
+ ;;
1100
+ --mode)
1101
+ test $# = 0 && func_missing_arg $opt && break
1102
+ optarg="$1"
1103
+ opt_mode="$optarg"
1104
+ case $optarg in
1105
+ # Valid mode arguments:
1106
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
1107
+
1108
+ # Catch anything else as an error
1109
+ *) func_error "invalid argument for $opt"
1110
+ exit_cmd=exit
1111
+ break
1112
+ ;;
1113
+ esac
1114
+ shift
1115
+ ;;
1116
+ --no-silent|--no-quiet)
932
1117
  opt_silent=false
933
- opt_verbose=:
1118
+ func_append preserve_args " $opt"
934
1119
  ;;
935
-
936
- --no-verbose) preserve_args="$preserve_args $opt"
1120
+ --no-warning|--no-warn)
1121
+ opt_warning=false
1122
+ func_append preserve_args " $opt"
1123
+ ;;
1124
+ --no-verbose)
937
1125
  opt_verbose=false
1126
+ func_append preserve_args " $opt"
938
1127
  ;;
939
-
940
- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
941
- preserve_args="$preserve_args $opt $1"
942
- func_enable_tag "$1" # tagname is set here
1128
+ --silent|--quiet)
1129
+ opt_silent=:
1130
+ func_append preserve_args " $opt"
1131
+ opt_verbose=false
1132
+ ;;
1133
+ --verbose|-v)
1134
+ opt_verbose=:
1135
+ func_append preserve_args " $opt"
1136
+ opt_silent=false
1137
+ ;;
1138
+ --tag)
1139
+ test $# = 0 && func_missing_arg $opt && break
1140
+ optarg="$1"
1141
+ opt_tag="$optarg"
1142
+ func_append preserve_args " $opt $optarg"
1143
+ func_enable_tag "$optarg"
943
1144
  shift
944
1145
  ;;
945
1146
 
1147
+ -\?|-h) func_usage ;;
1148
+ --help) func_help ;;
1149
+ --version) func_version ;;
1150
+
946
1151
  # Separate optargs to long options:
947
- -dlopen=*|--mode=*|--tag=*)
948
- func_opt_split "$opt"
949
- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
1152
+ --*=*)
1153
+ func_split_long_opt "$opt"
1154
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
950
1155
  shift
951
1156
  ;;
952
1157
 
953
- -\?|-h) func_usage ;;
954
- --help) opt_help=: ;;
955
- --help-all) opt_help=': help-all' ;;
956
- --version) func_version ;;
957
-
958
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
959
-
960
- *) nonopt="$opt"
961
- break
1158
+ # Separate non-argument short options:
1159
+ -\?*|-h*|-n*|-v*)
1160
+ func_split_short_opt "$opt"
1161
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1162
+ shift
962
1163
  ;;
1164
+
1165
+ --) break ;;
1166
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
1167
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
963
1168
  esac
964
1169
  done
965
1170
 
1171
+ # Validate options:
1172
+
1173
+ # save first non-option argument
1174
+ if test "$#" -gt 0; then
1175
+ nonopt="$opt"
1176
+ shift
1177
+ fi
1178
+
1179
+ # preserve --debug
1180
+ test "$opt_debug" = : || func_append preserve_args " --debug"
966
1181
 
967
1182
  case $host in
968
1183
  *cygwin* | *mingw* | *pw32* | *cegcc*)
@@ -970,82 +1185,44 @@ func_enable_tag ()
970
1185
  opt_duplicate_compiler_generated_deps=:
971
1186
  ;;
972
1187
  *)
973
- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
1188
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
974
1189
  ;;
975
1190
  esac
976
1191
 
977
- # Having warned about all mis-specified options, bail out if
978
- # anything was wrong.
979
- $exit_cmd $EXIT_FAILURE
980
- }
1192
+ $opt_help || {
1193
+ # Sanity checks first:
1194
+ func_check_version_match
981
1195
 
982
- # func_check_version_match
983
- # Ensure that we are using m4 macros, and libtool script from the same
984
- # release of libtool.
985
- func_check_version_match ()
986
- {
987
- if test "$package_revision" != "$macro_revision"; then
988
- if test "$VERSION" != "$macro_version"; then
989
- if test -z "$macro_version"; then
990
- cat >&2 <<_LT_EOF
991
- $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
992
- $progname: definition of this LT_INIT comes from an older release.
993
- $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
994
- $progname: and run autoconf again.
995
- _LT_EOF
996
- else
997
- cat >&2 <<_LT_EOF
998
- $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
999
- $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
1000
- $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
1001
- $progname: and run autoconf again.
1002
- _LT_EOF
1003
- fi
1004
- else
1005
- cat >&2 <<_LT_EOF
1006
- $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
1007
- $progname: but the definition of this LT_INIT comes from revision $macro_revision.
1008
- $progname: You should recreate aclocal.m4 with macros from revision $package_revision
1009
- $progname: of $PACKAGE $VERSION and run autoconf again.
1010
- _LT_EOF
1196
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1197
+ func_fatal_configuration "not configured to build any kind of library"
1011
1198
  fi
1012
1199
 
1013
- exit $EXIT_MISMATCH
1014
- fi
1015
- }
1016
-
1017
-
1018
- ## ----------- ##
1019
- ## Main. ##
1020
- ## ----------- ##
1200
+ # Darwin sucks
1201
+ eval std_shrext=\"$shrext_cmds\"
1021
1202
 
1022
- $opt_help || {
1023
- # Sanity checks first:
1024
- func_check_version_match
1025
-
1026
- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1027
- func_fatal_configuration "not configured to build any kind of library"
1028
- fi
1203
+ # Only execute mode is allowed to have -dlopen flags.
1204
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1205
+ func_error "unrecognized option \`-dlopen'"
1206
+ $ECHO "$help" 1>&2
1207
+ exit $EXIT_FAILURE
1208
+ fi
1029
1209
 
1030
- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
1210
+ # Change the help message to a mode-specific one.
1211
+ generic_help="$help"
1212
+ help="Try \`$progname --help --mode=$opt_mode' for more information."
1213
+ }
1031
1214
 
1032
1215
 
1033
- # Darwin sucks
1034
- eval std_shrext=\"$shrext_cmds\"
1216
+ # Bail if the options were screwed
1217
+ $exit_cmd $EXIT_FAILURE
1218
+ }
1035
1219
 
1036
1220
 
1037
- # Only execute mode is allowed to have -dlopen flags.
1038
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
1039
- func_error "unrecognized option \`-dlopen'"
1040
- $ECHO "$help" 1>&2
1041
- exit $EXIT_FAILURE
1042
- fi
1043
1221
 
1044
- # Change the help message to a mode-specific one.
1045
- generic_help="$help"
1046
- help="Try \`$progname --help --mode=$mode' for more information."
1047
- }
1048
1222
 
1223
+ ## ----------- ##
1224
+ ## Main. ##
1225
+ ## ----------- ##
1049
1226
 
1050
1227
  # func_lalib_p file
1051
1228
  # True iff FILE is a libtool `.la' library or `.lo' object file.
@@ -1110,12 +1287,9 @@ func_ltwrapper_executable_p ()
1110
1287
  # temporary ltwrapper_script.
1111
1288
  func_ltwrapper_scriptname ()
1112
1289
  {
1113
- func_ltwrapper_scriptname_result=""
1114
- if func_ltwrapper_executable_p "$1"; then
1115
- func_dirname_and_basename "$1" "" "."
1116
- func_stripname '' '.exe' "$func_basename_result"
1117
- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
1118
- fi
1290
+ func_dirname_and_basename "$1" "" "."
1291
+ func_stripname '' '.exe' "$func_basename_result"
1292
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
1119
1293
  }
1120
1294
 
1121
1295
  # func_ltwrapper_p file
@@ -1161,6 +1335,37 @@ func_source ()
1161
1335
  }
1162
1336
 
1163
1337
 
1338
+ # func_resolve_sysroot PATH
1339
+ # Replace a leading = in PATH with a sysroot. Store the result into
1340
+ # func_resolve_sysroot_result
1341
+ func_resolve_sysroot ()
1342
+ {
1343
+ func_resolve_sysroot_result=$1
1344
+ case $func_resolve_sysroot_result in
1345
+ =*)
1346
+ func_stripname '=' '' "$func_resolve_sysroot_result"
1347
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
1348
+ ;;
1349
+ esac
1350
+ }
1351
+
1352
+ # func_replace_sysroot PATH
1353
+ # If PATH begins with the sysroot, replace it with = and
1354
+ # store the result into func_replace_sysroot_result.
1355
+ func_replace_sysroot ()
1356
+ {
1357
+ case "$lt_sysroot:$1" in
1358
+ ?*:"$lt_sysroot"*)
1359
+ func_stripname "$lt_sysroot" '' "$1"
1360
+ func_replace_sysroot_result="=$func_stripname_result"
1361
+ ;;
1362
+ *)
1363
+ # Including no sysroot.
1364
+ func_replace_sysroot_result=$1
1365
+ ;;
1366
+ esac
1367
+ }
1368
+
1164
1369
  # func_infer_tag arg
1165
1370
  # Infer tagged configuration to use if any are available and
1166
1371
  # if one wasn't chosen via the "--tag" command line option.
@@ -1173,8 +1378,7 @@ func_infer_tag ()
1173
1378
  if test -n "$available_tags" && test -z "$tagname"; then
1174
1379
  CC_quoted=
1175
1380
  for arg in $CC; do
1176
- func_quote_for_eval "$arg"
1177
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
1381
+ func_append_quoted CC_quoted "$arg"
1178
1382
  done
1179
1383
  CC_expanded=`func_echo_all $CC`
1180
1384
  CC_quoted_expanded=`func_echo_all $CC_quoted`
@@ -1193,8 +1397,7 @@ func_infer_tag ()
1193
1397
  CC_quoted=
1194
1398
  for arg in $CC; do
1195
1399
  # Double-quote args containing other shell metacharacters.
1196
- func_quote_for_eval "$arg"
1197
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
1400
+ func_append_quoted CC_quoted "$arg"
1198
1401
  done
1199
1402
  CC_expanded=`func_echo_all $CC`
1200
1403
  CC_quoted_expanded=`func_echo_all $CC_quoted`
@@ -1238,30 +1441,510 @@ func_write_libtool_object ()
1238
1441
  write_lobj=none
1239
1442
  fi
1240
1443
 
1241
- if test "$build_old_libs" = yes; then
1242
- write_oldobj=\'${3}\'
1243
- else
1244
- write_oldobj=none
1245
- fi
1444
+ if test "$build_old_libs" = yes; then
1445
+ write_oldobj=\'${3}\'
1446
+ else
1447
+ write_oldobj=none
1448
+ fi
1449
+
1450
+ $opt_dry_run || {
1451
+ cat >${write_libobj}T <<EOF
1452
+ # $write_libobj - a libtool object file
1453
+ # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1454
+ #
1455
+ # Please DO NOT delete this file!
1456
+ # It is necessary for linking the library.
1457
+
1458
+ # Name of the PIC object.
1459
+ pic_object=$write_lobj
1460
+
1461
+ # Name of the non-PIC object
1462
+ non_pic_object=$write_oldobj
1463
+
1464
+ EOF
1465
+ $MV "${write_libobj}T" "${write_libobj}"
1466
+ }
1467
+ }
1468
+
1469
+
1470
+ ##################################################
1471
+ # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1472
+ ##################################################
1473
+
1474
+ # func_convert_core_file_wine_to_w32 ARG
1475
+ # Helper function used by file name conversion functions when $build is *nix,
1476
+ # and $host is mingw, cygwin, or some other w32 environment. Relies on a
1477
+ # correctly configured wine environment available, with the winepath program
1478
+ # in $build's $PATH.
1479
+ #
1480
+ # ARG is the $build file name to be converted to w32 format.
1481
+ # Result is available in $func_convert_core_file_wine_to_w32_result, and will
1482
+ # be empty on error (or when ARG is empty)
1483
+ func_convert_core_file_wine_to_w32 ()
1484
+ {
1485
+ $opt_debug
1486
+ func_convert_core_file_wine_to_w32_result="$1"
1487
+ if test -n "$1"; then
1488
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
1489
+ # are forced to check the contents of stdout. On the other hand, if the
1490
+ # command is not found, the shell will set an exit code of 127 and print
1491
+ # *an error message* to stdout. So we must check for both error code of
1492
+ # zero AND non-empty stdout, which explains the odd construction:
1493
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1494
+ if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1495
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1496
+ $SED -e "$lt_sed_naive_backslashify"`
1497
+ else
1498
+ func_convert_core_file_wine_to_w32_result=
1499
+ fi
1500
+ fi
1501
+ }
1502
+ # end: func_convert_core_file_wine_to_w32
1503
+
1504
+
1505
+ # func_convert_core_path_wine_to_w32 ARG
1506
+ # Helper function used by path conversion functions when $build is *nix, and
1507
+ # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1508
+ # configured wine environment available, with the winepath program in $build's
1509
+ # $PATH. Assumes ARG has no leading or trailing path separator characters.
1510
+ #
1511
+ # ARG is path to be converted from $build format to win32.
1512
+ # Result is available in $func_convert_core_path_wine_to_w32_result.
1513
+ # Unconvertible file (directory) names in ARG are skipped; if no directory names
1514
+ # are convertible, then the result may be empty.
1515
+ func_convert_core_path_wine_to_w32 ()
1516
+ {
1517
+ $opt_debug
1518
+ # unfortunately, winepath doesn't convert paths, only file names
1519
+ func_convert_core_path_wine_to_w32_result=""
1520
+ if test -n "$1"; then
1521
+ oldIFS=$IFS
1522
+ IFS=:
1523
+ for func_convert_core_path_wine_to_w32_f in $1; do
1524
+ IFS=$oldIFS
1525
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1526
+ if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1527
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
1528
+ func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1529
+ else
1530
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1531
+ fi
1532
+ fi
1533
+ done
1534
+ IFS=$oldIFS
1535
+ fi
1536
+ }
1537
+ # end: func_convert_core_path_wine_to_w32
1538
+
1539
+
1540
+ # func_cygpath ARGS...
1541
+ # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1542
+ # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1543
+ # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1544
+ # (2), returns the Cygwin file name or path in func_cygpath_result (input
1545
+ # file name or path is assumed to be in w32 format, as previously converted
1546
+ # from $build's *nix or MSYS format). In case (3), returns the w32 file name
1547
+ # or path in func_cygpath_result (input file name or path is assumed to be in
1548
+ # Cygwin format). Returns an empty string on error.
1549
+ #
1550
+ # ARGS are passed to cygpath, with the last one being the file name or path to
1551
+ # be converted.
1552
+ #
1553
+ # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1554
+ # environment variable; do not put it in $PATH.
1555
+ func_cygpath ()
1556
+ {
1557
+ $opt_debug
1558
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1559
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1560
+ if test "$?" -ne 0; then
1561
+ # on failure, ensure result is empty
1562
+ func_cygpath_result=
1563
+ fi
1564
+ else
1565
+ func_cygpath_result=
1566
+ func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1567
+ fi
1568
+ }
1569
+ #end: func_cygpath
1570
+
1571
+
1572
+ # func_convert_core_msys_to_w32 ARG
1573
+ # Convert file name or path ARG from MSYS format to w32 format. Return
1574
+ # result in func_convert_core_msys_to_w32_result.
1575
+ func_convert_core_msys_to_w32 ()
1576
+ {
1577
+ $opt_debug
1578
+ # awkward: cmd appends spaces to result
1579
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1580
+ $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1581
+ }
1582
+ #end: func_convert_core_msys_to_w32
1583
+
1584
+
1585
+ # func_convert_file_check ARG1 ARG2
1586
+ # Verify that ARG1 (a file name in $build format) was converted to $host
1587
+ # format in ARG2. Otherwise, emit an error message, but continue (resetting
1588
+ # func_to_host_file_result to ARG1).
1589
+ func_convert_file_check ()
1590
+ {
1591
+ $opt_debug
1592
+ if test -z "$2" && test -n "$1" ; then
1593
+ func_error "Could not determine host file name corresponding to"
1594
+ func_error " \`$1'"
1595
+ func_error "Continuing, but uninstalled executables may not work."
1596
+ # Fallback:
1597
+ func_to_host_file_result="$1"
1598
+ fi
1599
+ }
1600
+ # end func_convert_file_check
1601
+
1602
+
1603
+ # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1604
+ # Verify that FROM_PATH (a path in $build format) was converted to $host
1605
+ # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1606
+ # func_to_host_file_result to a simplistic fallback value (see below).
1607
+ func_convert_path_check ()
1608
+ {
1609
+ $opt_debug
1610
+ if test -z "$4" && test -n "$3"; then
1611
+ func_error "Could not determine the host path corresponding to"
1612
+ func_error " \`$3'"
1613
+ func_error "Continuing, but uninstalled executables may not work."
1614
+ # Fallback. This is a deliberately simplistic "conversion" and
1615
+ # should not be "improved". See libtool.info.
1616
+ if test "x$1" != "x$2"; then
1617
+ lt_replace_pathsep_chars="s|$1|$2|g"
1618
+ func_to_host_path_result=`echo "$3" |
1619
+ $SED -e "$lt_replace_pathsep_chars"`
1620
+ else
1621
+ func_to_host_path_result="$3"
1622
+ fi
1623
+ fi
1624
+ }
1625
+ # end func_convert_path_check
1626
+
1627
+
1628
+ # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1629
+ # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1630
+ # and appending REPL if ORIG matches BACKPAT.
1631
+ func_convert_path_front_back_pathsep ()
1632
+ {
1633
+ $opt_debug
1634
+ case $4 in
1635
+ $1 ) func_to_host_path_result="$3$func_to_host_path_result"
1636
+ ;;
1637
+ esac
1638
+ case $4 in
1639
+ $2 ) func_append func_to_host_path_result "$3"
1640
+ ;;
1641
+ esac
1642
+ }
1643
+ # end func_convert_path_front_back_pathsep
1644
+
1645
+
1646
+ ##################################################
1647
+ # $build to $host FILE NAME CONVERSION FUNCTIONS #
1648
+ ##################################################
1649
+ # invoked via `$to_host_file_cmd ARG'
1650
+ #
1651
+ # In each case, ARG is the path to be converted from $build to $host format.
1652
+ # Result will be available in $func_to_host_file_result.
1653
+
1654
+
1655
+ # func_to_host_file ARG
1656
+ # Converts the file name ARG from $build format to $host format. Return result
1657
+ # in func_to_host_file_result.
1658
+ func_to_host_file ()
1659
+ {
1660
+ $opt_debug
1661
+ $to_host_file_cmd "$1"
1662
+ }
1663
+ # end func_to_host_file
1664
+
1665
+
1666
+ # func_to_tool_file ARG LAZY
1667
+ # converts the file name ARG from $build format to toolchain format. Return
1668
+ # result in func_to_tool_file_result. If the conversion in use is listed
1669
+ # in (the comma separated) LAZY, no conversion takes place.
1670
+ func_to_tool_file ()
1671
+ {
1672
+ $opt_debug
1673
+ case ,$2, in
1674
+ *,"$to_tool_file_cmd",*)
1675
+ func_to_tool_file_result=$1
1676
+ ;;
1677
+ *)
1678
+ $to_tool_file_cmd "$1"
1679
+ func_to_tool_file_result=$func_to_host_file_result
1680
+ ;;
1681
+ esac
1682
+ }
1683
+ # end func_to_tool_file
1684
+
1685
+
1686
+ # func_convert_file_noop ARG
1687
+ # Copy ARG to func_to_host_file_result.
1688
+ func_convert_file_noop ()
1689
+ {
1690
+ func_to_host_file_result="$1"
1691
+ }
1692
+ # end func_convert_file_noop
1693
+
1694
+
1695
+ # func_convert_file_msys_to_w32 ARG
1696
+ # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1697
+ # conversion to w32 is not available inside the cwrapper. Returns result in
1698
+ # func_to_host_file_result.
1699
+ func_convert_file_msys_to_w32 ()
1700
+ {
1701
+ $opt_debug
1702
+ func_to_host_file_result="$1"
1703
+ if test -n "$1"; then
1704
+ func_convert_core_msys_to_w32 "$1"
1705
+ func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1706
+ fi
1707
+ func_convert_file_check "$1" "$func_to_host_file_result"
1708
+ }
1709
+ # end func_convert_file_msys_to_w32
1710
+
1711
+
1712
+ # func_convert_file_cygwin_to_w32 ARG
1713
+ # Convert file name ARG from Cygwin to w32 format. Returns result in
1714
+ # func_to_host_file_result.
1715
+ func_convert_file_cygwin_to_w32 ()
1716
+ {
1717
+ $opt_debug
1718
+ func_to_host_file_result="$1"
1719
+ if test -n "$1"; then
1720
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1721
+ # LT_CYGPATH in this case.
1722
+ func_to_host_file_result=`cygpath -m "$1"`
1723
+ fi
1724
+ func_convert_file_check "$1" "$func_to_host_file_result"
1725
+ }
1726
+ # end func_convert_file_cygwin_to_w32
1727
+
1728
+
1729
+ # func_convert_file_nix_to_w32 ARG
1730
+ # Convert file name ARG from *nix to w32 format. Requires a wine environment
1731
+ # and a working winepath. Returns result in func_to_host_file_result.
1732
+ func_convert_file_nix_to_w32 ()
1733
+ {
1734
+ $opt_debug
1735
+ func_to_host_file_result="$1"
1736
+ if test -n "$1"; then
1737
+ func_convert_core_file_wine_to_w32 "$1"
1738
+ func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1739
+ fi
1740
+ func_convert_file_check "$1" "$func_to_host_file_result"
1741
+ }
1742
+ # end func_convert_file_nix_to_w32
1743
+
1744
+
1745
+ # func_convert_file_msys_to_cygwin ARG
1746
+ # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1747
+ # Returns result in func_to_host_file_result.
1748
+ func_convert_file_msys_to_cygwin ()
1749
+ {
1750
+ $opt_debug
1751
+ func_to_host_file_result="$1"
1752
+ if test -n "$1"; then
1753
+ func_convert_core_msys_to_w32 "$1"
1754
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
1755
+ func_to_host_file_result="$func_cygpath_result"
1756
+ fi
1757
+ func_convert_file_check "$1" "$func_to_host_file_result"
1758
+ }
1759
+ # end func_convert_file_msys_to_cygwin
1760
+
1761
+
1762
+ # func_convert_file_nix_to_cygwin ARG
1763
+ # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1764
+ # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1765
+ # in func_to_host_file_result.
1766
+ func_convert_file_nix_to_cygwin ()
1767
+ {
1768
+ $opt_debug
1769
+ func_to_host_file_result="$1"
1770
+ if test -n "$1"; then
1771
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1772
+ func_convert_core_file_wine_to_w32 "$1"
1773
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1774
+ func_to_host_file_result="$func_cygpath_result"
1775
+ fi
1776
+ func_convert_file_check "$1" "$func_to_host_file_result"
1777
+ }
1778
+ # end func_convert_file_nix_to_cygwin
1779
+
1780
+
1781
+ #############################################
1782
+ # $build to $host PATH CONVERSION FUNCTIONS #
1783
+ #############################################
1784
+ # invoked via `$to_host_path_cmd ARG'
1785
+ #
1786
+ # In each case, ARG is the path to be converted from $build to $host format.
1787
+ # The result will be available in $func_to_host_path_result.
1788
+ #
1789
+ # Path separators are also converted from $build format to $host format. If
1790
+ # ARG begins or ends with a path separator character, it is preserved (but
1791
+ # converted to $host format) on output.
1792
+ #
1793
+ # All path conversion functions are named using the following convention:
1794
+ # file name conversion function : func_convert_file_X_to_Y ()
1795
+ # path conversion function : func_convert_path_X_to_Y ()
1796
+ # where, for any given $build/$host combination the 'X_to_Y' value is the
1797
+ # same. If conversion functions are added for new $build/$host combinations,
1798
+ # the two new functions must follow this pattern, or func_init_to_host_path_cmd
1799
+ # will break.
1800
+
1801
+
1802
+ # func_init_to_host_path_cmd
1803
+ # Ensures that function "pointer" variable $to_host_path_cmd is set to the
1804
+ # appropriate value, based on the value of $to_host_file_cmd.
1805
+ to_host_path_cmd=
1806
+ func_init_to_host_path_cmd ()
1807
+ {
1808
+ $opt_debug
1809
+ if test -z "$to_host_path_cmd"; then
1810
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1811
+ to_host_path_cmd="func_convert_path_${func_stripname_result}"
1812
+ fi
1813
+ }
1814
+
1815
+
1816
+ # func_to_host_path ARG
1817
+ # Converts the path ARG from $build format to $host format. Return result
1818
+ # in func_to_host_path_result.
1819
+ func_to_host_path ()
1820
+ {
1821
+ $opt_debug
1822
+ func_init_to_host_path_cmd
1823
+ $to_host_path_cmd "$1"
1824
+ }
1825
+ # end func_to_host_path
1826
+
1827
+
1828
+ # func_convert_path_noop ARG
1829
+ # Copy ARG to func_to_host_path_result.
1830
+ func_convert_path_noop ()
1831
+ {
1832
+ func_to_host_path_result="$1"
1833
+ }
1834
+ # end func_convert_path_noop
1835
+
1836
+
1837
+ # func_convert_path_msys_to_w32 ARG
1838
+ # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1839
+ # conversion to w32 is not available inside the cwrapper. Returns result in
1840
+ # func_to_host_path_result.
1841
+ func_convert_path_msys_to_w32 ()
1842
+ {
1843
+ $opt_debug
1844
+ func_to_host_path_result="$1"
1845
+ if test -n "$1"; then
1846
+ # Remove leading and trailing path separator characters from ARG. MSYS
1847
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1848
+ # and winepath ignores them completely.
1849
+ func_stripname : : "$1"
1850
+ func_to_host_path_tmp1=$func_stripname_result
1851
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1852
+ func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1853
+ func_convert_path_check : ";" \
1854
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
1855
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1856
+ fi
1857
+ }
1858
+ # end func_convert_path_msys_to_w32
1859
+
1860
+
1861
+ # func_convert_path_cygwin_to_w32 ARG
1862
+ # Convert path ARG from Cygwin to w32 format. Returns result in
1863
+ # func_to_host_file_result.
1864
+ func_convert_path_cygwin_to_w32 ()
1865
+ {
1866
+ $opt_debug
1867
+ func_to_host_path_result="$1"
1868
+ if test -n "$1"; then
1869
+ # See func_convert_path_msys_to_w32:
1870
+ func_stripname : : "$1"
1871
+ func_to_host_path_tmp1=$func_stripname_result
1872
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1873
+ func_convert_path_check : ";" \
1874
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
1875
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1876
+ fi
1877
+ }
1878
+ # end func_convert_path_cygwin_to_w32
1879
+
1880
+
1881
+ # func_convert_path_nix_to_w32 ARG
1882
+ # Convert path ARG from *nix to w32 format. Requires a wine environment and
1883
+ # a working winepath. Returns result in func_to_host_file_result.
1884
+ func_convert_path_nix_to_w32 ()
1885
+ {
1886
+ $opt_debug
1887
+ func_to_host_path_result="$1"
1888
+ if test -n "$1"; then
1889
+ # See func_convert_path_msys_to_w32:
1890
+ func_stripname : : "$1"
1891
+ func_to_host_path_tmp1=$func_stripname_result
1892
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1893
+ func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1894
+ func_convert_path_check : ";" \
1895
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
1896
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1897
+ fi
1898
+ }
1899
+ # end func_convert_path_nix_to_w32
1246
1900
 
1247
- $opt_dry_run || {
1248
- cat >${write_libobj}T <<EOF
1249
- # $write_libobj - a libtool object file
1250
- # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
1251
- #
1252
- # Please DO NOT delete this file!
1253
- # It is necessary for linking the library.
1254
1901
 
1255
- # Name of the PIC object.
1256
- pic_object=$write_lobj
1902
+ # func_convert_path_msys_to_cygwin ARG
1903
+ # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1904
+ # Returns result in func_to_host_file_result.
1905
+ func_convert_path_msys_to_cygwin ()
1906
+ {
1907
+ $opt_debug
1908
+ func_to_host_path_result="$1"
1909
+ if test -n "$1"; then
1910
+ # See func_convert_path_msys_to_w32:
1911
+ func_stripname : : "$1"
1912
+ func_to_host_path_tmp1=$func_stripname_result
1913
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1914
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1915
+ func_to_host_path_result="$func_cygpath_result"
1916
+ func_convert_path_check : : \
1917
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
1918
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1919
+ fi
1920
+ }
1921
+ # end func_convert_path_msys_to_cygwin
1257
1922
 
1258
- # Name of the non-PIC object
1259
- non_pic_object=$write_oldobj
1260
1923
 
1261
- EOF
1262
- $MV "${write_libobj}T" "${write_libobj}"
1263
- }
1924
+ # func_convert_path_nix_to_cygwin ARG
1925
+ # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1926
+ # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1927
+ # func_to_host_file_result.
1928
+ func_convert_path_nix_to_cygwin ()
1929
+ {
1930
+ $opt_debug
1931
+ func_to_host_path_result="$1"
1932
+ if test -n "$1"; then
1933
+ # Remove leading and trailing path separator characters from
1934
+ # ARG. msys behavior is inconsistent here, cygpath turns them
1935
+ # into '.;' and ';.', and winepath ignores them completely.
1936
+ func_stripname : : "$1"
1937
+ func_to_host_path_tmp1=$func_stripname_result
1938
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1939
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1940
+ func_to_host_path_result="$func_cygpath_result"
1941
+ func_convert_path_check : : \
1942
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
1943
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1944
+ fi
1264
1945
  }
1946
+ # end func_convert_path_nix_to_cygwin
1947
+
1265
1948
 
1266
1949
  # func_mode_compile arg...
1267
1950
  func_mode_compile ()
@@ -1303,12 +1986,12 @@ func_mode_compile ()
1303
1986
  ;;
1304
1987
 
1305
1988
  -pie | -fpie | -fPIE)
1306
- pie_flag="$pie_flag $arg"
1989
+ func_append pie_flag " $arg"
1307
1990
  continue
1308
1991
  ;;
1309
1992
 
1310
1993
  -shared | -static | -prefer-pic | -prefer-non-pic)
1311
- later="$later $arg"
1994
+ func_append later " $arg"
1312
1995
  continue
1313
1996
  ;;
1314
1997
 
@@ -1329,15 +2012,14 @@ func_mode_compile ()
1329
2012
  save_ifs="$IFS"; IFS=','
1330
2013
  for arg in $args; do
1331
2014
  IFS="$save_ifs"
1332
- func_quote_for_eval "$arg"
1333
- lastarg="$lastarg $func_quote_for_eval_result"
2015
+ func_append_quoted lastarg "$arg"
1334
2016
  done
1335
2017
  IFS="$save_ifs"
1336
2018
  func_stripname ' ' '' "$lastarg"
1337
2019
  lastarg=$func_stripname_result
1338
2020
 
1339
2021
  # Add the arguments to base_compile.
1340
- base_compile="$base_compile $lastarg"
2022
+ func_append base_compile " $lastarg"
1341
2023
  continue
1342
2024
  ;;
1343
2025
 
@@ -1353,8 +2035,7 @@ func_mode_compile ()
1353
2035
  esac # case $arg_mode
1354
2036
 
1355
2037
  # Aesthetically quote the previous argument.
1356
- func_quote_for_eval "$lastarg"
1357
- base_compile="$base_compile $func_quote_for_eval_result"
2038
+ func_append_quoted base_compile "$lastarg"
1358
2039
  done # for arg
1359
2040
 
1360
2041
  case $arg_mode in
@@ -1379,7 +2060,7 @@ func_mode_compile ()
1379
2060
  *.[cCFSifmso] | \
1380
2061
  *.ada | *.adb | *.ads | *.asm | \
1381
2062
  *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1382
- *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
2063
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
1383
2064
  func_xform "$libobj"
1384
2065
  libobj=$func_xform_result
1385
2066
  ;;
@@ -1485,17 +2166,16 @@ compiler."
1485
2166
  $opt_dry_run || $RM $removelist
1486
2167
  exit $EXIT_FAILURE
1487
2168
  fi
1488
- removelist="$removelist $output_obj"
2169
+ func_append removelist " $output_obj"
1489
2170
  $ECHO "$srcfile" > "$lockfile"
1490
2171
  fi
1491
2172
 
1492
2173
  $opt_dry_run || $RM $removelist
1493
- removelist="$removelist $lockfile"
2174
+ func_append removelist " $lockfile"
1494
2175
  trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
1495
2176
 
1496
- if test -n "$fix_srcfile_path"; then
1497
- eval srcfile=\"$fix_srcfile_path\"
1498
- fi
2177
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
2178
+ srcfile=$func_to_tool_file_result
1499
2179
  func_quote_for_eval "$srcfile"
1500
2180
  qsrcfile=$func_quote_for_eval_result
1501
2181
 
@@ -1515,7 +2195,7 @@ compiler."
1515
2195
 
1516
2196
  if test -z "$output_obj"; then
1517
2197
  # Place PIC objects in $objdir
1518
- command="$command -o $lobj"
2198
+ func_append command " -o $lobj"
1519
2199
  fi
1520
2200
 
1521
2201
  func_show_eval_locale "$command" \
@@ -1562,11 +2242,11 @@ compiler."
1562
2242
  command="$base_compile $qsrcfile $pic_flag"
1563
2243
  fi
1564
2244
  if test "$compiler_c_o" = yes; then
1565
- command="$command -o $obj"
2245
+ func_append command " -o $obj"
1566
2246
  fi
1567
2247
 
1568
2248
  # Suppress compiler output if we already did a PIC compilation.
1569
- command="$command$suppress_output"
2249
+ func_append command "$suppress_output"
1570
2250
  func_show_eval_locale "$command" \
1571
2251
  '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
1572
2252
 
@@ -1611,13 +2291,13 @@ compiler."
1611
2291
  }
1612
2292
 
1613
2293
  $opt_help || {
1614
- test "$mode" = compile && func_mode_compile ${1+"$@"}
2294
+ test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
1615
2295
  }
1616
2296
 
1617
2297
  func_mode_help ()
1618
2298
  {
1619
2299
  # We need to display help for each of the modes.
1620
- case $mode in
2300
+ case $opt_mode in
1621
2301
  "")
1622
2302
  # Generic help is extracted from the usage comments
1623
2303
  # at the start of this file.
@@ -1793,7 +2473,7 @@ Otherwise, only FILE itself is deleted using RM."
1793
2473
  ;;
1794
2474
 
1795
2475
  *)
1796
- func_fatal_help "invalid operation mode \`$mode'"
2476
+ func_fatal_help "invalid operation mode \`$opt_mode'"
1797
2477
  ;;
1798
2478
  esac
1799
2479
 
@@ -1808,13 +2488,13 @@ if $opt_help; then
1808
2488
  else
1809
2489
  {
1810
2490
  func_help noexit
1811
- for mode in compile link execute install finish uninstall clean; do
2491
+ for opt_mode in compile link execute install finish uninstall clean; do
1812
2492
  func_mode_help
1813
2493
  done
1814
2494
  } | sed -n '1p; 2,$s/^Usage:/ or: /p'
1815
2495
  {
1816
2496
  func_help noexit
1817
- for mode in compile link execute install finish uninstall clean; do
2497
+ for opt_mode in compile link execute install finish uninstall clean; do
1818
2498
  echo
1819
2499
  func_mode_help
1820
2500
  done
@@ -1843,13 +2523,16 @@ func_mode_execute ()
1843
2523
  func_fatal_help "you must specify a COMMAND"
1844
2524
 
1845
2525
  # Handle -dlopen flags immediately.
1846
- for file in $execute_dlfiles; do
2526
+ for file in $opt_dlopen; do
1847
2527
  test -f "$file" \
1848
2528
  || func_fatal_help "\`$file' is not a file"
1849
2529
 
1850
2530
  dir=
1851
2531
  case $file in
1852
2532
  *.la)
2533
+ func_resolve_sysroot "$file"
2534
+ file=$func_resolve_sysroot_result
2535
+
1853
2536
  # Check to see that this really is a libtool archive.
1854
2537
  func_lalib_unsafe_p "$file" \
1855
2538
  || func_fatal_help "\`$lib' is not a valid libtool archive"
@@ -1871,7 +2554,7 @@ func_mode_execute ()
1871
2554
  dir="$func_dirname_result"
1872
2555
 
1873
2556
  if test -f "$dir/$objdir/$dlname"; then
1874
- dir="$dir/$objdir"
2557
+ func_append dir "/$objdir"
1875
2558
  else
1876
2559
  if test ! -f "$dir/$dlname"; then
1877
2560
  func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
@@ -1928,8 +2611,7 @@ func_mode_execute ()
1928
2611
  ;;
1929
2612
  esac
1930
2613
  # Quote arguments (to preserve shell metacharacters).
1931
- func_quote_for_eval "$file"
1932
- args="$args $func_quote_for_eval_result"
2614
+ func_append_quoted args "$file"
1933
2615
  done
1934
2616
 
1935
2617
  if test "X$opt_dry_run" = Xfalse; then
@@ -1961,22 +2643,59 @@ func_mode_execute ()
1961
2643
  fi
1962
2644
  }
1963
2645
 
1964
- test "$mode" = execute && func_mode_execute ${1+"$@"}
2646
+ test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
1965
2647
 
1966
2648
 
1967
2649
  # func_mode_finish arg...
1968
2650
  func_mode_finish ()
1969
2651
  {
1970
2652
  $opt_debug
1971
- libdirs="$nonopt"
2653
+ libs=
2654
+ libdirs=
1972
2655
  admincmds=
1973
2656
 
1974
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1975
- for dir
1976
- do
1977
- libdirs="$libdirs $dir"
1978
- done
2657
+ for opt in "$nonopt" ${1+"$@"}
2658
+ do
2659
+ if test -d "$opt"; then
2660
+ func_append libdirs " $opt"
2661
+
2662
+ elif test -f "$opt"; then
2663
+ if func_lalib_unsafe_p "$opt"; then
2664
+ func_append libs " $opt"
2665
+ else
2666
+ func_warning "\`$opt' is not a valid libtool archive"
2667
+ fi
2668
+
2669
+ else
2670
+ func_fatal_error "invalid argument \`$opt'"
2671
+ fi
2672
+ done
2673
+
2674
+ if test -n "$libs"; then
2675
+ if test -n "$lt_sysroot"; then
2676
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
2677
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
2678
+ else
2679
+ sysroot_cmd=
2680
+ fi
2681
+
2682
+ # Remove sysroot references
2683
+ if $opt_dry_run; then
2684
+ for lib in $libs; do
2685
+ echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
2686
+ done
2687
+ else
2688
+ tmpdir=`func_mktempdir`
2689
+ for lib in $libs; do
2690
+ sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
2691
+ > $tmpdir/tmp-la
2692
+ mv -f $tmpdir/tmp-la $lib
2693
+ done
2694
+ ${RM}r "$tmpdir"
2695
+ fi
2696
+ fi
1979
2697
 
2698
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1980
2699
  for libdir in $libdirs; do
1981
2700
  if test -n "$finish_cmds"; then
1982
2701
  # Do each command in the finish commands.
@@ -1986,7 +2705,7 @@ func_mode_finish ()
1986
2705
  if test -n "$finish_eval"; then
1987
2706
  # Do the single finish_eval.
1988
2707
  eval cmds=\"$finish_eval\"
1989
- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
2708
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
1990
2709
  $cmds"
1991
2710
  fi
1992
2711
  done
@@ -1995,53 +2714,55 @@ func_mode_finish ()
1995
2714
  # Exit here if they wanted silent mode.
1996
2715
  $opt_silent && exit $EXIT_SUCCESS
1997
2716
 
1998
- echo "----------------------------------------------------------------------"
1999
- echo "Libraries have been installed in:"
2000
- for libdir in $libdirs; do
2001
- $ECHO " $libdir"
2002
- done
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:"
2008
- if test -n "$shlibpath_var"; then
2009
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2010
- echo " during execution"
2011
- fi
2012
- if test -n "$runpath_var"; then
2013
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
2014
- echo " during linking"
2015
- fi
2016
- if test -n "$hardcode_libdir_flag_spec"; then
2017
- libdir=LIBDIR
2018
- eval flag=\"$hardcode_libdir_flag_spec\"
2717
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2718
+ echo "----------------------------------------------------------------------"
2719
+ echo "Libraries have been installed in:"
2720
+ for libdir in $libdirs; do
2721
+ $ECHO " $libdir"
2722
+ done
2723
+ echo
2724
+ echo "If you ever happen to want to link against installed libraries"
2725
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
2726
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2727
+ echo "flag during linking and do at least one of the following:"
2728
+ if test -n "$shlibpath_var"; then
2729
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2730
+ echo " during execution"
2731
+ fi
2732
+ if test -n "$runpath_var"; then
2733
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
2734
+ echo " during linking"
2735
+ fi
2736
+ if test -n "$hardcode_libdir_flag_spec"; then
2737
+ libdir=LIBDIR
2738
+ eval flag=\"$hardcode_libdir_flag_spec\"
2019
2739
 
2020
- $ECHO " - use the \`$flag' linker flag"
2021
- fi
2022
- if test -n "$admincmds"; then
2023
- $ECHO " - have your system administrator run these commands:$admincmds"
2024
- fi
2025
- if test -f /etc/ld.so.conf; then
2026
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2027
- fi
2028
- echo
2740
+ $ECHO " - use the \`$flag' linker flag"
2741
+ fi
2742
+ if test -n "$admincmds"; then
2743
+ $ECHO " - have your system administrator run these commands:$admincmds"
2744
+ fi
2745
+ if test -f /etc/ld.so.conf; then
2746
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2747
+ fi
2748
+ echo
2029
2749
 
2030
- echo "See any operating system documentation about shared libraries for"
2031
- case $host in
2032
- solaris2.[6789]|solaris2.1[0-9])
2033
- echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2034
- echo "pages."
2035
- ;;
2036
- *)
2037
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
2038
- ;;
2039
- esac
2040
- echo "----------------------------------------------------------------------"
2750
+ echo "See any operating system documentation about shared libraries for"
2751
+ case $host in
2752
+ solaris2.[6789]|solaris2.1[0-9])
2753
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2754
+ echo "pages."
2755
+ ;;
2756
+ *)
2757
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
2758
+ ;;
2759
+ esac
2760
+ echo "----------------------------------------------------------------------"
2761
+ fi
2041
2762
  exit $EXIT_SUCCESS
2042
2763
  }
2043
2764
 
2044
- test "$mode" = finish && func_mode_finish ${1+"$@"}
2765
+ test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
2045
2766
 
2046
2767
 
2047
2768
  # func_mode_install arg...
@@ -2066,7 +2787,7 @@ func_mode_install ()
2066
2787
  # The real first argument should be the name of the installation program.
2067
2788
  # Aesthetically quote it.
2068
2789
  func_quote_for_eval "$arg"
2069
- install_prog="$install_prog$func_quote_for_eval_result"
2790
+ func_append install_prog "$func_quote_for_eval_result"
2070
2791
  install_shared_prog=$install_prog
2071
2792
  case " $install_prog " in
2072
2793
  *[\\\ /]cp\ *) install_cp=: ;;
@@ -2086,7 +2807,7 @@ func_mode_install ()
2086
2807
  do
2087
2808
  arg2=
2088
2809
  if test -n "$dest"; then
2089
- files="$files $dest"
2810
+ func_append files " $dest"
2090
2811
  dest=$arg
2091
2812
  continue
2092
2813
  fi
@@ -2124,11 +2845,11 @@ func_mode_install ()
2124
2845
 
2125
2846
  # Aesthetically quote the argument.
2126
2847
  func_quote_for_eval "$arg"
2127
- install_prog="$install_prog $func_quote_for_eval_result"
2848
+ func_append install_prog " $func_quote_for_eval_result"
2128
2849
  if test -n "$arg2"; then
2129
2850
  func_quote_for_eval "$arg2"
2130
2851
  fi
2131
- install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
2852
+ func_append install_shared_prog " $func_quote_for_eval_result"
2132
2853
  done
2133
2854
 
2134
2855
  test -z "$install_prog" && \
@@ -2140,7 +2861,7 @@ func_mode_install ()
2140
2861
  if test -n "$install_override_mode" && $no_mode; then
2141
2862
  if $install_cp; then :; else
2142
2863
  func_quote_for_eval "$install_override_mode"
2143
- install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
2864
+ func_append install_shared_prog " -m $func_quote_for_eval_result"
2144
2865
  fi
2145
2866
  fi
2146
2867
 
@@ -2198,10 +2919,13 @@ func_mode_install ()
2198
2919
  case $file in
2199
2920
  *.$libext)
2200
2921
  # Do the static libraries later.
2201
- staticlibs="$staticlibs $file"
2922
+ func_append staticlibs " $file"
2202
2923
  ;;
2203
2924
 
2204
2925
  *.la)
2926
+ func_resolve_sysroot "$file"
2927
+ file=$func_resolve_sysroot_result
2928
+
2205
2929
  # Check to see that this really is a libtool archive.
2206
2930
  func_lalib_unsafe_p "$file" \
2207
2931
  || func_fatal_help "\`$file' is not a valid libtool archive"
@@ -2215,19 +2939,19 @@ func_mode_install ()
2215
2939
  if test "X$destdir" = "X$libdir"; then
2216
2940
  case "$current_libdirs " in
2217
2941
  *" $libdir "*) ;;
2218
- *) current_libdirs="$current_libdirs $libdir" ;;
2942
+ *) func_append current_libdirs " $libdir" ;;
2219
2943
  esac
2220
2944
  else
2221
2945
  # Note the libdir as a future libdir.
2222
2946
  case "$future_libdirs " in
2223
2947
  *" $libdir "*) ;;
2224
- *) future_libdirs="$future_libdirs $libdir" ;;
2948
+ *) func_append future_libdirs " $libdir" ;;
2225
2949
  esac
2226
2950
  fi
2227
2951
 
2228
2952
  func_dirname "$file" "/" ""
2229
2953
  dir="$func_dirname_result"
2230
- dir="$dir$objdir"
2954
+ func_append dir "$objdir"
2231
2955
 
2232
2956
  if test -n "$relink_command"; then
2233
2957
  # Determine the prefix the user has applied to our future dir.
@@ -2304,7 +3028,7 @@ func_mode_install ()
2304
3028
  func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
2305
3029
 
2306
3030
  # Maybe install the static library, too.
2307
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3031
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
2308
3032
  ;;
2309
3033
 
2310
3034
  *.lo)
@@ -2478,11 +3202,13 @@ func_mode_install ()
2478
3202
 
2479
3203
  # Set up the ranlib parameters.
2480
3204
  oldlib="$destdir/$name"
3205
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3206
+ tool_oldlib=$func_to_tool_file_result
2481
3207
 
2482
3208
  func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
2483
3209
 
2484
3210
  if test -n "$stripme" && test -n "$old_striplib"; then
2485
- func_show_eval "$old_striplib $oldlib" 'exit $?'
3211
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
2486
3212
  fi
2487
3213
 
2488
3214
  # Do each command in the postinstall commands.
@@ -2501,7 +3227,7 @@ func_mode_install ()
2501
3227
  fi
2502
3228
  }
2503
3229
 
2504
- test "$mode" = install && func_mode_install ${1+"$@"}
3230
+ test "$opt_mode" = install && func_mode_install ${1+"$@"}
2505
3231
 
2506
3232
 
2507
3233
  # func_generate_dlsyms outputname originator pic_p
@@ -2548,6 +3274,18 @@ extern \"C\" {
2548
3274
  #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
2549
3275
  #endif
2550
3276
 
3277
+ /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3278
+ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3279
+ /* DATA imports from DLLs on WIN32 con't be const, because runtime
3280
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
3281
+ # define LT_DLSYM_CONST
3282
+ #elif defined(__osf__)
3283
+ /* This system does not cope well with relocations in const data. */
3284
+ # define LT_DLSYM_CONST
3285
+ #else
3286
+ # define LT_DLSYM_CONST const
3287
+ #endif
3288
+
2551
3289
  /* External symbol declarations for the compiler. */\
2552
3290
  "
2553
3291
 
@@ -2559,8 +3297,9 @@ extern \"C\" {
2559
3297
  # Add our own program objects to the symbol list.
2560
3298
  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
2561
3299
  for progfile in $progfiles; do
2562
- func_verbose "extracting global C symbols from \`$progfile'"
2563
- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
3300
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3301
+ func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3302
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
2564
3303
  done
2565
3304
 
2566
3305
  if test -n "$exclude_expsyms"; then
@@ -2609,10 +3348,52 @@ extern \"C\" {
2609
3348
  func_verbose "extracting global C symbols from \`$dlprefile'"
2610
3349
  func_basename "$dlprefile"
2611
3350
  name="$func_basename_result"
2612
- $opt_dry_run || {
2613
- eval '$ECHO ": $name " >> "$nlist"'
2614
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2615
- }
3351
+ case $host in
3352
+ *cygwin* | *mingw* | *cegcc* )
3353
+ # if an import library, we need to obtain dlname
3354
+ if func_win32_import_lib_p "$dlprefile"; then
3355
+ func_tr_sh "$dlprefile"
3356
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
3357
+ dlprefile_dlbasename=""
3358
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3359
+ # Use subshell, to avoid clobbering current variable values
3360
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3361
+ if test -n "$dlprefile_dlname" ; then
3362
+ func_basename "$dlprefile_dlname"
3363
+ dlprefile_dlbasename="$func_basename_result"
3364
+ else
3365
+ # no lafile. user explicitly requested -dlpreopen <import library>.
3366
+ $sharedlib_from_linklib_cmd "$dlprefile"
3367
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
3368
+ fi
3369
+ fi
3370
+ $opt_dry_run || {
3371
+ if test -n "$dlprefile_dlbasename" ; then
3372
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3373
+ else
3374
+ func_warning "Could not compute DLL name from $name"
3375
+ eval '$ECHO ": $name " >> "$nlist"'
3376
+ fi
3377
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3378
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3379
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3380
+ }
3381
+ else # not an import lib
3382
+ $opt_dry_run || {
3383
+ eval '$ECHO ": $name " >> "$nlist"'
3384
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3385
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3386
+ }
3387
+ fi
3388
+ ;;
3389
+ *)
3390
+ $opt_dry_run || {
3391
+ eval '$ECHO ": $name " >> "$nlist"'
3392
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3393
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3394
+ }
3395
+ ;;
3396
+ esac
2616
3397
  done
2617
3398
 
2618
3399
  $opt_dry_run || {
@@ -2650,26 +3431,9 @@ typedef struct {
2650
3431
  const char *name;
2651
3432
  void *address;
2652
3433
  } lt_dlsymlist;
2653
- "
2654
- case $host in
2655
- *cygwin* | *mingw* | *cegcc* )
2656
- echo >> "$output_objdir/$my_dlsyms" "\
2657
- /* DATA imports from DLLs on WIN32 con't be const, because
2658
- runtime relocations are performed -- see ld's documentation
2659
- on pseudo-relocs. */"
2660
- lt_dlsym_const= ;;
2661
- *osf5*)
2662
- echo >> "$output_objdir/$my_dlsyms" "\
2663
- /* This system does not cope well with relocations in const data */"
2664
- lt_dlsym_const= ;;
2665
- *)
2666
- lt_dlsym_const=const ;;
2667
- esac
2668
-
2669
- echo >> "$output_objdir/$my_dlsyms" "\
2670
- extern $lt_dlsym_const lt_dlsymlist
3434
+ extern LT_DLSYM_CONST lt_dlsymlist
2671
3435
  lt_${my_prefix}_LTX_preloaded_symbols[];
2672
- $lt_dlsym_const lt_dlsymlist
3436
+ LT_DLSYM_CONST lt_dlsymlist
2673
3437
  lt_${my_prefix}_LTX_preloaded_symbols[] =
2674
3438
  {\
2675
3439
  { \"$my_originator\", (void *) 0 },"
@@ -2709,7 +3473,7 @@ static const void *lt_preloaded_setup() {
2709
3473
  # linked before any other PIC object. But we must not use
2710
3474
  # pic_flag when linking with -static. The problem exists in
2711
3475
  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2712
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3476
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2713
3477
  pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
2714
3478
  *-*-hpux*)
2715
3479
  pic_flag_for_symtable=" $pic_flag" ;;
@@ -2725,7 +3489,7 @@ static const void *lt_preloaded_setup() {
2725
3489
  for arg in $LTCFLAGS; do
2726
3490
  case $arg in
2727
3491
  -pie | -fpie | -fPIE) ;;
2728
- *) symtab_cflags="$symtab_cflags $arg" ;;
3492
+ *) func_append symtab_cflags " $arg" ;;
2729
3493
  esac
2730
3494
  done
2731
3495
 
@@ -2788,7 +3552,8 @@ func_win32_libid ()
2788
3552
  # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
2789
3553
  if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2790
3554
  $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
2791
- win32_nmres=`eval $NM -f posix -A $1 |
3555
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
3556
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
2792
3557
  $SED -n -e '
2793
3558
  1,100{
2794
3559
  / I /{
@@ -2817,6 +3582,131 @@ func_win32_libid ()
2817
3582
  $ECHO "$win32_libid_type"
2818
3583
  }
2819
3584
 
3585
+ # func_cygming_dll_for_implib ARG
3586
+ #
3587
+ # Platform-specific function to extract the
3588
+ # name of the DLL associated with the specified
3589
+ # import library ARG.
3590
+ # Invoked by eval'ing the libtool variable
3591
+ # $sharedlib_from_linklib_cmd
3592
+ # Result is available in the variable
3593
+ # $sharedlib_from_linklib_result
3594
+ func_cygming_dll_for_implib ()
3595
+ {
3596
+ $opt_debug
3597
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3598
+ }
3599
+
3600
+ # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3601
+ #
3602
+ # The is the core of a fallback implementation of a
3603
+ # platform-specific function to extract the name of the
3604
+ # DLL associated with the specified import library LIBNAME.
3605
+ #
3606
+ # SECTION_NAME is either .idata$6 or .idata$7, depending
3607
+ # on the platform and compiler that created the implib.
3608
+ #
3609
+ # Echos the name of the DLL associated with the
3610
+ # specified import library.
3611
+ func_cygming_dll_for_implib_fallback_core ()
3612
+ {
3613
+ $opt_debug
3614
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3615
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3616
+ $SED '/^Contents of section '"$match_literal"':/{
3617
+ # Place marker at beginning of archive member dllname section
3618
+ s/.*/====MARK====/
3619
+ p
3620
+ d
3621
+ }
3622
+ # These lines can sometimes be longer than 43 characters, but
3623
+ # are always uninteresting
3624
+ /:[ ]*file format pe[i]\{,1\}-/d
3625
+ /^In archive [^:]*:/d
3626
+ # Ensure marker is printed
3627
+ /^====MARK====/p
3628
+ # Remove all lines with less than 43 characters
3629
+ /^.\{43\}/!d
3630
+ # From remaining lines, remove first 43 characters
3631
+ s/^.\{43\}//' |
3632
+ $SED -n '
3633
+ # Join marker and all lines until next marker into a single line
3634
+ /^====MARK====/ b para
3635
+ H
3636
+ $ b para
3637
+ b
3638
+ :para
3639
+ x
3640
+ s/\n//g
3641
+ # Remove the marker
3642
+ s/^====MARK====//
3643
+ # Remove trailing dots and whitespace
3644
+ s/[\. \t]*$//
3645
+ # Print
3646
+ /./p' |
3647
+ # we now have a list, one entry per line, of the stringified
3648
+ # contents of the appropriate section of all members of the
3649
+ # archive which possess that section. Heuristic: eliminate
3650
+ # all those which have a first or second character that is
3651
+ # a '.' (that is, objdump's representation of an unprintable
3652
+ # character.) This should work for all archives with less than
3653
+ # 0x302f exports -- but will fail for DLLs whose name actually
3654
+ # begins with a literal '.' or a single character followed by
3655
+ # a '.'.
3656
+ #
3657
+ # Of those that remain, print the first one.
3658
+ $SED -e '/^\./d;/^.\./d;q'
3659
+ }
3660
+
3661
+ # func_cygming_gnu_implib_p ARG
3662
+ # This predicate returns with zero status (TRUE) if
3663
+ # ARG is a GNU/binutils-style import library. Returns
3664
+ # with nonzero status (FALSE) otherwise.
3665
+ func_cygming_gnu_implib_p ()
3666
+ {
3667
+ $opt_debug
3668
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
3669
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3670
+ test -n "$func_cygming_gnu_implib_tmp"
3671
+ }
3672
+
3673
+ # func_cygming_ms_implib_p ARG
3674
+ # This predicate returns with zero status (TRUE) if
3675
+ # ARG is an MS-style import library. Returns
3676
+ # with nonzero status (FALSE) otherwise.
3677
+ func_cygming_ms_implib_p ()
3678
+ {
3679
+ $opt_debug
3680
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
3681
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3682
+ test -n "$func_cygming_ms_implib_tmp"
3683
+ }
3684
+
3685
+ # func_cygming_dll_for_implib_fallback ARG
3686
+ # Platform-specific function to extract the
3687
+ # name of the DLL associated with the specified
3688
+ # import library ARG.
3689
+ #
3690
+ # This fallback implementation is for use when $DLLTOOL
3691
+ # does not support the --identify-strict option.
3692
+ # Invoked by eval'ing the libtool variable
3693
+ # $sharedlib_from_linklib_cmd
3694
+ # Result is available in the variable
3695
+ # $sharedlib_from_linklib_result
3696
+ func_cygming_dll_for_implib_fallback ()
3697
+ {
3698
+ $opt_debug
3699
+ if func_cygming_gnu_implib_p "$1" ; then
3700
+ # binutils import library
3701
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3702
+ elif func_cygming_ms_implib_p "$1" ; then
3703
+ # ms-generated import library
3704
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3705
+ else
3706
+ # unknown
3707
+ sharedlib_from_linklib_result=""
3708
+ fi
3709
+ }
2820
3710
 
2821
3711
 
2822
3712
  # func_extract_an_archive dir oldlib
@@ -3095,14 +3985,17 @@ func_exec_program_core ()
3095
3985
  # launches target application with the remaining arguments.
3096
3986
  func_exec_program ()
3097
3987
  {
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
3988
+ case \" \$* \" in
3989
+ *\\ --lt-*)
3990
+ for lt_wr_arg
3991
+ do
3992
+ case \$lt_wr_arg in
3993
+ --lt-*) ;;
3994
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3995
+ esac
3996
+ shift
3997
+ done ;;
3998
+ esac
3106
3999
  func_exec_program_core \${1+\"\$@\"}
3107
4000
  }
3108
4001
 
@@ -3195,6 +4088,18 @@ func_exec_program ()
3195
4088
 
3196
4089
  if test -f \"\$progdir/\$program\"; then"
3197
4090
 
4091
+ # fixup the dll searchpath if we need to.
4092
+ #
4093
+ # Fix the DLL searchpath if we need to. Do this before prepending
4094
+ # to shlibpath, because on Windows, both are PATH and uninstalled
4095
+ # libraries must come first.
4096
+ if test -n "$dllsearchpath"; then
4097
+ $ECHO "\
4098
+ # Add the dll search path components to the executable PATH
4099
+ PATH=$dllsearchpath:\$PATH
4100
+ "
4101
+ fi
4102
+
3198
4103
  # Export our shlibpath_var if we have one.
3199
4104
  if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3200
4105
  $ECHO "\
@@ -3209,14 +4114,6 @@ func_exec_program ()
3209
4114
  "
3210
4115
  fi
3211
4116
 
3212
- # fixup the dll searchpath if we need to.
3213
- if test -n "$dllsearchpath"; then
3214
- $ECHO "\
3215
- # Add the dll search path components to the executable PATH
3216
- PATH=$dllsearchpath:\$PATH
3217
- "
3218
- fi
3219
-
3220
4117
  $ECHO "\
3221
4118
  if test \"\$libtool_execute_magic\" != \"$magic\"; then
3222
4119
  # Run the actual program with our arguments.
@@ -3234,166 +4131,6 @@ fi\
3234
4131
  }
3235
4132
 
3236
4133
 
3237
- # func_to_host_path arg
3238
- #
3239
- # Convert paths to host format when used with build tools.
3240
- # Intended for use with "native" mingw (where libtool itself
3241
- # is running under the msys shell), or in the following cross-
3242
- # build environments:
3243
- # $build $host
3244
- # mingw (msys) mingw [e.g. native]
3245
- # cygwin mingw
3246
- # *nix + wine mingw
3247
- # where wine is equipped with the `winepath' executable.
3248
- # In the native mingw case, the (msys) shell automatically
3249
- # converts paths for any non-msys applications it launches,
3250
- # but that facility isn't available from inside the cwrapper.
3251
- # Similar accommodations are necessary for $host mingw and
3252
- # $build cygwin. Calling this function does no harm for other
3253
- # $host/$build combinations not listed above.
3254
- #
3255
- # ARG is the path (on $build) that should be converted to
3256
- # the proper representation for $host. The result is stored
3257
- # in $func_to_host_path_result.
3258
- func_to_host_path ()
3259
- {
3260
- func_to_host_path_result="$1"
3261
- if test -n "$1"; then
3262
- case $host in
3263
- *mingw* )
3264
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3265
- case $build in
3266
- *mingw* ) # actually, msys
3267
- # awkward: cmd appends spaces to result
3268
- func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
3269
- $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3270
- ;;
3271
- *cygwin* )
3272
- func_to_host_path_result=`cygpath -w "$1" |
3273
- $SED -e "$lt_sed_naive_backslashify"`
3274
- ;;
3275
- * )
3276
- # Unfortunately, winepath does not exit with a non-zero
3277
- # error code, so we are forced to check the contents of
3278
- # stdout. On the other hand, if the command is not
3279
- # found, the shell will set an exit code of 127 and print
3280
- # *an error message* to stdout. So we must check for both
3281
- # error code of zero AND non-empty stdout, which explains
3282
- # the odd construction:
3283
- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3284
- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3285
- func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
3286
- $SED -e "$lt_sed_naive_backslashify"`
3287
- else
3288
- # Allow warning below.
3289
- func_to_host_path_result=
3290
- fi
3291
- ;;
3292
- esac
3293
- if test -z "$func_to_host_path_result" ; then
3294
- func_error "Could not determine host path corresponding to"
3295
- func_error " \`$1'"
3296
- func_error "Continuing, but uninstalled executables may not work."
3297
- # Fallback:
3298
- func_to_host_path_result="$1"
3299
- fi
3300
- ;;
3301
- esac
3302
- fi
3303
- }
3304
- # end: func_to_host_path
3305
-
3306
- # func_to_host_pathlist arg
3307
- #
3308
- # Convert pathlists to host format when used with build tools.
3309
- # See func_to_host_path(), above. This function supports the
3310
- # following $build/$host combinations (but does no harm for
3311
- # combinations not listed here):
3312
- # $build $host
3313
- # mingw (msys) mingw [e.g. native]
3314
- # cygwin mingw
3315
- # *nix + wine mingw
3316
- #
3317
- # Path separators are also converted from $build format to
3318
- # $host format. If ARG begins or ends with a path separator
3319
- # character, it is preserved (but converted to $host format)
3320
- # on output.
3321
- #
3322
- # ARG is a pathlist (on $build) that should be converted to
3323
- # the proper representation on $host. The result is stored
3324
- # in $func_to_host_pathlist_result.
3325
- func_to_host_pathlist ()
3326
- {
3327
- func_to_host_pathlist_result="$1"
3328
- if test -n "$1"; then
3329
- case $host in
3330
- *mingw* )
3331
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3332
- # Remove leading and trailing path separator characters from
3333
- # ARG. msys behavior is inconsistent here, cygpath turns them
3334
- # into '.;' and ';.', and winepath ignores them completely.
3335
- func_stripname : : "$1"
3336
- func_to_host_pathlist_tmp1=$func_stripname_result
3337
- case $build in
3338
- *mingw* ) # Actually, msys.
3339
- # Awkward: cmd appends spaces to result.
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"`
3343
- ;;
3344
- *cygwin* )
3345
- func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
3346
- $SED -e "$lt_sed_naive_backslashify"`
3347
- ;;
3348
- * )
3349
- # unfortunately, winepath doesn't convert pathlists
3350
- func_to_host_pathlist_result=""
3351
- func_to_host_pathlist_oldIFS=$IFS
3352
- IFS=:
3353
- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3354
- IFS=$func_to_host_pathlist_oldIFS
3355
- if test -n "$func_to_host_pathlist_f" ; then
3356
- func_to_host_path "$func_to_host_pathlist_f"
3357
- if test -n "$func_to_host_path_result" ; then
3358
- if test -z "$func_to_host_pathlist_result" ; then
3359
- func_to_host_pathlist_result="$func_to_host_path_result"
3360
- else
3361
- func_append func_to_host_pathlist_result ";$func_to_host_path_result"
3362
- fi
3363
- fi
3364
- fi
3365
- done
3366
- IFS=$func_to_host_pathlist_oldIFS
3367
- ;;
3368
- esac
3369
- if test -z "$func_to_host_pathlist_result"; then
3370
- func_error "Could not determine the host path(s) corresponding to"
3371
- func_error " \`$1'"
3372
- func_error "Continuing, but uninstalled executables may not work."
3373
- # Fallback. This may break if $1 contains DOS-style drive
3374
- # specifications. The fix is not to complicate the expression
3375
- # below, but for the user to provide a working wine installation
3376
- # with winepath so that path translation in the cross-to-mingw
3377
- # case works properly.
3378
- lt_replace_pathsep_nix_to_dos="s|:|;|g"
3379
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3380
- $SED -e "$lt_replace_pathsep_nix_to_dos"`
3381
- fi
3382
- # Now, add the leading and trailing path separators back
3383
- case "$1" in
3384
- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3385
- ;;
3386
- esac
3387
- case "$1" in
3388
- *: ) func_append func_to_host_pathlist_result ";"
3389
- ;;
3390
- esac
3391
- ;;
3392
- esac
3393
- fi
3394
- }
3395
- # end: func_to_host_pathlist
3396
-
3397
4134
  # func_emit_cwrapperexe_src
3398
4135
  # emit the source code for a wrapper executable on stdout
3399
4136
  # Must ONLY be called from within func_mode_link because
@@ -3563,14 +4300,14 @@ void lt_dump_script (FILE *f);
3563
4300
  EOF
3564
4301
 
3565
4302
  cat <<EOF
3566
- const char * MAGIC_EXE = "$magic_exe";
4303
+ volatile const char * MAGIC_EXE = "$magic_exe";
3567
4304
  const char * LIB_PATH_VARNAME = "$shlibpath_var";
3568
4305
  EOF
3569
4306
 
3570
4307
  if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3571
- func_to_host_pathlist "$temp_rpath"
4308
+ func_to_host_path "$temp_rpath"
3572
4309
  cat <<EOF
3573
- const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
4310
+ const char * LIB_PATH_VALUE = "$func_to_host_path_result";
3574
4311
  EOF
3575
4312
  else
3576
4313
  cat <<"EOF"
@@ -3579,10 +4316,10 @@ EOF
3579
4316
  fi
3580
4317
 
3581
4318
  if test -n "$dllsearchpath"; then
3582
- func_to_host_pathlist "$dllsearchpath:"
4319
+ func_to_host_path "$dllsearchpath:"
3583
4320
  cat <<EOF
3584
4321
  const char * EXE_PATH_VARNAME = "PATH";
3585
- const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
4322
+ const char * EXE_PATH_VALUE = "$func_to_host_path_result";
3586
4323
  EOF
3587
4324
  else
3588
4325
  cat <<"EOF"
@@ -3765,8 +4502,12 @@ EOF
3765
4502
 
3766
4503
  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
3767
4504
  lt_setenv ("DUALCASE", "1"); /* for MSK sh */
3768
- lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4505
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4506
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4507
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
4508
+ libraries must come first. */
3769
4509
  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
4510
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3770
4511
 
3771
4512
  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
3772
4513
  nonnull (lt_argv_zero));
@@ -4322,9 +5063,15 @@ void lt_dump_script (FILE* f)
4322
5063
  {
4323
5064
  EOF
4324
5065
  func_emit_wrapper yes |
4325
- $SED -e 's/\([\\"]\)/\\\1/g' \
4326
- -e 's/^/ fputs ("/' -e 's/$/\\n", f);/'
4327
-
5066
+ $SED -n -e '
5067
+ s/^\(.\{79\}\)\(..*\)/\1\
5068
+ \2/
5069
+ h
5070
+ s/\([\\"]\)/\\\1/g
5071
+ s/$/\\n/
5072
+ s/\([^\n]*\).*/ fputs ("\1", f);/p
5073
+ g
5074
+ D'
4328
5075
  cat <<"EOF"
4329
5076
  }
4330
5077
  EOF
@@ -4515,9 +5262,9 @@ func_mode_link ()
4515
5262
  ;;
4516
5263
  *)
4517
5264
  if test "$prev" = dlfiles; then
4518
- dlfiles="$dlfiles $arg"
5265
+ func_append dlfiles " $arg"
4519
5266
  else
4520
- dlprefiles="$dlprefiles $arg"
5267
+ func_append dlprefiles " $arg"
4521
5268
  fi
4522
5269
  prev=
4523
5270
  continue
@@ -4541,7 +5288,7 @@ func_mode_link ()
4541
5288
  *-*-darwin*)
4542
5289
  case "$deplibs " in
4543
5290
  *" $qarg.ltframework "*) ;;
4544
- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
5291
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
4545
5292
  ;;
4546
5293
  esac
4547
5294
  ;;
@@ -4560,7 +5307,7 @@ func_mode_link ()
4560
5307
  moreargs=
4561
5308
  for fil in `cat "$save_arg"`
4562
5309
  do
4563
- # moreargs="$moreargs $fil"
5310
+ # func_append moreargs " $fil"
4564
5311
  arg=$fil
4565
5312
  # A libtool-controlled object.
4566
5313
 
@@ -4589,7 +5336,7 @@ func_mode_link ()
4589
5336
 
4590
5337
  if test "$prev" = dlfiles; then
4591
5338
  if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4592
- dlfiles="$dlfiles $pic_object"
5339
+ func_append dlfiles " $pic_object"
4593
5340
  prev=
4594
5341
  continue
4595
5342
  else
@@ -4601,7 +5348,7 @@ func_mode_link ()
4601
5348
  # CHECK ME: I think I busted this. -Ossama
4602
5349
  if test "$prev" = dlprefiles; then
4603
5350
  # Preload the old-style object.
4604
- dlprefiles="$dlprefiles $pic_object"
5351
+ func_append dlprefiles " $pic_object"
4605
5352
  prev=
4606
5353
  fi
4607
5354
 
@@ -4671,12 +5418,12 @@ func_mode_link ()
4671
5418
  if test "$prev" = rpath; then
4672
5419
  case "$rpath " in
4673
5420
  *" $arg "*) ;;
4674
- *) rpath="$rpath $arg" ;;
5421
+ *) func_append rpath " $arg" ;;
4675
5422
  esac
4676
5423
  else
4677
5424
  case "$xrpath " in
4678
5425
  *" $arg "*) ;;
4679
- *) xrpath="$xrpath $arg" ;;
5426
+ *) func_append xrpath " $arg" ;;
4680
5427
  esac
4681
5428
  fi
4682
5429
  prev=
@@ -4688,28 +5435,28 @@ func_mode_link ()
4688
5435
  continue
4689
5436
  ;;
4690
5437
  weak)
4691
- weak_libs="$weak_libs $arg"
5438
+ func_append weak_libs " $arg"
4692
5439
  prev=
4693
5440
  continue
4694
5441
  ;;
4695
5442
  xcclinker)
4696
- linker_flags="$linker_flags $qarg"
4697
- compiler_flags="$compiler_flags $qarg"
5443
+ func_append linker_flags " $qarg"
5444
+ func_append compiler_flags " $qarg"
4698
5445
  prev=
4699
5446
  func_append compile_command " $qarg"
4700
5447
  func_append finalize_command " $qarg"
4701
5448
  continue
4702
5449
  ;;
4703
5450
  xcompiler)
4704
- compiler_flags="$compiler_flags $qarg"
5451
+ func_append compiler_flags " $qarg"
4705
5452
  prev=
4706
5453
  func_append compile_command " $qarg"
4707
5454
  func_append finalize_command " $qarg"
4708
5455
  continue
4709
5456
  ;;
4710
5457
  xlinker)
4711
- linker_flags="$linker_flags $qarg"
4712
- compiler_flags="$compiler_flags $wl$qarg"
5458
+ func_append linker_flags " $qarg"
5459
+ func_append compiler_flags " $wl$qarg"
4713
5460
  prev=
4714
5461
  func_append compile_command " $wl$qarg"
4715
5462
  func_append finalize_command " $wl$qarg"
@@ -4800,15 +5547,16 @@ func_mode_link ()
4800
5547
  ;;
4801
5548
 
4802
5549
  -L*)
4803
- func_stripname '-L' '' "$arg"
4804
- dir=$func_stripname_result
4805
- if test -z "$dir"; then
5550
+ func_stripname "-L" '' "$arg"
5551
+ if test -z "$func_stripname_result"; then
4806
5552
  if test "$#" -gt 0; then
4807
5553
  func_fatal_error "require no space between \`-L' and \`$1'"
4808
5554
  else
4809
5555
  func_fatal_error "need path for \`-L' option"
4810
5556
  fi
4811
5557
  fi
5558
+ func_resolve_sysroot "$func_stripname_result"
5559
+ dir=$func_resolve_sysroot_result
4812
5560
  # We need an absolute path.
4813
5561
  case $dir in
4814
5562
  [\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -4820,10 +5568,16 @@ func_mode_link ()
4820
5568
  ;;
4821
5569
  esac
4822
5570
  case "$deplibs " in
4823
- *" -L$dir "*) ;;
5571
+ *" -L$dir "* | *" $arg "*)
5572
+ # Will only happen for absolute or sysroot arguments
5573
+ ;;
4824
5574
  *)
4825
- deplibs="$deplibs -L$dir"
4826
- lib_search_path="$lib_search_path $dir"
5575
+ # Preserve sysroot, but never include relative directories
5576
+ case $dir in
5577
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
5578
+ *) func_append deplibs " -L$dir" ;;
5579
+ esac
5580
+ func_append lib_search_path " $dir"
4827
5581
  ;;
4828
5582
  esac
4829
5583
  case $host in
@@ -4832,12 +5586,12 @@ func_mode_link ()
4832
5586
  case :$dllsearchpath: in
4833
5587
  *":$dir:"*) ;;
4834
5588
  ::) dllsearchpath=$dir;;
4835
- *) dllsearchpath="$dllsearchpath:$dir";;
5589
+ *) func_append dllsearchpath ":$dir";;
4836
5590
  esac
4837
5591
  case :$dllsearchpath: in
4838
5592
  *":$testbindir:"*) ;;
4839
5593
  ::) dllsearchpath=$testbindir;;
4840
- *) dllsearchpath="$dllsearchpath:$testbindir";;
5594
+ *) func_append dllsearchpath ":$testbindir";;
4841
5595
  esac
4842
5596
  ;;
4843
5597
  esac
@@ -4861,7 +5615,7 @@ func_mode_link ()
4861
5615
  ;;
4862
5616
  *-*-rhapsody* | *-*-darwin1.[012])
4863
5617
  # Rhapsody C and math libraries are in the System framework
4864
- deplibs="$deplibs System.ltframework"
5618
+ func_append deplibs " System.ltframework"
4865
5619
  continue
4866
5620
  ;;
4867
5621
  *-*-sco3.2v5* | *-*-sco5v6*)
@@ -4881,7 +5635,7 @@ func_mode_link ()
4881
5635
  ;;
4882
5636
  esac
4883
5637
  fi
4884
- deplibs="$deplibs $arg"
5638
+ func_append deplibs " $arg"
4885
5639
  continue
4886
5640
  ;;
4887
5641
 
@@ -4893,21 +5647,22 @@ func_mode_link ()
4893
5647
  # Tru64 UNIX uses -model [arg] to determine the layout of C++
4894
5648
  # classes, name mangling, and exception handling.
4895
5649
  # Darwin uses the -arch flag to determine output architecture.
4896
- -model|-arch|-isysroot)
4897
- compiler_flags="$compiler_flags $arg"
5650
+ -model|-arch|-isysroot|--sysroot)
5651
+ func_append compiler_flags " $arg"
4898
5652
  func_append compile_command " $arg"
4899
5653
  func_append finalize_command " $arg"
4900
5654
  prev=xcompiler
4901
5655
  continue
4902
5656
  ;;
4903
5657
 
4904
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4905
- compiler_flags="$compiler_flags $arg"
5658
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
5659
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5660
+ func_append compiler_flags " $arg"
4906
5661
  func_append compile_command " $arg"
4907
5662
  func_append finalize_command " $arg"
4908
5663
  case "$new_inherited_linker_flags " in
4909
5664
  *" $arg "*) ;;
4910
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
5665
+ * ) func_append new_inherited_linker_flags " $arg" ;;
4911
5666
  esac
4912
5667
  continue
4913
5668
  ;;
@@ -4974,13 +5729,17 @@ func_mode_link ()
4974
5729
  # We need an absolute path.
4975
5730
  case $dir in
4976
5731
  [\\/]* | [A-Za-z]:[\\/]*) ;;
5732
+ =*)
5733
+ func_stripname '=' '' "$dir"
5734
+ dir=$lt_sysroot$func_stripname_result
5735
+ ;;
4977
5736
  *)
4978
5737
  func_fatal_error "only absolute run-paths are allowed"
4979
5738
  ;;
4980
5739
  esac
4981
5740
  case "$xrpath " in
4982
5741
  *" $dir "*) ;;
4983
- *) xrpath="$xrpath $dir" ;;
5742
+ *) func_append xrpath " $dir" ;;
4984
5743
  esac
4985
5744
  continue
4986
5745
  ;;
@@ -5033,8 +5792,8 @@ func_mode_link ()
5033
5792
  for flag in $args; do
5034
5793
  IFS="$save_ifs"
5035
5794
  func_quote_for_eval "$flag"
5036
- arg="$arg $func_quote_for_eval_result"
5037
- compiler_flags="$compiler_flags $func_quote_for_eval_result"
5795
+ func_append arg " $func_quote_for_eval_result"
5796
+ func_append compiler_flags " $func_quote_for_eval_result"
5038
5797
  done
5039
5798
  IFS="$save_ifs"
5040
5799
  func_stripname ' ' '' "$arg"
@@ -5049,9 +5808,9 @@ func_mode_link ()
5049
5808
  for flag in $args; do
5050
5809
  IFS="$save_ifs"
5051
5810
  func_quote_for_eval "$flag"
5052
- arg="$arg $wl$func_quote_for_eval_result"
5053
- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
5054
- linker_flags="$linker_flags $func_quote_for_eval_result"
5811
+ func_append arg " $wl$func_quote_for_eval_result"
5812
+ func_append compiler_flags " $wl$func_quote_for_eval_result"
5813
+ func_append linker_flags " $func_quote_for_eval_result"
5055
5814
  done
5056
5815
  IFS="$save_ifs"
5057
5816
  func_stripname ' ' '' "$arg"
@@ -5090,13 +5849,16 @@ func_mode_link ()
5090
5849
  # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5091
5850
  # @file GCC response files
5092
5851
  # -tp=* Portland pgcc target processor selection
5852
+ # --sysroot=* for sysroot support
5853
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
5093
5854
  -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
5094
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
5855
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5856
+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
5095
5857
  func_quote_for_eval "$arg"
5096
5858
  arg="$func_quote_for_eval_result"
5097
5859
  func_append compile_command " $arg"
5098
5860
  func_append finalize_command " $arg"
5099
- compiler_flags="$compiler_flags $arg"
5861
+ func_append compiler_flags " $arg"
5100
5862
  continue
5101
5863
  ;;
5102
5864
 
@@ -5108,7 +5870,7 @@ func_mode_link ()
5108
5870
 
5109
5871
  *.$objext)
5110
5872
  # A standard object.
5111
- objs="$objs $arg"
5873
+ func_append objs " $arg"
5112
5874
  ;;
5113
5875
 
5114
5876
  *.lo)
@@ -5139,7 +5901,7 @@ func_mode_link ()
5139
5901
 
5140
5902
  if test "$prev" = dlfiles; then
5141
5903
  if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5142
- dlfiles="$dlfiles $pic_object"
5904
+ func_append dlfiles " $pic_object"
5143
5905
  prev=
5144
5906
  continue
5145
5907
  else
@@ -5151,7 +5913,7 @@ func_mode_link ()
5151
5913
  # CHECK ME: I think I busted this. -Ossama
5152
5914
  if test "$prev" = dlprefiles; then
5153
5915
  # Preload the old-style object.
5154
- dlprefiles="$dlprefiles $pic_object"
5916
+ func_append dlprefiles " $pic_object"
5155
5917
  prev=
5156
5918
  fi
5157
5919
 
@@ -5196,24 +5958,25 @@ func_mode_link ()
5196
5958
 
5197
5959
  *.$libext)
5198
5960
  # An archive.
5199
- deplibs="$deplibs $arg"
5200
- old_deplibs="$old_deplibs $arg"
5961
+ func_append deplibs " $arg"
5962
+ func_append old_deplibs " $arg"
5201
5963
  continue
5202
5964
  ;;
5203
5965
 
5204
5966
  *.la)
5205
5967
  # A libtool-controlled library.
5206
5968
 
5969
+ func_resolve_sysroot "$arg"
5207
5970
  if test "$prev" = dlfiles; then
5208
5971
  # This library was specified with -dlopen.
5209
- dlfiles="$dlfiles $arg"
5972
+ func_append dlfiles " $func_resolve_sysroot_result"
5210
5973
  prev=
5211
5974
  elif test "$prev" = dlprefiles; then
5212
5975
  # The library was specified with -dlpreopen.
5213
- dlprefiles="$dlprefiles $arg"
5976
+ func_append dlprefiles " $func_resolve_sysroot_result"
5214
5977
  prev=
5215
5978
  else
5216
- deplibs="$deplibs $arg"
5979
+ func_append deplibs " $func_resolve_sysroot_result"
5217
5980
  fi
5218
5981
  continue
5219
5982
  ;;
@@ -5260,6 +6023,8 @@ func_mode_link ()
5260
6023
 
5261
6024
  func_dirname "$output" "/" ""
5262
6025
  output_objdir="$func_dirname_result$objdir"
6026
+ func_to_tool_file "$output_objdir/"
6027
+ tool_output_objdir=$func_to_tool_file_result
5263
6028
  # Create the object directory.
5264
6029
  func_mkdir_p "$output_objdir"
5265
6030
 
@@ -5280,12 +6045,12 @@ func_mode_link ()
5280
6045
  # Find all interdependent deplibs by searching for libraries
5281
6046
  # that are linked more than once (e.g. -la -lb -la)
5282
6047
  for deplib in $deplibs; do
5283
- if $opt_duplicate_deps ; then
6048
+ if $opt_preserve_dup_deps ; then
5284
6049
  case "$libs " in
5285
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6050
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
5286
6051
  esac
5287
6052
  fi
5288
- libs="$libs $deplib"
6053
+ func_append libs " $deplib"
5289
6054
  done
5290
6055
 
5291
6056
  if test "$linkmode" = lib; then
@@ -5298,9 +6063,9 @@ func_mode_link ()
5298
6063
  if $opt_duplicate_compiler_generated_deps; then
5299
6064
  for pre_post_dep in $predeps $postdeps; do
5300
6065
  case "$pre_post_deps " in
5301
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
6066
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
5302
6067
  esac
5303
- pre_post_deps="$pre_post_deps $pre_post_dep"
6068
+ func_append pre_post_deps " $pre_post_dep"
5304
6069
  done
5305
6070
  fi
5306
6071
  pre_post_deps=
@@ -5359,7 +6124,10 @@ func_mode_link ()
5359
6124
  case $pass in
5360
6125
  dlopen) libs="$dlfiles" ;;
5361
6126
  dlpreopen) libs="$dlprefiles" ;;
5362
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
6127
+ link)
6128
+ libs="$deplibs %DEPLIBS%"
6129
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
6130
+ ;;
5363
6131
  esac
5364
6132
  fi
5365
6133
  if test "$linkmode,$pass" = "lib,dlpreopen"; then
@@ -5367,8 +6135,9 @@ func_mode_link ()
5367
6135
  for lib in $dlprefiles; do
5368
6136
  # Ignore non-libtool-libs
5369
6137
  dependency_libs=
6138
+ func_resolve_sysroot "$lib"
5370
6139
  case $lib in
5371
- *.la) func_source "$lib" ;;
6140
+ *.la) func_source "$func_resolve_sysroot_result" ;;
5372
6141
  esac
5373
6142
 
5374
6143
  # Collect preopened libtool deplibs, except any this library
@@ -5378,7 +6147,7 @@ func_mode_link ()
5378
6147
  deplib_base=$func_basename_result
5379
6148
  case " $weak_libs " in
5380
6149
  *" $deplib_base "*) ;;
5381
- *) deplibs="$deplibs $deplib" ;;
6150
+ *) func_append deplibs " $deplib" ;;
5382
6151
  esac
5383
6152
  done
5384
6153
  done
@@ -5394,16 +6163,17 @@ func_mode_link ()
5394
6163
  lib=
5395
6164
  found=no
5396
6165
  case $deplib in
5397
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
6166
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
6167
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5398
6168
  if test "$linkmode,$pass" = "prog,link"; then
5399
6169
  compile_deplibs="$deplib $compile_deplibs"
5400
6170
  finalize_deplibs="$deplib $finalize_deplibs"
5401
6171
  else
5402
- compiler_flags="$compiler_flags $deplib"
6172
+ func_append compiler_flags " $deplib"
5403
6173
  if test "$linkmode" = lib ; then
5404
6174
  case "$new_inherited_linker_flags " in
5405
6175
  *" $deplib "*) ;;
5406
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6176
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
5407
6177
  esac
5408
6178
  fi
5409
6179
  fi
@@ -5488,7 +6258,7 @@ func_mode_link ()
5488
6258
  if test "$linkmode" = lib ; then
5489
6259
  case "$new_inherited_linker_flags " in
5490
6260
  *" $deplib "*) ;;
5491
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6261
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
5492
6262
  esac
5493
6263
  fi
5494
6264
  fi
@@ -5501,7 +6271,8 @@ func_mode_link ()
5501
6271
  test "$pass" = conv && continue
5502
6272
  newdependency_libs="$deplib $newdependency_libs"
5503
6273
  func_stripname '-L' '' "$deplib"
5504
- newlib_search_path="$newlib_search_path $func_stripname_result"
6274
+ func_resolve_sysroot "$func_stripname_result"
6275
+ func_append newlib_search_path " $func_resolve_sysroot_result"
5505
6276
  ;;
5506
6277
  prog)
5507
6278
  if test "$pass" = conv; then
@@ -5515,7 +6286,8 @@ func_mode_link ()
5515
6286
  finalize_deplibs="$deplib $finalize_deplibs"
5516
6287
  fi
5517
6288
  func_stripname '-L' '' "$deplib"
5518
- newlib_search_path="$newlib_search_path $func_stripname_result"
6289
+ func_resolve_sysroot "$func_stripname_result"
6290
+ func_append newlib_search_path " $func_resolve_sysroot_result"
5519
6291
  ;;
5520
6292
  *)
5521
6293
  func_warning "\`-L' is ignored for archives/objects"
@@ -5526,17 +6298,21 @@ func_mode_link ()
5526
6298
  -R*)
5527
6299
  if test "$pass" = link; then
5528
6300
  func_stripname '-R' '' "$deplib"
5529
- dir=$func_stripname_result
6301
+ func_resolve_sysroot "$func_stripname_result"
6302
+ dir=$func_resolve_sysroot_result
5530
6303
  # Make sure the xrpath contains only unique directories.
5531
6304
  case "$xrpath " in
5532
6305
  *" $dir "*) ;;
5533
- *) xrpath="$xrpath $dir" ;;
6306
+ *) func_append xrpath " $dir" ;;
5534
6307
  esac
5535
6308
  fi
5536
6309
  deplibs="$deplib $deplibs"
5537
6310
  continue
5538
6311
  ;;
5539
- *.la) lib="$deplib" ;;
6312
+ *.la)
6313
+ func_resolve_sysroot "$deplib"
6314
+ lib=$func_resolve_sysroot_result
6315
+ ;;
5540
6316
  *.$libext)
5541
6317
  if test "$pass" = conv; then
5542
6318
  deplibs="$deplib $deplibs"
@@ -5599,11 +6375,11 @@ func_mode_link ()
5599
6375
  if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
5600
6376
  # If there is no dlopen support or we're linking statically,
5601
6377
  # we need to preload.
5602
- newdlprefiles="$newdlprefiles $deplib"
6378
+ func_append newdlprefiles " $deplib"
5603
6379
  compile_deplibs="$deplib $compile_deplibs"
5604
6380
  finalize_deplibs="$deplib $finalize_deplibs"
5605
6381
  else
5606
- newdlfiles="$newdlfiles $deplib"
6382
+ func_append newdlfiles " $deplib"
5607
6383
  fi
5608
6384
  fi
5609
6385
  continue
@@ -5649,7 +6425,7 @@ func_mode_link ()
5649
6425
  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
5650
6426
  case " $new_inherited_linker_flags " in
5651
6427
  *" $tmp_inherited_linker_flag "*) ;;
5652
- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
6428
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
5653
6429
  esac
5654
6430
  done
5655
6431
  fi
@@ -5657,8 +6433,8 @@ func_mode_link ()
5657
6433
  if test "$linkmode,$pass" = "lib,link" ||
5658
6434
  test "$linkmode,$pass" = "prog,scan" ||
5659
6435
  { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5660
- test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5661
- test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
6436
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
6437
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
5662
6438
  fi
5663
6439
 
5664
6440
  if test "$pass" = conv; then
@@ -5669,30 +6445,36 @@ func_mode_link ()
5669
6445
  func_fatal_error "cannot find name of link library for \`$lib'"
5670
6446
  fi
5671
6447
  # It is a libtool convenience library, so add in its objects.
5672
- convenience="$convenience $ladir/$objdir/$old_library"
5673
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
6448
+ func_append convenience " $ladir/$objdir/$old_library"
6449
+ func_append old_convenience " $ladir/$objdir/$old_library"
6450
+ tmp_libs=
6451
+ for deplib in $dependency_libs; do
6452
+ deplibs="$deplib $deplibs"
6453
+ if $opt_preserve_dup_deps ; then
6454
+ case "$tmp_libs " in
6455
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6456
+ esac
6457
+ fi
6458
+ func_append tmp_libs " $deplib"
6459
+ done
5674
6460
  elif test "$linkmode" != prog && test "$linkmode" != lib; then
5675
6461
  func_fatal_error "\`$lib' is not a convenience library"
5676
6462
  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
5687
6463
  continue
5688
6464
  fi # $pass = conv
5689
6465
 
5690
6466
 
5691
6467
  # Get the name of the library we link against.
5692
6468
  linklib=
5693
- for l in $old_library $library_names; do
5694
- linklib="$l"
5695
- done
6469
+ if test -n "$old_library" &&
6470
+ { test "$prefer_static_libs" = yes ||
6471
+ test "$prefer_static_libs,$installed" = "built,no"; }; then
6472
+ linklib=$old_library
6473
+ else
6474
+ for l in $old_library $library_names; do
6475
+ linklib="$l"
6476
+ done
6477
+ fi
5696
6478
  if test -z "$linklib"; then
5697
6479
  func_fatal_error "cannot find name of link library for \`$lib'"
5698
6480
  fi
@@ -5709,9 +6491,9 @@ func_mode_link ()
5709
6491
  # statically, we need to preload. We also need to preload any
5710
6492
  # dependent libraries so libltdl's deplib preloader doesn't
5711
6493
  # bomb out in the load deplibs phase.
5712
- dlprefiles="$dlprefiles $lib $dependency_libs"
6494
+ func_append dlprefiles " $lib $dependency_libs"
5713
6495
  else
5714
- newdlfiles="$newdlfiles $lib"
6496
+ func_append newdlfiles " $lib"
5715
6497
  fi
5716
6498
  continue
5717
6499
  fi # $pass = dlopen
@@ -5733,14 +6515,14 @@ func_mode_link ()
5733
6515
 
5734
6516
  # Find the relevant object directory and library name.
5735
6517
  if test "X$installed" = Xyes; then
5736
- if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6518
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5737
6519
  func_warning "library \`$lib' was moved."
5738
6520
  dir="$ladir"
5739
6521
  absdir="$abs_ladir"
5740
6522
  libdir="$abs_ladir"
5741
6523
  else
5742
- dir="$libdir"
5743
- absdir="$libdir"
6524
+ dir="$lt_sysroot$libdir"
6525
+ absdir="$lt_sysroot$libdir"
5744
6526
  fi
5745
6527
  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
5746
6528
  else
@@ -5748,12 +6530,12 @@ func_mode_link ()
5748
6530
  dir="$ladir"
5749
6531
  absdir="$abs_ladir"
5750
6532
  # Remove this search path later
5751
- notinst_path="$notinst_path $abs_ladir"
6533
+ func_append notinst_path " $abs_ladir"
5752
6534
  else
5753
6535
  dir="$ladir/$objdir"
5754
6536
  absdir="$abs_ladir/$objdir"
5755
6537
  # Remove this search path later
5756
- notinst_path="$notinst_path $abs_ladir"
6538
+ func_append notinst_path " $abs_ladir"
5757
6539
  fi
5758
6540
  fi # $installed = yes
5759
6541
  func_stripname 'lib' '.la' "$laname"
@@ -5764,20 +6546,46 @@ func_mode_link ()
5764
6546
  if test -z "$libdir" && test "$linkmode" = prog; then
5765
6547
  func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
5766
6548
  fi
5767
- # Prefer using a static library (so that no silly _DYNAMIC symbols
5768
- # are required to link).
5769
- if test -n "$old_library"; then
5770
- newdlprefiles="$newdlprefiles $dir/$old_library"
5771
- # Keep a list of preopened convenience libraries to check
5772
- # that they are being used correctly in the link pass.
5773
- test -z "$libdir" && \
5774
- dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5775
- # Otherwise, use the dlname, so that lt_dlopen finds it.
5776
- elif test -n "$dlname"; then
5777
- newdlprefiles="$newdlprefiles $dir/$dlname"
5778
- else
5779
- newdlprefiles="$newdlprefiles $dir/$linklib"
5780
- fi
6549
+ case "$host" in
6550
+ # special handling for platforms with PE-DLLs.
6551
+ *cygwin* | *mingw* | *cegcc* )
6552
+ # Linker will automatically link against shared library if both
6553
+ # static and shared are present. Therefore, ensure we extract
6554
+ # symbols from the import library if a shared library is present
6555
+ # (otherwise, the dlopen module name will be incorrect). We do
6556
+ # this by putting the import library name into $newdlprefiles.
6557
+ # We recover the dlopen module name by 'saving' the la file
6558
+ # name in a special purpose variable, and (later) extracting the
6559
+ # dlname from the la file.
6560
+ if test -n "$dlname"; then
6561
+ func_tr_sh "$dir/$linklib"
6562
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
6563
+ func_append newdlprefiles " $dir/$linklib"
6564
+ else
6565
+ func_append newdlprefiles " $dir/$old_library"
6566
+ # Keep a list of preopened convenience libraries to check
6567
+ # that they are being used correctly in the link pass.
6568
+ test -z "$libdir" && \
6569
+ func_append dlpreconveniencelibs " $dir/$old_library"
6570
+ fi
6571
+ ;;
6572
+ * )
6573
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
6574
+ # are required to link).
6575
+ if test -n "$old_library"; then
6576
+ func_append newdlprefiles " $dir/$old_library"
6577
+ # Keep a list of preopened convenience libraries to check
6578
+ # that they are being used correctly in the link pass.
6579
+ test -z "$libdir" && \
6580
+ func_append dlpreconveniencelibs " $dir/$old_library"
6581
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
6582
+ elif test -n "$dlname"; then
6583
+ func_append newdlprefiles " $dir/$dlname"
6584
+ else
6585
+ func_append newdlprefiles " $dir/$linklib"
6586
+ fi
6587
+ ;;
6588
+ esac
5781
6589
  fi # $pass = dlpreopen
5782
6590
 
5783
6591
  if test -z "$libdir"; then
@@ -5795,7 +6603,7 @@ func_mode_link ()
5795
6603
 
5796
6604
 
5797
6605
  if test "$linkmode" = prog && test "$pass" != link; then
5798
- newlib_search_path="$newlib_search_path $ladir"
6606
+ func_append newlib_search_path " $ladir"
5799
6607
  deplibs="$lib $deplibs"
5800
6608
 
5801
6609
  linkalldeplibs=no
@@ -5808,7 +6616,8 @@ func_mode_link ()
5808
6616
  for deplib in $dependency_libs; do
5809
6617
  case $deplib in
5810
6618
  -L*) func_stripname '-L' '' "$deplib"
5811
- newlib_search_path="$newlib_search_path $func_stripname_result"
6619
+ func_resolve_sysroot "$func_stripname_result"
6620
+ func_append newlib_search_path " $func_resolve_sysroot_result"
5812
6621
  ;;
5813
6622
  esac
5814
6623
  # Need to link against all dependency_libs?
@@ -5819,12 +6628,12 @@ func_mode_link ()
5819
6628
  # or/and link against static libraries
5820
6629
  newdependency_libs="$deplib $newdependency_libs"
5821
6630
  fi
5822
- if $opt_duplicate_deps ; then
6631
+ if $opt_preserve_dup_deps ; then
5823
6632
  case "$tmp_libs " in
5824
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6633
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
5825
6634
  esac
5826
6635
  fi
5827
- tmp_libs="$tmp_libs $deplib"
6636
+ func_append tmp_libs " $deplib"
5828
6637
  done # for deplib
5829
6638
  continue
5830
6639
  fi # $linkmode = prog...
@@ -5839,7 +6648,7 @@ func_mode_link ()
5839
6648
  # Make sure the rpath contains only unique directories.
5840
6649
  case "$temp_rpath:" in
5841
6650
  *"$absdir:"*) ;;
5842
- *) temp_rpath="$temp_rpath$absdir:" ;;
6651
+ *) func_append temp_rpath "$absdir:" ;;
5843
6652
  esac
5844
6653
  fi
5845
6654
 
@@ -5851,7 +6660,7 @@ func_mode_link ()
5851
6660
  *)
5852
6661
  case "$compile_rpath " in
5853
6662
  *" $absdir "*) ;;
5854
- *) compile_rpath="$compile_rpath $absdir"
6663
+ *) func_append compile_rpath " $absdir" ;;
5855
6664
  esac
5856
6665
  ;;
5857
6666
  esac
@@ -5860,7 +6669,7 @@ func_mode_link ()
5860
6669
  *)
5861
6670
  case "$finalize_rpath " in
5862
6671
  *" $libdir "*) ;;
5863
- *) finalize_rpath="$finalize_rpath $libdir"
6672
+ *) func_append finalize_rpath " $libdir" ;;
5864
6673
  esac
5865
6674
  ;;
5866
6675
  esac
@@ -5885,12 +6694,12 @@ func_mode_link ()
5885
6694
  case $host in
5886
6695
  *cygwin* | *mingw* | *cegcc*)
5887
6696
  # No point in relinking DLLs because paths are not encoded
5888
- notinst_deplibs="$notinst_deplibs $lib"
6697
+ func_append notinst_deplibs " $lib"
5889
6698
  need_relink=no
5890
6699
  ;;
5891
6700
  *)
5892
6701
  if test "$installed" = no; then
5893
- notinst_deplibs="$notinst_deplibs $lib"
6702
+ func_append notinst_deplibs " $lib"
5894
6703
  need_relink=yes
5895
6704
  fi
5896
6705
  ;;
@@ -5925,7 +6734,7 @@ func_mode_link ()
5925
6734
  *)
5926
6735
  case "$compile_rpath " in
5927
6736
  *" $absdir "*) ;;
5928
- *) compile_rpath="$compile_rpath $absdir"
6737
+ *) func_append compile_rpath " $absdir" ;;
5929
6738
  esac
5930
6739
  ;;
5931
6740
  esac
@@ -5934,7 +6743,7 @@ func_mode_link ()
5934
6743
  *)
5935
6744
  case "$finalize_rpath " in
5936
6745
  *" $libdir "*) ;;
5937
- *) finalize_rpath="$finalize_rpath $libdir"
6746
+ *) func_append finalize_rpath " $libdir" ;;
5938
6747
  esac
5939
6748
  ;;
5940
6749
  esac
@@ -5988,7 +6797,7 @@ func_mode_link ()
5988
6797
  linklib=$newlib
5989
6798
  fi # test -n "$old_archive_from_expsyms_cmds"
5990
6799
 
5991
- if test "$linkmode" = prog || test "$mode" != relink; then
6800
+ if test "$linkmode" = prog || test "$opt_mode" != relink; then
5992
6801
  add_shlibpath=
5993
6802
  add_dir=
5994
6803
  add=
@@ -6039,12 +6848,12 @@ func_mode_link ()
6039
6848
  test "$hardcode_direct_absolute" = no; then
6040
6849
  add="$dir/$linklib"
6041
6850
  elif test "$hardcode_minus_L" = yes; then
6042
- add_dir="-L$dir"
6851
+ add_dir="-L$absdir"
6043
6852
  # Try looking first in the location we're being installed to.
6044
6853
  if test -n "$inst_prefix_dir"; then
6045
6854
  case $libdir in
6046
6855
  [\\/]*)
6047
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
6856
+ func_append add_dir " -L$inst_prefix_dir$libdir"
6048
6857
  ;;
6049
6858
  esac
6050
6859
  fi
@@ -6066,7 +6875,7 @@ func_mode_link ()
6066
6875
  if test -n "$add_shlibpath"; then
6067
6876
  case :$compile_shlibpath: in
6068
6877
  *":$add_shlibpath:"*) ;;
6069
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
6878
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
6070
6879
  esac
6071
6880
  fi
6072
6881
  if test "$linkmode" = prog; then
@@ -6080,13 +6889,13 @@ func_mode_link ()
6080
6889
  test "$hardcode_shlibpath_var" = yes; then
6081
6890
  case :$finalize_shlibpath: in
6082
6891
  *":$libdir:"*) ;;
6083
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6892
+ *) func_append finalize_shlibpath "$libdir:" ;;
6084
6893
  esac
6085
6894
  fi
6086
6895
  fi
6087
6896
  fi
6088
6897
 
6089
- if test "$linkmode" = prog || test "$mode" = relink; then
6898
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
6090
6899
  add_shlibpath=
6091
6900
  add_dir=
6092
6901
  add=
@@ -6100,7 +6909,7 @@ func_mode_link ()
6100
6909
  elif test "$hardcode_shlibpath_var" = yes; then
6101
6910
  case :$finalize_shlibpath: in
6102
6911
  *":$libdir:"*) ;;
6103
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6912
+ *) func_append finalize_shlibpath "$libdir:" ;;
6104
6913
  esac
6105
6914
  add="-l$name"
6106
6915
  elif test "$hardcode_automatic" = yes; then
@@ -6117,7 +6926,7 @@ func_mode_link ()
6117
6926
  if test -n "$inst_prefix_dir"; then
6118
6927
  case $libdir in
6119
6928
  [\\/]*)
6120
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
6929
+ func_append add_dir " -L$inst_prefix_dir$libdir"
6121
6930
  ;;
6122
6931
  esac
6123
6932
  fi
@@ -6194,27 +7003,33 @@ func_mode_link ()
6194
7003
  temp_xrpath=$func_stripname_result
6195
7004
  case " $xrpath " in
6196
7005
  *" $temp_xrpath "*) ;;
6197
- *) xrpath="$xrpath $temp_xrpath";;
7006
+ *) func_append xrpath " $temp_xrpath";;
6198
7007
  esac;;
6199
- *) temp_deplibs="$temp_deplibs $libdir";;
7008
+ *) func_append temp_deplibs " $libdir";;
6200
7009
  esac
6201
7010
  done
6202
7011
  dependency_libs="$temp_deplibs"
6203
7012
  fi
6204
7013
 
6205
- newlib_search_path="$newlib_search_path $absdir"
7014
+ func_append newlib_search_path " $absdir"
6206
7015
  # Link against this library
6207
7016
  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
6208
7017
  # ... and its dependency_libs
6209
7018
  tmp_libs=
6210
7019
  for deplib in $dependency_libs; do
6211
7020
  newdependency_libs="$deplib $newdependency_libs"
6212
- if $opt_duplicate_deps ; then
7021
+ case $deplib in
7022
+ -L*) func_stripname '-L' '' "$deplib"
7023
+ func_resolve_sysroot "$func_stripname_result";;
7024
+ *) func_resolve_sysroot "$deplib" ;;
7025
+ esac
7026
+ if $opt_preserve_dup_deps ; then
6213
7027
  case "$tmp_libs " in
6214
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
7028
+ *" $func_resolve_sysroot_result "*)
7029
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
6215
7030
  esac
6216
7031
  fi
6217
- tmp_libs="$tmp_libs $deplib"
7032
+ func_append tmp_libs " $func_resolve_sysroot_result"
6218
7033
  done
6219
7034
 
6220
7035
  if test "$link_all_deplibs" != no; then
@@ -6224,8 +7039,10 @@ func_mode_link ()
6224
7039
  case $deplib in
6225
7040
  -L*) path="$deplib" ;;
6226
7041
  *.la)
7042
+ func_resolve_sysroot "$deplib"
7043
+ deplib=$func_resolve_sysroot_result
6227
7044
  func_dirname "$deplib" "" "."
6228
- dir="$func_dirname_result"
7045
+ dir=$func_dirname_result
6229
7046
  # We need an absolute path.
6230
7047
  case $dir in
6231
7048
  [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
@@ -6252,8 +7069,8 @@ func_mode_link ()
6252
7069
  if test -z "$darwin_install_name"; then
6253
7070
  darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
6254
7071
  fi
6255
- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
6256
- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
7072
+ func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7073
+ func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
6257
7074
  path=
6258
7075
  fi
6259
7076
  fi
@@ -6303,7 +7120,7 @@ func_mode_link ()
6303
7120
  for dir in $newlib_search_path; do
6304
7121
  case "$lib_search_path " in
6305
7122
  *" $dir "*) ;;
6306
- *) lib_search_path="$lib_search_path $dir" ;;
7123
+ *) func_append lib_search_path " $dir" ;;
6307
7124
  esac
6308
7125
  done
6309
7126
  newlib_search_path=
@@ -6361,10 +7178,10 @@ func_mode_link ()
6361
7178
  -L*)
6362
7179
  case " $tmp_libs " in
6363
7180
  *" $deplib "*) ;;
6364
- *) tmp_libs="$tmp_libs $deplib" ;;
7181
+ *) func_append tmp_libs " $deplib" ;;
6365
7182
  esac
6366
7183
  ;;
6367
- *) tmp_libs="$tmp_libs $deplib" ;;
7184
+ *) func_append tmp_libs " $deplib" ;;
6368
7185
  esac
6369
7186
  done
6370
7187
  eval $var=\"$tmp_libs\"
@@ -6380,7 +7197,7 @@ func_mode_link ()
6380
7197
  ;;
6381
7198
  esac
6382
7199
  if test -n "$i" ; then
6383
- tmp_libs="$tmp_libs $i"
7200
+ func_append tmp_libs " $i"
6384
7201
  fi
6385
7202
  done
6386
7203
  dependency_libs=$tmp_libs
@@ -6421,7 +7238,7 @@ func_mode_link ()
6421
7238
  # Now set the variables for building old libraries.
6422
7239
  build_libtool_libs=no
6423
7240
  oldlibs="$output"
6424
- objs="$objs$old_deplibs"
7241
+ func_append objs "$old_deplibs"
6425
7242
  ;;
6426
7243
 
6427
7244
  lib)
@@ -6457,7 +7274,7 @@ func_mode_link ()
6457
7274
  echo
6458
7275
  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
6459
7276
  $ECHO "*** objects $objs is not portable!"
6460
- libobjs="$libobjs $objs"
7277
+ func_append libobjs " $objs"
6461
7278
  fi
6462
7279
  fi
6463
7280
 
@@ -6516,6 +7333,7 @@ func_mode_link ()
6516
7333
  # which has an extra 1 added just for fun
6517
7334
  #
6518
7335
  case $version_type in
7336
+ # correct linux to gnu/linux during the next big refactor
6519
7337
  darwin|linux|osf|windows|none)
6520
7338
  func_arith $number_major + $number_minor
6521
7339
  current=$func_arith_result
@@ -6534,6 +7352,9 @@ func_mode_link ()
6534
7352
  revision="$number_minor"
6535
7353
  lt_irix_increment=no
6536
7354
  ;;
7355
+ *)
7356
+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
7357
+ ;;
6537
7358
  esac
6538
7359
  ;;
6539
7360
  no)
@@ -6632,7 +7453,7 @@ func_mode_link ()
6632
7453
  versuffix="$major.$revision"
6633
7454
  ;;
6634
7455
 
6635
- linux)
7456
+ linux) # correct to gnu/linux during the next big refactor
6636
7457
  func_arith $current - $age
6637
7458
  major=.$func_arith_result
6638
7459
  versuffix="$major.$age.$revision"
@@ -6655,7 +7476,7 @@ func_mode_link ()
6655
7476
  done
6656
7477
 
6657
7478
  # Make executables depend on our current version.
6658
- verstring="$verstring:${current}.0"
7479
+ func_append verstring ":${current}.0"
6659
7480
  ;;
6660
7481
 
6661
7482
  qnx)
@@ -6723,10 +7544,10 @@ func_mode_link ()
6723
7544
  fi
6724
7545
 
6725
7546
  func_generate_dlsyms "$libname" "$libname" "yes"
6726
- libobjs="$libobjs $symfileobj"
7547
+ func_append libobjs " $symfileobj"
6727
7548
  test "X$libobjs" = "X " && libobjs=
6728
7549
 
6729
- if test "$mode" != relink; then
7550
+ if test "$opt_mode" != relink; then
6730
7551
  # Remove our outputs, but don't remove object files since they
6731
7552
  # may have been created when compiling PIC objects.
6732
7553
  removelist=
@@ -6742,7 +7563,7 @@ func_mode_link ()
6742
7563
  continue
6743
7564
  fi
6744
7565
  fi
6745
- removelist="$removelist $p"
7566
+ func_append removelist " $p"
6746
7567
  ;;
6747
7568
  *) ;;
6748
7569
  esac
@@ -6753,7 +7574,7 @@ func_mode_link ()
6753
7574
 
6754
7575
  # Now set the variables for building old libraries.
6755
7576
  if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
6756
- oldlibs="$oldlibs $output_objdir/$libname.$libext"
7577
+ func_append oldlibs " $output_objdir/$libname.$libext"
6757
7578
 
6758
7579
  # Transform .lo files to .o files.
6759
7580
  oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
@@ -6770,10 +7591,11 @@ func_mode_link ()
6770
7591
  # If the user specified any rpath flags, then add them.
6771
7592
  temp_xrpath=
6772
7593
  for libdir in $xrpath; do
6773
- temp_xrpath="$temp_xrpath -R$libdir"
7594
+ func_replace_sysroot "$libdir"
7595
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
6774
7596
  case "$finalize_rpath " in
6775
7597
  *" $libdir "*) ;;
6776
- *) finalize_rpath="$finalize_rpath $libdir" ;;
7598
+ *) func_append finalize_rpath " $libdir" ;;
6777
7599
  esac
6778
7600
  done
6779
7601
  if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
@@ -6787,7 +7609,7 @@ func_mode_link ()
6787
7609
  for lib in $old_dlfiles; do
6788
7610
  case " $dlprefiles $dlfiles " in
6789
7611
  *" $lib "*) ;;
6790
- *) dlfiles="$dlfiles $lib" ;;
7612
+ *) func_append dlfiles " $lib" ;;
6791
7613
  esac
6792
7614
  done
6793
7615
 
@@ -6797,7 +7619,7 @@ func_mode_link ()
6797
7619
  for lib in $old_dlprefiles; do
6798
7620
  case "$dlprefiles " in
6799
7621
  *" $lib "*) ;;
6800
- *) dlprefiles="$dlprefiles $lib" ;;
7622
+ *) func_append dlprefiles " $lib" ;;
6801
7623
  esac
6802
7624
  done
6803
7625
 
@@ -6809,7 +7631,7 @@ func_mode_link ()
6809
7631
  ;;
6810
7632
  *-*-rhapsody* | *-*-darwin1.[012])
6811
7633
  # Rhapsody C library is in the System framework
6812
- deplibs="$deplibs System.ltframework"
7634
+ func_append deplibs " System.ltframework"
6813
7635
  ;;
6814
7636
  *-*-netbsd*)
6815
7637
  # Don't link with libc until the a.out ld.so is fixed.
@@ -6826,7 +7648,7 @@ func_mode_link ()
6826
7648
  *)
6827
7649
  # Add libc to deplibs on all other systems if necessary.
6828
7650
  if test "$build_libtool_need_lc" = "yes"; then
6829
- deplibs="$deplibs -lc"
7651
+ func_append deplibs " -lc"
6830
7652
  fi
6831
7653
  ;;
6832
7654
  esac
@@ -6875,7 +7697,7 @@ EOF
6875
7697
  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6876
7698
  case " $predeps $postdeps " in
6877
7699
  *" $i "*)
6878
- newdeplibs="$newdeplibs $i"
7700
+ func_append newdeplibs " $i"
6879
7701
  i=""
6880
7702
  ;;
6881
7703
  esac
@@ -6886,7 +7708,7 @@ EOF
6886
7708
  set dummy $deplib_matches; shift
6887
7709
  deplib_match=$1
6888
7710
  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6889
- newdeplibs="$newdeplibs $i"
7711
+ func_append newdeplibs " $i"
6890
7712
  else
6891
7713
  droppeddeps=yes
6892
7714
  echo
@@ -6900,7 +7722,7 @@ EOF
6900
7722
  fi
6901
7723
  ;;
6902
7724
  *)
6903
- newdeplibs="$newdeplibs $i"
7725
+ func_append newdeplibs " $i"
6904
7726
  ;;
6905
7727
  esac
6906
7728
  done
@@ -6918,7 +7740,7 @@ EOF
6918
7740
  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6919
7741
  case " $predeps $postdeps " in
6920
7742
  *" $i "*)
6921
- newdeplibs="$newdeplibs $i"
7743
+ func_append newdeplibs " $i"
6922
7744
  i=""
6923
7745
  ;;
6924
7746
  esac
@@ -6929,7 +7751,7 @@ EOF
6929
7751
  set dummy $deplib_matches; shift
6930
7752
  deplib_match=$1
6931
7753
  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6932
- newdeplibs="$newdeplibs $i"
7754
+ func_append newdeplibs " $i"
6933
7755
  else
6934
7756
  droppeddeps=yes
6935
7757
  echo
@@ -6951,7 +7773,7 @@ EOF
6951
7773
  fi
6952
7774
  ;;
6953
7775
  *)
6954
- newdeplibs="$newdeplibs $i"
7776
+ func_append newdeplibs " $i"
6955
7777
  ;;
6956
7778
  esac
6957
7779
  done
@@ -6968,15 +7790,27 @@ EOF
6968
7790
  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6969
7791
  case " $predeps $postdeps " in
6970
7792
  *" $a_deplib "*)
6971
- newdeplibs="$newdeplibs $a_deplib"
7793
+ func_append newdeplibs " $a_deplib"
6972
7794
  a_deplib=""
6973
7795
  ;;
6974
7796
  esac
6975
7797
  fi
6976
7798
  if test -n "$a_deplib" ; then
6977
7799
  libname=`eval "\\$ECHO \"$libname_spec\""`
7800
+ if test -n "$file_magic_glob"; then
7801
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
7802
+ else
7803
+ libnameglob=$libname
7804
+ fi
7805
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
6978
7806
  for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6979
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7807
+ if test "$want_nocaseglob" = yes; then
7808
+ shopt -s nocaseglob
7809
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7810
+ $nocaseglob
7811
+ else
7812
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7813
+ fi
6980
7814
  for potent_lib in $potential_libs; do
6981
7815
  # Follow soft links.
6982
7816
  if ls -lLd "$potent_lib" 2>/dev/null |
@@ -6999,7 +7833,7 @@ EOF
6999
7833
  if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
7000
7834
  $SED -e 10q |
7001
7835
  $EGREP "$file_magic_regex" > /dev/null; then
7002
- newdeplibs="$newdeplibs $a_deplib"
7836
+ func_append newdeplibs " $a_deplib"
7003
7837
  a_deplib=""
7004
7838
  break 2
7005
7839
  fi
@@ -7024,7 +7858,7 @@ EOF
7024
7858
  ;;
7025
7859
  *)
7026
7860
  # Add a -L argument.
7027
- newdeplibs="$newdeplibs $a_deplib"
7861
+ func_append newdeplibs " $a_deplib"
7028
7862
  ;;
7029
7863
  esac
7030
7864
  done # Gone through all deplibs.
@@ -7040,7 +7874,7 @@ EOF
7040
7874
  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7041
7875
  case " $predeps $postdeps " in
7042
7876
  *" $a_deplib "*)
7043
- newdeplibs="$newdeplibs $a_deplib"
7877
+ func_append newdeplibs " $a_deplib"
7044
7878
  a_deplib=""
7045
7879
  ;;
7046
7880
  esac
@@ -7053,7 +7887,7 @@ EOF
7053
7887
  potlib="$potent_lib" # see symlink-check above in file_magic test
7054
7888
  if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
7055
7889
  $EGREP "$match_pattern_regex" > /dev/null; then
7056
- newdeplibs="$newdeplibs $a_deplib"
7890
+ func_append newdeplibs " $a_deplib"
7057
7891
  a_deplib=""
7058
7892
  break 2
7059
7893
  fi
@@ -7078,7 +7912,7 @@ EOF
7078
7912
  ;;
7079
7913
  *)
7080
7914
  # Add a -L argument.
7081
- newdeplibs="$newdeplibs $a_deplib"
7915
+ func_append newdeplibs " $a_deplib"
7082
7916
  ;;
7083
7917
  esac
7084
7918
  done # Gone through all deplibs.
@@ -7182,7 +8016,7 @@ EOF
7182
8016
  *)
7183
8017
  case " $deplibs " in
7184
8018
  *" -L$path/$objdir "*)
7185
- new_libs="$new_libs -L$path/$objdir" ;;
8019
+ func_append new_libs " -L$path/$objdir" ;;
7186
8020
  esac
7187
8021
  ;;
7188
8022
  esac
@@ -7192,10 +8026,10 @@ EOF
7192
8026
  -L*)
7193
8027
  case " $new_libs " in
7194
8028
  *" $deplib "*) ;;
7195
- *) new_libs="$new_libs $deplib" ;;
8029
+ *) func_append new_libs " $deplib" ;;
7196
8030
  esac
7197
8031
  ;;
7198
- *) new_libs="$new_libs $deplib" ;;
8032
+ *) func_append new_libs " $deplib" ;;
7199
8033
  esac
7200
8034
  done
7201
8035
  deplibs="$new_libs"
@@ -7207,15 +8041,22 @@ EOF
7207
8041
 
7208
8042
  # Test again, we may have decided not to build it any more
7209
8043
  if test "$build_libtool_libs" = yes; then
8044
+ # Remove ${wl} instances when linking with ld.
8045
+ # FIXME: should test the right _cmds variable.
8046
+ case $archive_cmds in
8047
+ *\$LD\ *) wl= ;;
8048
+ esac
7210
8049
  if test "$hardcode_into_libs" = yes; then
7211
8050
  # Hardcode the library paths
7212
8051
  hardcode_libdirs=
7213
8052
  dep_rpath=
7214
8053
  rpath="$finalize_rpath"
7215
- test "$mode" != relink && rpath="$compile_rpath$rpath"
8054
+ test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
7216
8055
  for libdir in $rpath; do
7217
8056
  if test -n "$hardcode_libdir_flag_spec"; then
7218
8057
  if test -n "$hardcode_libdir_separator"; then
8058
+ func_replace_sysroot "$libdir"
8059
+ libdir=$func_replace_sysroot_result
7219
8060
  if test -z "$hardcode_libdirs"; then
7220
8061
  hardcode_libdirs="$libdir"
7221
8062
  else
@@ -7224,18 +8065,18 @@ EOF
7224
8065
  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7225
8066
  ;;
7226
8067
  *)
7227
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8068
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
7228
8069
  ;;
7229
8070
  esac
7230
8071
  fi
7231
8072
  else
7232
8073
  eval flag=\"$hardcode_libdir_flag_spec\"
7233
- dep_rpath="$dep_rpath $flag"
8074
+ func_append dep_rpath " $flag"
7234
8075
  fi
7235
8076
  elif test -n "$runpath_var"; then
7236
8077
  case "$perm_rpath " in
7237
8078
  *" $libdir "*) ;;
7238
- *) perm_rpath="$perm_rpath $libdir" ;;
8079
+ *) func_append perm_rpath " $libdir" ;;
7239
8080
  esac
7240
8081
  fi
7241
8082
  done
@@ -7243,17 +8084,13 @@ EOF
7243
8084
  if test -n "$hardcode_libdir_separator" &&
7244
8085
  test -n "$hardcode_libdirs"; then
7245
8086
  libdir="$hardcode_libdirs"
7246
- if test -n "$hardcode_libdir_flag_spec_ld"; then
7247
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
7248
- else
7249
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
7250
- fi
8087
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
7251
8088
  fi
7252
8089
  if test -n "$runpath_var" && test -n "$perm_rpath"; then
7253
8090
  # We should set the runpath_var.
7254
8091
  rpath=
7255
8092
  for dir in $perm_rpath; do
7256
- rpath="$rpath$dir:"
8093
+ func_append rpath "$dir:"
7257
8094
  done
7258
8095
  eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
7259
8096
  fi
@@ -7261,7 +8098,7 @@ EOF
7261
8098
  fi
7262
8099
 
7263
8100
  shlibpath="$finalize_shlibpath"
7264
- test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
8101
+ test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
7265
8102
  if test -n "$shlibpath"; then
7266
8103
  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
7267
8104
  fi
@@ -7287,7 +8124,7 @@ EOF
7287
8124
  linknames=
7288
8125
  for link
7289
8126
  do
7290
- linknames="$linknames $link"
8127
+ func_append linknames " $link"
7291
8128
  done
7292
8129
 
7293
8130
  # Use standard objects if they are pic
@@ -7298,7 +8135,7 @@ EOF
7298
8135
  if test -n "$export_symbols" && test -n "$include_expsyms"; then
7299
8136
  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
7300
8137
  export_symbols="$output_objdir/$libname.uexp"
7301
- delfiles="$delfiles $export_symbols"
8138
+ func_append delfiles " $export_symbols"
7302
8139
  fi
7303
8140
 
7304
8141
  orig_export_symbols=
@@ -7329,13 +8166,45 @@ EOF
7329
8166
  $opt_dry_run || $RM $export_symbols
7330
8167
  cmds=$export_symbols_cmds
7331
8168
  save_ifs="$IFS"; IFS='~'
7332
- for cmd in $cmds; do
8169
+ for cmd1 in $cmds; do
7333
8170
  IFS="$save_ifs"
7334
- eval cmd=\"$cmd\"
7335
- func_len " $cmd"
7336
- len=$func_len_result
7337
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8171
+ # Take the normal branch if the nm_file_list_spec branch
8172
+ # doesn't work or if tool conversion is not needed.
8173
+ case $nm_file_list_spec~$to_tool_file_cmd in
8174
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
8175
+ try_normal_branch=yes
8176
+ eval cmd=\"$cmd1\"
8177
+ func_len " $cmd"
8178
+ len=$func_len_result
8179
+ ;;
8180
+ *)
8181
+ try_normal_branch=no
8182
+ ;;
8183
+ esac
8184
+ if test "$try_normal_branch" = yes \
8185
+ && { test "$len" -lt "$max_cmd_len" \
8186
+ || test "$max_cmd_len" -le -1; }
8187
+ then
8188
+ func_show_eval "$cmd" 'exit $?'
8189
+ skipped_export=false
8190
+ elif test -n "$nm_file_list_spec"; then
8191
+ func_basename "$output"
8192
+ output_la=$func_basename_result
8193
+ save_libobjs=$libobjs
8194
+ save_output=$output
8195
+ output=${output_objdir}/${output_la}.nm
8196
+ func_to_tool_file "$output"
8197
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
8198
+ func_append delfiles " $output"
8199
+ func_verbose "creating $NM input file list: $output"
8200
+ for obj in $save_libobjs; do
8201
+ func_to_tool_file "$obj"
8202
+ $ECHO "$func_to_tool_file_result"
8203
+ done > "$output"
8204
+ eval cmd=\"$cmd1\"
7338
8205
  func_show_eval "$cmd" 'exit $?'
8206
+ output=$save_output
8207
+ libobjs=$save_libobjs
7339
8208
  skipped_export=false
7340
8209
  else
7341
8210
  # The command line is too long to execute in one step.
@@ -7369,7 +8238,7 @@ EOF
7369
8238
  # global variables. join(1) would be nice here, but unfortunately
7370
8239
  # isn't a blessed tool.
7371
8240
  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7372
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8241
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
7373
8242
  export_symbols=$output_objdir/$libname.def
7374
8243
  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7375
8244
  fi
@@ -7379,7 +8248,7 @@ EOF
7379
8248
  case " $convenience " in
7380
8249
  *" $test_deplib "*) ;;
7381
8250
  *)
7382
- tmp_deplibs="$tmp_deplibs $test_deplib"
8251
+ func_append tmp_deplibs " $test_deplib"
7383
8252
  ;;
7384
8253
  esac
7385
8254
  done
@@ -7399,21 +8268,21 @@ EOF
7399
8268
  test "X$libobjs" = "X " && libobjs=
7400
8269
  else
7401
8270
  gentop="$output_objdir/${outputname}x"
7402
- generated="$generated $gentop"
8271
+ func_append generated " $gentop"
7403
8272
 
7404
8273
  func_extract_archives $gentop $convenience
7405
- libobjs="$libobjs $func_extract_archives_result"
8274
+ func_append libobjs " $func_extract_archives_result"
7406
8275
  test "X$libobjs" = "X " && libobjs=
7407
8276
  fi
7408
8277
  fi
7409
8278
 
7410
8279
  if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
7411
8280
  eval flag=\"$thread_safe_flag_spec\"
7412
- linker_flags="$linker_flags $flag"
8281
+ func_append linker_flags " $flag"
7413
8282
  fi
7414
8283
 
7415
8284
  # Make a backup of the uninstalled library when relinking
7416
- if test "$mode" = relink; then
8285
+ if test "$opt_mode" = relink; then
7417
8286
  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
7418
8287
  fi
7419
8288
 
@@ -7475,10 +8344,13 @@ EOF
7475
8344
  echo 'INPUT (' > $output
7476
8345
  for obj in $save_libobjs
7477
8346
  do
7478
- $ECHO "$obj" >> $output
8347
+ func_to_tool_file "$obj"
8348
+ $ECHO "$func_to_tool_file_result" >> $output
7479
8349
  done
7480
8350
  echo ')' >> $output
7481
- delfiles="$delfiles $output"
8351
+ func_append delfiles " $output"
8352
+ func_to_tool_file "$output"
8353
+ output=$func_to_tool_file_result
7482
8354
  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
7483
8355
  output=${output_objdir}/${output_la}.lnk
7484
8356
  func_verbose "creating linker input file list: $output"
@@ -7492,10 +8364,12 @@ EOF
7492
8364
  fi
7493
8365
  for obj
7494
8366
  do
7495
- $ECHO "$obj" >> $output
8367
+ func_to_tool_file "$obj"
8368
+ $ECHO "$func_to_tool_file_result" >> $output
7496
8369
  done
7497
- delfiles="$delfiles $output"
7498
- output=$firstobj\"$file_list_spec$output\"
8370
+ func_append delfiles " $output"
8371
+ func_to_tool_file "$output"
8372
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
7499
8373
  else
7500
8374
  if test -n "$save_libobjs"; then
7501
8375
  func_verbose "creating reloadable object files..."
@@ -7546,7 +8420,7 @@ EOF
7546
8420
  if test -n "$last_robj"; then
7547
8421
  eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
7548
8422
  fi
7549
- delfiles="$delfiles $output"
8423
+ func_append delfiles " $output"
7550
8424
 
7551
8425
  else
7552
8426
  output=
@@ -7580,7 +8454,7 @@ EOF
7580
8454
  lt_exit=$?
7581
8455
 
7582
8456
  # Restore the uninstalled library and exit
7583
- if test "$mode" = relink; then
8457
+ if test "$opt_mode" = relink; then
7584
8458
  ( cd "$output_objdir" && \
7585
8459
  $RM "${realname}T" && \
7586
8460
  $MV "${realname}U" "$realname" )
@@ -7613,7 +8487,7 @@ EOF
7613
8487
  # global variables. join(1) would be nice here, but unfortunately
7614
8488
  # isn't a blessed tool.
7615
8489
  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7616
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8490
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
7617
8491
  export_symbols=$output_objdir/$libname.def
7618
8492
  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7619
8493
  fi
@@ -7654,10 +8528,10 @@ EOF
7654
8528
  # Add any objects from preloaded convenience libraries
7655
8529
  if test -n "$dlprefiles"; then
7656
8530
  gentop="$output_objdir/${outputname}x"
7657
- generated="$generated $gentop"
8531
+ func_append generated " $gentop"
7658
8532
 
7659
8533
  func_extract_archives $gentop $dlprefiles
7660
- libobjs="$libobjs $func_extract_archives_result"
8534
+ func_append libobjs " $func_extract_archives_result"
7661
8535
  test "X$libobjs" = "X " && libobjs=
7662
8536
  fi
7663
8537
 
@@ -7673,7 +8547,7 @@ EOF
7673
8547
  lt_exit=$?
7674
8548
 
7675
8549
  # Restore the uninstalled library and exit
7676
- if test "$mode" = relink; then
8550
+ if test "$opt_mode" = relink; then
7677
8551
  ( cd "$output_objdir" && \
7678
8552
  $RM "${realname}T" && \
7679
8553
  $MV "${realname}U" "$realname" )
@@ -7685,7 +8559,7 @@ EOF
7685
8559
  IFS="$save_ifs"
7686
8560
 
7687
8561
  # Restore the uninstalled library and exit
7688
- if test "$mode" = relink; then
8562
+ if test "$opt_mode" = relink; then
7689
8563
  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
7690
8564
 
7691
8565
  if test -n "$convenience"; then
@@ -7769,13 +8643,16 @@ EOF
7769
8643
  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
7770
8644
  else
7771
8645
  gentop="$output_objdir/${obj}x"
7772
- generated="$generated $gentop"
8646
+ func_append generated " $gentop"
7773
8647
 
7774
8648
  func_extract_archives $gentop $convenience
7775
8649
  reload_conv_objs="$reload_objs $func_extract_archives_result"
7776
8650
  fi
7777
8651
  fi
7778
8652
 
8653
+ # If we're not building shared, we need to use non_pic_objs
8654
+ test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
8655
+
7779
8656
  # Create the old-style object.
7780
8657
  reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
7781
8658
 
@@ -7849,8 +8726,8 @@ EOF
7849
8726
  if test "$tagname" = CXX ; then
7850
8727
  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
7851
8728
  10.[0123])
7852
- compile_command="$compile_command ${wl}-bind_at_load"
7853
- finalize_command="$finalize_command ${wl}-bind_at_load"
8729
+ func_append compile_command " ${wl}-bind_at_load"
8730
+ func_append finalize_command " ${wl}-bind_at_load"
7854
8731
  ;;
7855
8732
  esac
7856
8733
  fi
@@ -7870,7 +8747,7 @@ EOF
7870
8747
  *)
7871
8748
  case " $compile_deplibs " in
7872
8749
  *" -L$path/$objdir "*)
7873
- new_libs="$new_libs -L$path/$objdir" ;;
8750
+ func_append new_libs " -L$path/$objdir" ;;
7874
8751
  esac
7875
8752
  ;;
7876
8753
  esac
@@ -7880,17 +8757,17 @@ EOF
7880
8757
  -L*)
7881
8758
  case " $new_libs " in
7882
8759
  *" $deplib "*) ;;
7883
- *) new_libs="$new_libs $deplib" ;;
8760
+ *) func_append new_libs " $deplib" ;;
7884
8761
  esac
7885
8762
  ;;
7886
- *) new_libs="$new_libs $deplib" ;;
8763
+ *) func_append new_libs " $deplib" ;;
7887
8764
  esac
7888
8765
  done
7889
8766
  compile_deplibs="$new_libs"
7890
8767
 
7891
8768
 
7892
- compile_command="$compile_command $compile_deplibs"
7893
- finalize_command="$finalize_command $finalize_deplibs"
8769
+ func_append compile_command " $compile_deplibs"
8770
+ func_append finalize_command " $finalize_deplibs"
7894
8771
 
7895
8772
  if test -n "$rpath$xrpath"; then
7896
8773
  # If the user specified any rpath flags, then add them.
@@ -7898,7 +8775,7 @@ EOF
7898
8775
  # This is the magic to use -rpath.
7899
8776
  case "$finalize_rpath " in
7900
8777
  *" $libdir "*) ;;
7901
- *) finalize_rpath="$finalize_rpath $libdir" ;;
8778
+ *) func_append finalize_rpath " $libdir" ;;
7902
8779
  esac
7903
8780
  done
7904
8781
  fi
@@ -7917,18 +8794,18 @@ EOF
7917
8794
  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7918
8795
  ;;
7919
8796
  *)
7920
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8797
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
7921
8798
  ;;
7922
8799
  esac
7923
8800
  fi
7924
8801
  else
7925
8802
  eval flag=\"$hardcode_libdir_flag_spec\"
7926
- rpath="$rpath $flag"
8803
+ func_append rpath " $flag"
7927
8804
  fi
7928
8805
  elif test -n "$runpath_var"; then
7929
8806
  case "$perm_rpath " in
7930
8807
  *" $libdir "*) ;;
7931
- *) perm_rpath="$perm_rpath $libdir" ;;
8808
+ *) func_append perm_rpath " $libdir" ;;
7932
8809
  esac
7933
8810
  fi
7934
8811
  case $host in
@@ -7937,12 +8814,12 @@ EOF
7937
8814
  case :$dllsearchpath: in
7938
8815
  *":$libdir:"*) ;;
7939
8816
  ::) dllsearchpath=$libdir;;
7940
- *) dllsearchpath="$dllsearchpath:$libdir";;
8817
+ *) func_append dllsearchpath ":$libdir";;
7941
8818
  esac
7942
8819
  case :$dllsearchpath: in
7943
8820
  *":$testbindir:"*) ;;
7944
8821
  ::) dllsearchpath=$testbindir;;
7945
- *) dllsearchpath="$dllsearchpath:$testbindir";;
8822
+ *) func_append dllsearchpath ":$testbindir";;
7946
8823
  esac
7947
8824
  ;;
7948
8825
  esac
@@ -7968,18 +8845,18 @@ EOF
7968
8845
  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7969
8846
  ;;
7970
8847
  *)
7971
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8848
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
7972
8849
  ;;
7973
8850
  esac
7974
8851
  fi
7975
8852
  else
7976
8853
  eval flag=\"$hardcode_libdir_flag_spec\"
7977
- rpath="$rpath $flag"
8854
+ func_append rpath " $flag"
7978
8855
  fi
7979
8856
  elif test -n "$runpath_var"; then
7980
8857
  case "$finalize_perm_rpath " in
7981
8858
  *" $libdir "*) ;;
7982
- *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
8859
+ *) func_append finalize_perm_rpath " $libdir" ;;
7983
8860
  esac
7984
8861
  fi
7985
8862
  done
@@ -8030,6 +8907,12 @@ EOF
8030
8907
  exit_status=0
8031
8908
  func_show_eval "$link_command" 'exit_status=$?'
8032
8909
 
8910
+ if test -n "$postlink_cmds"; then
8911
+ func_to_tool_file "$output"
8912
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8913
+ func_execute_cmds "$postlink_cmds" 'exit $?'
8914
+ fi
8915
+
8033
8916
  # Delete the generated files.
8034
8917
  if test -f "$output_objdir/${outputname}S.${objext}"; then
8035
8918
  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
@@ -8052,7 +8935,7 @@ EOF
8052
8935
  # We should set the runpath_var.
8053
8936
  rpath=
8054
8937
  for dir in $perm_rpath; do
8055
- rpath="$rpath$dir:"
8938
+ func_append rpath "$dir:"
8056
8939
  done
8057
8940
  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
8058
8941
  fi
@@ -8060,7 +8943,7 @@ EOF
8060
8943
  # We should set the runpath_var.
8061
8944
  rpath=
8062
8945
  for dir in $finalize_perm_rpath; do
8063
- rpath="$rpath$dir:"
8946
+ func_append rpath "$dir:"
8064
8947
  done
8065
8948
  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
8066
8949
  fi
@@ -8075,6 +8958,13 @@ EOF
8075
8958
  $opt_dry_run || $RM $output
8076
8959
  # Link the executable and exit
8077
8960
  func_show_eval "$link_command" 'exit $?'
8961
+
8962
+ if test -n "$postlink_cmds"; then
8963
+ func_to_tool_file "$output"
8964
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8965
+ func_execute_cmds "$postlink_cmds" 'exit $?'
8966
+ fi
8967
+
8078
8968
  exit $EXIT_SUCCESS
8079
8969
  fi
8080
8970
 
@@ -8108,6 +8998,12 @@ EOF
8108
8998
 
8109
8999
  func_show_eval "$link_command" 'exit $?'
8110
9000
 
9001
+ if test -n "$postlink_cmds"; then
9002
+ func_to_tool_file "$output_objdir/$outputname"
9003
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
9004
+ func_execute_cmds "$postlink_cmds" 'exit $?'
9005
+ fi
9006
+
8111
9007
  # Now create the wrapper script.
8112
9008
  func_verbose "creating $output"
8113
9009
 
@@ -8205,7 +9101,7 @@ EOF
8205
9101
  else
8206
9102
  oldobjs="$old_deplibs $non_pic_objects"
8207
9103
  if test "$preload" = yes && test -f "$symfileobj"; then
8208
- oldobjs="$oldobjs $symfileobj"
9104
+ func_append oldobjs " $symfileobj"
8209
9105
  fi
8210
9106
  fi
8211
9107
  addlibs="$old_convenience"
@@ -8213,10 +9109,10 @@ EOF
8213
9109
 
8214
9110
  if test -n "$addlibs"; then
8215
9111
  gentop="$output_objdir/${outputname}x"
8216
- generated="$generated $gentop"
9112
+ func_append generated " $gentop"
8217
9113
 
8218
9114
  func_extract_archives $gentop $addlibs
8219
- oldobjs="$oldobjs $func_extract_archives_result"
9115
+ func_append oldobjs " $func_extract_archives_result"
8220
9116
  fi
8221
9117
 
8222
9118
  # Do each command in the archive commands.
@@ -8227,10 +9123,10 @@ EOF
8227
9123
  # Add any objects from preloaded convenience libraries
8228
9124
  if test -n "$dlprefiles"; then
8229
9125
  gentop="$output_objdir/${outputname}x"
8230
- generated="$generated $gentop"
9126
+ func_append generated " $gentop"
8231
9127
 
8232
9128
  func_extract_archives $gentop $dlprefiles
8233
- oldobjs="$oldobjs $func_extract_archives_result"
9129
+ func_append oldobjs " $func_extract_archives_result"
8234
9130
  fi
8235
9131
 
8236
9132
  # POSIX demands no paths to be encoded in archives. We have
@@ -8248,7 +9144,7 @@ EOF
8248
9144
  else
8249
9145
  echo "copying selected object files to avoid basename conflicts..."
8250
9146
  gentop="$output_objdir/${outputname}x"
8251
- generated="$generated $gentop"
9147
+ func_append generated " $gentop"
8252
9148
  func_mkdir_p "$gentop"
8253
9149
  save_oldobjs=$oldobjs
8254
9150
  oldobjs=
@@ -8272,18 +9168,30 @@ EOF
8272
9168
  esac
8273
9169
  done
8274
9170
  func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
8275
- oldobjs="$oldobjs $gentop/$newobj"
9171
+ func_append oldobjs " $gentop/$newobj"
8276
9172
  ;;
8277
- *) oldobjs="$oldobjs $obj" ;;
9173
+ *) func_append oldobjs " $obj" ;;
8278
9174
  esac
8279
9175
  done
8280
9176
  fi
9177
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
9178
+ tool_oldlib=$func_to_tool_file_result
8281
9179
  eval cmds=\"$old_archive_cmds\"
8282
9180
 
8283
9181
  func_len " $cmds"
8284
9182
  len=$func_len_result
8285
9183
  if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8286
9184
  cmds=$old_archive_cmds
9185
+ elif test -n "$archiver_list_spec"; then
9186
+ func_verbose "using command file archive linking..."
9187
+ for obj in $oldobjs
9188
+ do
9189
+ func_to_tool_file "$obj"
9190
+ $ECHO "$func_to_tool_file_result"
9191
+ done > $output_objdir/$libname.libcmd
9192
+ func_to_tool_file "$output_objdir/$libname.libcmd"
9193
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
9194
+ cmds=$old_archive_cmds
8287
9195
  else
8288
9196
  # the command line is too long to link in one step, link in parts
8289
9197
  func_verbose "using piecewise archive linking..."
@@ -8377,12 +9285,23 @@ EOF
8377
9285
  *.la)
8378
9286
  func_basename "$deplib"
8379
9287
  name="$func_basename_result"
8380
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
9288
+ func_resolve_sysroot "$deplib"
9289
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
8381
9290
  test -z "$libdir" && \
8382
9291
  func_fatal_error "\`$deplib' is not a valid libtool archive"
8383
- newdependency_libs="$newdependency_libs $libdir/$name"
9292
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
9293
+ ;;
9294
+ -L*)
9295
+ func_stripname -L '' "$deplib"
9296
+ func_replace_sysroot "$func_stripname_result"
9297
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
9298
+ ;;
9299
+ -R*)
9300
+ func_stripname -R '' "$deplib"
9301
+ func_replace_sysroot "$func_stripname_result"
9302
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
8384
9303
  ;;
8385
- *) newdependency_libs="$newdependency_libs $deplib" ;;
9304
+ *) func_append newdependency_libs " $deplib" ;;
8386
9305
  esac
8387
9306
  done
8388
9307
  dependency_libs="$newdependency_libs"
@@ -8396,9 +9315,9 @@ EOF
8396
9315
  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8397
9316
  test -z "$libdir" && \
8398
9317
  func_fatal_error "\`$lib' is not a valid libtool archive"
8399
- newdlfiles="$newdlfiles $libdir/$name"
9318
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
8400
9319
  ;;
8401
- *) newdlfiles="$newdlfiles $lib" ;;
9320
+ *) func_append newdlfiles " $lib" ;;
8402
9321
  esac
8403
9322
  done
8404
9323
  dlfiles="$newdlfiles"
@@ -8415,7 +9334,7 @@ EOF
8415
9334
  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8416
9335
  test -z "$libdir" && \
8417
9336
  func_fatal_error "\`$lib' is not a valid libtool archive"
8418
- newdlprefiles="$newdlprefiles $libdir/$name"
9337
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
8419
9338
  ;;
8420
9339
  esac
8421
9340
  done
@@ -8427,7 +9346,7 @@ EOF
8427
9346
  [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8428
9347
  *) abs=`pwd`"/$lib" ;;
8429
9348
  esac
8430
- newdlfiles="$newdlfiles $abs"
9349
+ func_append newdlfiles " $abs"
8431
9350
  done
8432
9351
  dlfiles="$newdlfiles"
8433
9352
  newdlprefiles=
@@ -8436,7 +9355,7 @@ EOF
8436
9355
  [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8437
9356
  *) abs=`pwd`"/$lib" ;;
8438
9357
  esac
8439
- newdlprefiles="$newdlprefiles $abs"
9358
+ func_append newdlprefiles " $abs"
8440
9359
  done
8441
9360
  dlprefiles="$newdlprefiles"
8442
9361
  fi
@@ -8521,7 +9440,7 @@ relink_command=\"$relink_command\""
8521
9440
  exit $EXIT_SUCCESS
8522
9441
  }
8523
9442
 
8524
- { test "$mode" = link || test "$mode" = relink; } &&
9443
+ { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
8525
9444
  func_mode_link ${1+"$@"}
8526
9445
 
8527
9446
 
@@ -8541,9 +9460,9 @@ func_mode_uninstall ()
8541
9460
  for arg
8542
9461
  do
8543
9462
  case $arg in
8544
- -f) RM="$RM $arg"; rmforce=yes ;;
8545
- -*) RM="$RM $arg" ;;
8546
- *) files="$files $arg" ;;
9463
+ -f) func_append RM " $arg"; rmforce=yes ;;
9464
+ -*) func_append RM " $arg" ;;
9465
+ *) func_append files " $arg" ;;
8547
9466
  esac
8548
9467
  done
8549
9468
 
@@ -8552,24 +9471,23 @@ func_mode_uninstall ()
8552
9471
 
8553
9472
  rmdirs=
8554
9473
 
8555
- origobjdir="$objdir"
8556
9474
  for file in $files; do
8557
9475
  func_dirname "$file" "" "."
8558
9476
  dir="$func_dirname_result"
8559
9477
  if test "X$dir" = X.; then
8560
- objdir="$origobjdir"
9478
+ odir="$objdir"
8561
9479
  else
8562
- objdir="$dir/$origobjdir"
9480
+ odir="$dir/$objdir"
8563
9481
  fi
8564
9482
  func_basename "$file"
8565
9483
  name="$func_basename_result"
8566
- test "$mode" = uninstall && objdir="$dir"
9484
+ test "$opt_mode" = uninstall && odir="$dir"
8567
9485
 
8568
- # Remember objdir for removal later, being careful to avoid duplicates
8569
- if test "$mode" = clean; then
9486
+ # Remember odir for removal later, being careful to avoid duplicates
9487
+ if test "$opt_mode" = clean; then
8570
9488
  case " $rmdirs " in
8571
- *" $objdir "*) ;;
8572
- *) rmdirs="$rmdirs $objdir" ;;
9489
+ *" $odir "*) ;;
9490
+ *) func_append rmdirs " $odir" ;;
8573
9491
  esac
8574
9492
  fi
8575
9493
 
@@ -8595,18 +9513,17 @@ func_mode_uninstall ()
8595
9513
 
8596
9514
  # Delete the libtool libraries and symlinks.
8597
9515
  for n in $library_names; do
8598
- rmfiles="$rmfiles $objdir/$n"
9516
+ func_append rmfiles " $odir/$n"
8599
9517
  done
8600
- test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
9518
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
8601
9519
 
8602
- case "$mode" in
9520
+ case "$opt_mode" in
8603
9521
  clean)
8604
- case " $library_names " in
8605
- # " " in the beginning catches empty $dlname
9522
+ case " $library_names " in
8606
9523
  *" $dlname "*) ;;
8607
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
9524
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
8608
9525
  esac
8609
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
9526
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
8610
9527
  ;;
8611
9528
  uninstall)
8612
9529
  if test -n "$library_names"; then
@@ -8634,19 +9551,19 @@ func_mode_uninstall ()
8634
9551
  # Add PIC object to the list of files to remove.
8635
9552
  if test -n "$pic_object" &&
8636
9553
  test "$pic_object" != none; then
8637
- rmfiles="$rmfiles $dir/$pic_object"
9554
+ func_append rmfiles " $dir/$pic_object"
8638
9555
  fi
8639
9556
 
8640
9557
  # Add non-PIC object to the list of files to remove.
8641
9558
  if test -n "$non_pic_object" &&
8642
9559
  test "$non_pic_object" != none; then
8643
- rmfiles="$rmfiles $dir/$non_pic_object"
9560
+ func_append rmfiles " $dir/$non_pic_object"
8644
9561
  fi
8645
9562
  fi
8646
9563
  ;;
8647
9564
 
8648
9565
  *)
8649
- if test "$mode" = clean ; then
9566
+ if test "$opt_mode" = clean ; then
8650
9567
  noexename=$name
8651
9568
  case $file in
8652
9569
  *.exe)
@@ -8656,7 +9573,7 @@ func_mode_uninstall ()
8656
9573
  noexename=$func_stripname_result
8657
9574
  # $file with .exe has already been added to rmfiles,
8658
9575
  # add $file without .exe
8659
- rmfiles="$rmfiles $file"
9576
+ func_append rmfiles " $file"
8660
9577
  ;;
8661
9578
  esac
8662
9579
  # Do a test to see if this is a libtool program.
@@ -8665,7 +9582,7 @@ func_mode_uninstall ()
8665
9582
  func_ltwrapper_scriptname "$file"
8666
9583
  relink_command=
8667
9584
  func_source $func_ltwrapper_scriptname_result
8668
- rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
9585
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
8669
9586
  else
8670
9587
  relink_command=
8671
9588
  func_source $dir/$noexename
@@ -8673,12 +9590,12 @@ func_mode_uninstall ()
8673
9590
 
8674
9591
  # note $name still contains .exe if it was in $file originally
8675
9592
  # as does the version of $file that was added into $rmfiles
8676
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
9593
+ func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
8677
9594
  if test "$fast_install" = yes && test -n "$relink_command"; then
8678
- rmfiles="$rmfiles $objdir/lt-$name"
9595
+ func_append rmfiles " $odir/lt-$name"
8679
9596
  fi
8680
9597
  if test "X$noexename" != "X$name" ; then
8681
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
9598
+ func_append rmfiles " $odir/lt-${noexename}.c"
8682
9599
  fi
8683
9600
  fi
8684
9601
  fi
@@ -8686,7 +9603,6 @@ func_mode_uninstall ()
8686
9603
  esac
8687
9604
  func_show_eval "$RM $rmfiles" 'exit_status=1'
8688
9605
  done
8689
- objdir="$origobjdir"
8690
9606
 
8691
9607
  # Try to remove the ${objdir}s in the directories where we deleted files
8692
9608
  for dir in $rmdirs; do
@@ -8698,16 +9614,16 @@ func_mode_uninstall ()
8698
9614
  exit $exit_status
8699
9615
  }
8700
9616
 
8701
- { test "$mode" = uninstall || test "$mode" = clean; } &&
9617
+ { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
8702
9618
  func_mode_uninstall ${1+"$@"}
8703
9619
 
8704
- test -z "$mode" && {
9620
+ test -z "$opt_mode" && {
8705
9621
  help="$generic_help"
8706
9622
  func_fatal_help "you must specify a MODE"
8707
9623
  }
8708
9624
 
8709
9625
  test -z "$exec_cmd" && \
8710
- func_fatal_help "invalid operation mode \`$mode'"
9626
+ func_fatal_help "invalid operation mode \`$opt_mode'"
8711
9627
 
8712
9628
  if test -n "$exec_cmd"; then
8713
9629
  eval exec "$exec_cmd"