ffi 1.9.3-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ffi might be problematic. Click here for more details.

Files changed (436) hide show
  1. data/COPYING +49 -0
  2. data/LICENSE +24 -0
  3. data/README.md +109 -0
  4. data/Rakefile +220 -0
  5. data/ext/ffi_c/AbstractMemory.c +1032 -0
  6. data/ext/ffi_c/AbstractMemory.h +175 -0
  7. data/ext/ffi_c/ArrayType.c +162 -0
  8. data/ext/ffi_c/ArrayType.h +59 -0
  9. data/ext/ffi_c/Buffer.c +365 -0
  10. data/ext/ffi_c/Call.c +465 -0
  11. data/ext/ffi_c/Call.h +93 -0
  12. data/ext/ffi_c/ClosurePool.c +283 -0
  13. data/ext/ffi_c/ClosurePool.h +57 -0
  14. data/ext/ffi_c/DataConverter.c +91 -0
  15. data/ext/ffi_c/DynamicLibrary.c +333 -0
  16. data/ext/ffi_c/DynamicLibrary.h +49 -0
  17. data/ext/ffi_c/Function.c +999 -0
  18. data/ext/ffi_c/Function.h +87 -0
  19. data/ext/ffi_c/FunctionInfo.c +271 -0
  20. data/ext/ffi_c/LastError.c +184 -0
  21. data/ext/ffi_c/LastError.h +47 -0
  22. data/ext/ffi_c/LongDouble.c +63 -0
  23. data/ext/ffi_c/LongDouble.h +51 -0
  24. data/ext/ffi_c/MappedType.c +168 -0
  25. data/ext/ffi_c/MappedType.h +59 -0
  26. data/ext/ffi_c/MemoryPointer.c +197 -0
  27. data/ext/ffi_c/MemoryPointer.h +53 -0
  28. data/ext/ffi_c/MethodHandle.c +360 -0
  29. data/ext/ffi_c/MethodHandle.h +55 -0
  30. data/ext/ffi_c/Platform.c +121 -0
  31. data/ext/ffi_c/Platform.h +45 -0
  32. data/ext/ffi_c/Pointer.c +508 -0
  33. data/ext/ffi_c/Pointer.h +63 -0
  34. data/ext/ffi_c/Struct.c +828 -0
  35. data/ext/ffi_c/Struct.h +106 -0
  36. data/ext/ffi_c/StructByReference.c +190 -0
  37. data/ext/ffi_c/StructByReference.h +50 -0
  38. data/ext/ffi_c/StructByValue.c +150 -0
  39. data/ext/ffi_c/StructByValue.h +55 -0
  40. data/ext/ffi_c/StructLayout.c +698 -0
  41. data/ext/ffi_c/Thread.c +352 -0
  42. data/ext/ffi_c/Thread.h +95 -0
  43. data/ext/ffi_c/Type.c +397 -0
  44. data/ext/ffi_c/Type.h +62 -0
  45. data/ext/ffi_c/Types.c +139 -0
  46. data/ext/ffi_c/Types.h +89 -0
  47. data/ext/ffi_c/Variadic.c +276 -0
  48. data/ext/ffi_c/compat.h +83 -0
  49. data/ext/ffi_c/extconf.rb +64 -0
  50. data/ext/ffi_c/ffi.c +98 -0
  51. data/ext/ffi_c/libffi.bsd.mk +34 -0
  52. data/ext/ffi_c/libffi.darwin.mk +95 -0
  53. data/ext/ffi_c/libffi.gnu.mk +31 -0
  54. data/ext/ffi_c/libffi.mk +13 -0
  55. data/ext/ffi_c/libffi.vc.mk +26 -0
  56. data/ext/ffi_c/libffi.vc64.mk +26 -0
  57. data/ext/ffi_c/libffi/ChangeLog +4600 -0
  58. data/ext/ffi_c/libffi/ChangeLog.libffi +584 -0
  59. data/ext/ffi_c/libffi/ChangeLog.libgcj +40 -0
  60. data/ext/ffi_c/libffi/ChangeLog.v1 +764 -0
  61. data/ext/ffi_c/libffi/LICENSE +21 -0
  62. data/ext/ffi_c/libffi/Makefile.am +196 -0
  63. data/ext/ffi_c/libffi/Makefile.in +1820 -0
  64. data/ext/ffi_c/libffi/Makefile.vc +141 -0
  65. data/ext/ffi_c/libffi/Makefile.vc64 +141 -0
  66. data/ext/ffi_c/libffi/README +342 -0
  67. data/ext/ffi_c/libffi/acinclude.m4 +92 -0
  68. data/ext/ffi_c/libffi/aclocal.m4 +1873 -0
  69. data/ext/ffi_c/libffi/build-ios.sh +67 -0
  70. data/ext/ffi_c/libffi/compile +143 -0
  71. data/ext/ffi_c/libffi/config.guess +1501 -0
  72. data/ext/ffi_c/libffi/config.sub +1705 -0
  73. data/ext/ffi_c/libffi/configure +17191 -0
  74. data/ext/ffi_c/libffi/configure.ac +496 -0
  75. data/ext/ffi_c/libffi/configure.host +11 -0
  76. data/ext/ffi_c/libffi/depcomp +630 -0
  77. data/ext/ffi_c/libffi/doc/libffi.info +593 -0
  78. data/ext/ffi_c/libffi/doc/libffi.texi +600 -0
  79. data/ext/ffi_c/libffi/doc/stamp-vti +4 -0
  80. data/ext/ffi_c/libffi/doc/version.texi +4 -0
  81. data/ext/ffi_c/libffi/fficonfig.h.in +199 -0
  82. data/ext/ffi_c/libffi/fficonfig.hw +57 -0
  83. data/ext/ffi_c/libffi/include/Makefile.am +9 -0
  84. data/ext/ffi_c/libffi/include/Makefile.in +487 -0
  85. data/ext/ffi_c/libffi/include/ffi.h.in +427 -0
  86. data/ext/ffi_c/libffi/include/ffi.h.vc +427 -0
  87. data/ext/ffi_c/libffi/include/ffi.h.vc64 +427 -0
  88. data/ext/ffi_c/libffi/include/ffi_common.h +126 -0
  89. data/ext/ffi_c/libffi/install-sh +520 -0
  90. data/ext/ffi_c/libffi/libffi.pc.in +10 -0
  91. data/ext/ffi_c/libffi/libtool-version +29 -0
  92. data/ext/ffi_c/libffi/ltmain.sh +9636 -0
  93. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +176 -0
  94. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +195 -0
  95. data/ext/ffi_c/libffi/m4/ax_check_compiler_flags.m4 +76 -0
  96. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +63 -0
  97. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +70 -0
  98. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +300 -0
  99. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +215 -0
  100. data/ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4 +79 -0
  101. data/ext/ffi_c/libffi/m4/libtool.m4 +7831 -0
  102. data/ext/ffi_c/libffi/m4/ltoptions.m4 +369 -0
  103. data/ext/ffi_c/libffi/m4/ltsugar.m4 +123 -0
  104. data/ext/ffi_c/libffi/m4/ltversion.m4 +23 -0
  105. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +98 -0
  106. data/ext/ffi_c/libffi/man/Makefile.am +8 -0
  107. data/ext/ffi_c/libffi/man/Makefile.in +466 -0
  108. data/ext/ffi_c/libffi/man/ffi.3 +31 -0
  109. data/ext/ffi_c/libffi/man/ffi_call.3 +103 -0
  110. data/ext/ffi_c/libffi/man/ffi_prep_cif.3 +66 -0
  111. data/ext/ffi_c/libffi/mdate-sh +201 -0
  112. data/ext/ffi_c/libffi/missing +376 -0
  113. data/ext/ffi_c/libffi/msvcc.sh +197 -0
  114. data/ext/ffi_c/libffi/src/alpha/ffi.c +284 -0
  115. data/ext/ffi_c/libffi/src/alpha/ffitarget.h +48 -0
  116. data/ext/ffi_c/libffi/src/alpha/osf.S +387 -0
  117. data/ext/ffi_c/libffi/src/arm/ffi.c +728 -0
  118. data/ext/ffi_c/libffi/src/arm/ffitarget.h +65 -0
  119. data/ext/ffi_c/libffi/src/arm/gentramp.sh +118 -0
  120. data/ext/ffi_c/libffi/src/arm/sysv.S +497 -0
  121. data/ext/ffi_c/libffi/src/arm/trampoline.S +4450 -0
  122. data/ext/ffi_c/libffi/src/avr32/ffi.c +423 -0
  123. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +50 -0
  124. data/ext/ffi_c/libffi/src/avr32/sysv.S +208 -0
  125. data/ext/ffi_c/libffi/src/closures.c +615 -0
  126. data/ext/ffi_c/libffi/src/cris/ffi.c +383 -0
  127. data/ext/ffi_c/libffi/src/cris/ffitarget.h +51 -0
  128. data/ext/ffi_c/libffi/src/cris/sysv.S +215 -0
  129. data/ext/ffi_c/libffi/src/debug.c +59 -0
  130. data/ext/ffi_c/libffi/src/dlmalloc.c +5161 -0
  131. data/ext/ffi_c/libffi/src/frv/eabi.S +128 -0
  132. data/ext/ffi_c/libffi/src/frv/ffi.c +292 -0
  133. data/ext/ffi_c/libffi/src/frv/ffitarget.h +57 -0
  134. data/ext/ffi_c/libffi/src/ia64/ffi.c +582 -0
  135. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +50 -0
  136. data/ext/ffi_c/libffi/src/ia64/ia64_flags.h +40 -0
  137. data/ext/ffi_c/libffi/src/ia64/unix.S +560 -0
  138. data/ext/ffi_c/libffi/src/java_raw_api.c +356 -0
  139. data/ext/ffi_c/libffi/src/m32r/ffi.c +232 -0
  140. data/ext/ffi_c/libffi/src/m32r/ffitarget.h +48 -0
  141. data/ext/ffi_c/libffi/src/m32r/sysv.S +121 -0
  142. data/ext/ffi_c/libffi/src/m68k/ffi.c +288 -0
  143. data/ext/ffi_c/libffi/src/m68k/ffitarget.h +49 -0
  144. data/ext/ffi_c/libffi/src/m68k/sysv.S +270 -0
  145. data/ext/ffi_c/libffi/src/mips/ffi.c +1036 -0
  146. data/ext/ffi_c/libffi/src/mips/ffitarget.h +242 -0
  147. data/ext/ffi_c/libffi/src/mips/n32.S +591 -0
  148. data/ext/ffi_c/libffi/src/mips/o32.S +381 -0
  149. data/ext/ffi_c/libffi/src/moxie/eabi.S +128 -0
  150. data/ext/ffi_c/libffi/src/moxie/ffi.c +276 -0
  151. data/ext/ffi_c/libffi/src/pa/ffi.c +719 -0
  152. data/ext/ffi_c/libffi/src/pa/ffitarget.h +78 -0
  153. data/ext/ffi_c/libffi/src/pa/hpux32.S +368 -0
  154. data/ext/ffi_c/libffi/src/pa/linux.S +357 -0
  155. data/ext/ffi_c/libffi/src/powerpc/aix.S +328 -0
  156. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +445 -0
  157. data/ext/ffi_c/libffi/src/powerpc/asm.h +125 -0
  158. data/ext/ffi_c/libffi/src/powerpc/darwin.S +383 -0
  159. data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +575 -0
  160. data/ext/ffi_c/libffi/src/powerpc/ffi.c +1448 -0
  161. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +1359 -0
  162. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +139 -0
  163. data/ext/ffi_c/libffi/src/powerpc/linux64.S +187 -0
  164. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +236 -0
  165. data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +327 -0
  166. data/ext/ffi_c/libffi/src/powerpc/sysv.S +219 -0
  167. data/ext/ffi_c/libffi/src/prep_cif.c +177 -0
  168. data/ext/ffi_c/libffi/src/raw_api.c +254 -0
  169. data/ext/ffi_c/libffi/src/s390/ffi.c +780 -0
  170. data/ext/ffi_c/libffi/src/s390/ffitarget.h +62 -0
  171. data/ext/ffi_c/libffi/src/s390/sysv.S +434 -0
  172. data/ext/ffi_c/libffi/src/sh/ffi.c +716 -0
  173. data/ext/ffi_c/libffi/src/sh/ffitarget.h +49 -0
  174. data/ext/ffi_c/libffi/src/sh/sysv.S +850 -0
  175. data/ext/ffi_c/libffi/src/sh64/ffi.c +468 -0
  176. data/ext/ffi_c/libffi/src/sh64/ffitarget.h +53 -0
  177. data/ext/ffi_c/libffi/src/sh64/sysv.S +539 -0
  178. data/ext/ffi_c/libffi/src/sparc/ffi.c +669 -0
  179. data/ext/ffi_c/libffi/src/sparc/ffitarget.h +68 -0
  180. data/ext/ffi_c/libffi/src/sparc/v8.S +313 -0
  181. data/ext/ffi_c/libffi/src/sparc/v9.S +307 -0
  182. data/ext/ffi_c/libffi/src/types.c +77 -0
  183. data/ext/ffi_c/libffi/src/x86/darwin.S +444 -0
  184. data/ext/ffi_c/libffi/src/x86/darwin64.S +416 -0
  185. data/ext/ffi_c/libffi/src/x86/ffi.c +644 -0
  186. data/ext/ffi_c/libffi/src/x86/ffi64.c +635 -0
  187. data/ext/ffi_c/libffi/src/x86/ffitarget.h +121 -0
  188. data/ext/ffi_c/libffi/src/x86/freebsd.S +458 -0
  189. data/ext/ffi_c/libffi/src/x86/sysv.S +468 -0
  190. data/ext/ffi_c/libffi/src/x86/unix64.S +426 -0
  191. data/ext/ffi_c/libffi/src/x86/win32.S +1065 -0
  192. data/ext/ffi_c/libffi/src/x86/win64.S +468 -0
  193. data/ext/ffi_c/libffi/testsuite/Makefile.am +80 -0
  194. data/ext/ffi_c/libffi/testsuite/Makefile.in +500 -0
  195. data/ext/ffi_c/libffi/testsuite/config/default.exp +1 -0
  196. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +300 -0
  197. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +350 -0
  198. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +263 -0
  199. data/ext/ffi_c/libffi/testsuite/lib/wrapper.exp +45 -0
  200. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +32 -0
  201. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn0.c +89 -0
  202. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn1.c +81 -0
  203. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn2.c +81 -0
  204. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn3.c +82 -0
  205. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn4.c +89 -0
  206. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn5.c +92 -0
  207. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_fn6.c +90 -0
  208. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_loc_fn0.c +95 -0
  209. data/ext/ffi_c/libffi/testsuite/libffi.call/closure_stdcall.c +64 -0
  210. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +94 -0
  211. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +95 -0
  212. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +96 -0
  213. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +102 -0
  214. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +89 -0
  215. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +91 -0
  216. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +93 -0
  217. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +113 -0
  218. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +90 -0
  219. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +95 -0
  220. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +90 -0
  221. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +90 -0
  222. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +98 -0
  223. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +90 -0
  224. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +109 -0
  225. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +98 -0
  226. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +124 -0
  227. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +113 -0
  228. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +99 -0
  229. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +117 -0
  230. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +97 -0
  231. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +88 -0
  232. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +90 -0
  233. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +91 -0
  234. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +93 -0
  235. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +91 -0
  236. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +92 -0
  237. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +134 -0
  238. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +117 -0
  239. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +95 -0
  240. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +91 -0
  241. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +91 -0
  242. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +92 -0
  243. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +91 -0
  244. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +91 -0
  245. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +93 -0
  246. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c +66 -0
  247. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double.c +43 -0
  248. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +60 -0
  249. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_float.c +42 -0
  250. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +105 -0
  251. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +60 -0
  252. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_schar.c +74 -0
  253. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshort.c +74 -0
  254. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_sshortchar.c +86 -0
  255. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_uchar.c +91 -0
  256. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushort.c +74 -0
  257. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_multi_ushortchar.c +86 -0
  258. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +74 -0
  259. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +140 -0
  260. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_schar.c +44 -0
  261. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_sint.c +42 -0
  262. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_sshort.c +42 -0
  263. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar.c +42 -0
  264. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint.c +43 -0
  265. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +47 -0
  266. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort.c +43 -0
  267. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_abi.c +36 -0
  268. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +26 -0
  269. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +153 -0
  270. data/ext/ffi_c/libffi/testsuite/libffi.call/float.c +59 -0
  271. data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +58 -0
  272. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +58 -0
  273. data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +72 -0
  274. data/ext/ffi_c/libffi/testsuite/libffi.call/float4.c +62 -0
  275. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +342 -0
  276. data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +69 -0
  277. data/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +63 -0
  278. data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +53 -0
  279. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +152 -0
  280. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +161 -0
  281. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +133 -0
  282. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +110 -0
  283. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +111 -0
  284. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +111 -0
  285. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +112 -0
  286. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +131 -0
  287. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +111 -0
  288. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +131 -0
  289. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +131 -0
  290. data/ext/ffi_c/libffi/testsuite/libffi.call/problem1.c +90 -0
  291. data/ext/ffi_c/libffi/testsuite/libffi.call/promotion.c +59 -0
  292. data/ext/ffi_c/libffi/testsuite/libffi.call/pyobjc-tc.c +114 -0
  293. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +35 -0
  294. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl1.c +43 -0
  295. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl2.c +42 -0
  296. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl.c +35 -0
  297. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl1.c +36 -0
  298. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl2.c +49 -0
  299. data/ext/ffi_c/libffi/testsuite/libffi.call/return_fl3.c +42 -0
  300. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +34 -0
  301. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll.c +41 -0
  302. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +43 -0
  303. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +36 -0
  304. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +38 -0
  305. data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +38 -0
  306. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +38 -0
  307. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c +145 -0
  308. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c +148 -0
  309. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c +124 -0
  310. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +125 -0
  311. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +44 -0
  312. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +44 -0
  313. data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +65 -0
  314. data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +67 -0
  315. data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +59 -0
  316. data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +63 -0
  317. data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +65 -0
  318. data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +64 -0
  319. data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +74 -0
  320. data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +80 -0
  321. data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +67 -0
  322. data/ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c +70 -0
  323. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +96 -0
  324. data/ext/ffi_c/libffi/testsuite/libffi.special/special.exp +35 -0
  325. data/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest.cc +124 -0
  326. data/ext/ffi_c/libffi/testsuite/libffi.special/unwindtest_ffi_call.cc +53 -0
  327. data/ext/ffi_c/libffi/texinfo.tex +7210 -0
  328. data/ext/ffi_c/rbffi.h +57 -0
  329. data/ext/ffi_c/rbffi_endian.h +59 -0
  330. data/ext/ffi_c/win32/stdbool.h +8 -0
  331. data/ext/ffi_c/win32/stdint.h +201 -0
  332. data/ffi.gemspec +22 -0
  333. data/gen/Rakefile +30 -0
  334. data/lib/ffi.rb +28 -0
  335. data/lib/ffi/autopointer.rb +194 -0
  336. data/lib/ffi/buffer.rb +4 -0
  337. data/lib/ffi/callback.rb +4 -0
  338. data/lib/ffi/enum.rb +173 -0
  339. data/lib/ffi/errno.rb +43 -0
  340. data/lib/ffi/ffi.rb +44 -0
  341. data/lib/ffi/io.rb +62 -0
  342. data/lib/ffi/library.rb +499 -0
  343. data/lib/ffi/managedstruct.rb +84 -0
  344. data/lib/ffi/memorypointer.rb +1 -0
  345. data/lib/ffi/platform.rb +148 -0
  346. data/lib/ffi/platform/arm-linux/types.conf +104 -0
  347. data/lib/ffi/platform/i386-cygwin/types.conf +3 -0
  348. data/lib/ffi/platform/i386-darwin/types.conf +100 -0
  349. data/lib/ffi/platform/i386-freebsd/types.conf +152 -0
  350. data/lib/ffi/platform/i386-gnu/types.conf +107 -0
  351. data/lib/ffi/platform/i386-linux/types.conf +103 -0
  352. data/lib/ffi/platform/i386-netbsd/types.conf +126 -0
  353. data/lib/ffi/platform/i386-openbsd/types.conf +128 -0
  354. data/lib/ffi/platform/i386-solaris/types.conf +122 -0
  355. data/lib/ffi/platform/i386-windows/types.conf +105 -0
  356. data/lib/ffi/platform/ia64-linux/types.conf +104 -0
  357. data/lib/ffi/platform/mips-linux/types.conf +102 -0
  358. data/lib/ffi/platform/mipsel-linux/types.conf +102 -0
  359. data/lib/ffi/platform/powerpc-aix/types.conf +180 -0
  360. data/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
  361. data/lib/ffi/platform/powerpc-linux/types.conf +100 -0
  362. data/lib/ffi/platform/s390-linux/types.conf +102 -0
  363. data/lib/ffi/platform/s390x-linux/types.conf +102 -0
  364. data/lib/ffi/platform/sparc-linux/types.conf +102 -0
  365. data/lib/ffi/platform/sparc-solaris/types.conf +128 -0
  366. data/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
  367. data/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
  368. data/lib/ffi/platform/x86_64-darwin/types.conf +100 -0
  369. data/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
  370. data/lib/ffi/platform/x86_64-linux/types.conf +102 -0
  371. data/lib/ffi/platform/x86_64-netbsd/types.conf +126 -0
  372. data/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
  373. data/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
  374. data/lib/ffi/platform/x86_64-windows/types.conf +27 -0
  375. data/lib/ffi/pointer.rb +134 -0
  376. data/lib/ffi/struct.rb +367 -0
  377. data/lib/ffi/struct_layout_builder.rb +222 -0
  378. data/lib/ffi/tools/const_generator.rb +229 -0
  379. data/lib/ffi/tools/generator.rb +60 -0
  380. data/lib/ffi/tools/generator_task.rb +36 -0
  381. data/lib/ffi/tools/struct_generator.rb +194 -0
  382. data/lib/ffi/tools/types_generator.rb +135 -0
  383. data/lib/ffi/types.rb +190 -0
  384. data/lib/ffi/union.rb +43 -0
  385. data/lib/ffi/variadic.rb +78 -0
  386. data/lib/ffi/version.rb +4 -0
  387. data/lib/ffi_c.so +0 -0
  388. data/libtest/Benchmark.c +52 -0
  389. data/libtest/BoolTest.c +34 -0
  390. data/libtest/BufferTest.c +31 -0
  391. data/libtest/ClosureTest.c +190 -0
  392. data/libtest/EnumTest.c +34 -0
  393. data/libtest/FunctionTest.c +58 -0
  394. data/libtest/GNUmakefile +149 -0
  395. data/libtest/GlobalVariable.c +62 -0
  396. data/libtest/LastErrorTest.c +21 -0
  397. data/libtest/NumberTest.c +132 -0
  398. data/libtest/PointerTest.c +63 -0
  399. data/libtest/ReferenceTest.c +23 -0
  400. data/libtest/StringTest.c +34 -0
  401. data/libtest/StructTest.c +243 -0
  402. data/libtest/UnionTest.c +43 -0
  403. data/libtest/VariadicTest.c +62 -0
  404. data/spec/ffi/async_callback_spec.rb +35 -0
  405. data/spec/ffi/bool_spec.rb +29 -0
  406. data/spec/ffi/buffer_spec.rb +251 -0
  407. data/spec/ffi/callback_spec.rb +667 -0
  408. data/spec/ffi/custom_param_type.rb +36 -0
  409. data/spec/ffi/custom_type_spec.rb +74 -0
  410. data/spec/ffi/dup_spec.rb +54 -0
  411. data/spec/ffi/enum_spec.rb +220 -0
  412. data/spec/ffi/errno_spec.rb +18 -0
  413. data/spec/ffi/ffi_spec.rb +29 -0
  414. data/spec/ffi/function_spec.rb +76 -0
  415. data/spec/ffi/library_spec.rb +216 -0
  416. data/spec/ffi/long_double.rb +30 -0
  417. data/spec/ffi/managed_struct_spec.rb +57 -0
  418. data/spec/ffi/number_spec.rb +236 -0
  419. data/spec/ffi/pointer_spec.rb +265 -0
  420. data/spec/ffi/rbx/attach_function_spec.rb +28 -0
  421. data/spec/ffi/rbx/memory_pointer_spec.rb +123 -0
  422. data/spec/ffi/rbx/spec_helper.rb +1 -0
  423. data/spec/ffi/rbx/struct_spec.rb +13 -0
  424. data/spec/ffi/spec_helper.rb +33 -0
  425. data/spec/ffi/string_spec.rb +108 -0
  426. data/spec/ffi/strptr_spec.rb +50 -0
  427. data/spec/ffi/struct_by_ref_spec.rb +43 -0
  428. data/spec/ffi/struct_callback_spec.rb +69 -0
  429. data/spec/ffi/struct_initialize_spec.rb +35 -0
  430. data/spec/ffi/struct_packed_spec.rb +51 -0
  431. data/spec/ffi/struct_spec.rb +748 -0
  432. data/spec/ffi/typedef_spec.rb +78 -0
  433. data/spec/ffi/union_spec.rb +65 -0
  434. data/spec/ffi/variadic_spec.rb +92 -0
  435. data/spec/spec.opts +4 -0
  436. metadata +562 -0
