couchbase-memcached 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (539) hide show
  1. data.tar.gz.sig +2 -0
  2. data/BENCHMARKS +134 -0
  3. data/CHANGELOG +127 -0
  4. data/LICENSE +184 -0
  5. data/Manifest +535 -0
  6. data/README +118 -0
  7. data/Rakefile +83 -0
  8. data/TODO +4 -0
  9. data/couchbase-memcached.gemspec +33 -0
  10. data/ext/extconf-make.rb +25 -0
  11. data/ext/extconf.rb +91 -0
  12. data/ext/libmemcached-0.50/AUTHORS +11 -0
  13. data/ext/libmemcached-0.50/COPYING +33 -0
  14. data/ext/libmemcached-0.50/ChangeLog +392 -0
  15. data/ext/libmemcached-0.50/Makefile.am +114 -0
  16. data/ext/libmemcached-0.50/Makefile.in +4232 -0
  17. data/ext/libmemcached-0.50/NEWS +1 -0
  18. data/ext/libmemcached-0.50/README +43 -0
  19. data/ext/libmemcached-0.50/README.FIRST +31 -0
  20. data/ext/libmemcached-0.50/README.win32 +25 -0
  21. data/ext/libmemcached-0.50/THANKS +14 -0
  22. data/ext/libmemcached-0.50/TODO +11 -0
  23. data/ext/libmemcached-0.50/aclocal.m4 +1077 -0
  24. data/ext/libmemcached-0.50/clients/client_options.h +45 -0
  25. data/ext/libmemcached-0.50/clients/execute.cc +131 -0
  26. data/ext/libmemcached-0.50/clients/execute.h +30 -0
  27. data/ext/libmemcached-0.50/clients/generator.cc +96 -0
  28. data/ext/libmemcached-0.50/clients/generator.h +36 -0
  29. data/ext/libmemcached-0.50/clients/include.am +116 -0
  30. data/ext/libmemcached-0.50/clients/memaslap.c +908 -0
  31. data/ext/libmemcached-0.50/clients/memcapable.cc +2094 -0
  32. data/ext/libmemcached-0.50/clients/memcat.cc +242 -0
  33. data/ext/libmemcached-0.50/clients/memcp.cc +317 -0
  34. data/ext/libmemcached-0.50/clients/memdump.cc +183 -0
  35. data/ext/libmemcached-0.50/clients/memerror.cc +102 -0
  36. data/ext/libmemcached-0.50/clients/memflush.cc +154 -0
  37. data/ext/libmemcached-0.50/clients/memparse.cc +68 -0
  38. data/ext/libmemcached-0.50/clients/memrm.cc +177 -0
  39. data/ext/libmemcached-0.50/clients/memslap.cc +495 -0
  40. data/ext/libmemcached-0.50/clients/memstat.cc +349 -0
  41. data/ext/libmemcached-0.50/clients/ms_atomic.h +69 -0
  42. data/ext/libmemcached-0.50/clients/ms_conn.c +3413 -0
  43. data/ext/libmemcached-0.50/clients/ms_conn.h +241 -0
  44. data/ext/libmemcached-0.50/clients/ms_memslap.h +132 -0
  45. data/ext/libmemcached-0.50/clients/ms_setting.c +1068 -0
  46. data/ext/libmemcached-0.50/clients/ms_setting.h +181 -0
  47. data/ext/libmemcached-0.50/clients/ms_sigsegv.c +126 -0
  48. data/ext/libmemcached-0.50/clients/ms_sigsegv.h +34 -0
  49. data/ext/libmemcached-0.50/clients/ms_stats.c +307 -0
  50. data/ext/libmemcached-0.50/clients/ms_stats.h +69 -0
  51. data/ext/libmemcached-0.50/clients/ms_task.c +1114 -0
  52. data/ext/libmemcached-0.50/clients/ms_task.h +94 -0
  53. data/ext/libmemcached-0.50/clients/ms_thread.c +351 -0
  54. data/ext/libmemcached-0.50/clients/ms_thread.h +78 -0
  55. data/ext/libmemcached-0.50/clients/utilities.cc +231 -0
  56. data/ext/libmemcached-0.50/clients/utilities.h +64 -0
  57. data/ext/libmemcached-0.50/config.h.in +647 -0
  58. data/ext/libmemcached-0.50/config/autorun.sh +126 -0
  59. data/ext/libmemcached-0.50/config/compile +143 -0
  60. data/ext/libmemcached-0.50/config/config.guess +1517 -0
  61. data/ext/libmemcached-0.50/config/config.rpath +666 -0
  62. data/ext/libmemcached-0.50/config/config.sub +1760 -0
  63. data/ext/libmemcached-0.50/config/depcomp +630 -0
  64. data/ext/libmemcached-0.50/config/install-sh +520 -0
  65. data/ext/libmemcached-0.50/config/ltmain.sh +9642 -0
  66. data/ext/libmemcached-0.50/config/missing +376 -0
  67. data/ext/libmemcached-0.50/config/pandora-plugin +752 -0
  68. data/ext/libmemcached-0.50/config/uncrustify.cfg +1112 -0
  69. data/ext/libmemcached-0.50/configure +27103 -0
  70. data/ext/libmemcached-0.50/configure.ac +186 -0
  71. data/ext/libmemcached-0.50/docs/conf.py.in +354 -0
  72. data/ext/libmemcached-0.50/docs/include.am +240 -0
  73. data/ext/libmemcached-0.50/docs/man/hashkit_clone.3 +88 -0
  74. data/ext/libmemcached-0.50/docs/man/hashkit_crc32.3 +105 -0
  75. data/ext/libmemcached-0.50/docs/man/hashkit_create.3 +88 -0
  76. data/ext/libmemcached-0.50/docs/man/hashkit_fnv1_32.3 +105 -0
  77. data/ext/libmemcached-0.50/docs/man/hashkit_fnv1_64.3 +105 -0
  78. data/ext/libmemcached-0.50/docs/man/hashkit_fnv1a_32.3 +105 -0
  79. data/ext/libmemcached-0.50/docs/man/hashkit_fnv1a_64.3 +105 -0
  80. data/ext/libmemcached-0.50/docs/man/hashkit_free.3 +88 -0
  81. data/ext/libmemcached-0.50/docs/man/hashkit_functions.3 +105 -0
  82. data/ext/libmemcached-0.50/docs/man/hashkit_hsieh.3 +105 -0
  83. data/ext/libmemcached-0.50/docs/man/hashkit_is_allocated.3 +88 -0
  84. data/ext/libmemcached-0.50/docs/man/hashkit_jenkins.3 +105 -0
  85. data/ext/libmemcached-0.50/docs/man/hashkit_md5.3 +105 -0
  86. data/ext/libmemcached-0.50/docs/man/hashkit_murmur.3 +105 -0
  87. data/ext/libmemcached-0.50/docs/man/hashkit_value.3 +66 -0
  88. data/ext/libmemcached-0.50/docs/man/libhashkit.3 +57 -0
  89. data/ext/libmemcached-0.50/docs/man/libmemcached.3 +208 -0
  90. data/ext/libmemcached-0.50/docs/man/libmemcached_check_configuration.3 +293 -0
  91. data/ext/libmemcached-0.50/docs/man/libmemcached_configuration.3 +293 -0
  92. data/ext/libmemcached-0.50/docs/man/libmemcached_examples.3 +144 -0
  93. data/ext/libmemcached-0.50/docs/man/libmemcachedutil.3 +68 -0
  94. data/ext/libmemcached-0.50/docs/man/memaslap.1 +1222 -0
  95. data/ext/libmemcached-0.50/docs/man/memcached.3 +293 -0
  96. data/ext/libmemcached-0.50/docs/man/memcached_add.3 +132 -0
  97. data/ext/libmemcached-0.50/docs/man/memcached_add_by_key.3 +132 -0
  98. data/ext/libmemcached-0.50/docs/man/memcached_analyze.3 +77 -0
  99. data/ext/libmemcached-0.50/docs/man/memcached_append.3 +111 -0
  100. data/ext/libmemcached-0.50/docs/man/memcached_append_by_key.3 +111 -0
  101. data/ext/libmemcached-0.50/docs/man/memcached_behavior_get.3 +333 -0
  102. data/ext/libmemcached-0.50/docs/man/memcached_behavior_set.3 +333 -0
  103. data/ext/libmemcached-0.50/docs/man/memcached_callback_get.3 +159 -0
  104. data/ext/libmemcached-0.50/docs/man/memcached_callback_set.3 +159 -0
  105. data/ext/libmemcached-0.50/docs/man/memcached_cas.3 +91 -0
  106. data/ext/libmemcached-0.50/docs/man/memcached_cas_by_key.3 +91 -0
  107. data/ext/libmemcached-0.50/docs/man/memcached_clone.3 +99 -0
  108. data/ext/libmemcached-0.50/docs/man/memcached_create.3 +99 -0
  109. data/ext/libmemcached-0.50/docs/man/memcached_decrement.3 +124 -0
  110. data/ext/libmemcached-0.50/docs/man/memcached_decrement_with_initial.3 +124 -0
  111. data/ext/libmemcached-0.50/docs/man/memcached_delete.3 +83 -0
  112. data/ext/libmemcached-0.50/docs/man/memcached_delete_by_key.3 +83 -0
  113. data/ext/libmemcached-0.50/docs/man/memcached_destroy_sasl_auth_data.3 +95 -0
  114. data/ext/libmemcached-0.50/docs/man/memcached_dump.3 +77 -0
  115. data/ext/libmemcached-0.50/docs/man/memcached_fetch.3 +174 -0
  116. data/ext/libmemcached-0.50/docs/man/memcached_fetch_execute.3 +174 -0
  117. data/ext/libmemcached-0.50/docs/man/memcached_fetch_result.3 +174 -0
  118. data/ext/libmemcached-0.50/docs/man/memcached_flush_buffers.3 +72 -0
  119. data/ext/libmemcached-0.50/docs/man/memcached_free.3 +99 -0
  120. data/ext/libmemcached-0.50/docs/man/memcached_generate_hash.3 +85 -0
  121. data/ext/libmemcached-0.50/docs/man/memcached_generate_hash_value.3 +85 -0
  122. data/ext/libmemcached-0.50/docs/man/memcached_get.3 +174 -0
  123. data/ext/libmemcached-0.50/docs/man/memcached_get_by_key.3 +174 -0
  124. data/ext/libmemcached-0.50/docs/man/memcached_get_memory_allocators.3 +111 -0
  125. data/ext/libmemcached-0.50/docs/man/memcached_get_sasl_callbacks.3 +95 -0
  126. data/ext/libmemcached-0.50/docs/man/memcached_get_user_data.3 +79 -0
  127. data/ext/libmemcached-0.50/docs/man/memcached_increment.3 +124 -0
  128. data/ext/libmemcached-0.50/docs/man/memcached_increment_with_initial.3 +124 -0
  129. data/ext/libmemcached-0.50/docs/man/memcached_lib_version.3 +76 -0
  130. data/ext/libmemcached-0.50/docs/man/memcached_mget.3 +174 -0
  131. data/ext/libmemcached-0.50/docs/man/memcached_mget_by_key.3 +174 -0
  132. data/ext/libmemcached-0.50/docs/man/memcached_mget_execute.3 +174 -0
  133. data/ext/libmemcached-0.50/docs/man/memcached_mget_execute_by_key.3 +174 -0
  134. data/ext/libmemcached-0.50/docs/man/memcached_pool_behavior_get.3 +139 -0
  135. data/ext/libmemcached-0.50/docs/man/memcached_pool_behavior_set.3 +139 -0
  136. data/ext/libmemcached-0.50/docs/man/memcached_pool_create.3 +139 -0
  137. data/ext/libmemcached-0.50/docs/man/memcached_pool_destroy.3 +139 -0
  138. data/ext/libmemcached-0.50/docs/man/memcached_pool_pop.3 +139 -0
  139. data/ext/libmemcached-0.50/docs/man/memcached_pool_push.3 +139 -0
  140. data/ext/libmemcached-0.50/docs/man/memcached_pool_st.3 +139 -0
  141. data/ext/libmemcached-0.50/docs/man/memcached_prepend.3 +111 -0
  142. data/ext/libmemcached-0.50/docs/man/memcached_prepend_by_key.3 +111 -0
  143. data/ext/libmemcached-0.50/docs/man/memcached_quit.3 +74 -0
  144. data/ext/libmemcached-0.50/docs/man/memcached_replace.3 +132 -0
  145. data/ext/libmemcached-0.50/docs/man/memcached_replace_by_key.3 +132 -0
  146. data/ext/libmemcached-0.50/docs/man/memcached_sasl_set_auth_data.3 +95 -0
  147. data/ext/libmemcached-0.50/docs/man/memcached_server_add.3 +141 -0
  148. data/ext/libmemcached-0.50/docs/man/memcached_server_count.3 +141 -0
  149. data/ext/libmemcached-0.50/docs/man/memcached_server_cursor.3 +141 -0
  150. data/ext/libmemcached-0.50/docs/man/memcached_server_list.3 +141 -0
  151. data/ext/libmemcached-0.50/docs/man/memcached_server_list_append.3 +111 -0
  152. data/ext/libmemcached-0.50/docs/man/memcached_server_list_count.3 +111 -0
  153. data/ext/libmemcached-0.50/docs/man/memcached_server_list_free.3 +111 -0
  154. data/ext/libmemcached-0.50/docs/man/memcached_server_push.3 +141 -0
  155. data/ext/libmemcached-0.50/docs/man/memcached_servers_parse.3 +111 -0
  156. data/ext/libmemcached-0.50/docs/man/memcached_set.3 +132 -0
  157. data/ext/libmemcached-0.50/docs/man/memcached_set_by_key.3 +132 -0
  158. data/ext/libmemcached-0.50/docs/man/memcached_set_memory_allocators.3 +111 -0
  159. data/ext/libmemcached-0.50/docs/man/memcached_set_sasl_callbacks.3 +95 -0
  160. data/ext/libmemcached-0.50/docs/man/memcached_set_user_data.3 +79 -0
  161. data/ext/libmemcached-0.50/docs/man/memcached_stat.3 +116 -0
  162. data/ext/libmemcached-0.50/docs/man/memcached_stat_execute.3 +116 -0
  163. data/ext/libmemcached-0.50/docs/man/memcached_stat_get_keys.3 +116 -0
  164. data/ext/libmemcached-0.50/docs/man/memcached_stat_get_value.3 +116 -0
  165. data/ext/libmemcached-0.50/docs/man/memcached_stat_servername.3 +116 -0
  166. data/ext/libmemcached-0.50/docs/man/memcached_strerror.3 +69 -0
  167. data/ext/libmemcached-0.50/docs/man/memcached_verbosity.3 +66 -0
  168. data/ext/libmemcached-0.50/docs/man/memcached_version.3 +76 -0
  169. data/ext/libmemcached-0.50/docs/man/memcapable.1 +92 -0
  170. data/ext/libmemcached-0.50/docs/man/memcat.1 +71 -0
  171. data/ext/libmemcached-0.50/docs/man/memcp.1 +77 -0
  172. data/ext/libmemcached-0.50/docs/man/memdump.1 +66 -0
  173. data/ext/libmemcached-0.50/docs/man/memerror.1 +65 -0
  174. data/ext/libmemcached-0.50/docs/man/memflush.1 +73 -0
  175. data/ext/libmemcached-0.50/docs/man/memrm.1 +72 -0
  176. data/ext/libmemcached-0.50/docs/man/memslap.1 +59 -0
  177. data/ext/libmemcached-0.50/docs/man/memstat.1 +70 -0
  178. data/ext/libmemcached-0.50/example/include.am +24 -0
  179. data/ext/libmemcached-0.50/example/interface_v0.c +594 -0
  180. data/ext/libmemcached-0.50/example/interface_v1.c +411 -0
  181. data/ext/libmemcached-0.50/example/memcached_light.c +474 -0
  182. data/ext/libmemcached-0.50/example/memcached_light.h +7 -0
  183. data/ext/libmemcached-0.50/example/storage.c +172 -0
  184. data/ext/libmemcached-0.50/example/storage.h +27 -0
  185. data/ext/libmemcached-0.50/example/storage_innodb.c +535 -0
  186. data/ext/libmemcached-0.50/libhashkit/algorithm.cc +69 -0
  187. data/ext/libmemcached-0.50/libhashkit/algorithm.h +96 -0
  188. data/ext/libmemcached-0.50/libhashkit/behavior.cc +9 -0
  189. data/ext/libmemcached-0.50/libhashkit/behavior.h +26 -0
  190. data/ext/libmemcached-0.50/libhashkit/common.h +33 -0
  191. data/ext/libmemcached-0.50/libhashkit/configure.h.in +19 -0
  192. data/ext/libmemcached-0.50/libhashkit/crc32.cc +86 -0
  193. data/ext/libmemcached-0.50/libhashkit/digest.cc +62 -0
  194. data/ext/libmemcached-0.50/libhashkit/digest.h +30 -0
  195. data/ext/libmemcached-0.50/libhashkit/fnv.cc +75 -0
  196. data/ext/libmemcached-0.50/libhashkit/function.cc +156 -0
  197. data/ext/libmemcached-0.50/libhashkit/function.h +44 -0
  198. data/ext/libmemcached-0.50/libhashkit/hashkit.cc +100 -0
  199. data/ext/libmemcached-0.50/libhashkit/hashkit.h +95 -0
  200. data/ext/libmemcached-0.50/libhashkit/hashkit.hpp +97 -0
  201. data/ext/libmemcached-0.50/libhashkit/hsieh.cc +70 -0
  202. data/ext/libmemcached-0.50/libhashkit/include.am +69 -0
  203. data/ext/libmemcached-0.50/libhashkit/jenkins.cc +214 -0
  204. data/ext/libmemcached-0.50/libhashkit/ketama.cc +164 -0
  205. data/ext/libmemcached-0.50/libhashkit/md5.cc +367 -0
  206. data/ext/libmemcached-0.50/libhashkit/murmur.cc +77 -0
  207. data/ext/libmemcached-0.50/libhashkit/one_at_a_time.cc +34 -0
  208. data/ext/libmemcached-0.50/libhashkit/str_algorithm.cc +58 -0
  209. data/ext/libmemcached-0.50/libhashkit/str_algorithm.h +48 -0
  210. data/ext/libmemcached-0.50/libhashkit/strerror.cc +25 -0
  211. data/ext/libmemcached-0.50/libhashkit/strerror.h +23 -0
  212. data/ext/libmemcached-0.50/libhashkit/types.h +90 -0
  213. data/ext/libmemcached-0.50/libhashkit/visibility.h +48 -0
  214. data/ext/libmemcached-0.50/libmemcached/allocators.cc +119 -0
  215. data/ext/libmemcached-0.50/libmemcached/allocators.h +87 -0
  216. data/ext/libmemcached-0.50/libmemcached/analyze.cc +110 -0
  217. data/ext/libmemcached-0.50/libmemcached/analyze.h +66 -0
  218. data/ext/libmemcached-0.50/libmemcached/array.c +128 -0
  219. data/ext/libmemcached-0.50/libmemcached/array.h +75 -0
  220. data/ext/libmemcached-0.50/libmemcached/auto.cc +383 -0
  221. data/ext/libmemcached-0.50/libmemcached/auto.h +111 -0
  222. data/ext/libmemcached-0.50/libmemcached/basic_string.h +55 -0
  223. data/ext/libmemcached-0.50/libmemcached/behavior.cc +590 -0
  224. data/ext/libmemcached-0.50/libmemcached/behavior.h +86 -0
  225. data/ext/libmemcached-0.50/libmemcached/byteorder.cc +90 -0
  226. data/ext/libmemcached-0.50/libmemcached/byteorder.h +52 -0
  227. data/ext/libmemcached-0.50/libmemcached/callback.cc +160 -0
  228. data/ext/libmemcached-0.50/libmemcached/callback.h +61 -0
  229. data/ext/libmemcached-0.50/libmemcached/common.h +182 -0
  230. data/ext/libmemcached-0.50/libmemcached/configure.h.in +52 -0
  231. data/ext/libmemcached-0.50/libmemcached/connect.cc +626 -0
  232. data/ext/libmemcached-0.50/libmemcached/constants.h +167 -0
  233. data/ext/libmemcached-0.50/libmemcached/delete.cc +266 -0
  234. data/ext/libmemcached-0.50/libmemcached/delete.h +57 -0
  235. data/ext/libmemcached-0.50/libmemcached/do.cc +100 -0
  236. data/ext/libmemcached-0.50/libmemcached/do.hpp +49 -0
  237. data/ext/libmemcached-0.50/libmemcached/dump.cc +107 -0
  238. data/ext/libmemcached-0.50/libmemcached/dump.h +51 -0
  239. data/ext/libmemcached-0.50/libmemcached/error.cc +419 -0
  240. data/ext/libmemcached-0.50/libmemcached/error.h +61 -0
  241. data/ext/libmemcached-0.50/libmemcached/error.hpp +87 -0
  242. data/ext/libmemcached-0.50/libmemcached/exception.hpp +63 -0
  243. data/ext/libmemcached-0.50/libmemcached/fetch.cc +267 -0
  244. data/ext/libmemcached-0.50/libmemcached/fetch.h +53 -0
  245. data/ext/libmemcached-0.50/libmemcached/flush.cc +149 -0
  246. data/ext/libmemcached-0.50/libmemcached/flush.h +49 -0
  247. data/ext/libmemcached-0.50/libmemcached/flush_buffers.cc +66 -0
  248. data/ext/libmemcached-0.50/libmemcached/flush_buffers.h +49 -0
  249. data/ext/libmemcached-0.50/libmemcached/get.cc +842 -0
  250. data/ext/libmemcached-0.50/libmemcached/get.h +135 -0
  251. data/ext/libmemcached-0.50/libmemcached/hash.cc +178 -0
  252. data/ext/libmemcached-0.50/libmemcached/hash.h +68 -0
  253. data/ext/libmemcached-0.50/libmemcached/hosts.cc +516 -0
  254. data/ext/libmemcached-0.50/libmemcached/include.am +183 -0
  255. data/ext/libmemcached-0.50/libmemcached/initialize_query.cc +70 -0
  256. data/ext/libmemcached-0.50/libmemcached/initialize_query.h +51 -0
  257. data/ext/libmemcached-0.50/libmemcached/internal.h +46 -0
  258. data/ext/libmemcached-0.50/libmemcached/io.cc +920 -0
  259. data/ext/libmemcached-0.50/libmemcached/io.h +119 -0
  260. data/ext/libmemcached-0.50/libmemcached/is.h +48 -0
  261. data/ext/libmemcached-0.50/libmemcached/key.cc +23 -0
  262. data/ext/libmemcached-0.50/libmemcached/libmemcached_probes.d +30 -0
  263. data/ext/libmemcached-0.50/libmemcached/libmemcached_probes.h +118 -0
  264. data/ext/libmemcached-0.50/libmemcached/memcached.cc +437 -0
  265. data/ext/libmemcached-0.50/libmemcached/memcached.h +214 -0
  266. data/ext/libmemcached-0.50/libmemcached/memcached.hpp +799 -0
  267. data/ext/libmemcached-0.50/libmemcached/memcached/README.txt +7 -0
  268. data/ext/libmemcached-0.50/libmemcached/memcached/protocol_binary.h +726 -0
  269. data/ext/libmemcached-0.50/libmemcached/memcached/vbucket.h +26 -0
  270. data/ext/libmemcached-0.50/libmemcached/memcached_util.h +44 -0
  271. data/ext/libmemcached-0.50/libmemcached/memory.h +79 -0
  272. data/ext/libmemcached-0.50/libmemcached/options.cc +178 -0
  273. data/ext/libmemcached-0.50/libmemcached/options.h +49 -0
  274. data/ext/libmemcached-0.50/libmemcached/options.hpp +56 -0
  275. data/ext/libmemcached-0.50/libmemcached/options/context.h +151 -0
  276. data/ext/libmemcached-0.50/libmemcached/options/include.am +19 -0
  277. data/ext/libmemcached-0.50/libmemcached/options/parser.am +0 -0
  278. data/ext/libmemcached-0.50/libmemcached/options/parser.cc +2324 -0
  279. data/ext/libmemcached-0.50/libmemcached/options/parser.h +122 -0
  280. data/ext/libmemcached-0.50/libmemcached/options/scanner.cc +3203 -0
  281. data/ext/libmemcached-0.50/libmemcached/options/scanner.h +479 -0
  282. data/ext/libmemcached-0.50/libmemcached/options/server.h +60 -0
  283. data/ext/libmemcached-0.50/libmemcached/options/symbol.h +57 -0
  284. data/ext/libmemcached-0.50/libmemcached/parse.cc +110 -0
  285. data/ext/libmemcached-0.50/libmemcached/parse.h +23 -0
  286. data/ext/libmemcached-0.50/libmemcached/platform.h +56 -0
  287. data/ext/libmemcached-0.50/libmemcached/prefix_key.cc +65 -0
  288. data/ext/libmemcached-0.50/libmemcached/prefix_key.h +49 -0
  289. data/ext/libmemcached-0.50/libmemcached/protocol/ascii_handler.c +963 -0
  290. data/ext/libmemcached-0.50/libmemcached/protocol/ascii_handler.h +40 -0
  291. data/ext/libmemcached-0.50/libmemcached/protocol/binary_handler.c +1121 -0
  292. data/ext/libmemcached-0.50/libmemcached/protocol/binary_handler.h +47 -0
  293. data/ext/libmemcached-0.50/libmemcached/protocol/cache.c +149 -0
  294. data/ext/libmemcached-0.50/libmemcached/protocol/cache.h +116 -0
  295. data/ext/libmemcached-0.50/libmemcached/protocol/callback.h +418 -0
  296. data/ext/libmemcached-0.50/libmemcached/protocol/common.h +163 -0
  297. data/ext/libmemcached-0.50/libmemcached/protocol/include.am +26 -0
  298. data/ext/libmemcached-0.50/libmemcached/protocol/pedantic.c +202 -0
  299. data/ext/libmemcached-0.50/libmemcached/protocol/protocol_handler.c +365 -0
  300. data/ext/libmemcached-0.50/libmemcached/protocol_handler.h +215 -0
  301. data/ext/libmemcached-0.50/libmemcached/purge.cc +90 -0
  302. data/ext/libmemcached-0.50/libmemcached/quit.cc +139 -0
  303. data/ext/libmemcached-0.50/libmemcached/quit.h +55 -0
  304. data/ext/libmemcached-0.50/libmemcached/response.cc +619 -0
  305. data/ext/libmemcached-0.50/libmemcached/response.h +57 -0
  306. data/ext/libmemcached-0.50/libmemcached/result.cc +173 -0
  307. data/ext/libmemcached-0.50/libmemcached/result.h +100 -0
  308. data/ext/libmemcached-0.50/libmemcached/return.h +98 -0
  309. data/ext/libmemcached-0.50/libmemcached/sasl.c +408 -0
  310. data/ext/libmemcached-0.50/libmemcached/sasl.h +86 -0
  311. data/ext/libmemcached-0.50/libmemcached/server.cc +351 -0
  312. data/ext/libmemcached-0.50/libmemcached/server.h +169 -0
  313. data/ext/libmemcached-0.50/libmemcached/server_list.cc +88 -0
  314. data/ext/libmemcached-0.50/libmemcached/server_list.h +77 -0
  315. data/ext/libmemcached-0.50/libmemcached/stats.cc +623 -0
  316. data/ext/libmemcached-0.50/libmemcached/stats.h +96 -0
  317. data/ext/libmemcached-0.50/libmemcached/storage.cc +567 -0
  318. data/ext/libmemcached-0.50/libmemcached/storage.h +133 -0
  319. data/ext/libmemcached-0.50/libmemcached/strerror.cc +189 -0
  320. data/ext/libmemcached-0.50/libmemcached/strerror.h +50 -0
  321. data/ext/libmemcached-0.50/libmemcached/string.cc +253 -0
  322. data/ext/libmemcached-0.50/libmemcached/string.h +121 -0
  323. data/ext/libmemcached-0.50/libmemcached/touch.cc +106 -0
  324. data/ext/libmemcached-0.50/libmemcached/touch.h +59 -0
  325. data/ext/libmemcached-0.50/libmemcached/types.h +117 -0
  326. data/ext/libmemcached-0.50/libmemcached/util.h +40 -0
  327. data/ext/libmemcached-0.50/libmemcached/util/flush.cc +61 -0
  328. data/ext/libmemcached-0.50/libmemcached/util/flush.h +50 -0
  329. data/ext/libmemcached-0.50/libmemcached/util/include.am +34 -0
  330. data/ext/libmemcached-0.50/libmemcached/util/ping.cc +62 -0
  331. data/ext/libmemcached-0.50/libmemcached/util/ping.h +49 -0
  332. data/ext/libmemcached-0.50/libmemcached/util/pool.cc +392 -0
  333. data/ext/libmemcached-0.50/libmemcached/util/pool.h +78 -0
  334. data/ext/libmemcached-0.50/libmemcached/util/version.cc +87 -0
  335. data/ext/libmemcached-0.50/libmemcached/util/version.h +53 -0
  336. data/ext/libmemcached-0.50/libmemcached/verbosity.cc +97 -0
  337. data/ext/libmemcached-0.50/libmemcached/verbosity.h +50 -0
  338. data/ext/libmemcached-0.50/libmemcached/version.cc +214 -0
  339. data/ext/libmemcached-0.50/libmemcached/version.h +52 -0
  340. data/ext/libmemcached-0.50/libmemcached/virtual_bucket.c +118 -0
  341. data/ext/libmemcached-0.50/libmemcached/virtual_bucket.h +59 -0
  342. data/ext/libmemcached-0.50/libmemcached/visibility.h +51 -0
  343. data/ext/libmemcached-0.50/libmemcached/watchpoint.h +110 -0
  344. data/ext/libmemcached-0.50/libtest/callbacks.h +21 -0
  345. data/ext/libmemcached-0.50/libtest/collection.h +19 -0
  346. data/ext/libmemcached-0.50/libtest/common.h +50 -0
  347. data/ext/libmemcached-0.50/libtest/core.h +11 -0
  348. data/ext/libmemcached-0.50/libtest/error.h +18 -0
  349. data/ext/libmemcached-0.50/libtest/failed.h +52 -0
  350. data/ext/libmemcached-0.50/libtest/framework.cc +57 -0
  351. data/ext/libmemcached-0.50/libtest/framework.h +137 -0
  352. data/ext/libmemcached-0.50/libtest/get.h +22 -0
  353. data/ext/libmemcached-0.50/libtest/include.am +52 -0
  354. data/ext/libmemcached-0.50/libtest/runner.h +19 -0
  355. data/ext/libmemcached-0.50/libtest/server.c +355 -0
  356. data/ext/libmemcached-0.50/libtest/server.h +43 -0
  357. data/ext/libmemcached-0.50/libtest/stats.h +30 -0
  358. data/ext/libmemcached-0.50/libtest/strerror.h +14 -0
  359. data/ext/libmemcached-0.50/libtest/test.cc +319 -0
  360. data/ext/libmemcached-0.50/libtest/test.h +162 -0
  361. data/ext/libmemcached-0.50/libtest/test.hpp +46 -0
  362. data/ext/libmemcached-0.50/libtest/visibility.h +69 -0
  363. data/ext/libmemcached-0.50/m4/ac_cxx_header_stdcxx_98.m4 +83 -0
  364. data/ext/libmemcached-0.50/m4/acx_pthread.m4 +271 -0
  365. data/ext/libmemcached-0.50/m4/byteorder.m4 +19 -0
  366. data/ext/libmemcached-0.50/m4/deprecated.m4 +17 -0
  367. data/ext/libmemcached-0.50/m4/eagain.m4 +28 -0
  368. data/ext/libmemcached-0.50/m4/enable_utillib.m4 +16 -0
  369. data/ext/libmemcached-0.50/m4/gettext.m4 +379 -0
  370. data/ext/libmemcached-0.50/m4/hsieh.m4 +18 -0
  371. data/ext/libmemcached-0.50/m4/iconv.m4 +214 -0
  372. data/ext/libmemcached-0.50/m4/lib-ld.m4 +110 -0
  373. data/ext/libmemcached-0.50/m4/lib-link.m4 +767 -0
  374. data/ext/libmemcached-0.50/m4/lib-prefix.m4 +221 -0
  375. data/ext/libmemcached-0.50/m4/libtool.m4 +7851 -0
  376. data/ext/libmemcached-0.50/m4/ltoptions.m4 +369 -0
  377. data/ext/libmemcached-0.50/m4/ltsugar.m4 +123 -0
  378. data/ext/libmemcached-0.50/m4/ltversion.m4 +23 -0
  379. data/ext/libmemcached-0.50/m4/lt~obsolete.m4 +98 -0
  380. data/ext/libmemcached-0.50/m4/memaslap.m4 +9 -0
  381. data/ext/libmemcached-0.50/m4/memcached.m4 +31 -0
  382. data/ext/libmemcached-0.50/m4/murmur.m4 +18 -0
  383. data/ext/libmemcached-0.50/m4/pandora_64bit.m4 +60 -0
  384. data/ext/libmemcached-0.50/m4/pandora_bison.m4 +33 -0
  385. data/ext/libmemcached-0.50/m4/pandora_canonical.m4 +418 -0
  386. data/ext/libmemcached-0.50/m4/pandora_check_compiler_version.m4 +37 -0
  387. data/ext/libmemcached-0.50/m4/pandora_check_cxx_standard.m4 +23 -0
  388. data/ext/libmemcached-0.50/m4/pandora_cinttypes.m4 +39 -0
  389. data/ext/libmemcached-0.50/m4/pandora_clock_gettime.m4 +15 -0
  390. data/ext/libmemcached-0.50/m4/pandora_compile_stdcxx_0x.m4 +103 -0
  391. data/ext/libmemcached-0.50/m4/pandora_cstdint.m4 +38 -0
  392. data/ext/libmemcached-0.50/m4/pandora_cxx_demangle.m4 +27 -0
  393. data/ext/libmemcached-0.50/m4/pandora_enable_dtrace.m4 +60 -0
  394. data/ext/libmemcached-0.50/m4/pandora_ensure_gcc_version.m4 +62 -0
  395. data/ext/libmemcached-0.50/m4/pandora_extensions.m4 +16 -0
  396. data/ext/libmemcached-0.50/m4/pandora_fdatasync.m4 +25 -0
  397. data/ext/libmemcached-0.50/m4/pandora_flex.m4 +33 -0
  398. data/ext/libmemcached-0.50/m4/pandora_have_better_malloc.m4 +66 -0
  399. data/ext/libmemcached-0.50/m4/pandora_have_boost.m4 +93 -0
  400. data/ext/libmemcached-0.50/m4/pandora_have_gcc_atomics.m4 +37 -0
  401. data/ext/libmemcached-0.50/m4/pandora_have_innodb.m4 +41 -0
  402. data/ext/libmemcached-0.50/m4/pandora_have_libaio.m4 +56 -0
  403. data/ext/libmemcached-0.50/m4/pandora_have_libavahi.m4 +41 -0
  404. data/ext/libmemcached-0.50/m4/pandora_have_libbdb.m4 +40 -0
  405. data/ext/libmemcached-0.50/m4/pandora_have_libboost_date_time.m4 +46 -0
  406. data/ext/libmemcached-0.50/m4/pandora_have_libboost_filesystem.m4 +47 -0
  407. data/ext/libmemcached-0.50/m4/pandora_have_libboost_iostreams.m4 +49 -0
  408. data/ext/libmemcached-0.50/m4/pandora_have_libboost_options.m4 +47 -0
  409. data/ext/libmemcached-0.50/m4/pandora_have_libboost_regex.m4 +54 -0
  410. data/ext/libmemcached-0.50/m4/pandora_have_libboost_test.m4 +45 -0
  411. data/ext/libmemcached-0.50/m4/pandora_have_libboost_thread.m4 +54 -0
  412. data/ext/libmemcached-0.50/m4/pandora_have_libcassandra.m4 +44 -0
  413. data/ext/libmemcached-0.50/m4/pandora_have_libcurl.m4 +62 -0
  414. data/ext/libmemcached-0.50/m4/pandora_have_libdl.m4 +51 -0
  415. data/ext/libmemcached-0.50/m4/pandora_have_libdrizzle.m4 +61 -0
  416. data/ext/libmemcached-0.50/m4/pandora_have_libevent.m4 +66 -0
  417. data/ext/libmemcached-0.50/m4/pandora_have_libgearman.m4 +41 -0
  418. data/ext/libmemcached-0.50/m4/pandora_have_libgtest.m4 +47 -0
  419. data/ext/libmemcached-0.50/m4/pandora_have_libhaildb.m4 +43 -0
  420. data/ext/libmemcached-0.50/m4/pandora_have_libhashkit.m4 +42 -0
  421. data/ext/libmemcached-0.50/m4/pandora_have_libinnodb.m4 +64 -0
  422. data/ext/libmemcached-0.50/m4/pandora_have_libldap.m4 +73 -0
  423. data/ext/libmemcached-0.50/m4/pandora_have_libmemcached.m4 +106 -0
  424. data/ext/libmemcached-0.50/m4/pandora_have_libmysqlclient.m4 +146 -0
  425. data/ext/libmemcached-0.50/m4/pandora_have_libndbclient.m4 +80 -0
  426. data/ext/libmemcached-0.50/m4/pandora_have_libpcre.m4 +73 -0
  427. data/ext/libmemcached-0.50/m4/pandora_have_libpq.m4 +46 -0
  428. data/ext/libmemcached-0.50/m4/pandora_have_libpqxx.m4 +44 -0
  429. data/ext/libmemcached-0.50/m4/pandora_have_libsqlite3.m4 +42 -0
  430. data/ext/libmemcached-0.50/m4/pandora_have_libtokyocabinet.m4 +54 -0
  431. data/ext/libmemcached-0.50/m4/pandora_have_libuuid.m4 +55 -0
  432. data/ext/libmemcached-0.50/m4/pandora_have_libvbucket.m4 +40 -0
  433. data/ext/libmemcached-0.50/m4/pandora_have_libxml2.m4 +52 -0
  434. data/ext/libmemcached-0.50/m4/pandora_have_libz.m4 +51 -0
  435. data/ext/libmemcached-0.50/m4/pandora_have_protobuf.m4 +82 -0
  436. data/ext/libmemcached-0.50/m4/pandora_have_sasl.m4 +133 -0
  437. data/ext/libmemcached-0.50/m4/pandora_have_thrift.m4 +45 -0
  438. data/ext/libmemcached-0.50/m4/pandora_header_assert.m4 +23 -0
  439. data/ext/libmemcached-0.50/m4/pandora_header_stdcxx_98.m4 +83 -0
  440. data/ext/libmemcached-0.50/m4/pandora_intltool.m4 +225 -0
  441. data/ext/libmemcached-0.50/m4/pandora_libtool.m4 +25 -0
  442. data/ext/libmemcached-0.50/m4/pandora_optimize.m4 +75 -0
  443. data/ext/libmemcached-0.50/m4/pandora_platform.m4 +117 -0
  444. data/ext/libmemcached-0.50/m4/pandora_plugins.m4 +62 -0
  445. data/ext/libmemcached-0.50/m4/pandora_print_callstack.m4 +61 -0
  446. data/ext/libmemcached-0.50/m4/pandora_pthread.m4 +258 -0
  447. data/ext/libmemcached-0.50/m4/pandora_python3_devel.m4 +236 -0
  448. data/ext/libmemcached-0.50/m4/pandora_run_cpplint.m4 +8 -0
  449. data/ext/libmemcached-0.50/m4/pandora_sasl.m4 +133 -0
  450. data/ext/libmemcached-0.50/m4/pandora_shared_ptr.m4 +59 -0
  451. data/ext/libmemcached-0.50/m4/pandora_stack_direction.m4 +39 -0
  452. data/ext/libmemcached-0.50/m4/pandora_stl_hash.m4 +94 -0
  453. data/ext/libmemcached-0.50/m4/pandora_swig.m4 +39 -0
  454. data/ext/libmemcached-0.50/m4/pandora_use_pipe.m4 +36 -0
  455. data/ext/libmemcached-0.50/m4/pandora_vc_build.m4 +168 -0
  456. data/ext/libmemcached-0.50/m4/pandora_version.m4 +11 -0
  457. data/ext/libmemcached-0.50/m4/pandora_visibility.m4 +75 -0
  458. data/ext/libmemcached-0.50/m4/pandora_warnings.m4 +447 -0
  459. data/ext/libmemcached-0.50/m4/pandora_with_gettext.m4 +44 -0
  460. data/ext/libmemcached-0.50/m4/pandora_with_lua.m4 +55 -0
  461. data/ext/libmemcached-0.50/m4/pandora_with_memcached.m4 +41 -0
  462. data/ext/libmemcached-0.50/m4/pandora_with_perl.m4 +81 -0
  463. data/ext/libmemcached-0.50/m4/pandora_with_php.m4 +56 -0
  464. data/ext/libmemcached-0.50/m4/pandora_with_python.m4 +37 -0
  465. data/ext/libmemcached-0.50/m4/pandora_with_python3.m4 +44 -0
  466. data/ext/libmemcached-0.50/m4/pandora_with_r.m4 +33 -0
  467. data/ext/libmemcached-0.50/m4/pandora_with_ruby.m4 +79 -0
  468. data/ext/libmemcached-0.50/m4/pandora_with_valgrind.m4 +17 -0
  469. data/ext/libmemcached-0.50/m4/pkg.m4 +157 -0
  470. data/ext/libmemcached-0.50/m4/po.m4 +449 -0
  471. data/ext/libmemcached-0.50/m4/progtest.m4 +92 -0
  472. data/ext/libmemcached-0.50/m4/protocol_binary.m4 +36 -0
  473. data/ext/libmemcached-0.50/m4/setsockopt.m4 +73 -0
  474. data/ext/libmemcached-0.50/m4/socket_send_flags.m4 +66 -0
  475. data/ext/libmemcached-0.50/poll/include.am +8 -0
  476. data/ext/libmemcached-0.50/poll/poll.c +77 -0
  477. data/ext/libmemcached-0.50/poll/poll.h +45 -0
  478. data/ext/libmemcached-0.50/support/include.am +11 -0
  479. data/ext/libmemcached-0.50/support/libmemcached-fc.spec.in +105 -0
  480. data/ext/libmemcached-0.50/support/libmemcached.pc.in +10 -0
  481. data/ext/libmemcached-0.50/support/libmemcached.spec.in +281 -0
  482. data/ext/libmemcached-0.50/support/set_benchmark.sh +5 -0
  483. data/ext/libmemcached-0.50/tests/atomsmasher.cc +295 -0
  484. data/ext/libmemcached-0.50/tests/basic.cc +134 -0
  485. data/ext/libmemcached-0.50/tests/basic.h +66 -0
  486. data/ext/libmemcached-0.50/tests/cpp_example.cc +195 -0
  487. data/ext/libmemcached-0.50/tests/deprecated.cc +72 -0
  488. data/ext/libmemcached-0.50/tests/deprecated.h +49 -0
  489. data/ext/libmemcached-0.50/tests/error_conditions.cc +63 -0
  490. data/ext/libmemcached-0.50/tests/error_conditions.h +48 -0
  491. data/ext/libmemcached-0.50/tests/hash_plus.cc +225 -0
  492. data/ext/libmemcached-0.50/tests/hash_results.h +127 -0
  493. data/ext/libmemcached-0.50/tests/hashkit_functions.cc +619 -0
  494. data/ext/libmemcached-0.50/tests/include.am +342 -0
  495. data/ext/libmemcached-0.50/tests/ketama_test_cases.h +121 -0
  496. data/ext/libmemcached-0.50/tests/ketama_test_cases_spy.h +118 -0
  497. data/ext/libmemcached-0.50/tests/libmemcached_world.h +205 -0
  498. data/ext/libmemcached-0.50/tests/mem_functions.cc +6648 -0
  499. data/ext/libmemcached-0.50/tests/mem_udp.cc +510 -0
  500. data/ext/libmemcached-0.50/tests/output_plus.res +5 -0
  501. data/ext/libmemcached-0.50/tests/parser.cc +599 -0
  502. data/ext/libmemcached-0.50/tests/parser.h +109 -0
  503. data/ext/libmemcached-0.50/tests/plus.cpp +240 -0
  504. data/ext/libmemcached-0.50/tests/pool.cc +78 -0
  505. data/ext/libmemcached-0.50/tests/pool.h +49 -0
  506. data/ext/libmemcached-0.50/tests/print.cc +58 -0
  507. data/ext/libmemcached-0.50/tests/print.h +51 -0
  508. data/ext/libmemcached-0.50/tests/replication.cc +333 -0
  509. data/ext/libmemcached-0.50/tests/replication.h +64 -0
  510. data/ext/libmemcached-0.50/tests/start.cc +29 -0
  511. data/ext/libmemcached-0.50/tests/string.cc +174 -0
  512. data/ext/libmemcached-0.50/tests/string.h +67 -0
  513. data/ext/libmemcached-0.50/tests/virtual_buckets.cc +143 -0
  514. data/ext/libmemcached-0.50/tests/virtual_buckets.h +51 -0
  515. data/ext/libmemcached-0.50/win32/include.am +11 -0
  516. data/ext/libmemcached-0.50/win32/wrappers.h +55 -0
  517. data/ext/rlibmemcached.i +263 -0
  518. data/ext/rlibmemcached_wrap.c +16732 -0
  519. data/lib/memcached.rb +32 -0
  520. data/lib/memcached/auth.rb +16 -0
  521. data/lib/memcached/behaviors.rb +77 -0
  522. data/lib/memcached/exceptions.rb +84 -0
  523. data/lib/memcached/experimental.rb +48 -0
  524. data/lib/memcached/memcached.rb +660 -0
  525. data/lib/memcached/rails.rb +133 -0
  526. data/test/profile/benchmark.rb +245 -0
  527. data/test/profile/c_profiler.rb +14 -0
  528. data/test/profile/exercise.rb +185 -0
  529. data/test/profile/rb_profiler.rb +21 -0
  530. data/test/profile/valgrind.rb +10 -0
  531. data/test/setup.rb +30 -0
  532. data/test/teardown.rb +0 -0
  533. data/test/test_helper.rb +19 -0
  534. data/test/unit/binding_test.rb +8 -0
  535. data/test/unit/memcached_experimental_test.rb +274 -0
  536. data/test/unit/memcached_test.rb +1293 -0
  537. data/test/unit/rails_test.rb +122 -0
  538. metadata +650 -0
  539. metadata.gz.sig +0 -0
@@ -0,0 +1,18 @@
1
+ dnl ---------------------------------------------------------------------------
2
+ dnl Macro: ENABLE_HSIEH_HASH
3
+ dnl ---------------------------------------------------------------------------
4
+ AC_DEFUN([ENABLE_HSIEH_HASH],
5
+ [AC_ARG_ENABLE([hsieh_hash],
6
+ [AS_HELP_STRING([--enable-hsieh_hash],
7
+ [build with support for hsieh hashing. @<:@default=off@:>@])],
8
+ [ac_cv_enable_hsieh_hash=yes],
9
+ [ac_cv_enable_hsieh_hash=no])
10
+
11
+ AS_IF([test "$ac_cv_enable_hsieh_hash" = "yes"],
12
+ [AC_DEFINE([HAVE_HSIEH_HASH], [1], [Enables hsieh hashing support])])
13
+
14
+ AM_CONDITIONAL([INCLUDE_HSIEH_SRC], [test "$ac_cv_enable_hsieh_hash" = "yes"])
15
+ ])
16
+ dnl ---------------------------------------------------------------------------
17
+ dnl End Macro: ENABLE_HSIEH_HASH
18
+ dnl ---------------------------------------------------------------------------
@@ -0,0 +1,214 @@
1
+ # iconv.m4 serial 11 (gettext-0.18.1)
2
+ dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
3
+ dnl This file is free software; the Free Software Foundation
4
+ dnl gives unlimited permission to copy and/or distribute it,
5
+ dnl with or without modifications, as long as this notice is preserved.
6
+
7
+ dnl From Bruno Haible.
8
+
9
+ AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
10
+ [
11
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
12
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
13
+ AC_REQUIRE([AC_LIB_RPATH])
14
+
15
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
16
+ dnl accordingly.
17
+ AC_LIB_LINKFLAGS_BODY([iconv])
18
+ ])
19
+
20
+ AC_DEFUN([AM_ICONV_LINK],
21
+ [
22
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
23
+ dnl those with the standalone portable GNU libiconv installed).
24
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
25
+
26
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
27
+ dnl accordingly.
28
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
29
+
30
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
31
+ dnl because if the user has installed libiconv and not disabled its use
32
+ dnl via --without-libiconv-prefix, he wants to use it. The first
33
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
34
+ am_save_CPPFLAGS="$CPPFLAGS"
35
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
36
+
37
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
38
+ am_cv_func_iconv="no, consider installing GNU libiconv"
39
+ am_cv_lib_iconv=no
40
+ AC_TRY_LINK([#include <stdlib.h>
41
+ #include <iconv.h>],
42
+ [iconv_t cd = iconv_open("","");
43
+ iconv(cd,NULL,NULL,NULL,NULL);
44
+ iconv_close(cd);],
45
+ [am_cv_func_iconv=yes])
46
+ if test "$am_cv_func_iconv" != yes; then
47
+ am_save_LIBS="$LIBS"
48
+ LIBS="$LIBS $LIBICONV"
49
+ AC_TRY_LINK([#include <stdlib.h>
50
+ #include <iconv.h>],
51
+ [iconv_t cd = iconv_open("","");
52
+ iconv(cd,NULL,NULL,NULL,NULL);
53
+ iconv_close(cd);],
54
+ [am_cv_lib_iconv=yes]
55
+ [am_cv_func_iconv=yes])
56
+ LIBS="$am_save_LIBS"
57
+ fi
58
+ ])
59
+ if test "$am_cv_func_iconv" = yes; then
60
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
61
+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
62
+ am_save_LIBS="$LIBS"
63
+ if test $am_cv_lib_iconv = yes; then
64
+ LIBS="$LIBS $LIBICONV"
65
+ fi
66
+ AC_TRY_RUN([
67
+ #include <iconv.h>
68
+ #include <string.h>
69
+ int main ()
70
+ {
71
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
72
+ returns. */
73
+ {
74
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
75
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
76
+ {
77
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
78
+ char buf[10];
79
+ const char *inptr = input;
80
+ size_t inbytesleft = strlen (input);
81
+ char *outptr = buf;
82
+ size_t outbytesleft = sizeof (buf);
83
+ size_t res = iconv (cd_utf8_to_88591,
84
+ (char **) &inptr, &inbytesleft,
85
+ &outptr, &outbytesleft);
86
+ if (res == 0)
87
+ return 1;
88
+ }
89
+ }
90
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
91
+ successful returns. */
92
+ {
93
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
94
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
95
+ {
96
+ static const char input[] = "\263";
97
+ char buf[10];
98
+ const char *inptr = input;
99
+ size_t inbytesleft = strlen (input);
100
+ char *outptr = buf;
101
+ size_t outbytesleft = sizeof (buf);
102
+ size_t res = iconv (cd_ascii_to_88591,
103
+ (char **) &inptr, &inbytesleft,
104
+ &outptr, &outbytesleft);
105
+ if (res == 0)
106
+ return 1;
107
+ }
108
+ }
109
+ #if 0 /* This bug could be worked around by the caller. */
110
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
111
+ {
112
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
113
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
114
+ {
115
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
116
+ char buf[50];
117
+ const char *inptr = input;
118
+ size_t inbytesleft = strlen (input);
119
+ char *outptr = buf;
120
+ size_t outbytesleft = sizeof (buf);
121
+ size_t res = iconv (cd_88591_to_utf8,
122
+ (char **) &inptr, &inbytesleft,
123
+ &outptr, &outbytesleft);
124
+ if ((int)res > 0)
125
+ return 1;
126
+ }
127
+ }
128
+ #endif
129
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
130
+ provided. */
131
+ if (/* Try standardized names. */
132
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
133
+ /* Try IRIX, OSF/1 names. */
134
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
135
+ /* Try AIX names. */
136
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
137
+ /* Try HP-UX names. */
138
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
139
+ return 1;
140
+ return 0;
141
+ }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
142
+ [case "$host_os" in
143
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
144
+ *) am_cv_func_iconv_works="guessing yes" ;;
145
+ esac])
146
+ LIBS="$am_save_LIBS"
147
+ ])
148
+ case "$am_cv_func_iconv_works" in
149
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
150
+ *) am_func_iconv=yes ;;
151
+ esac
152
+ else
153
+ am_func_iconv=no am_cv_lib_iconv=no
154
+ fi
155
+ if test "$am_func_iconv" = yes; then
156
+ AC_DEFINE([HAVE_ICONV], [1],
157
+ [Define if you have the iconv() function and it works.])
158
+ fi
159
+ if test "$am_cv_lib_iconv" = yes; then
160
+ AC_MSG_CHECKING([how to link with libiconv])
161
+ AC_MSG_RESULT([$LIBICONV])
162
+ else
163
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
164
+ dnl either.
165
+ CPPFLAGS="$am_save_CPPFLAGS"
166
+ LIBICONV=
167
+ LTLIBICONV=
168
+ fi
169
+ AC_SUBST([LIBICONV])
170
+ AC_SUBST([LTLIBICONV])
171
+ ])
172
+
173
+ dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
174
+ dnl avoid warnings like
175
+ dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
176
+ dnl This is tricky because of the way 'aclocal' is implemented:
177
+ dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
178
+ dnl Otherwise aclocal's initial scan pass would miss the macro definition.
179
+ dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
180
+ dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
181
+ dnl warnings.
182
+ m4_define([gl_iconv_AC_DEFUN],
183
+ m4_version_prereq([2.64],
184
+ [[AC_DEFUN_ONCE(
185
+ [$1], [$2])]],
186
+ [[AC_DEFUN(
187
+ [$1], [$2])]]))
188
+ gl_iconv_AC_DEFUN([AM_ICONV],
189
+ [
190
+ AM_ICONV_LINK
191
+ if test "$am_cv_func_iconv" = yes; then
192
+ AC_MSG_CHECKING([for iconv declaration])
193
+ AC_CACHE_VAL([am_cv_proto_iconv], [
194
+ AC_TRY_COMPILE([
195
+ #include <stdlib.h>
196
+ #include <iconv.h>
197
+ extern
198
+ #ifdef __cplusplus
199
+ "C"
200
+ #endif
201
+ #if defined(__STDC__) || defined(__cplusplus)
202
+ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
203
+ #else
204
+ size_t iconv();
205
+ #endif
206
+ ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
207
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
208
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
209
+ AC_MSG_RESULT([
210
+ $am_cv_proto_iconv])
211
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
212
+ [Define as const if the declaration of iconv() needs const.])
213
+ fi
214
+ ])
@@ -0,0 +1,110 @@
1
+ # lib-ld.m4 serial 3 (gettext-0.13)
2
+ dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
3
+ dnl This file is free software; the Free Software Foundation
4
+ dnl gives unlimited permission to copy and/or distribute it,
5
+ dnl with or without modifications, as long as this notice is preserved.
6
+
7
+ dnl Subroutines of libtool.m4,
8
+ dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
9
+ dnl with libtool.m4.
10
+
11
+ dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
12
+ AC_DEFUN([AC_LIB_PROG_LD_GNU],
13
+ [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
14
+ [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
15
+ case `$LD -v 2>&1 </dev/null` in
16
+ *GNU* | *'with BFD'*)
17
+ acl_cv_prog_gnu_ld=yes ;;
18
+ *)
19
+ acl_cv_prog_gnu_ld=no ;;
20
+ esac])
21
+ with_gnu_ld=$acl_cv_prog_gnu_ld
22
+ ])
23
+
24
+ dnl From libtool-1.4. Sets the variable LD.
25
+ AC_DEFUN([AC_LIB_PROG_LD],
26
+ [AC_ARG_WITH(gnu-ld,
27
+ [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
28
+ test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
29
+ AC_REQUIRE([AC_PROG_CC])dnl
30
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
31
+ # Prepare PATH_SEPARATOR.
32
+ # The user is always right.
33
+ if test "${PATH_SEPARATOR+set}" != set; then
34
+ echo "#! /bin/sh" >conf$$.sh
35
+ echo "exit 0" >>conf$$.sh
36
+ chmod +x conf$$.sh
37
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
38
+ PATH_SEPARATOR=';'
39
+ else
40
+ PATH_SEPARATOR=:
41
+ fi
42
+ rm -f conf$$.sh
43
+ fi
44
+ ac_prog=ld
45
+ if test "$GCC" = yes; then
46
+ # Check if gcc -print-prog-name=ld gives a path.
47
+ AC_MSG_CHECKING([for ld used by GCC])
48
+ case $host in
49
+ *-*-mingw*)
50
+ # gcc leaves a trailing carriage return which upsets mingw
51
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
52
+ *)
53
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
54
+ esac
55
+ case $ac_prog in
56
+ # Accept absolute paths.
57
+ [[\\/]* | [A-Za-z]:[\\/]*)]
58
+ [re_direlt='/[^/][^/]*/\.\./']
59
+ # Canonicalize the path of ld
60
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
61
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
62
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
63
+ done
64
+ test -z "$LD" && LD="$ac_prog"
65
+ ;;
66
+ "")
67
+ # If it fails, then pretend we aren't using GCC.
68
+ ac_prog=ld
69
+ ;;
70
+ *)
71
+ # If it is relative, then search for the first ld in PATH.
72
+ with_gnu_ld=unknown
73
+ ;;
74
+ esac
75
+ elif test "$with_gnu_ld" = yes; then
76
+ AC_MSG_CHECKING([for GNU ld])
77
+ else
78
+ AC_MSG_CHECKING([for non-GNU ld])
79
+ fi
80
+ AC_CACHE_VAL(acl_cv_path_LD,
81
+ [if test -z "$LD"; then
82
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
83
+ for ac_dir in $PATH; do
84
+ test -z "$ac_dir" && ac_dir=.
85
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
86
+ acl_cv_path_LD="$ac_dir/$ac_prog"
87
+ # Check to see if the program is GNU ld. I'd rather use --version,
88
+ # but apparently some GNU ld's only accept -v.
89
+ # Break only if it was the GNU/non-GNU ld that we prefer.
90
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
91
+ *GNU* | *'with BFD'*)
92
+ test "$with_gnu_ld" != no && break ;;
93
+ *)
94
+ test "$with_gnu_ld" != yes && break ;;
95
+ esac
96
+ fi
97
+ done
98
+ IFS="$ac_save_ifs"
99
+ else
100
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
101
+ fi])
102
+ LD="$acl_cv_path_LD"
103
+ if test -n "$LD"; then
104
+ AC_MSG_RESULT($LD)
105
+ else
106
+ AC_MSG_RESULT(no)
107
+ fi
108
+ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
109
+ AC_LIB_PROG_LD_GNU
110
+ ])
@@ -0,0 +1,767 @@
1
+ # lib-link.m4 serial 18 (gettext-0.18)
2
+ dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
3
+ dnl This file is free software; the Free Software Foundation
4
+ dnl gives unlimited permission to copy and/or distribute it,
5
+ dnl with or without modifications, as long as this notice is preserved.
6
+
7
+ dnl From Bruno Haible.
8
+
9
+ AC_PREREQ([2.54])
10
+
11
+ dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
12
+ dnl the libraries corresponding to explicit and implicit dependencies.
13
+ dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
14
+ dnl augments the CPPFLAGS variable.
15
+ dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
16
+ dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
17
+ AC_DEFUN([AC_LIB_LINKFLAGS],
18
+ [
19
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20
+ AC_REQUIRE([AC_LIB_RPATH])
21
+ pushdef([Name],[translit([$1],[./-], [___])])
22
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
23
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
24
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
25
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
26
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
27
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
28
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
29
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
30
+ ])
31
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
32
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
33
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
34
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
35
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
36
+ AC_SUBST([LIB]NAME)
37
+ AC_SUBST([LTLIB]NAME)
38
+ AC_SUBST([LIB]NAME[_PREFIX])
39
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
40
+ dnl results of this search when this library appears as a dependency.
41
+ HAVE_LIB[]NAME=yes
42
+ popdef([NAME])
43
+ popdef([Name])
44
+ ])
45
+
46
+ dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [system])
47
+ dnl searches for libname and the libraries corresponding to explicit and
48
+ dnl implicit dependencies, together with the specified include files and
49
+ dnl the ability to compile and link the specified testcode. If found, it
50
+ dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
51
+ dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
52
+ dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
53
+ dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
54
+ dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
55
+ dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
56
+ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
57
+ [
58
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
59
+ AC_REQUIRE([AC_LIB_RPATH])
60
+ pushdef([Name],[translit([$1],[./-], [___])])
61
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
62
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
63
+
64
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
65
+ dnl accordingly.
66
+ AC_LIB_LINKFLAGS_BODY([$1], [$2], [$5])
67
+
68
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
69
+ dnl because if the user has installed lib[]Name and not disabled its use
70
+ dnl via --without-lib[]Name-prefix, he wants to use it.
71
+ ac_save_CPPFLAGS="$CPPFLAGS"
72
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
73
+
74
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
75
+ ac_save_LIBS="$LIBS"
76
+ LIBS="$LIBS $LIB[]NAME"
77
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
78
+ LIBS="$ac_save_LIBS"
79
+ ])
80
+ if test "$ac_cv_lib[]Name" = yes; then
81
+ HAVE_LIB[]NAME=yes
82
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
83
+ AC_MSG_CHECKING([how to link with lib[]$1])
84
+ AC_MSG_RESULT([$LIB[]NAME])
85
+ else
86
+ HAVE_LIB[]NAME=no
87
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
88
+ dnl $INC[]NAME either.
89
+ CPPFLAGS="$ac_save_CPPFLAGS"
90
+ LIB[]NAME=
91
+ LTLIB[]NAME=
92
+ LIB[]NAME[]_PREFIX=
93
+ fi
94
+ AC_SUBST([HAVE_LIB]NAME)
95
+ AC_SUBST([LIB]NAME)
96
+ AC_SUBST([LTLIB]NAME)
97
+ AC_SUBST([LIB]NAME[_PREFIX])
98
+ popdef([NAME])
99
+ popdef([Name])
100
+ ])
101
+
102
+ dnl Determine the platform dependent parameters needed to use rpath:
103
+ dnl acl_libext,
104
+ dnl acl_shlibext,
105
+ dnl acl_hardcode_libdir_flag_spec,
106
+ dnl acl_hardcode_libdir_separator,
107
+ dnl acl_hardcode_direct,
108
+ dnl acl_hardcode_minus_L.
109
+ AC_DEFUN([AC_LIB_RPATH],
110
+ [
111
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
112
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
113
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
114
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
115
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
116
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
117
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
118
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
119
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
120
+ . ./conftest.sh
121
+ rm -f ./conftest.sh
122
+ acl_cv_rpath=done
123
+ ])
124
+ wl="$acl_cv_wl"
125
+ acl_libext="$acl_cv_libext"
126
+ acl_shlibext="$acl_cv_shlibext"
127
+ acl_libname_spec="$acl_cv_libname_spec"
128
+ acl_library_names_spec="$acl_cv_library_names_spec"
129
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
130
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
131
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
132
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
133
+ dnl Determine whether the user wants rpath handling at all.
134
+ AC_ARG_ENABLE([rpath],
135
+ [ --disable-rpath do not hardcode runtime library paths],
136
+ :, enable_rpath=yes)
137
+ ])
138
+
139
+ dnl AC_LIB_FROMPACKAGE(name, package)
140
+ dnl declares that libname comes from the given package. The configure file
141
+ dnl will then not have a --with-libname-prefix option but a
142
+ dnl --with-package-prefix option. Several libraries can come from the same
143
+ dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
144
+ dnl macro call that searches for libname.
145
+ AC_DEFUN([AC_LIB_FROMPACKAGE],
146
+ [
147
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
148
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
149
+ define([acl_frompackage_]NAME, [$2])
150
+ popdef([NAME])
151
+ pushdef([PACK],[$2])
152
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
153
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
154
+ define([acl_libsinpackage_]PACKUP,
155
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
156
+ popdef([PACKUP])
157
+ popdef([PACK])
158
+ ])
159
+
160
+ dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies, system]) searches for
161
+ dnl libname and the libraries corresponding to explicit and implicit
162
+ dnl dependencies.
163
+ dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
164
+ dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
165
+ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
166
+ dnl If system==system, -isystem is used instead of -I
167
+ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
168
+ [
169
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
170
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
171
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
172
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
173
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
174
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
175
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
176
+ dnl Autoconf >= 2.61 supports dots in --with options.
177
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
178
+ dnl By default, look in $includedir and $libdir.
179
+ use_additional=yes
180
+ if test "x$GCC" = "xyes" -a "x$3" = "xsystem"
181
+ then
182
+ i_system="-isystem "
183
+ else
184
+ i_system="-I"
185
+ fi
186
+
187
+ AC_LIB_WITH_FINAL_PREFIX([
188
+ eval additional_includedir=\"$includedir\"
189
+ eval additional_libdir=\"$libdir\"
190
+ ])
191
+ AC_ARG_WITH(P_A_C_K[-prefix],
192
+ [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
193
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
194
+ [
195
+ if test "X$withval" = "Xno"; then
196
+ use_additional=no
197
+ else
198
+ if test "X$withval" = "X"; then
199
+ AC_LIB_WITH_FINAL_PREFIX([
200
+ eval additional_includedir=\"$includedir\"
201
+ eval additional_libdir=\"$libdir\"
202
+ ])
203
+ else
204
+ additional_includedir="$withval/include"
205
+ additional_libdir="$withval/$acl_libdirstem"
206
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
207
+ && ! test -d "$withval/$acl_libdirstem"; then
208
+ additional_libdir="$withval/$acl_libdirstem2"
209
+ fi
210
+ fi
211
+ fi
212
+ ])
213
+ dnl Search the library and its dependencies in $additional_libdir and
214
+ dnl $LDFLAGS. Using breadth-first-seach.
215
+ LIB[]NAME=
216
+ LTLIB[]NAME=
217
+ INC[]NAME=
218
+ LIB[]NAME[]_PREFIX=
219
+ rpathdirs=
220
+ ltrpathdirs=
221
+ names_already_handled=
222
+ names_next_round='$1 $2'
223
+ while test -n "$names_next_round"; do
224
+ names_this_round="$names_next_round"
225
+ names_next_round=
226
+ for name in $names_this_round; do
227
+ already_handled=
228
+ for n in $names_already_handled; do
229
+ if test "$n" = "$name"; then
230
+ already_handled=yes
231
+ break
232
+ fi
233
+ done
234
+ if test -z "$already_handled"; then
235
+ names_already_handled="$names_already_handled $name"
236
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
237
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
238
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
239
+ eval value=\"\$HAVE_LIB$uppername\"
240
+ if test -n "$value"; then
241
+ if test "$value" = yes; then
242
+ eval value=\"\$LIB$uppername\"
243
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
244
+ eval value=\"\$LTLIB$uppername\"
245
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
246
+ else
247
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
248
+ dnl that this library doesn't exist. So just drop it.
249
+ :
250
+ fi
251
+ else
252
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
253
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
254
+ found_dir=
255
+ found_la=
256
+ found_so=
257
+ found_a=
258
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
259
+ if test -n "$acl_shlibext"; then
260
+ shrext=".$acl_shlibext" # typically: shrext=.so
261
+ else
262
+ shrext=
263
+ fi
264
+ if test $use_additional = yes; then
265
+ dir="$additional_libdir"
266
+ dnl The same code as in the loop below:
267
+ dnl First look for a shared library.
268
+ if test -n "$acl_shlibext"; then
269
+ if test -f "$dir/$libname$shrext"; then
270
+ found_dir="$dir"
271
+ found_so="$dir/$libname$shrext"
272
+ else
273
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
274
+ ver=`(cd "$dir" && \
275
+ for f in "$libname$shrext".*; do echo "$f"; done \
276
+ | sed -e "s,^$libname$shrext\\\\.,," \
277
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
278
+ | sed 1q ) 2>/dev/null`
279
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
280
+ found_dir="$dir"
281
+ found_so="$dir/$libname$shrext.$ver"
282
+ fi
283
+ else
284
+ eval library_names=\"$acl_library_names_spec\"
285
+ for f in $library_names; do
286
+ if test -f "$dir/$f"; then
287
+ found_dir="$dir"
288
+ found_so="$dir/$f"
289
+ break
290
+ fi
291
+ done
292
+ fi
293
+ fi
294
+ fi
295
+ dnl Then look for a static library.
296
+ if test "X$found_dir" = "X"; then
297
+ if test -f "$dir/$libname.$acl_libext"; then
298
+ found_dir="$dir"
299
+ found_a="$dir/$libname.$acl_libext"
300
+ fi
301
+ fi
302
+ if test "X$found_dir" != "X"; then
303
+ if test -f "$dir/$libname.la"; then
304
+ found_la="$dir/$libname.la"
305
+ fi
306
+ fi
307
+ fi
308
+ if test "X$found_dir" = "X"; then
309
+ for x in $LDFLAGS $LTLIB[]NAME; do
310
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
311
+ case "$x" in
312
+ -L*)
313
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
314
+ dnl First look for a shared library.
315
+ if test -n "$acl_shlibext"; then
316
+ if test -f "$dir/$libname$shrext"; then
317
+ found_dir="$dir"
318
+ found_so="$dir/$libname$shrext"
319
+ else
320
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
321
+ ver=`(cd "$dir" && \
322
+ for f in "$libname$shrext".*; do echo "$f"; done \
323
+ | sed -e "s,^$libname$shrext\\\\.,," \
324
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
325
+ | sed 1q ) 2>/dev/null`
326
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
327
+ found_dir="$dir"
328
+ found_so="$dir/$libname$shrext.$ver"
329
+ fi
330
+ else
331
+ eval library_names=\"$acl_library_names_spec\"
332
+ for f in $library_names; do
333
+ if test -f "$dir/$f"; then
334
+ found_dir="$dir"
335
+ found_so="$dir/$f"
336
+ break
337
+ fi
338
+ done
339
+ fi
340
+ fi
341
+ fi
342
+ dnl Then look for a static library.
343
+ if test "X$found_dir" = "X"; then
344
+ if test -f "$dir/$libname.$acl_libext"; then
345
+ found_dir="$dir"
346
+ found_a="$dir/$libname.$acl_libext"
347
+ fi
348
+ fi
349
+ if test "X$found_dir" != "X"; then
350
+ if test -f "$dir/$libname.la"; then
351
+ found_la="$dir/$libname.la"
352
+ fi
353
+ fi
354
+ ;;
355
+ esac
356
+ if test "X$found_dir" != "X"; then
357
+ break
358
+ fi
359
+ done
360
+ fi
361
+ if test "X$found_dir" != "X"; then
362
+ dnl Found the library.
363
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
364
+ if test "X$found_so" != "X"; then
365
+ dnl Linking with a shared library. We attempt to hardcode its
366
+ dnl directory into the executable's runpath, unless it's the
367
+ dnl standard /usr/lib.
368
+ if test "$enable_rpath" = no \
369
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
370
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
371
+ dnl No hardcoding is needed.
372
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
373
+ else
374
+ dnl Use an explicit option to hardcode DIR into the resulting
375
+ dnl binary.
376
+ dnl Potentially add DIR to ltrpathdirs.
377
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
378
+ haveit=
379
+ for x in $ltrpathdirs; do
380
+ if test "X$x" = "X$found_dir"; then
381
+ haveit=yes
382
+ break
383
+ fi
384
+ done
385
+ if test -z "$haveit"; then
386
+ ltrpathdirs="$ltrpathdirs $found_dir"
387
+ fi
388
+ dnl The hardcoding into $LIBNAME is system dependent.
389
+ if test "$acl_hardcode_direct" = yes; then
390
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
391
+ dnl resulting binary.
392
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
393
+ else
394
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
395
+ dnl Use an explicit option to hardcode DIR into the resulting
396
+ dnl binary.
397
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
398
+ dnl Potentially add DIR to rpathdirs.
399
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
400
+ haveit=
401
+ for x in $rpathdirs; do
402
+ if test "X$x" = "X$found_dir"; then
403
+ haveit=yes
404
+ break
405
+ fi
406
+ done
407
+ if test -z "$haveit"; then
408
+ rpathdirs="$rpathdirs $found_dir"
409
+ fi
410
+ else
411
+ dnl Rely on "-L$found_dir".
412
+ dnl But don't add it if it's already contained in the LDFLAGS
413
+ dnl or the already constructed $LIBNAME
414
+ haveit=
415
+ for x in $LDFLAGS $LIB[]NAME; do
416
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
417
+ if test "X$x" = "X-L$found_dir"; then
418
+ haveit=yes
419
+ break
420
+ fi
421
+ done
422
+ if test -z "$haveit"; then
423
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
424
+ fi
425
+ if test "$acl_hardcode_minus_L" != no; then
426
+ dnl FIXME: Not sure whether we should use
427
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
428
+ dnl here.
429
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
430
+ else
431
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
432
+ dnl here, because this doesn't fit in flags passed to the
433
+ dnl compiler. So give up. No hardcoding. This affects only
434
+ dnl very old systems.
435
+ dnl FIXME: Not sure whether we should use
436
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
437
+ dnl here.
438
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
439
+ fi
440
+ fi
441
+ fi
442
+ fi
443
+ else
444
+ if test "X$found_a" != "X"; then
445
+ dnl Linking with a static library.
446
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
447
+ else
448
+ dnl We shouldn't come here, but anyway it's good to have a
449
+ dnl fallback.
450
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
451
+ fi
452
+ fi
453
+ dnl Assume the include files are nearby.
454
+ additional_includedir=
455
+ case "$found_dir" in
456
+ */$acl_libdirstem | */$acl_libdirstem/)
457
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
458
+ if test "$name" = '$1'; then
459
+ LIB[]NAME[]_PREFIX="$basedir"
460
+ fi
461
+ additional_includedir="$basedir/include"
462
+ ;;
463
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
464
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
465
+ if test "$name" = '$1'; then
466
+ LIB[]NAME[]_PREFIX="$basedir"
467
+ fi
468
+ additional_includedir="$basedir/include"
469
+ ;;
470
+ esac
471
+ if test "X$additional_includedir" != "X"; then
472
+ dnl Potentially add $additional_includedir to $INCNAME.
473
+ dnl But don't add it
474
+ dnl 1. if it's the standard /usr/include,
475
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
476
+ dnl 3. if it's already present in $CPPFLAGS or the already
477
+ dnl constructed $INCNAME,
478
+ dnl 4. if it doesn't exist as a directory.
479
+ if test "X$additional_includedir" != "X/usr/include"; then
480
+ haveit=
481
+ if test "X$additional_includedir" = "X/usr/local/include"; then
482
+ if test -n "$GCC"; then
483
+ case $host_os in
484
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
485
+ esac
486
+ fi
487
+ fi
488
+ if test -z "$haveit"; then
489
+ for x in $CPPFLAGS $INC[]NAME; do
490
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
491
+ if test "X$x" = "X${i_system}$additional_includedir"; then
492
+ haveit=yes
493
+ break
494
+ fi
495
+ done
496
+ if test -z "$haveit"; then
497
+ if test -d "$additional_includedir"; then
498
+ dnl Really add $additional_includedir to $INCNAME.
499
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }${i_system}$additional_includedir"
500
+ fi
501
+ fi
502
+ fi
503
+ fi
504
+ fi
505
+ dnl Look for dependencies.
506
+ if test -n "$found_la"; then
507
+ dnl Read the .la file. It defines the variables
508
+ dnl dlname, library_names, old_library, dependency_libs, current,
509
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
510
+ save_libdir="$libdir"
511
+ case "$found_la" in
512
+ */* | *\\*) . "$found_la" ;;
513
+ *) . "./$found_la" ;;
514
+ esac
515
+ libdir="$save_libdir"
516
+ dnl We use only dependency_libs.
517
+ for dep in $dependency_libs; do
518
+ case "$dep" in
519
+ -L*)
520
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
521
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
522
+ dnl But don't add it
523
+ dnl 1. if it's the standard /usr/lib,
524
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
525
+ dnl 3. if it's already present in $LDFLAGS or the already
526
+ dnl constructed $LIBNAME,
527
+ dnl 4. if it doesn't exist as a directory.
528
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
529
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
530
+ haveit=
531
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
532
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
533
+ if test -n "$GCC"; then
534
+ case $host_os in
535
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
536
+ esac
537
+ fi
538
+ fi
539
+ if test -z "$haveit"; then
540
+ haveit=
541
+ for x in $LDFLAGS $LIB[]NAME; do
542
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
543
+ if test "X$x" = "X-L$additional_libdir"; then
544
+ haveit=yes
545
+ break
546
+ fi
547
+ done
548
+ if test -z "$haveit"; then
549
+ if test -d "$additional_libdir"; then
550
+ dnl Really add $additional_libdir to $LIBNAME.
551
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
552
+ fi
553
+ fi
554
+ haveit=
555
+ for x in $LDFLAGS $LTLIB[]NAME; do
556
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
557
+ if test "X$x" = "X-L$additional_libdir"; then
558
+ haveit=yes
559
+ break
560
+ fi
561
+ done
562
+ if test -z "$haveit"; then
563
+ if test -d "$additional_libdir"; then
564
+ dnl Really add $additional_libdir to $LTLIBNAME.
565
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
566
+ fi
567
+ fi
568
+ fi
569
+ fi
570
+ ;;
571
+ -R*)
572
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
573
+ if test "$enable_rpath" != no; then
574
+ dnl Potentially add DIR to rpathdirs.
575
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
576
+ haveit=
577
+ for x in $rpathdirs; do
578
+ if test "X$x" = "X$dir"; then
579
+ haveit=yes
580
+ break
581
+ fi
582
+ done
583
+ if test -z "$haveit"; then
584
+ rpathdirs="$rpathdirs $dir"
585
+ fi
586
+ dnl Potentially add DIR to ltrpathdirs.
587
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
588
+ haveit=
589
+ for x in $ltrpathdirs; do
590
+ if test "X$x" = "X$dir"; then
591
+ haveit=yes
592
+ break
593
+ fi
594
+ done
595
+ if test -z "$haveit"; then
596
+ ltrpathdirs="$ltrpathdirs $dir"
597
+ fi
598
+ fi
599
+ ;;
600
+ -l*)
601
+ dnl Handle this in the next round.
602
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
603
+ ;;
604
+ *.la)
605
+ dnl Handle this in the next round. Throw away the .la's
606
+ dnl directory; it is already contained in a preceding -L
607
+ dnl option.
608
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
609
+ ;;
610
+ *)
611
+ dnl Most likely an immediate library name.
612
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
613
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
614
+ ;;
615
+ esac
616
+ done
617
+ fi
618
+ else
619
+ dnl Didn't find the library; assume it is in the system directories
620
+ dnl known to the linker and runtime loader. (All the system
621
+ dnl directories known to the linker should also be known to the
622
+ dnl runtime loader, otherwise the system is severely misconfigured.)
623
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
624
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
625
+ fi
626
+ fi
627
+ fi
628
+ done
629
+ done
630
+ if test "X$rpathdirs" != "X"; then
631
+ if test -n "$acl_hardcode_libdir_separator"; then
632
+ dnl Weird platform: only the last -rpath option counts, the user must
633
+ dnl pass all path elements in one option. We can arrange that for a
634
+ dnl single library, but not when more than one $LIBNAMEs are used.
635
+ alldirs=
636
+ for found_dir in $rpathdirs; do
637
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
638
+ done
639
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
640
+ acl_save_libdir="$libdir"
641
+ libdir="$alldirs"
642
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
643
+ libdir="$acl_save_libdir"
644
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
645
+ else
646
+ dnl The -rpath options are cumulative.
647
+ for found_dir in $rpathdirs; do
648
+ acl_save_libdir="$libdir"
649
+ libdir="$found_dir"
650
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
651
+ libdir="$acl_save_libdir"
652
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
653
+ done
654
+ fi
655
+ fi
656
+ if test "X$ltrpathdirs" != "X"; then
657
+ dnl When using libtool, the option that works for both libraries and
658
+ dnl executables is -R. The -R options are cumulative.
659
+ for found_dir in $ltrpathdirs; do
660
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
661
+ done
662
+ fi
663
+ popdef([P_A_C_K])
664
+ popdef([PACKLIBS])
665
+ popdef([PACKUP])
666
+ popdef([PACK])
667
+ popdef([NAME])
668
+ ])
669
+
670
+ dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
671
+ dnl unless already present in VAR.
672
+ dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
673
+ dnl contains two or three consecutive elements that belong together.
674
+ AC_DEFUN([AC_LIB_APPENDTOVAR],
675
+ [
676
+ for element in [$2]; do
677
+ haveit=
678
+ for x in $[$1]; do
679
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
680
+ if test "X$x" = "X$element"; then
681
+ haveit=yes
682
+ break
683
+ fi
684
+ done
685
+ if test -z "$haveit"; then
686
+ [$1]="${[$1]}${[$1]:+ }$element"
687
+ fi
688
+ done
689
+ ])
690
+
691
+ dnl For those cases where a variable contains several -L and -l options
692
+ dnl referring to unknown libraries and directories, this macro determines the
693
+ dnl necessary additional linker options for the runtime path.
694
+ dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
695
+ dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
696
+ dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
697
+ dnl otherwise linking without libtool is assumed.
698
+ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
699
+ [
700
+ AC_REQUIRE([AC_LIB_RPATH])
701
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
702
+ $1=
703
+ if test "$enable_rpath" != no; then
704
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
705
+ dnl Use an explicit option to hardcode directories into the resulting
706
+ dnl binary.
707
+ rpathdirs=
708
+ next=
709
+ for opt in $2; do
710
+ if test -n "$next"; then
711
+ dir="$next"
712
+ dnl No need to hardcode the standard /usr/lib.
713
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
714
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
715
+ rpathdirs="$rpathdirs $dir"
716
+ fi
717
+ next=
718
+ else
719
+ case $opt in
720
+ -L) next=yes ;;
721
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
722
+ dnl No need to hardcode the standard /usr/lib.
723
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
724
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
725
+ rpathdirs="$rpathdirs $dir"
726
+ fi
727
+ next= ;;
728
+ *) next= ;;
729
+ esac
730
+ fi
731
+ done
732
+ if test "X$rpathdirs" != "X"; then
733
+ if test -n ""$3""; then
734
+ dnl libtool is used for linking. Use -R options.
735
+ for dir in $rpathdirs; do
736
+ $1="${$1}${$1:+ }-R$dir"
737
+ done
738
+ else
739
+ dnl The linker is used for linking directly.
740
+ if test -n "$acl_hardcode_libdir_separator"; then
741
+ dnl Weird platform: only the last -rpath option counts, the user
742
+ dnl must pass all path elements in one option.
743
+ alldirs=
744
+ for dir in $rpathdirs; do
745
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
746
+ done
747
+ acl_save_libdir="$libdir"
748
+ libdir="$alldirs"
749
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
750
+ libdir="$acl_save_libdir"
751
+ $1="$flag"
752
+ else
753
+ dnl The -rpath options are cumulative.
754
+ for dir in $rpathdirs; do
755
+ acl_save_libdir="$libdir"
756
+ libdir="$dir"
757
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
758
+ libdir="$acl_save_libdir"
759
+ $1="${$1}${$1:+ }$flag"
760
+ done
761
+ fi
762
+ fi
763
+ fi
764
+ fi
765
+ fi
766
+ AC_SUBST([$1])
767
+ ])