@@ -0,0 +1,92 @@
1
+ # mmap(2) blacklisting. Some platforms provide the mmap library routine
2
+ # but don't support all of the features we need from it.
3
+ AC_DEFUN([AC_FUNC_MMAP_BLACKLIST],
4
+ [
5
+ AC_CHECK_HEADER([sys/mman.h],
6
+ [libffi_header_sys_mman_h=yes], [libffi_header_sys_mman_h=no])
7
+ AC_CHECK_FUNC([mmap], [libffi_func_mmap=yes], [libffi_func_mmap=no])
8
+ if test "$libffi_header_sys_mman_h" != yes \
9
+ || test "$libffi_func_mmap" != yes; then
10
+ ac_cv_func_mmap_file=no
11
+ ac_cv_func_mmap_dev_zero=no
12
+ ac_cv_func_mmap_anon=no
13
+ else
14
+ AC_CACHE_CHECK([whether read-only mmap of a plain file works],
15
+ ac_cv_func_mmap_file,
16
+ [# Add a system to this blacklist if
17
+ # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
18
+ # memory area containing the same data that you'd get if you applied
19
+ # read() to the same fd. The only system known to have a problem here
20
+ # is VMS, where text files have record structure.
21
+ case "$host_os" in
22
+ vms* | ultrix*)
23
+ ac_cv_func_mmap_file=no ;;
24
+ *)
25
+ ac_cv_func_mmap_file=yes;;
26
+ esac])
27
+ AC_CACHE_CHECK([whether mmap from /dev/zero works],
28
+ ac_cv_func_mmap_dev_zero,
29
+ [# Add a system to this blacklist if it has mmap() but /dev/zero
30
+ # does not exist, or if mmapping /dev/zero does not give anonymous
31
+ # zeroed pages with both the following properties:
32
+ # 1. If you map N consecutive pages in with one call, and then
33
+ # unmap any subset of those pages, the pages that were not
34
+ # explicitly unmapped remain accessible.
35
+ # 2. If you map two adjacent blocks of memory and then unmap them
36
+ # both at once, they must both go away.
37
+ # Systems known to be in this category are Windows (all variants),
38
+ # VMS, and Darwin.
39
+ case "$host_os" in
40
+ vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
41
+ ac_cv_func_mmap_dev_zero=no ;;
42
+ *)
43
+ ac_cv_func_mmap_dev_zero=yes;;
44
+ esac])
45
+
46
+ # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
47
+ AC_CACHE_CHECK([for MAP_ANON(YMOUS)], ac_cv_decl_map_anon,
48
+ [AC_TRY_COMPILE(
49
+ [#include <sys/types.h>
50
+ #include <sys/mman.h>
51
+ #include <unistd.h>
52
+
53
+ #ifndef MAP_ANONYMOUS
54
+ #define MAP_ANONYMOUS MAP_ANON
55
+ #endif
56
+ ],
57
+ [int n = MAP_ANONYMOUS;],
58
+ ac_cv_decl_map_anon=yes,
59
+ ac_cv_decl_map_anon=no)])
60
+
61
+ if test $ac_cv_decl_map_anon = no; then
62
+ ac_cv_func_mmap_anon=no
63
+ else
64
+ AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works],
65
+ ac_cv_func_mmap_anon,
66
+ [# Add a system to this blacklist if it has mmap() and MAP_ANON or
67
+ # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
68
+ # doesn't give anonymous zeroed pages with the same properties listed
69
+ # above for use of /dev/zero.
70
+ # Systems known to be in this category are Windows, VMS, and SCO Unix.
71
+ case "$host_os" in
72
+ vms* | cygwin* | pe | mingw* | sco* | udk* )
73
+ ac_cv_func_mmap_anon=no ;;
74
+ *)
75
+ ac_cv_func_mmap_anon=yes;;
76
+ esac])
77
+ fi
78
+ fi
79
+
80
+ if test $ac_cv_func_mmap_file = yes; then
81
+ AC_DEFINE(HAVE_MMAP_FILE, 1,
82
+ [Define if read-only mmap of a plain file works.])
83
+ fi
84
+ if test $ac_cv_func_mmap_dev_zero = yes; then
85
+ AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1,
86
+ [Define if mmap of /dev/zero works.])
87
+ fi
88
+ if test $ac_cv_func_mmap_anon = yes; then
89
+ AC_DEFINE(HAVE_MMAP_ANON, 1,
90
+ [Define if mmap with MAP_ANON(YMOUS) works.])
91
+ fi
92
+ ])
@@ -0,0 +1,1873 @@
1
+ # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
+
3
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
+ # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
+ # This file is free software; the Free Software Foundation
6
+ # gives unlimited permission to copy and/or distribute it,
7
+ # with or without modifications, as long as this notice is preserved.
8
+
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
+ # PARTICULAR PURPOSE.
13
+
14
+ m4_ifndef([AC_AUTOCONF_VERSION],
15
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
+ m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17
+ [m4_warning([this file was generated for autoconf 2.68.
18
+ You have another version of autoconf. It may work, but is not guaranteed to.
19
+ If you have problems, you may need to regenerate the build system entirely.
20
+ To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
+
22
+ # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
23
+ #
24
+ # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
25
+ # Written by Thomas Tanner, 1999
26
+ #
27
+ # This file is free software; the Free Software Foundation gives
28
+ # unlimited permission to copy and/or distribute it, with or without
29
+ # modifications, as long as this notice is preserved.
30
+
31
+ # serial 18 LTDL_INIT
32
+
33
+ # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
34
+ # ------------------------------------------
35
+ # DIRECTORY contains the libltdl sources. It is okay to call this
36
+ # function multiple times, as long as the same DIRECTORY is always given.
37
+ AC_DEFUN([LT_CONFIG_LTDL_DIR],
38
+ [AC_BEFORE([$0], [LTDL_INIT])
39
+ _$0($*)
40
+ ])# LT_CONFIG_LTDL_DIR
41
+
42
+ # We break this out into a separate macro, so that we can call it safely
43
+ # internally without being caught accidentally by the sed scan in libtoolize.
44
+ m4_defun([_LT_CONFIG_LTDL_DIR],
45
+ [dnl remove trailing slashes
46
+ m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
47
+ m4_case(_LTDL_DIR,
48
+ [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
49
+ m4_if(_ARG_DIR, [.],
50
+ [],
51
+ [m4_define([_LTDL_DIR], _ARG_DIR)
52
+ _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
53
+ [m4_if(_ARG_DIR, _LTDL_DIR,
54
+ [],
55
+ [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
56
+ m4_popdef([_ARG_DIR])
57
+ ])# _LT_CONFIG_LTDL_DIR
58
+
59
+ # Initialise:
60
+ m4_define([_LTDL_DIR], [])
61
+
62
+
63
+ # _LT_BUILD_PREFIX
64
+ # ----------------
65
+ # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
66
+ # to `${top_builddir}/'.
67
+ m4_define([_LT_BUILD_PREFIX],
68
+ [m4_ifdef([AC_AUTOCONF_VERSION],
69
+ [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
70
+ [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
71
+ [${top_build_prefix}],
72
+ [${top_builddir}/])],
73
+ [${top_build_prefix}])],
74
+ [${top_builddir}/])[]dnl
75
+ ])
76
+
77
+
78
+ # LTDL_CONVENIENCE
79
+ # ----------------
80
+ # sets LIBLTDL to the link flags for the libltdl convenience library and
81
+ # LTDLINCL to the include flags for the libltdl header and adds
82
+ # --enable-ltdl-convenience to the configure arguments. Note that
83
+ # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
84
+ # '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
85
+ # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
86
+ # quotes!). If your package is not flat and you're not using automake,
87
+ # define top_build_prefix, top_builddir, and top_srcdir appropriately
88
+ # in your Makefiles.
89
+ AC_DEFUN([LTDL_CONVENIENCE],
90
+ [AC_BEFORE([$0], [LTDL_INIT])dnl
91
+ dnl Although the argument is deprecated and no longer documented,
92
+ dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
93
+ dnl here make sure it is the same as any other declaration of libltdl's
94
+ dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
95
+ dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
96
+ m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
97
+ _$0()
98
+ ])# LTDL_CONVENIENCE
99
+
100
+ # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
101
+ # now we have LT_CONFIG_LTDL_DIR:
102
+ AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
103
+ [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
104
+ _LTDL_CONVENIENCE])
105
+
106
+ dnl aclocal-1.4 backwards compatibility:
107
+ dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
108
+
109
+
110
+ # _LTDL_CONVENIENCE
111
+ # -----------------
112
+ # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
113
+ m4_defun([_LTDL_CONVENIENCE],
114
+ [case $enable_ltdl_convenience in
115
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
116
+ "") enable_ltdl_convenience=yes
117
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
118
+ esac
119
+ LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
120
+ LTDLDEPS=$LIBLTDL
121
+ LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
122
+
123
+ AC_SUBST([LIBLTDL])
124
+ AC_SUBST([LTDLDEPS])
125
+ AC_SUBST([LTDLINCL])
126
+
127
+ # For backwards non-gettext consistent compatibility...
128
+ INCLTDL="$LTDLINCL"
129
+ AC_SUBST([INCLTDL])
130
+ ])# _LTDL_CONVENIENCE
131
+
132
+
133
+ # LTDL_INSTALLABLE
134
+ # ----------------
135
+ # sets LIBLTDL to the link flags for the libltdl installable library
136
+ # and LTDLINCL to the include flags for the libltdl header and adds
137
+ # --enable-ltdl-install to the configure arguments. Note that
138
+ # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
139
+ # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
140
+ # available, otherwise with '${top_builddir}/', and LTDLINCL will be
141
+ # prefixed with '${top_srcdir}/' (note the single quotes!). If your
142
+ # package is not flat and you're not using automake, define top_build_prefix,
143
+ # top_builddir, and top_srcdir appropriately in your Makefiles.
144
+ # In the future, this macro may have to be called after LT_INIT.
145
+ AC_DEFUN([LTDL_INSTALLABLE],
146
+ [AC_BEFORE([$0], [LTDL_INIT])dnl
147
+ dnl Although the argument is deprecated and no longer documented,
148
+ dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
149
+ dnl here make sure it is the same as any other declaration of libltdl's
150
+ dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
151
+ dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
152
+ m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
153
+ _$0()
154
+ ])# LTDL_INSTALLABLE
155
+
156
+ # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
157
+ # now we have LT_CONFIG_LTDL_DIR:
158
+ AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
159
+ [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
160
+ _LTDL_INSTALLABLE])
161
+
162
+ dnl aclocal-1.4 backwards compatibility:
163
+ dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
164
+
165
+
166
+ # _LTDL_INSTALLABLE
167
+ # -----------------
168
+ # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
169
+ m4_defun([_LTDL_INSTALLABLE],
170
+ [if test -f $prefix/lib/libltdl.la; then
171
+ lt_save_LDFLAGS="$LDFLAGS"
172
+ LDFLAGS="-L$prefix/lib $LDFLAGS"
173
+ AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
174
+ LDFLAGS="$lt_save_LDFLAGS"
175
+ if test x"${lt_lib_ltdl-no}" = xyes; then
176
+ if test x"$enable_ltdl_install" != xyes; then
177
+ # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
178
+ AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
179
+ enable_ltdl_install=no
180
+ fi
181
+ elif test x"$enable_ltdl_install" = xno; then
182
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
183
+ fi
184
+ fi
185
+
186
+ # If configure.ac declared an installable ltdl, and the user didn't override
187
+ # with --disable-ltdl-install, we will install the shipped libltdl.
188
+ case $enable_ltdl_install in
189
+ no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
190
+ LIBLTDL="-lltdl"
191
+ LTDLDEPS=
192
+ LTDLINCL=
193
+ ;;
194
+ *) enable_ltdl_install=yes
195
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
196
+ LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
197
+ LTDLDEPS=$LIBLTDL
198
+ LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
199
+ ;;
200
+ esac
201
+
202
+ AC_SUBST([LIBLTDL])
203
+ AC_SUBST([LTDLDEPS])
204
+ AC_SUBST([LTDLINCL])
205
+
206
+ # For backwards non-gettext consistent compatibility...
207
+ INCLTDL="$LTDLINCL"
208
+ AC_SUBST([INCLTDL])
209
+ ])# LTDL_INSTALLABLE
210
+
211
+
212
+ # _LTDL_MODE_DISPATCH
213
+ # -------------------
214
+ m4_define([_LTDL_MODE_DISPATCH],
215
+ [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
216
+ m4_if(_LTDL_DIR, [],
217
+ [],
218
+ dnl if _LTDL_MODE was not set already, the default value is `subproject':
219
+ [m4_case(m4_default(_LTDL_MODE, [subproject]),
220
+ [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
221
+ _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
222
+ [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
223
+ [recursive], [],
224
+ [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
225
+ dnl Be careful not to expand twice:
226
+ m4_define([$0], [])
227
+ ])# _LTDL_MODE_DISPATCH
228
+
229
+
230
+ # _LT_LIBOBJ(MODULE_NAME)
231
+ # -----------------------
232
+ # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
233
+ # of into LIBOBJS.
234
+ AC_DEFUN([_LT_LIBOBJ], [
235
+ m4_pattern_allow([^_LT_LIBOBJS$])
236
+ _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
237
+ ])# _LT_LIBOBJS
238
+
239
+
240
+ # LTDL_INIT([OPTIONS])
241
+ # --------------------
242
+ # Clients of libltdl can use this macro to allow the installer to
243
+ # choose between a shipped copy of the ltdl sources or a preinstalled
244
+ # version of the library. If the shipped ltdl sources are not in a
245
+ # subdirectory named libltdl, the directory name must be given by
246
+ # LT_CONFIG_LTDL_DIR.
247
+ AC_DEFUN([LTDL_INIT],
248
+ [dnl Parse OPTIONS
249
+ _LT_SET_OPTIONS([$0], [$1])
250
+
251
+ dnl We need to keep our own list of libobjs separate from our parent project,
252
+ dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
253
+ dnl we look for our own LIBOBJs.
254
+ m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
255
+ m4_pushdef([AC_LIBSOURCES])
256
+
257
+ dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
258
+ m4_if(_LTDL_MODE, [],
259
+ [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
260
+ m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
261
+ [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
262
+
263
+ AC_ARG_WITH([included_ltdl],
264
+ [AS_HELP_STRING([--with-included-ltdl],
265
+ [use the GNU ltdl sources included here])])
266
+
267
+ if test "x$with_included_ltdl" != xyes; then
268
+ # We are not being forced to use the included libltdl sources, so
269
+ # decide whether there is a useful installed version we can use.
270
+ AC_CHECK_HEADER([ltdl.h],
271
+ [AC_CHECK_DECL([lt_dlinterface_register],
272
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
273
+ [with_included_ltdl=no],
274
+ [with_included_ltdl=yes])],
275
+ [with_included_ltdl=yes],
276
+ [AC_INCLUDES_DEFAULT
277
+ #include <ltdl.h>])],
278
+ [with_included_ltdl=yes],
279
+ [AC_INCLUDES_DEFAULT]
280
+ )
281
+ fi
282
+
283
+ dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
284
+ dnl was called yet, then for old times' sake, we assume libltdl is in an
285
+ dnl eponymous directory:
286
+ AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
287
+
288
+ AC_ARG_WITH([ltdl_include],
289
+ [AS_HELP_STRING([--with-ltdl-include=DIR],
290
+ [use the ltdl headers installed in DIR])])
291
+
292
+ if test -n "$with_ltdl_include"; then
293
+ if test -f "$with_ltdl_include/ltdl.h"; then :
294
+ else
295
+ AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
296
+ fi
297
+ else
298
+ with_ltdl_include=no
299
+ fi
300
+
301
+ AC_ARG_WITH([ltdl_lib],
302
+ [AS_HELP_STRING([--with-ltdl-lib=DIR],
303
+ [use the libltdl.la installed in DIR])])
304
+
305
+ if test -n "$with_ltdl_lib"; then
306
+ if test -f "$with_ltdl_lib/libltdl.la"; then :
307
+ else
308
+ AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
309
+ fi
310
+ else
311
+ with_ltdl_lib=no
312
+ fi
313
+
314
+ case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
315
+ ,yes,no,no,)
316
+ m4_case(m4_default(_LTDL_TYPE, [convenience]),
317
+ [convenience], [_LTDL_CONVENIENCE],
318
+ [installable], [_LTDL_INSTALLABLE],
319
+ [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
320
+ ;;
321
+ ,no,no,no,)
322
+ # If the included ltdl is not to be used, then use the
323
+ # preinstalled libltdl we found.
324
+ AC_DEFINE([HAVE_LTDL], [1],
325
+ [Define this if a modern libltdl is already installed])
326
+ LIBLTDL=-lltdl
327
+ LTDLDEPS=
328
+ LTDLINCL=
329
+ ;;
330
+ ,no*,no,*)
331
+ AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
332
+ ;;
333
+ *) with_included_ltdl=no
334
+ LIBLTDL="-L$with_ltdl_lib -lltdl"
335
+ LTDLDEPS=
336
+ LTDLINCL="-I$with_ltdl_include"
337
+ ;;
338
+ esac
339
+ INCLTDL="$LTDLINCL"
340
+
341
+ # Report our decision...
342
+ AC_MSG_CHECKING([where to find libltdl headers])
343
+ AC_MSG_RESULT([$LTDLINCL])
344
+ AC_MSG_CHECKING([where to find libltdl library])
345
+ AC_MSG_RESULT([$LIBLTDL])
346
+
347
+ _LTDL_SETUP
348
+
349
+ dnl restore autoconf definition.
350
+ m4_popdef([AC_LIBOBJ])
351
+ m4_popdef([AC_LIBSOURCES])
352
+
353
+ AC_CONFIG_COMMANDS_PRE([
354
+ _ltdl_libobjs=
355
+ _ltdl_ltlibobjs=
356
+ if test -n "$_LT_LIBOBJS"; then
357
+ # Remove the extension.
358
+ _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
359
+ for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
360
+ _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
361
+ _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
362
+ done
363
+ fi
364
+ AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
365
+ AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
366
+ ])
367
+
368
+ # Only expand once:
369
+ m4_define([LTDL_INIT])
370
+ ])# LTDL_INIT
371
+
372
+ # Old names:
373
+ AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
374
+ AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
375
+ AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
376
+ dnl aclocal-1.4 backwards compatibility:
377
+ dnl AC_DEFUN([AC_LIB_LTDL], [])
378
+ dnl AC_DEFUN([AC_WITH_LTDL], [])
379
+ dnl AC_DEFUN([LT_WITH_LTDL], [])
380
+
381
+
382
+ # _LTDL_SETUP
383
+ # -----------
384
+ # Perform all the checks necessary for compilation of the ltdl objects
385
+ # -- including compiler checks and header checks. This is a public
386
+ # interface mainly for the benefit of libltdl's own configure.ac, most
387
+ # other users should call LTDL_INIT instead.
388
+ AC_DEFUN([_LTDL_SETUP],
389
+ [AC_REQUIRE([AC_PROG_CC])dnl
390
+ AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
391
+ AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
392
+ AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
393
+ AC_REQUIRE([LT_LIB_DLLOAD])dnl
394
+ AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
395
+ AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
396
+ AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
397
+ AC_REQUIRE([gl_FUNC_ARGZ])dnl
398
+
399
+ m4_require([_LT_CHECK_OBJDIR])dnl
400
+ m4_require([_LT_HEADER_DLFCN])dnl
401
+ m4_require([_LT_CHECK_DLPREOPEN])dnl
402
+ m4_require([_LT_DECL_SED])dnl
403
+
404
+ dnl Don't require this, or it will be expanded earlier than the code
405
+ dnl that sets the variables it relies on:
406
+ _LT_ENABLE_INSTALL
407
+
408
+ dnl _LTDL_MODE specific code must be called at least once:
409
+ _LTDL_MODE_DISPATCH
410
+
411
+ # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
412
+ # the user used. This is so that ltdl.h can pick up the parent projects
413
+ # config.h file, The first file in AC_CONFIG_HEADERS must contain the
414
+ # definitions required by ltdl.c.
415
+ # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
416
+ AC_CONFIG_COMMANDS_PRE([dnl
417
+ m4_pattern_allow([^LT_CONFIG_H$])dnl
418
+ m4_ifset([AH_HEADER],
419
+ [LT_CONFIG_H=AH_HEADER],
420
+ [m4_ifset([AC_LIST_HEADERS],
421
+ [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
422
+ [])])])
423
+ AC_SUBST([LT_CONFIG_H])
424
+
425
+ AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
426
+ [], [], [AC_INCLUDES_DEFAULT])
427
+
428
+ AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
429
+ AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
430
+
431
+ m4_pattern_allow([LT_LIBEXT])dnl
432
+ AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
433
+
434
+ name=
435
+ eval "lt_libprefix=\"$libname_spec\""
436
+ m4_pattern_allow([LT_LIBPREFIX])dnl
437
+ AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
438
+
439
+ name=ltdl
440
+ eval "LTDLOPEN=\"$libname_spec\""
441
+ AC_SUBST([LTDLOPEN])
442
+ ])# _LTDL_SETUP
443
+
444
+
445
+ # _LT_ENABLE_INSTALL
446
+ # ------------------
447
+ m4_define([_LT_ENABLE_INSTALL],
448
+ [AC_ARG_ENABLE([ltdl-install],
449
+ [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
450
+
451
+ case ,${enable_ltdl_install},${enable_ltdl_convenience} in
452
+ *yes*) ;;
453
+ *) enable_ltdl_convenience=yes ;;
454
+ esac
455
+
456
+ m4_ifdef([AM_CONDITIONAL],
457
+ [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
458
+ AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
459
+ ])# _LT_ENABLE_INSTALL
460
+
461
+
462
+ # LT_SYS_DLOPEN_DEPLIBS
463
+ # ---------------------
464
+ AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
465
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
466
+ AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
467
+ [lt_cv_sys_dlopen_deplibs],
468
+ [# PORTME does your system automatically load deplibs for dlopen?
469
+ # or its logical equivalent (e.g. shl_load for HP-UX < 11)
470
+ # For now, we just catch OSes we know something about -- in the
471
+ # future, we'll try test this programmatically.
472
+ lt_cv_sys_dlopen_deplibs=unknown
473
+ case $host_os in
474
+ aix3*|aix4.1.*|aix4.2.*)
475
+ # Unknown whether this is true for these versions of AIX, but
476
+ # we want this `case' here to explicitly catch those versions.
477
+ lt_cv_sys_dlopen_deplibs=unknown
478
+ ;;
479
+ aix[[4-9]]*)
480
+ lt_cv_sys_dlopen_deplibs=yes
481
+ ;;
482
+ amigaos*)
483
+ case $host_cpu in
484
+ powerpc)
485
+ lt_cv_sys_dlopen_deplibs=no
486
+ ;;
487
+ esac
488
+ ;;
489
+ darwin*)
490
+ # Assuming the user has installed a libdl from somewhere, this is true
491
+ # If you are looking for one http://www.opendarwin.org/projects/dlcompat
492
+ lt_cv_sys_dlopen_deplibs=yes
493
+ ;;
494
+ freebsd* | dragonfly*)
495
+ lt_cv_sys_dlopen_deplibs=yes
496
+ ;;
497
+ gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
498
+ # GNU and its variants, using gnu ld.so (Glibc)
499
+ lt_cv_sys_dlopen_deplibs=yes
500
+ ;;
501
+ hpux10*|hpux11*)
502
+ lt_cv_sys_dlopen_deplibs=yes
503
+ ;;
504
+ interix*)
505
+ lt_cv_sys_dlopen_deplibs=yes
506
+ ;;
507
+ irix[[12345]]*|irix6.[[01]]*)
508
+ # Catch all versions of IRIX before 6.2, and indicate that we don't
509
+ # know how it worked for any of those versions.
510
+ lt_cv_sys_dlopen_deplibs=unknown
511
+ ;;
512
+ irix*)
513
+ # The case above catches anything before 6.2, and it's known that
514
+ # at 6.2 and later dlopen does load deplibs.
515
+ lt_cv_sys_dlopen_deplibs=yes
516
+ ;;
517
+ netbsd*)
518
+ lt_cv_sys_dlopen_deplibs=yes
519
+ ;;
520
+ openbsd*)
521
+ lt_cv_sys_dlopen_deplibs=yes
522
+ ;;
523
+ osf[[1234]]*)
524
+ # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
525
+ # it did *not* use an RPATH in a shared library to find objects the
526
+ # library depends on, so we explicitly say `no'.
527
+ lt_cv_sys_dlopen_deplibs=no
528
+ ;;
529
+ osf5.0|osf5.0a|osf5.1)
530
+ # dlopen *does* load deplibs and with the right loader patch applied
531
+ # it even uses RPATH in a shared library to search for shared objects
532
+ # that the library depends on, but there's no easy way to know if that
533
+ # patch is installed. Since this is the case, all we can really
534
+ # say is unknown -- it depends on the patch being installed. If
535
+ # it is, this changes to `yes'. Without it, it would be `no'.
536
+ lt_cv_sys_dlopen_deplibs=unknown
537
+ ;;
538
+ osf*)
539
+ # the two cases above should catch all versions of osf <= 5.1. Read
540
+ # the comments above for what we know about them.
541
+ # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
542
+ # is used to find them so we can finally say `yes'.
543
+ lt_cv_sys_dlopen_deplibs=yes
544
+ ;;
545
+ qnx*)
546
+ lt_cv_sys_dlopen_deplibs=yes
547
+ ;;
548
+ solaris*)
549
+ lt_cv_sys_dlopen_deplibs=yes
550
+ ;;
551
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
552
+ libltdl_cv_sys_dlopen_deplibs=yes
553
+ ;;
554
+ esac
555
+ ])
556
+ if test "$lt_cv_sys_dlopen_deplibs" != yes; then
557
+ AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
558
+ [Define if the OS needs help to load dependent libraries for dlopen().])
559
+ fi
560
+ ])# LT_SYS_DLOPEN_DEPLIBS
561
+
562
+ # Old name:
563
+ AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
564
+ dnl aclocal-1.4 backwards compatibility:
565
+ dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
566
+
567
+
568
+ # LT_SYS_MODULE_EXT
569
+ # -----------------
570
+ AC_DEFUN([LT_SYS_MODULE_EXT],
571
+ [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
572
+ AC_CACHE_CHECK([which extension is used for runtime loadable modules],
573
+ [libltdl_cv_shlibext],
574
+ [
575
+ module=yes
576
+ eval libltdl_cv_shlibext=$shrext_cmds
577
+ ])
578
+ if test -n "$libltdl_cv_shlibext"; then
579
+ m4_pattern_allow([LT_MODULE_EXT])dnl
580
+ AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
581
+ [Define to the extension used for runtime loadable modules, say, ".so".])
582
+ fi
583
+ ])# LT_SYS_MODULE_EXT
584
+
585
+ # Old name:
586
+ AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
587
+ dnl aclocal-1.4 backwards compatibility:
588
+ dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
589
+
590
+
591
+ # LT_SYS_MODULE_PATH
592
+ # ------------------
593
+ AC_DEFUN([LT_SYS_MODULE_PATH],
594
+ [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
595
+ AC_CACHE_CHECK([which variable specifies run-time module search path],
596
+ [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
597
+ if test -n "$lt_cv_module_path_var"; then
598
+ m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
599
+ AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
600
+ [Define to the name of the environment variable that determines the run-time module search path.])
601
+ fi
602
+ ])# LT_SYS_MODULE_PATH
603
+
604
+ # Old name:
605
+ AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
606
+ dnl aclocal-1.4 backwards compatibility:
607
+ dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
608
+
609
+
610
+ # LT_SYS_DLSEARCH_PATH
611
+ # --------------------
612
+ AC_DEFUN([LT_SYS_DLSEARCH_PATH],
613
+ [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
614
+ AC_CACHE_CHECK([for the default library search path],
615
+ [lt_cv_sys_dlsearch_path],
616
+ [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
617
+ if test -n "$lt_cv_sys_dlsearch_path"; then
618
+ sys_dlsearch_path=
619
+ for dir in $lt_cv_sys_dlsearch_path; do
620
+ if test -z "$sys_dlsearch_path"; then
621
+ sys_dlsearch_path="$dir"
622
+ else
623
+ sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
624
+ fi
625
+ done
626
+ m4_pattern_allow([LT_DLSEARCH_PATH])dnl
627
+ AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
628
+ [Define to the system default library search path.])
629
+ fi
630
+ ])# LT_SYS_DLSEARCH_PATH
631
+
632
+ # Old name:
633
+ AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
634
+ dnl aclocal-1.4 backwards compatibility:
635
+ dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
636
+
637
+
638
+ # _LT_CHECK_DLPREOPEN
639
+ # -------------------
640
+ m4_defun([_LT_CHECK_DLPREOPEN],
641
+ [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
642
+ AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
643
+ [libltdl_cv_preloaded_symbols],
644
+ [if test -n "$lt_cv_sys_global_symbol_pipe"; then
645
+ libltdl_cv_preloaded_symbols=yes
646
+ else
647
+ libltdl_cv_preloaded_symbols=no
648
+ fi
649
+ ])
650
+ if test x"$libltdl_cv_preloaded_symbols" = xyes; then
651
+ AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
652
+ [Define if libtool can extract symbol lists from object files.])
653
+ fi
654
+ ])# _LT_CHECK_DLPREOPEN
655
+
656
+
657
+ # LT_LIB_DLLOAD
658
+ # -------------
659
+ AC_DEFUN([LT_LIB_DLLOAD],
660
+ [m4_pattern_allow([^LT_DLLOADERS$])
661
+ LT_DLLOADERS=
662
+ AC_SUBST([LT_DLLOADERS])
663
+
664
+ AC_LANG_PUSH([C])
665
+
666
+ LIBADD_DLOPEN=
667
+ AC_SEARCH_LIBS([dlopen], [dl],
668
+ [AC_DEFINE([HAVE_LIBDL], [1],
669
+ [Define if you have the libdl library or equivalent.])
670
+ if test "$ac_cv_search_dlopen" != "none required" ; then
671
+ LIBADD_DLOPEN="-ldl"
672
+ fi
673
+ libltdl_cv_lib_dl_dlopen="yes"
674
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
675
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
676
+ # include <dlfcn.h>
677
+ #endif
678
+ ]], [[dlopen(0, 0);]])],
679
+ [AC_DEFINE([HAVE_LIBDL], [1],
680
+ [Define if you have the libdl library or equivalent.])
681
+ libltdl_cv_func_dlopen="yes"
682
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
683
+ [AC_CHECK_LIB([svld], [dlopen],
684
+ [AC_DEFINE([HAVE_LIBDL], [1],
685
+ [Define if you have the libdl library or equivalent.])
686
+ LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
687
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
688
+ if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
689
+ then
690
+ lt_save_LIBS="$LIBS"
691
+ LIBS="$LIBS $LIBADD_DLOPEN"
692
+ AC_CHECK_FUNCS([dlerror])
693
+ LIBS="$lt_save_LIBS"
694
+ fi
695
+ AC_SUBST([LIBADD_DLOPEN])
696
+
697
+ LIBADD_SHL_LOAD=
698
+ AC_CHECK_FUNC([shl_load],
699
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
700
+ [Define if you have the shl_load function.])
701
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
702
+ [AC_CHECK_LIB([dld], [shl_load],
703
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
704
+ [Define if you have the shl_load function.])
705
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
706
+ LIBADD_SHL_LOAD="-ldld"])])
707
+ AC_SUBST([LIBADD_SHL_LOAD])
708
+
709
+ case $host_os in
710
+ darwin[[1567]].*)
711
+ # We only want this for pre-Mac OS X 10.4.
712
+ AC_CHECK_FUNC([_dyld_func_lookup],
713
+ [AC_DEFINE([HAVE_DYLD], [1],
714
+ [Define if you have the _dyld_func_lookup function.])
715
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
716
+ ;;
717
+ beos*)
718
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
719
+ ;;
720
+ cygwin* | mingw* | os2* | pw32*)
721
+ AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
722
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
723
+ ;;
724
+ esac
725
+
726
+ AC_CHECK_LIB([dld], [dld_link],
727
+ [AC_DEFINE([HAVE_DLD], [1],
728
+ [Define if you have the GNU dld library.])
729
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
730
+ AC_SUBST([LIBADD_DLD_LINK])
731
+
732
+ m4_pattern_allow([^LT_DLPREOPEN$])
733
+ LT_DLPREOPEN=
734
+ if test -n "$LT_DLLOADERS"
735
+ then
736
+ for lt_loader in $LT_DLLOADERS; do
737
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
738
+ done
739
+ AC_DEFINE([HAVE_LIBDLLOADER], [1],
740
+ [Define if libdlloader will be built on this platform])
741
+ fi
742
+ AC_SUBST([LT_DLPREOPEN])
743
+
744
+ dnl This isn't used anymore, but set it for backwards compatibility
745
+ LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
746
+ AC_SUBST([LIBADD_DL])
747
+
748
+ AC_LANG_POP
749
+ ])# LT_LIB_DLLOAD
750
+
751
+ # Old name:
752
+ AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
753
+ dnl aclocal-1.4 backwards compatibility:
754
+ dnl AC_DEFUN([AC_LTDL_DLLIB], [])
755
+
756
+
757
+ # LT_SYS_SYMBOL_USCORE
758
+ # --------------------
759
+ # does the compiler prefix global symbols with an underscore?
760
+ AC_DEFUN([LT_SYS_SYMBOL_USCORE],
761
+ [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
762
+ AC_CACHE_CHECK([for _ prefix in compiled symbols],
763
+ [lt_cv_sys_symbol_underscore],
764
+ [lt_cv_sys_symbol_underscore=no
765
+ cat > conftest.$ac_ext <<_LT_EOF
766
+ void nm_test_func(){}
767
+ int main(){nm_test_func;return 0;}
768
+ _LT_EOF
769
+ if AC_TRY_EVAL(ac_compile); then
770
+ # Now try to grab the symbols.
771
+ ac_nlist=conftest.nm
772
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
773
+ # See whether the symbols have a leading underscore.
774
+ if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
775
+ lt_cv_sys_symbol_underscore=yes
776
+ else
777
+ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
778
+ :
779
+ else
780
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
781
+ fi
782
+ fi
783
+ else
784
+ echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
785
+ fi
786
+ else
787
+ echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
788
+ cat conftest.c >&AS_MESSAGE_LOG_FD
789
+ fi
790
+ rm -rf conftest*
791
+ ])
792
+ sys_symbol_underscore=$lt_cv_sys_symbol_underscore
793
+ AC_SUBST([sys_symbol_underscore])
794
+ ])# LT_SYS_SYMBOL_USCORE
795
+
796
+ # Old name:
797
+ AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
798
+ dnl aclocal-1.4 backwards compatibility:
799
+ dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
800
+
801
+
802
+ # LT_FUNC_DLSYM_USCORE
803
+ # --------------------
804
+ AC_DEFUN([LT_FUNC_DLSYM_USCORE],
805
+ [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
806
+ if test x"$lt_cv_sys_symbol_underscore" = xyes; then
807
+ if test x"$libltdl_cv_func_dlopen" = xyes ||
808
+ test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
809
+ AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
810
+ [libltdl_cv_need_uscore],
811
+ [libltdl_cv_need_uscore=unknown
812
+ save_LIBS="$LIBS"
813
+ LIBS="$LIBS $LIBADD_DLOPEN"
814
+ _LT_TRY_DLOPEN_SELF(
815
+ [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
816
+ [], [libltdl_cv_need_uscore=cross])
817
+ LIBS="$save_LIBS"
818
+ ])
819
+ fi
820
+ fi
821
+
822
+ if test x"$libltdl_cv_need_uscore" = xyes; then
823
+ AC_DEFINE([NEED_USCORE], [1],
824
+ [Define if dlsym() requires a leading underscore in symbol names.])
825
+ fi
826
+ ])# LT_FUNC_DLSYM_USCORE
827
+
828
+ # Old name:
829
+ AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
830
+ dnl aclocal-1.4 backwards compatibility:
831
+ dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
832
+
833
+ # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
834
+ #
835
+ # This file is free software; the Free Software Foundation
836
+ # gives unlimited permission to copy and/or distribute it,
837
+ # with or without modifications, as long as this notice is preserved.
838
+
839
+ # AM_AUTOMAKE_VERSION(VERSION)
840
+ # ----------------------------
841
+ # Automake X.Y traces this macro to ensure aclocal.m4 has been
842
+ # generated from the m4 files accompanying Automake X.Y.
843
+ # (This private macro should not be called outside this file.)
844
+ AC_DEFUN([AM_AUTOMAKE_VERSION],
845
+ [am__api_version='1.11'
846
+ dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
847
+ dnl require some minimum version. Point them to the right macro.
848
+ m4_if([$1], [1.11.1], [],
849
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
850
+ ])
851
+
852
+ # _AM_AUTOCONF_VERSION(VERSION)
853
+ # -----------------------------
854
+ # aclocal traces this macro to find the Autoconf version.
855
+ # This is a private macro too. Using m4_define simplifies
856
+ # the logic in aclocal, which can simply ignore this definition.
857
+ m4_define([_AM_AUTOCONF_VERSION], [])
858
+
859
+ # AM_SET_CURRENT_AUTOMAKE_VERSION
860
+ # -------------------------------
861
+ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
862
+ # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
863
+ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
864
+ [AM_AUTOMAKE_VERSION([1.11.1])dnl
865
+ m4_ifndef([AC_AUTOCONF_VERSION],
866
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
867
+ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
868
+
869
+ # Figure out how to run the assembler. -*- Autoconf -*-
870
+
871
+ # Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
872
+ #
873
+ # This file is free software; the Free Software Foundation
874
+ # gives unlimited permission to copy and/or distribute it,
875
+ # with or without modifications, as long as this notice is preserved.
876
+
877
+ # serial 5
878
+
879
+ # AM_PROG_AS
880
+ # ----------
881
+ AC_DEFUN([AM_PROG_AS],
882
+ [# By default we simply use the C compiler to build assembly code.
883
+ AC_REQUIRE([AC_PROG_CC])
884
+ test "${CCAS+set}" = set || CCAS=$CC
885
+ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
886
+ AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
887
+ AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
888
+ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
889
+ ])
890
+
891
+ # AM_AUX_DIR_EXPAND -*- Autoconf -*-
892
+
893
+ # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
894
+ #
895
+ # This file is free software; the Free Software Foundation
896
+ # gives unlimited permission to copy and/or distribute it,
897
+ # with or without modifications, as long as this notice is preserved.
898
+
899
+ # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
900
+ # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
901
+ # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
902
+ #
903
+ # Of course, Automake must honor this variable whenever it calls a
904
+ # tool from the auxiliary directory. The problem is that $srcdir (and
905
+ # therefore $ac_aux_dir as well) can be either absolute or relative,
906
+ # depending on how configure is run. This is pretty annoying, since
907
+ # it makes $ac_aux_dir quite unusable in subdirectories: in the top
908
+ # source directory, any form will work fine, but in subdirectories a
909
+ # relative path needs to be adjusted first.
910
+ #
911
+ # $ac_aux_dir/missing
912
+ # fails when called from a subdirectory if $ac_aux_dir is relative
913
+ # $top_srcdir/$ac_aux_dir/missing
914
+ # fails if $ac_aux_dir is absolute,
915
+ # fails when called from a subdirectory in a VPATH build with
916
+ # a relative $ac_aux_dir
917
+ #
918
+ # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
919
+ # are both prefixed by $srcdir. In an in-source build this is usually
920
+ # harmless because $srcdir is `.', but things will broke when you
921
+ # start a VPATH build or use an absolute $srcdir.
922
+ #
923
+ # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
924
+ # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
925
+ # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
926
+ # and then we would define $MISSING as
927
+ # MISSING="\${SHELL} $am_aux_dir/missing"
928
+ # This will work as long as MISSING is not called from configure, because
929
+ # unfortunately $(top_srcdir) has no meaning in configure.
930
+ # However there are other variables, like CC, which are often used in
931
+ # configure, and could therefore not use this "fixed" $ac_aux_dir.
932
+ #
933
+ # Another solution, used here, is to always expand $ac_aux_dir to an
934
+ # absolute PATH. The drawback is that using absolute paths prevent a
935
+ # configured tree to be moved without reconfiguration.
936
+
937
+ AC_DEFUN([AM_AUX_DIR_EXPAND],
938
+ [dnl Rely on autoconf to set up CDPATH properly.
939
+ AC_PREREQ([2.50])dnl
940
+ # expand $ac_aux_dir to an absolute path
941
+ am_aux_dir=`cd $ac_aux_dir && pwd`
942
+ ])
943
+
944
+ # AM_CONDITIONAL -*- Autoconf -*-
945
+
946
+ # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
947
+ # Free Software Foundation, Inc.
948
+ #
949
+ # This file is free software; the Free Software Foundation
950
+ # gives unlimited permission to copy and/or distribute it,
951
+ # with or without modifications, as long as this notice is preserved.
952
+
953
+ # serial 9
954
+
955
+ # AM_CONDITIONAL(NAME, SHELL-CONDITION)
956
+ # -------------------------------------
957
+ # Define a conditional.
958
+ AC_DEFUN([AM_CONDITIONAL],
959
+ [AC_PREREQ(2.52)dnl
960
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
961
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
962
+ AC_SUBST([$1_TRUE])dnl
963
+ AC_SUBST([$1_FALSE])dnl
964
+ _AM_SUBST_NOTMAKE([$1_TRUE])dnl
965
+ _AM_SUBST_NOTMAKE([$1_FALSE])dnl
966
+ m4_define([_AM_COND_VALUE_$1], [$2])dnl
967
+ if $2; then
968
+ $1_TRUE=
969
+ $1_FALSE='#'
970
+ else
971
+ $1_TRUE='#'
972
+ $1_FALSE=
973
+ fi
974
+ AC_CONFIG_COMMANDS_PRE(
975
+ [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
976
+ AC_MSG_ERROR([[conditional "$1" was never defined.
977
+ Usually this means the macro was only invoked conditionally.]])
978
+ fi])])
979
+
980
+ # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
981
+ # Free Software Foundation, Inc.
982
+ #
983
+ # This file is free software; the Free Software Foundation
984
+ # gives unlimited permission to copy and/or distribute it,
985
+ # with or without modifications, as long as this notice is preserved.
986
+
987
+ # serial 10
988
+
989
+ # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
990
+ # written in clear, in which case automake, when reading aclocal.m4,
991
+ # will think it sees a *use*, and therefore will trigger all it's
992
+ # C support machinery. Also note that it means that autoscan, seeing
993
+ # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
994
+
995
+
996
+ # _AM_DEPENDENCIES(NAME)
997
+ # ----------------------
998
+ # See how the compiler implements dependency checking.
999
+ # NAME is "CC", "CXX", "GCJ", or "OBJC".
1000
+ # We try a few techniques and use that to set a single cache variable.
1001
+ #
1002
+ # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1003
+ # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1004
+ # dependency, and given that the user is not expected to run this macro,
1005
+ # just rely on AC_PROG_CC.
1006
+ AC_DEFUN([_AM_DEPENDENCIES],
1007
+ [AC_REQUIRE([AM_SET_DEPDIR])dnl
1008
+ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1009
+ AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1010
+ AC_REQUIRE([AM_DEP_TRACK])dnl
1011
+
1012
+ ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1013
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
1014
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1015
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
1016
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1017
+ [depcc="$$1" am_compiler_list=])
1018
+
1019
+ AC_CACHE_CHECK([dependency style of $depcc],
1020
+ [am_cv_$1_dependencies_compiler_type],
1021
+ [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1022
+ # We make a subdir and do the tests there. Otherwise we can end up
1023
+ # making bogus files that we don't know about and never remove. For
1024
+ # instance it was reported that on HP-UX the gcc test will end up
1025
+ # making a dummy file named `D' -- because `-MD' means `put the output
1026
+ # in D'.
1027
+ mkdir conftest.dir
1028
+ # Copy depcomp to subdir because otherwise we won't find it if we're
1029
+ # using a relative directory.
1030
+ cp "$am_depcomp" conftest.dir
1031
+ cd conftest.dir
1032
+ # We will build objects and dependencies in a subdirectory because
1033
+ # it helps to detect inapplicable dependency modes. For instance
1034
+ # both Tru64's cc and ICC support -MD to output dependencies as a
1035
+ # side effect of compilation, but ICC will put the dependencies in
1036
+ # the current directory while Tru64 will put them in the object
1037
+ # directory.
1038
+ mkdir sub
1039
+
1040
+ am_cv_$1_dependencies_compiler_type=none
1041
+ if test "$am_compiler_list" = ""; then
1042
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1043
+ fi
1044
+ am__universal=false
1045
+ m4_case([$1], [CC],
1046
+ [case " $depcc " in #(
1047
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
1048
+ esac],
1049
+ [CXX],
1050
+ [case " $depcc " in #(
1051
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
1052
+ esac])
1053
+
1054
+ for depmode in $am_compiler_list; do
1055
+ # Setup a source with many dependencies, because some compilers
1056
+ # like to wrap large dependency lists on column 80 (with \), and
1057
+ # we should not choose a depcomp mode which is confused by this.
1058
+ #
1059
+ # We need to recreate these files for each test, as the compiler may
1060
+ # overwrite some of them when testing with obscure command lines.
1061
+ # This happens at least with the AIX C compiler.
1062
+ : > sub/conftest.c
1063
+ for i in 1 2 3 4 5 6; do
1064
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
1065
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1066
+ # Solaris 8's {/usr,}/bin/sh.
1067
+ touch sub/conftst$i.h
1068
+ done
1069
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1070
+
1071
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
1072
+ # mode. It turns out that the SunPro C++ compiler does not properly
1073
+ # handle `-M -o', and we need to detect this. Also, some Intel
1074
+ # versions had trouble with output in subdirs
1075
+ am__obj=sub/conftest.${OBJEXT-o}
1076
+ am__minus_obj="-o $am__obj"
1077
+ case $depmode in
1078
+ gcc)
1079
+ # This depmode causes a compiler race in universal mode.
1080
+ test "$am__universal" = false || continue
1081
+ ;;
1082
+ nosideeffect)
1083
+ # after this tag, mechanisms are not by side-effect, so they'll
1084
+ # only be used when explicitly requested
1085
+ if test "x$enable_dependency_tracking" = xyes; then
1086
+ continue
1087
+ else
1088
+ break
1089
+ fi
1090
+ ;;
1091
+ msvisualcpp | msvcmsys)
1092
+ # This compiler won't grok `-c -o', but also, the minuso test has
1093
+ # not run yet. These depmodes are late enough in the game, and
1094
+ # so weak that their functioning should not be impacted.
1095
+ am__obj=conftest.${OBJEXT-o}
1096
+ am__minus_obj=
1097
+ ;;
1098
+ none) break ;;
1099
+ esac
1100
+ if depmode=$depmode \
1101
+ source=sub/conftest.c object=$am__obj \
1102
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1103
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1104
+ >/dev/null 2>conftest.err &&
1105
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1106
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1107
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1108
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1109
+ # icc doesn't choke on unknown options, it will just issue warnings
1110
+ # or remarks (even with -Werror). So we grep stderr for any message
1111
+ # that says an option was ignored or not supported.
1112
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
1113
+ # icc: Command line warning: ignoring option '-M'; no argument required
1114
+ # The diagnosis changed in icc 8.0:
1115
+ # icc: Command line remark: option '-MP' not supported
1116
+ if (grep 'ignoring option' conftest.err ||
1117
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1118
+ am_cv_$1_dependencies_compiler_type=$depmode
1119
+ break
1120
+ fi
1121
+ fi
1122
+ done
1123
+
1124
+ cd ..
1125
+ rm -rf conftest.dir
1126
+ else
1127
+ am_cv_$1_dependencies_compiler_type=none
1128
+ fi
1129
+ ])
1130
+ AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1131
+ AM_CONDITIONAL([am__fastdep$1], [
1132
+ test "x$enable_dependency_tracking" != xno \
1133
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1134
+ ])
1135
+
1136
+
1137
+ # AM_SET_DEPDIR
1138
+ # -------------
1139
+ # Choose a directory name for dependency files.
1140
+ # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1141
+ AC_DEFUN([AM_SET_DEPDIR],
1142
+ [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1143
+ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1144
+ ])
1145
+
1146
+
1147
+ # AM_DEP_TRACK
1148
+ # ------------
1149
+ AC_DEFUN([AM_DEP_TRACK],
1150
+ [AC_ARG_ENABLE(dependency-tracking,
1151
+ [ --disable-dependency-tracking speeds up one-time build
1152
+ --enable-dependency-tracking do not reject slow dependency extractors])
1153
+ if test "x$enable_dependency_tracking" != xno; then
1154
+ am_depcomp="$ac_aux_dir/depcomp"
1155
+ AMDEPBACKSLASH='\'
1156
+ fi
1157
+ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1158
+ AC_SUBST([AMDEPBACKSLASH])dnl
1159
+ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1160
+ ])
1161
+
1162
+ # Generate code to set up dependency tracking. -*- Autoconf -*-
1163
+
1164
+ # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1165
+ # Free Software Foundation, Inc.
1166
+ #
1167
+ # This file is free software; the Free Software Foundation
1168
+ # gives unlimited permission to copy and/or distribute it,
1169
+ # with or without modifications, as long as this notice is preserved.
1170
+
1171
+ #serial 5
1172
+
1173
+ # _AM_OUTPUT_DEPENDENCY_COMMANDS
1174
+ # ------------------------------
1175
+ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1176
+ [{
1177
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
1178
+ # are listed without --file. Let's play safe and only enable the eval
1179
+ # if we detect the quoting.
1180
+ case $CONFIG_FILES in
1181
+ *\'*) eval set x "$CONFIG_FILES" ;;
1182
+ *) set x $CONFIG_FILES ;;
1183
+ esac
1184
+ shift
1185
+ for mf
1186
+ do
1187
+ # Strip MF so we end up with the name of the file.
1188
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
1189
+ # Check whether this is an Automake generated Makefile or not.
1190
+ # We used to match only the files named `Makefile.in', but
1191
+ # some people rename them; so instead we look at the file content.
1192
+ # Grep'ing the first line is not enough: some people post-process
1193
+ # each Makefile.in and add a new line on top of each file to say so.
1194
+ # Grep'ing the whole file is not good either: AIX grep has a line
1195
+ # limit of 2048, but all sed's we know have understand at least 4000.
1196
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1197
+ dirpart=`AS_DIRNAME("$mf")`
1198
+ else
1199
+ continue
1200
+ fi
1201
+ # Extract the definition of DEPDIR, am__include, and am__quote
1202
+ # from the Makefile without running `make'.
1203
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1204
+ test -z "$DEPDIR" && continue
1205
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
1206
+ test -z "am__include" && continue
1207
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1208
+ # When using ansi2knr, U may be empty or an underscore; expand it
1209
+ U=`sed -n 's/^U = //p' < "$mf"`
1210
+ # Find all dependency output files, they are included files with
1211
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
1212
+ # simplest approach to changing $(DEPDIR) to its actual value in the
1213
+ # expansion.
1214
+ for file in `sed -n "
1215
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1216
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1217
+ # Make sure the directory exists.
1218
+ test -f "$dirpart/$file" && continue
1219
+ fdir=`AS_DIRNAME(["$file"])`
1220
+ AS_MKDIR_P([$dirpart/$fdir])
1221
+ # echo "creating $dirpart/$file"
1222
+ echo '# dummy' > "$dirpart/$file"
1223
+ done
1224
+ done
1225
+ }
1226
+ ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1227
+
1228
+
1229
+ # AM_OUTPUT_DEPENDENCY_COMMANDS
1230
+ # -----------------------------
1231
+ # This macro should only be invoked once -- use via AC_REQUIRE.
1232
+ #
1233
+ # This code is only required when automatic dependency tracking
1234
+ # is enabled. FIXME. This creates each `.P' file that we will
1235
+ # need in order to bootstrap the dependency handling code.
1236
+ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1237
+ [AC_CONFIG_COMMANDS([depfiles],
1238
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1239
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1240
+ ])
1241
+
1242
+ # Do all the work for Automake. -*- Autoconf -*-
1243
+
1244
+ # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1245
+ # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1246
+ #
1247
+ # This file is free software; the Free Software Foundation
1248
+ # gives unlimited permission to copy and/or distribute it,
1249
+ # with or without modifications, as long as this notice is preserved.
1250
+
1251
+ # serial 16
1252
+
1253
+ # This macro actually does too much. Some checks are only needed if
1254
+ # your package does certain things. But this isn't really a big deal.
1255
+
1256
+ # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1257
+ # AM_INIT_AUTOMAKE([OPTIONS])
1258
+ # -----------------------------------------------
1259
+ # The call with PACKAGE and VERSION arguments is the old style
1260
+ # call (pre autoconf-2.50), which is being phased out. PACKAGE
1261
+ # and VERSION should now be passed to AC_INIT and removed from
1262
+ # the call to AM_INIT_AUTOMAKE.
1263
+ # We support both call styles for the transition. After
1264
+ # the next Automake release, Autoconf can make the AC_INIT
1265
+ # arguments mandatory, and then we can depend on a new Autoconf
1266
+ # release and drop the old call support.
1267
+ AC_DEFUN([AM_INIT_AUTOMAKE],
1268
+ [AC_PREREQ([2.62])dnl
1269
+ dnl Autoconf wants to disallow AM_ names. We explicitly allow
1270
+ dnl the ones we care about.
1271
+ m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1272
+ AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1273
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
1274
+ if test "`cd $srcdir && pwd`" != "`pwd`"; then
1275
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1276
+ # is not polluted with repeated "-I."
1277
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1278
+ # test to see if srcdir already configured
1279
+ if test -f $srcdir/config.status; then
1280
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1281
+ fi
1282
+ fi
1283
+
1284
+ # test whether we have cygpath
1285
+ if test -z "$CYGPATH_W"; then
1286
+ if (cygpath --version) >/dev/null 2>/dev/null; then
1287
+ CYGPATH_W='cygpath -w'
1288
+ else
1289
+ CYGPATH_W=echo
1290
+ fi
1291
+ fi
1292
+ AC_SUBST([CYGPATH_W])
1293
+
1294
+ # Define the identity of the package.
1295
+ dnl Distinguish between old-style and new-style calls.
1296
+ m4_ifval([$2],
1297
+ [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1298
+ AC_SUBST([PACKAGE], [$1])dnl
1299
+ AC_SUBST([VERSION], [$2])],
1300
+ [_AM_SET_OPTIONS([$1])dnl
1301
+ dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1302
+ m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1303
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1304
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1305
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1306
+
1307
+ _AM_IF_OPTION([no-define],,
1308
+ [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1309
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1310
+
1311
+ # Some tools Automake needs.
1312
+ AC_REQUIRE([AM_SANITY_CHECK])dnl
1313
+ AC_REQUIRE([AC_ARG_PROGRAM])dnl
1314
+ AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1315
+ AM_MISSING_PROG(AUTOCONF, autoconf)
1316
+ AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1317
+ AM_MISSING_PROG(AUTOHEADER, autoheader)
1318
+ AM_MISSING_PROG(MAKEINFO, makeinfo)
1319
+ AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1320
+ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1321
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1322
+ # We need awk for the "check" target. The system "awk" is bad on
1323
+ # some platforms.
1324
+ AC_REQUIRE([AC_PROG_AWK])dnl
1325
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1326
+ AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1327
+ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1328
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1329
+ [_AM_PROG_TAR([v7])])])
1330
+ _AM_IF_OPTION([no-dependencies],,
1331
+ [AC_PROVIDE_IFELSE([AC_PROG_CC],
1332
+ [_AM_DEPENDENCIES(CC)],
1333
+ [define([AC_PROG_CC],
1334
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1335
+ AC_PROVIDE_IFELSE([AC_PROG_CXX],
1336
+ [_AM_DEPENDENCIES(CXX)],
1337
+ [define([AC_PROG_CXX],
1338
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1339
+ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1340
+ [_AM_DEPENDENCIES(OBJC)],
1341
+ [define([AC_PROG_OBJC],
1342
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1343
+ ])
1344
+ _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1345
+ dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1346
+ dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1347
+ dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1348
+ AC_CONFIG_COMMANDS_PRE(dnl
1349
+ [m4_provide_if([_AM_COMPILER_EXEEXT],
1350
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1351
+ ])
1352
+
1353
+ dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1354
+ dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1355
+ dnl mangled by Autoconf and run in a shell conditional statement.
1356
+ m4_define([_AC_COMPILER_EXEEXT],
1357
+ m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1358
+
1359
+
1360
+ # When config.status generates a header, we must update the stamp-h file.
1361
+ # This file resides in the same directory as the config header
1362
+ # that is generated. The stamp files are numbered to have different names.
1363
+
1364
+ # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1365
+ # loop where config.status creates the headers, so we can generate
1366
+ # our stamp files there.
1367
+ AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1368
+ [# Compute $1's index in $config_headers.
1369
+ _am_arg=$1
1370
+ _am_stamp_count=1
1371
+ for _am_header in $config_headers :; do
1372
+ case $_am_header in
1373
+ $_am_arg | $_am_arg:* )
1374
+ break ;;
1375
+ * )
1376
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1377
+ esac
1378
+ done
1379
+ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1380
+
1381
+ # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1382
+ #
1383
+ # This file is free software; the Free Software Foundation
1384
+ # gives unlimited permission to copy and/or distribute it,
1385
+ # with or without modifications, as long as this notice is preserved.
1386
+
1387
+ # AM_PROG_INSTALL_SH
1388
+ # ------------------
1389
+ # Define $install_sh.
1390
+ AC_DEFUN([AM_PROG_INSTALL_SH],
1391
+ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1392
+ if test x"${install_sh}" != xset; then
1393
+ case $am_aux_dir in
1394
+ *\ * | *\ *)
1395
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1396
+ *)
1397
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
1398
+ esac
1399
+ fi
1400
+ AC_SUBST(install_sh)])
1401
+
1402
+ # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1403
+ #
1404
+ # This file is free software; the Free Software Foundation
1405
+ # gives unlimited permission to copy and/or distribute it,
1406
+ # with or without modifications, as long as this notice is preserved.
1407
+
1408
+ # serial 2
1409
+
1410
+ # Check whether the underlying file-system supports filenames
1411
+ # with a leading dot. For instance MS-DOS doesn't.
1412
+ AC_DEFUN([AM_SET_LEADING_DOT],
1413
+ [rm -rf .tst 2>/dev/null
1414
+ mkdir .tst 2>/dev/null
1415
+ if test -d .tst; then
1416
+ am__leading_dot=.
1417
+ else
1418
+ am__leading_dot=_
1419
+ fi
1420
+ rmdir .tst 2>/dev/null
1421
+ AC_SUBST([am__leading_dot])])
1422
+
1423
+ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1424
+ # From Jim Meyering
1425
+
1426
+ # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1427
+ # Free Software Foundation, Inc.
1428
+ #
1429
+ # This file is free software; the Free Software Foundation
1430
+ # gives unlimited permission to copy and/or distribute it,
1431
+ # with or without modifications, as long as this notice is preserved.
1432
+
1433
+ # serial 5
1434
+
1435
+ # AM_MAINTAINER_MODE([DEFAULT-MODE])
1436
+ # ----------------------------------
1437
+ # Control maintainer-specific portions of Makefiles.
1438
+ # Default is to disable them, unless `enable' is passed literally.
1439
+ # For symmetry, `disable' may be passed as well. Anyway, the user
1440
+ # can override the default with the --enable/--disable switch.
1441
+ AC_DEFUN([AM_MAINTAINER_MODE],
1442
+ [m4_case(m4_default([$1], [disable]),
1443
+ [enable], [m4_define([am_maintainer_other], [disable])],
1444
+ [disable], [m4_define([am_maintainer_other], [enable])],
1445
+ [m4_define([am_maintainer_other], [enable])
1446
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1447
+ AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1448
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1449
+ AC_ARG_ENABLE([maintainer-mode],
1450
+ [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
1451
+ (and sometimes confusing) to the casual installer],
1452
+ [USE_MAINTAINER_MODE=$enableval],
1453
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1454
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1455
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1456
+ MAINT=$MAINTAINER_MODE_TRUE
1457
+ AC_SUBST([MAINT])dnl
1458
+ ]
1459
+ )
1460
+
1461
+ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1462
+
1463
+ # Check to see how 'make' treats includes. -*- Autoconf -*-
1464
+
1465
+ # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1466
+ #
1467
+ # This file is free software; the Free Software Foundation
1468
+ # gives unlimited permission to copy and/or distribute it,
1469
+ # with or without modifications, as long as this notice is preserved.
1470
+
1471
+ # serial 4
1472
+
1473
+ # AM_MAKE_INCLUDE()
1474
+ # -----------------
1475
+ # Check to see how make treats includes.
1476
+ AC_DEFUN([AM_MAKE_INCLUDE],
1477
+ [am_make=${MAKE-make}
1478
+ cat > confinc << 'END'
1479
+ am__doit:
1480
+ @echo this is the am__doit target
1481
+ .PHONY: am__doit
1482
+ END
1483
+ # If we don't find an include directive, just comment out the code.
1484
+ AC_MSG_CHECKING([for style of include used by $am_make])
1485
+ am__include="#"
1486
+ am__quote=
1487
+ _am_result=none
1488
+ # First try GNU make style include.
1489
+ echo "include confinc" > confmf
1490
+ # Ignore all kinds of additional output from `make'.
1491
+ case `$am_make -s -f confmf 2> /dev/null` in #(
1492
+ *the\ am__doit\ target*)
1493
+ am__include=include
1494
+ am__quote=
1495
+ _am_result=GNU
1496
+ ;;
1497
+ esac
1498
+ # Now try BSD make style include.
1499
+ if test "$am__include" = "#"; then
1500
+ echo '.include "confinc"' > confmf
1501
+ case `$am_make -s -f confmf 2> /dev/null` in #(
1502
+ *the\ am__doit\ target*)
1503
+ am__include=.include
1504
+ am__quote="\""
1505
+ _am_result=BSD
1506
+ ;;
1507
+ esac
1508
+ fi
1509
+ AC_SUBST([am__include])
1510
+ AC_SUBST([am__quote])
1511
+ AC_MSG_RESULT([$_am_result])
1512
+ rm -f confinc confmf
1513
+ ])
1514
+
1515
+ # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1516
+ # Free Software Foundation, Inc.
1517
+ #
1518
+ # This file is free software; the Free Software Foundation
1519
+ # gives unlimited permission to copy and/or distribute it,
1520
+ # with or without modifications, as long as this notice is preserved.
1521
+
1522
+ # serial 6
1523
+
1524
+ # AM_PROG_CC_C_O
1525
+ # --------------
1526
+ # Like AC_PROG_CC_C_O, but changed for automake.
1527
+ AC_DEFUN([AM_PROG_CC_C_O],
1528
+ [AC_REQUIRE([AC_PROG_CC_C_O])dnl
1529
+ AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1530
+ AC_REQUIRE_AUX_FILE([compile])dnl
1531
+ # FIXME: we rely on the cache variable name because
1532
+ # there is no other way.
1533
+ set dummy $CC
1534
+ am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1535
+ eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1536
+ if test "$am_t" != yes; then
1537
+ # Losing compiler, so override with the script.
1538
+ # FIXME: It is wrong to rewrite CC.
1539
+ # But if we don't then we get into trouble of one sort or another.
1540
+ # A longer-term fix would be to have automake use am__CC in this case,
1541
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1542
+ CC="$am_aux_dir/compile $CC"
1543
+ fi
1544
+ dnl Make sure AC_PROG_CC is never called again, or it will override our
1545
+ dnl setting of CC.
1546
+ m4_define([AC_PROG_CC],
1547
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1548
+ ])
1549
+
1550
+ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1551
+
1552
+ # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1553
+ # Free Software Foundation, Inc.
1554
+ #
1555
+ # This file is free software; the Free Software Foundation
1556
+ # gives unlimited permission to copy and/or distribute it,
1557
+ # with or without modifications, as long as this notice is preserved.
1558
+
1559
+ # serial 6
1560
+
1561
+ # AM_MISSING_PROG(NAME, PROGRAM)
1562
+ # ------------------------------
1563
+ AC_DEFUN([AM_MISSING_PROG],
1564
+ [AC_REQUIRE([AM_MISSING_HAS_RUN])
1565
+ $1=${$1-"${am_missing_run}$2"}
1566
+ AC_SUBST($1)])
1567
+
1568
+
1569
+ # AM_MISSING_HAS_RUN
1570
+ # ------------------
1571
+ # Define MISSING if not defined so far and test if it supports --run.
1572
+ # If it does, set am_missing_run to use it, otherwise, to nothing.
1573
+ AC_DEFUN([AM_MISSING_HAS_RUN],
1574
+ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1575
+ AC_REQUIRE_AUX_FILE([missing])dnl
1576
+ if test x"${MISSING+set}" != xset; then
1577
+ case $am_aux_dir in
1578
+ *\ * | *\ *)
1579
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1580
+ *)
1581
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
1582
+ esac
1583
+ fi
1584
+ # Use eval to expand $SHELL
1585
+ if eval "$MISSING --run true"; then
1586
+ am_missing_run="$MISSING --run "
1587
+ else
1588
+ am_missing_run=
1589
+ AC_MSG_WARN([`missing' script is too old or missing])
1590
+ fi
1591
+ ])
1592
+
1593
+ # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1594
+ #
1595
+ # This file is free software; the Free Software Foundation
1596
+ # gives unlimited permission to copy and/or distribute it,
1597
+ # with or without modifications, as long as this notice is preserved.
1598
+
1599
+ # AM_PROG_MKDIR_P
1600
+ # ---------------
1601
+ # Check for `mkdir -p'.
1602
+ AC_DEFUN([AM_PROG_MKDIR_P],
1603
+ [AC_PREREQ([2.60])dnl
1604
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1605
+ dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1606
+ dnl while keeping a definition of mkdir_p for backward compatibility.
1607
+ dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1608
+ dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1609
+ dnl Makefile.ins that do not define MKDIR_P, so we do our own
1610
+ dnl adjustment using top_builddir (which is defined more often than
1611
+ dnl MKDIR_P).
1612
+ AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1613
+ case $mkdir_p in
1614
+ [[\\/$]]* | ?:[[\\/]]*) ;;
1615
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1616
+ esac
1617
+ ])
1618
+
1619
+ # Helper functions for option handling. -*- Autoconf -*-
1620
+
1621
+ # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
1622
+ #
1623
+ # This file is free software; the Free Software Foundation
1624
+ # gives unlimited permission to copy and/or distribute it,
1625
+ # with or without modifications, as long as this notice is preserved.
1626
+
1627
+ # serial 4
1628
+
1629
+ # _AM_MANGLE_OPTION(NAME)
1630
+ # -----------------------
1631
+ AC_DEFUN([_AM_MANGLE_OPTION],
1632
+ [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1633
+
1634
+ # _AM_SET_OPTION(NAME)
1635
+ # ------------------------------
1636
+ # Set option NAME. Presently that only means defining a flag for this option.
1637
+ AC_DEFUN([_AM_SET_OPTION],
1638
+ [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1639
+
1640
+ # _AM_SET_OPTIONS(OPTIONS)
1641
+ # ----------------------------------
1642
+ # OPTIONS is a space-separated list of Automake options.
1643
+ AC_DEFUN([_AM_SET_OPTIONS],
1644
+ [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1645
+
1646
+ # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1647
+ # -------------------------------------------
1648
+ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1649
+ AC_DEFUN([_AM_IF_OPTION],
1650
+ [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1651
+
1652
+ # Check to make sure that the build environment is sane. -*- Autoconf -*-
1653
+
1654
+ # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1655
+ # Free Software Foundation, Inc.
1656
+ #
1657
+ # This file is free software; the Free Software Foundation
1658
+ # gives unlimited permission to copy and/or distribute it,
1659
+ # with or without modifications, as long as this notice is preserved.
1660
+
1661
+ # serial 5
1662
+
1663
+ # AM_SANITY_CHECK
1664
+ # ---------------
1665
+ AC_DEFUN([AM_SANITY_CHECK],
1666
+ [AC_MSG_CHECKING([whether build environment is sane])
1667
+ # Just in case
1668
+ sleep 1
1669
+ echo timestamp > conftest.file
1670
+ # Reject unsafe characters in $srcdir or the absolute working directory
1671
+ # name. Accept space and tab only in the latter.
1672
+ am_lf='
1673
+ '
1674
+ case `pwd` in
1675
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
1676
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
1677
+ esac
1678
+ case $srcdir in
1679
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
1680
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1681
+ esac
1682
+
1683
+ # Do `set' in a subshell so we don't clobber the current shell's
1684
+ # arguments. Must try -L first in case configure is actually a
1685
+ # symlink; some systems play weird games with the mod time of symlinks
1686
+ # (eg FreeBSD returns the mod time of the symlink's containing
1687
+ # directory).
1688
+ if (
1689
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1690
+ if test "$[*]" = "X"; then
1691
+ # -L didn't work.
1692
+ set X `ls -t "$srcdir/configure" conftest.file`
1693
+ fi
1694
+ rm -f conftest.file
1695
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
1696
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
1697
+
1698
+ # If neither matched, then we have a broken ls. This can happen
1699
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
1700
+ # broken ls alias from the environment. This has actually
1701
+ # happened. Such a system could not be considered "sane".
1702
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1703
+ alias in your environment])
1704
+ fi
1705
+
1706
+ test "$[2]" = conftest.file
1707
+ )
1708
+ then
1709
+ # Ok.
1710
+ :
1711
+ else
1712
+ AC_MSG_ERROR([newly created file is older than distributed files!
1713
+ Check your system clock])
1714
+ fi
1715
+ AC_MSG_RESULT(yes)])
1716
+
1717
+ # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1718
+ #
1719
+ # This file is free software; the Free Software Foundation
1720
+ # gives unlimited permission to copy and/or distribute it,
1721
+ # with or without modifications, as long as this notice is preserved.
1722
+
1723
+ # AM_PROG_INSTALL_STRIP
1724
+ # ---------------------
1725
+ # One issue with vendor `install' (even GNU) is that you can't
1726
+ # specify the program used to strip binaries. This is especially
1727
+ # annoying in cross-compiling environments, where the build's strip
1728
+ # is unlikely to handle the host's binaries.
1729
+ # Fortunately install-sh will honor a STRIPPROG variable, so we
1730
+ # always use install-sh in `make install-strip', and initialize
1731
+ # STRIPPROG with the value of the STRIP variable (set by the user).
1732
+ AC_DEFUN([AM_PROG_INSTALL_STRIP],
1733
+ [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1734
+ # Installed binaries are usually stripped using `strip' when the user
1735
+ # run `make install-strip'. However `strip' might not be the right
1736
+ # tool to use in cross-compilation environments, therefore Automake
1737
+ # will honor the `STRIP' environment variable to overrule this program.
1738
+ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1739
+ if test "$cross_compiling" != no; then
1740
+ AC_CHECK_TOOL([STRIP], [strip], :)
1741
+ fi
1742
+ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1743
+ AC_SUBST([INSTALL_STRIP_PROGRAM])])
1744
+
1745
+ # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
1746
+ #
1747
+ # This file is free software; the Free Software Foundation
1748
+ # gives unlimited permission to copy and/or distribute it,
1749
+ # with or without modifications, as long as this notice is preserved.
1750
+
1751
+ # serial 2
1752
+
1753
+ # _AM_SUBST_NOTMAKE(VARIABLE)
1754
+ # ---------------------------
1755
+ # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1756
+ # This macro is traced by Automake.
1757
+ AC_DEFUN([_AM_SUBST_NOTMAKE])
1758
+
1759
+ # AM_SUBST_NOTMAKE(VARIABLE)
1760
+ # ---------------------------
1761
+ # Public sister of _AM_SUBST_NOTMAKE.
1762
+ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1763
+
1764
+ # Check how to create a tarball. -*- Autoconf -*-
1765
+
1766
+ # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1767
+ #
1768
+ # This file is free software; the Free Software Foundation
1769
+ # gives unlimited permission to copy and/or distribute it,
1770
+ # with or without modifications, as long as this notice is preserved.
1771
+
1772
+ # serial 2
1773
+
1774
+ # _AM_PROG_TAR(FORMAT)
1775
+ # --------------------
1776
+ # Check how to create a tarball in format FORMAT.
1777
+ # FORMAT should be one of `v7', `ustar', or `pax'.
1778
+ #
1779
+ # Substitute a variable $(am__tar) that is a command
1780
+ # writing to stdout a FORMAT-tarball containing the directory
1781
+ # $tardir.
1782
+ # tardir=directory && $(am__tar) > result.tar
1783
+ #
1784
+ # Substitute a variable $(am__untar) that extract such
1785
+ # a tarball read from stdin.
1786
+ # $(am__untar) < result.tar
1787
+ AC_DEFUN([_AM_PROG_TAR],
1788
+ [# Always define AMTAR for backward compatibility.
1789
+ AM_MISSING_PROG([AMTAR], [tar])
1790
+ m4_if([$1], [v7],
1791
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1792
+ [m4_case([$1], [ustar],, [pax],,
1793
+ [m4_fatal([Unknown tar format])])
1794
+ AC_MSG_CHECKING([how to create a $1 tar archive])
1795
+ # Loop over all known methods to create a tar archive until one works.
1796
+ _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1797
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1798
+ # Do not fold the above two line into one, because Tru64 sh and
1799
+ # Solaris sh will not grok spaces in the rhs of `-'.
1800
+ for _am_tool in $_am_tools
1801
+ do
1802
+ case $_am_tool in
1803
+ gnutar)
1804
+ for _am_tar in tar gnutar gtar;
1805
+ do
1806
+ AM_RUN_LOG([$_am_tar --version]) && break
1807
+ done
1808
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1809
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1810
+ am__untar="$_am_tar -xf -"
1811
+ ;;
1812
+ plaintar)
1813
+ # Must skip GNU tar: if it does not support --format= it doesn't create
1814
+ # ustar tarball either.
1815
+ (tar --version) >/dev/null 2>&1 && continue
1816
+ am__tar='tar chf - "$$tardir"'
1817
+ am__tar_='tar chf - "$tardir"'
1818
+ am__untar='tar xf -'
1819
+ ;;
1820
+ pax)
1821
+ am__tar='pax -L -x $1 -w "$$tardir"'
1822
+ am__tar_='pax -L -x $1 -w "$tardir"'
1823
+ am__untar='pax -r'
1824
+ ;;
1825
+ cpio)
1826
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1827
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1828
+ am__untar='cpio -i -H $1 -d'
1829
+ ;;
1830
+ none)
1831
+ am__tar=false
1832
+ am__tar_=false
1833
+ am__untar=false
1834
+ ;;
1835
+ esac
1836
+
1837
+ # If the value was cached, stop now. We just wanted to have am__tar
1838
+ # and am__untar set.
1839
+ test -n "${am_cv_prog_tar_$1}" && break
1840
+
1841
+ # tar/untar a dummy directory, and stop if the command works
1842
+ rm -rf conftest.dir
1843
+ mkdir conftest.dir
1844
+ echo GrepMe > conftest.dir/file
1845
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1846
+ rm -rf conftest.dir
1847
+ if test -s conftest.tar; then
1848
+ AM_RUN_LOG([$am__untar <conftest.tar])
1849
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1850
+ fi
1851
+ done
1852
+ rm -rf conftest.dir
1853
+
1854
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1855
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1856
+ AC_SUBST([am__tar])
1857
+ AC_SUBST([am__untar])
1858
+ ]) # _AM_PROG_TAR
1859
+
1860
+ m4_include([m4/ax_cc_maxopt.m4])
1861
+ m4_include([m4/ax_cflags_warn_all.m4])
1862
+ m4_include([m4/ax_check_compiler_flags.m4])
1863
+ m4_include([m4/ax_compiler_vendor.m4])
1864
+ m4_include([m4/ax_configure_args.m4])
1865
+ m4_include([m4/ax_enable_builddir.m4])
1866
+ m4_include([m4/ax_gcc_archflag.m4])
1867
+ m4_include([m4/ax_gcc_x86_cpuid.m4])
1868
+ m4_include([m4/libtool.m4])
1869
+ m4_include([m4/ltoptions.m4])
1870
+ m4_include([m4/ltsugar.m4])
1871
+ m4_include([m4/ltversion.m4])
1872
+ m4_include([m4/lt~obsolete.m4])
1873
+ m4_include([acinclude.m4])