ffi 1.1.5 → 1.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (629) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +338 -0
  3. data/COPYING +49 -0
  4. data/Gemfile +14 -0
  5. data/LICENSE +21 -11
  6. data/LICENSE.SPECS +22 -0
  7. data/README.md +136 -0
  8. data/Rakefile +149 -154
  9. data/ext/ffi_c/AbstractMemory.c +133 -57
  10. data/ext/ffi_c/AbstractMemory.h +21 -12
  11. data/ext/ffi_c/ArrayType.c +27 -14
  12. data/ext/ffi_c/ArrayType.h +21 -12
  13. data/ext/ffi_c/Buffer.c +29 -25
  14. data/ext/ffi_c/Call.c +154 -125
  15. data/ext/ffi_c/Call.h +43 -20
  16. data/ext/ffi_c/ClosurePool.c +100 -42
  17. data/ext/ffi_c/ClosurePool.h +24 -13
  18. data/ext/ffi_c/DynamicLibrary.c +47 -28
  19. data/ext/ffi_c/DynamicLibrary.h +70 -12
  20. data/ext/ffi_c/Function.c +119 -167
  21. data/ext/ffi_c/Function.h +23 -19
  22. data/ext/ffi_c/FunctionInfo.c +55 -25
  23. data/ext/ffi_c/LastError.c +70 -21
  24. data/ext/ffi_c/LastError.h +21 -12
  25. data/ext/ffi_c/LongDouble.c +15 -9
  26. data/ext/ffi_c/LongDouble.h +21 -16
  27. data/ext/ffi_c/MappedType.c +22 -15
  28. data/ext/ffi_c/MappedType.h +21 -12
  29. data/ext/ffi_c/MemoryPointer.c +58 -33
  30. data/ext/ffi_c/MemoryPointer.h +22 -19
  31. data/ext/ffi_c/MethodHandle.c +49 -50
  32. data/ext/ffi_c/MethodHandle.h +24 -14
  33. data/ext/ffi_c/Platform.c +28 -62
  34. data/ext/ffi_c/Platform.h +21 -12
  35. data/ext/ffi_c/Pointer.c +63 -46
  36. data/ext/ffi_c/Pointer.h +22 -19
  37. data/ext/ffi_c/Struct.c +198 -80
  38. data/ext/ffi_c/Struct.h +33 -18
  39. data/ext/ffi_c/StructByValue.c +23 -20
  40. data/ext/ffi_c/StructByValue.h +21 -12
  41. data/ext/ffi_c/StructLayout.c +184 -39
  42. data/ext/ffi_c/Thread.c +73 -270
  43. data/ext/ffi_c/Thread.h +32 -35
  44. data/ext/ffi_c/Type.c +26 -32
  45. data/ext/ffi_c/Type.h +24 -10
  46. data/ext/ffi_c/Types.c +28 -20
  47. data/ext/ffi_c/Types.h +25 -16
  48. data/ext/ffi_c/Variadic.c +78 -39
  49. data/ext/ffi_c/compat.h +25 -17
  50. data/ext/ffi_c/extconf.rb +68 -31
  51. data/ext/ffi_c/ffi.c +27 -20
  52. data/ext/ffi_c/libffi/.appveyor.yml +66 -0
  53. data/ext/ffi_c/libffi/.gitattributes +4 -0
  54. data/ext/ffi_c/libffi/.github/issue_template.md +10 -0
  55. data/ext/ffi_c/libffi/.gitignore +38 -0
  56. data/ext/ffi_c/libffi/.travis/ar-lib +270 -0
  57. data/ext/ffi_c/libffi/.travis/bfin-sim.exp +58 -0
  58. data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +14 -0
  59. data/ext/ffi_c/libffi/.travis/build-in-container.sh +12 -0
  60. data/ext/ffi_c/libffi/.travis/build.sh +142 -0
  61. data/ext/ffi_c/libffi/.travis/compile +351 -0
  62. data/ext/ffi_c/libffi/.travis/install.sh +71 -0
  63. data/ext/ffi_c/libffi/.travis/m32r-sim.exp +58 -0
  64. data/ext/ffi_c/libffi/.travis/moxie-sim.exp +60 -0
  65. data/ext/ffi_c/libffi/.travis/or1k-sim.exp +58 -0
  66. data/ext/ffi_c/libffi/.travis/powerpc-eabisim.exp +58 -0
  67. data/ext/ffi_c/libffi/.travis/site.exp +27 -0
  68. data/ext/ffi_c/libffi/.travis/wine-sim.exp +55 -0
  69. data/ext/ffi_c/libffi/.travis.yml +83 -0
  70. data/ext/ffi_c/libffi/{ChangeLog → ChangeLog.old} +6366 -3559
  71. data/ext/ffi_c/libffi/LICENSE +1 -1
  72. data/ext/ffi_c/libffi/LICENSE-BUILDTOOLS +353 -0
  73. data/ext/ffi_c/libffi/Makefile.am +123 -169
  74. data/ext/ffi_c/libffi/Makefile.in +1243 -1003
  75. data/ext/ffi_c/libffi/README.md +486 -0
  76. data/ext/ffi_c/libffi/acinclude.m4 +387 -0
  77. data/ext/ffi_c/libffi/autogen.sh +2 -0
  78. data/ext/ffi_c/libffi/config.guess +690 -504
  79. data/ext/ffi_c/libffi/config.sub +1353 -1207
  80. data/ext/ffi_c/libffi/configure +7308 -2449
  81. data/ext/ffi_c/libffi/configure.ac +178 -259
  82. data/ext/ffi_c/libffi/configure.host +311 -4
  83. data/ext/ffi_c/libffi/doc/Makefile.am +3 -0
  84. data/ext/ffi_c/libffi/doc/Makefile.in +815 -0
  85. data/ext/ffi_c/libffi/doc/libffi.texi +455 -58
  86. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  87. data/ext/ffi_c/libffi/fficonfig.h.in +37 -13
  88. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +201 -0
  89. data/ext/ffi_c/libffi/include/Makefile.am +3 -3
  90. data/ext/ffi_c/libffi/include/Makefile.in +196 -75
  91. data/ext/ffi_c/libffi/include/ffi.h.in +163 -67
  92. data/ext/ffi_c/libffi/include/ffi_cfi.h +55 -0
  93. data/ext/ffi_c/libffi/include/ffi_common.h +39 -12
  94. data/ext/ffi_c/libffi/install-sh +207 -209
  95. data/ext/ffi_c/libffi/libffi.map.in +76 -0
  96. data/ext/ffi_c/libffi/libffi.pc.in +3 -2
  97. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +997 -0
  98. data/ext/ffi_c/libffi/libtool-ldflags +106 -0
  99. data/ext/ffi_c/libffi/libtool-version +1 -1
  100. data/ext/ffi_c/libffi/ltmain.sh +3641 -2026
  101. data/ext/ffi_c/libffi/m4/asmcfi.m4 +13 -0
  102. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +50 -0
  103. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +32 -14
  104. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +33 -106
  105. data/ext/ffi_c/libffi/m4/ax_check_compile_flag.m4 +53 -0
  106. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +38 -13
  107. data/ext/ffi_c/libffi/m4/ax_configure_args.m4 +8 -29
  108. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +11 -9
  109. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +104 -52
  110. data/ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4 +18 -8
  111. data/ext/ffi_c/libffi/m4/ax_require_defined.m4 +37 -0
  112. data/ext/ffi_c/libffi/make_sunver.pl +333 -0
  113. data/ext/ffi_c/libffi/man/Makefile.am +2 -2
  114. data/ext/ffi_c/libffi/man/Makefile.in +151 -55
  115. data/ext/ffi_c/libffi/man/ffi.3 +10 -0
  116. data/ext/ffi_c/libffi/man/ffi_prep_cif.3 +6 -4
  117. data/ext/ffi_c/libffi/man/ffi_prep_cif_var.3 +73 -0
  118. data/ext/ffi_c/libffi/missing +153 -314
  119. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.sln +33 -0
  120. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj +130 -0
  121. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.filters +57 -0
  122. data/ext/ffi_c/libffi/msvc_build/aarch64/Ffi_staticLib.vcxproj.user +4 -0
  123. data/ext/ffi_c/libffi/{include/ffi.h.vc64 → msvc_build/aarch64/aarch64_include/ffi.h} +151 -67
  124. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/fficonfig.h +219 -0
  125. data/ext/ffi_c/libffi/msvcc.sh +176 -20
  126. data/ext/ffi_c/libffi/src/aarch64/ffi.c +1025 -0
  127. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +97 -0
  128. data/ext/ffi_c/libffi/src/aarch64/internal.h +68 -0
  129. data/ext/ffi_c/libffi/src/aarch64/sysv.S +451 -0
  130. data/ext/ffi_c/libffi/src/aarch64/win64_armasm.S +506 -0
  131. data/ext/ffi_c/libffi/src/alpha/ffi.c +335 -98
  132. data/ext/ffi_c/libffi/src/alpha/ffitarget.h +10 -1
  133. data/ext/ffi_c/libffi/src/alpha/internal.h +23 -0
  134. data/ext/ffi_c/libffi/src/alpha/osf.S +161 -266
  135. data/ext/ffi_c/libffi/src/arc/arcompact.S +135 -0
  136. data/ext/ffi_c/libffi/src/arc/ffi.c +266 -0
  137. data/ext/ffi_c/libffi/src/arc/ffitarget.h +53 -0
  138. data/ext/ffi_c/libffi/src/arm/ffi.c +663 -515
  139. data/ext/ffi_c/libffi/src/arm/ffitarget.h +32 -8
  140. data/ext/ffi_c/libffi/src/arm/internal.h +7 -0
  141. data/ext/ffi_c/libffi/src/arm/sysv.S +305 -417
  142. data/ext/ffi_c/libffi/src/arm/sysv_msvc_arm32.S +311 -0
  143. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +6 -1
  144. data/ext/ffi_c/libffi/src/bfin/ffi.c +196 -0
  145. data/ext/ffi_c/libffi/src/bfin/ffitarget.h +43 -0
  146. data/ext/ffi_c/libffi/src/bfin/sysv.S +179 -0
  147. data/ext/ffi_c/libffi/src/closures.c +465 -59
  148. data/ext/ffi_c/libffi/src/cris/ffi.c +10 -7
  149. data/ext/ffi_c/libffi/src/cris/ffitarget.h +6 -1
  150. data/ext/ffi_c/libffi/src/csky/ffi.c +395 -0
  151. data/ext/ffi_c/libffi/src/csky/ffitarget.h +63 -0
  152. data/ext/ffi_c/libffi/src/csky/sysv.S +371 -0
  153. data/ext/ffi_c/libffi/src/debug.c +6 -1
  154. data/ext/ffi_c/libffi/src/dlmalloc.c +17 -12
  155. data/ext/ffi_c/libffi/src/frv/ffi.c +2 -2
  156. data/ext/ffi_c/libffi/src/frv/ffitarget.h +6 -1
  157. data/ext/ffi_c/libffi/src/ia64/ffi.c +35 -13
  158. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +8 -2
  159. data/ext/ffi_c/libffi/src/ia64/unix.S +8 -1
  160. data/ext/ffi_c/libffi/src/java_raw_api.c +23 -5
  161. data/ext/ffi_c/libffi/src/kvx/asm.h +5 -0
  162. data/ext/ffi_c/libffi/src/kvx/ffi.c +273 -0
  163. data/ext/ffi_c/libffi/src/kvx/ffitarget.h +75 -0
  164. data/ext/ffi_c/libffi/src/kvx/sysv.S +127 -0
  165. data/ext/ffi_c/libffi/src/m32r/ffi.c +1 -1
  166. data/ext/ffi_c/libffi/src/m32r/ffitarget.h +6 -1
  167. data/ext/ffi_c/libffi/src/m68k/ffi.c +87 -13
  168. data/ext/ffi_c/libffi/src/m68k/ffitarget.h +6 -1
  169. data/ext/ffi_c/libffi/src/m68k/sysv.S +119 -32
  170. data/ext/ffi_c/libffi/src/m88k/ffi.c +400 -0
  171. data/ext/ffi_c/libffi/src/m88k/ffitarget.h +49 -0
  172. data/ext/ffi_c/libffi/src/m88k/obsd.S +209 -0
  173. data/ext/ffi_c/libffi/src/metag/ffi.c +330 -0
  174. data/ext/ffi_c/libffi/{fficonfig.hw → src/metag/ffitarget.h} +22 -26
  175. data/ext/ffi_c/libffi/src/metag/sysv.S +311 -0
  176. data/ext/ffi_c/libffi/src/microblaze/ffi.c +321 -0
  177. data/ext/ffi_c/libffi/src/microblaze/ffitarget.h +53 -0
  178. data/ext/ffi_c/libffi/src/microblaze/sysv.S +302 -0
  179. data/ext/ffi_c/libffi/src/mips/ffi.c +135 -37
  180. data/ext/ffi_c/libffi/src/mips/ffitarget.h +16 -14
  181. data/ext/ffi_c/libffi/src/mips/n32.S +128 -56
  182. data/ext/ffi_c/libffi/src/mips/o32.S +150 -27
  183. data/ext/ffi_c/libffi/src/moxie/eabi.S +55 -82
  184. data/ext/ffi_c/libffi/src/moxie/ffi.c +55 -46
  185. data/ext/ffi_c/libffi/src/moxie/ffitarget.h +52 -0
  186. data/ext/ffi_c/libffi/src/nios2/ffi.c +304 -0
  187. data/ext/ffi_c/libffi/src/nios2/ffitarget.h +52 -0
  188. data/ext/ffi_c/libffi/src/nios2/sysv.S +136 -0
  189. data/ext/ffi_c/libffi/src/or1k/ffi.c +328 -0
  190. data/ext/ffi_c/libffi/src/or1k/ffitarget.h +58 -0
  191. data/ext/ffi_c/libffi/src/or1k/sysv.S +107 -0
  192. data/ext/ffi_c/libffi/src/pa/ffi.c +46 -91
  193. data/ext/ffi_c/libffi/src/pa/ffitarget.h +9 -7
  194. data/ext/ffi_c/libffi/src/pa/hpux32.S +4 -2
  195. data/ext/ffi_c/libffi/src/pa/linux.S +27 -4
  196. data/ext/ffi_c/libffi/src/powerpc/aix.S +245 -7
  197. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +253 -4
  198. data/ext/ffi_c/libffi/src/powerpc/asm.h +2 -2
  199. data/ext/ffi_c/libffi/src/powerpc/darwin.S +2 -7
  200. data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +22 -26
  201. data/ext/ffi_c/libffi/src/powerpc/ffi.c +105 -1378
  202. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +123 -30
  203. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +1153 -0
  204. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +105 -0
  205. data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +923 -0
  206. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +110 -45
  207. data/ext/ffi_c/libffi/src/powerpc/linux64.S +189 -85
  208. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +436 -108
  209. data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +138 -68
  210. data/ext/ffi_c/libffi/src/powerpc/sysv.S +73 -119
  211. data/ext/ffi_c/libffi/src/prep_cif.c +111 -25
  212. data/ext/ffi_c/libffi/src/raw_api.c +18 -5
  213. data/ext/ffi_c/libffi/src/riscv/ffi.c +481 -0
  214. data/ext/ffi_c/libffi/src/riscv/ffitarget.h +69 -0
  215. data/ext/ffi_c/libffi/src/riscv/sysv.S +293 -0
  216. data/ext/ffi_c/libffi/src/s390/ffi.c +294 -318
  217. data/ext/ffi_c/libffi/src/s390/ffitarget.h +9 -1
  218. data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
  219. data/ext/ffi_c/libffi/src/s390/sysv.S +257 -366
  220. data/ext/ffi_c/libffi/src/sh/ffi.c +4 -3
  221. data/ext/ffi_c/libffi/src/sh/ffitarget.h +6 -1
  222. data/ext/ffi_c/libffi/src/sh64/ffi.c +3 -2
  223. data/ext/ffi_c/libffi/src/sh64/ffitarget.h +6 -1
  224. data/ext/ffi_c/libffi/src/sparc/ffi.c +326 -527
  225. data/ext/ffi_c/libffi/src/sparc/ffi64.c +608 -0
  226. data/ext/ffi_c/libffi/src/sparc/ffitarget.h +20 -7
  227. data/ext/ffi_c/libffi/src/sparc/internal.h +26 -0
  228. data/ext/ffi_c/libffi/src/sparc/v8.S +364 -234
  229. data/ext/ffi_c/libffi/src/sparc/v9.S +340 -207
  230. data/ext/ffi_c/libffi/src/tile/ffi.c +355 -0
  231. data/ext/ffi_c/libffi/src/tile/ffitarget.h +65 -0
  232. data/ext/ffi_c/libffi/src/tile/tile.S +360 -0
  233. data/ext/ffi_c/libffi/src/types.c +46 -15
  234. data/ext/ffi_c/libffi/src/vax/elfbsd.S +195 -0
  235. data/ext/ffi_c/libffi/src/vax/ffi.c +276 -0
  236. data/ext/ffi_c/libffi/src/vax/ffitarget.h +49 -0
  237. data/ext/ffi_c/libffi/src/x86/asmnames.h +30 -0
  238. data/ext/ffi_c/libffi/src/x86/ffi.c +624 -498
  239. data/ext/ffi_c/libffi/src/x86/ffi64.c +379 -119
  240. data/ext/ffi_c/libffi/src/x86/ffitarget.h +74 -35
  241. data/ext/ffi_c/libffi/src/x86/ffiw64.c +318 -0
  242. data/ext/ffi_c/libffi/src/x86/internal.h +29 -0
  243. data/ext/ffi_c/libffi/src/x86/internal64.h +22 -0
  244. data/ext/ffi_c/libffi/src/x86/sysv.S +1070 -400
  245. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +995 -0
  246. data/ext/ffi_c/libffi/src/x86/unix64.S +494 -299
  247. data/ext/ffi_c/libffi/src/x86/win64.S +231 -458
  248. data/ext/ffi_c/libffi/src/x86/win64_intel.S +238 -0
  249. data/ext/ffi_c/libffi/src/xtensa/ffi.c +298 -0
  250. data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +53 -0
  251. data/ext/ffi_c/libffi/src/xtensa/sysv.S +258 -0
  252. data/ext/ffi_c/libffi/stamp-h.in +1 -0
  253. data/ext/ffi_c/libffi/testsuite/Makefile.am +115 -73
  254. data/ext/ffi_c/libffi/testsuite/Makefile.in +262 -114
  255. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +334 -24
  256. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +21 -1
  257. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/Makefile +28 -0
  258. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/README +78 -0
  259. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/alignof.h +50 -0
  260. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/bhaible.exp +63 -0
  261. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1745 -0
  262. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-callback.c +2885 -0
  263. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +743 -0
  264. data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +46 -0
  265. data/ext/ffi_c/libffi/testsuite/libffi.call/align_stdcall.c +46 -0
  266. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +28 -6
  267. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +2 -2
  268. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +25 -40
  269. data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +3 -1
  270. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +15 -12
  271. data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +4 -2
  272. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +107 -0
  273. data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +6 -16
  274. data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +57 -0
  275. data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +70 -0
  276. data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +78 -0
  277. data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -1
  278. data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +46 -0
  279. data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +127 -0
  280. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +1 -0
  281. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
  282. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +1 -1
  283. data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +1 -1
  284. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +2 -2
  285. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +49 -0
  286. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +49 -0
  287. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +55 -0
  288. data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +9 -7
  289. data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +57 -0
  290. data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +7 -7
  291. data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +7 -6
  292. data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +9 -8
  293. data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +9 -8
  294. data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +9 -9
  295. data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +9 -9
  296. data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +9 -8
  297. data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +9 -8
  298. data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +61 -0
  299. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +196 -0
  300. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +121 -0
  301. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +123 -0
  302. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +125 -0
  303. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure.exp +67 -0
  304. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn0.c +0 -0
  305. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn1.c +0 -0
  306. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn2.c +0 -0
  307. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn3.c +0 -0
  308. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn4.c +0 -0
  309. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn5.c +0 -0
  310. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_fn6.c +0 -0
  311. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/closure_loc_fn0.c +0 -0
  312. data/ext/ffi_c/libffi/testsuite/{libffi.call/closure_stdcall.c → libffi.closures/closure_simple.c} +7 -16
  313. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_12byte.c +4 -4
  314. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_16byte.c +4 -4
  315. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_18byte.c +4 -4
  316. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_19byte.c +4 -4
  317. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_1_1byte.c +4 -4
  318. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte.c +4 -4
  319. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_20byte1.c +4 -4
  320. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_24byte.c +5 -5
  321. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_2byte.c +4 -4
  322. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3_1byte.c +4 -4
  323. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte1.c +4 -4
  324. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_3byte2.c +4 -4
  325. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +95 -0
  326. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4_1byte.c +4 -4
  327. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_4byte.c +4 -4
  328. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5_1_byte.c +4 -4
  329. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_5byte.c +4 -4
  330. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_64byte.c +5 -5
  331. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6_1_byte.c +4 -4
  332. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_6byte.c +4 -4
  333. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7_1_byte.c +4 -4
  334. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_7byte.c +4 -4
  335. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_8byte.c +4 -4
  336. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte1.c +4 -4
  337. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_9byte2.c +4 -4
  338. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_double.c +4 -4
  339. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_float.c +4 -4
  340. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble.c +4 -4
  341. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split.c +4 -6
  342. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_longdouble_split2.c +4 -6
  343. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_pointer.c +4 -4
  344. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint16.c +4 -4
  345. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint32.c +4 -4
  346. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_sint64.c +4 -4
  347. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint16.c +4 -4
  348. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint32.c +4 -4
  349. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_align_uint64.c +4 -4
  350. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_dbls_struct.c +4 -4
  351. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double.c +0 -0
  352. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_double_va.c +10 -9
  353. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_float.c +0 -0
  354. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble.c +3 -3
  355. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_longdouble_va.c +10 -9
  356. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_args.c +70 -0
  357. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_many_mixed_float_double.c +55 -0
  358. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_schar.c +0 -0
  359. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshort.c +0 -0
  360. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_sshortchar.c +0 -0
  361. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_uchar.c +0 -0
  362. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushort.c +0 -0
  363. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_multi_ushortchar.c +0 -0
  364. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer.c +1 -1
  365. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_pointer_stack.c +11 -9
  366. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_schar.c +0 -0
  367. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sint.c +0 -0
  368. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_sshort.c +0 -0
  369. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +114 -0
  370. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uchar.c +0 -0
  371. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar_va.c +44 -0
  372. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_uint.c +0 -0
  373. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +45 -0
  374. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +45 -0
  375. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ulonglong.c +5 -5
  376. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/cls_ushort.c +0 -0
  377. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort_va.c +44 -0
  378. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/err_bad_abi.c +0 -0
  379. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +138 -0
  380. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/huge_struct.c +20 -19
  381. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct.c +6 -6
  382. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct1.c +8 -8
  383. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct10.c +7 -6
  384. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +121 -0
  385. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct2.c +5 -5
  386. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct3.c +5 -5
  387. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct4.c +5 -5
  388. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct5.c +5 -5
  389. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct6.c +6 -6
  390. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct7.c +5 -5
  391. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct8.c +6 -6
  392. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/nested_struct9.c +6 -6
  393. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/problem1.c +0 -0
  394. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large.c +7 -7
  395. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_large2.c +7 -7
  396. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium.c +5 -5
  397. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/stret_medium2.c +5 -5
  398. data/ext/ffi_c/libffi/testsuite/{libffi.call → libffi.closures}/testclosure.c +2 -2
  399. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.closures}/unwindtest.cc +3 -10
  400. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.closures}/unwindtest_ffi_call.cc +3 -2
  401. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +91 -0
  402. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +10 -0
  403. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +10 -0
  404. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +10 -0
  405. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +42 -0
  406. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +10 -0
  407. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +10 -0
  408. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +10 -0
  409. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +71 -0
  410. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +10 -0
  411. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +10 -0
  412. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +10 -0
  413. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +80 -0
  414. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +10 -0
  415. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +16 -0
  416. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +10 -0
  417. data/ext/ffi_c/libffi/testsuite/{libffi.special/special.exp → libffi.complex/complex.exp} +9 -8
  418. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +51 -0
  419. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +7 -0
  420. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +7 -0
  421. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +7 -0
  422. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +10 -0
  423. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +10 -0
  424. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +86 -0
  425. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +10 -0
  426. data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +1 -0
  427. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +78 -0
  428. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +10 -0
  429. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +10 -0
  430. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +10 -0
  431. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +37 -0
  432. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +41 -0
  433. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +10 -0
  434. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +10 -0
  435. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +10 -0
  436. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +44 -0
  437. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +10 -0
  438. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +10 -0
  439. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +10 -0
  440. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +10 -0
  441. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +10 -0
  442. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +10 -0
  443. data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +34 -0
  444. data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +28 -0
  445. data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +1 -0
  446. data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +36 -0
  447. data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +19 -0
  448. data/ext/ffi_c/libffi.bsd.mk +12 -6
  449. data/ext/ffi_c/libffi.darwin.mk +21 -9
  450. data/ext/ffi_c/libffi.gnu.mk +3 -2
  451. data/ext/ffi_c/libffi.mk +11 -6
  452. data/ext/ffi_c/libffi.vc.mk +1 -1
  453. data/ext/ffi_c/libffi.vc64.mk +1 -1
  454. data/ext/ffi_c/rbffi.h +22 -14
  455. data/ext/ffi_c/rbffi_endian.h +11 -2
  456. data/ffi.gemspec +42 -0
  457. data/lib/ffi/abstract_memory.rb +44 -0
  458. data/lib/ffi/autopointer.rb +70 -50
  459. data/lib/ffi/data_converter.rb +67 -0
  460. data/lib/ffi/enum.rb +159 -24
  461. data/lib/ffi/errno.rb +21 -11
  462. data/lib/ffi/ffi.rb +25 -11
  463. data/lib/ffi/io.rb +24 -14
  464. data/lib/ffi/library.rb +174 -67
  465. data/lib/ffi/managedstruct.rb +63 -34
  466. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  467. data/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
  468. data/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
  469. data/lib/ffi/platform/aarch64-linux/types.conf +104 -0
  470. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  471. data/lib/ffi/platform/arm-freebsd/types.conf +152 -0
  472. data/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
  473. data/lib/ffi/platform/arm-linux/types.conf +110 -82
  474. data/lib/ffi/platform/i386-cygwin/types.conf +3 -0
  475. data/lib/ffi/platform/i386-darwin/types.conf +63 -63
  476. data/lib/ffi/platform/i386-freebsd/types.conf +89 -89
  477. data/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
  478. data/lib/ffi/platform/{i486-gnu → i386-gnu}/types.conf +84 -84
  479. data/lib/ffi/platform/i386-linux/types.conf +77 -77
  480. data/lib/ffi/platform/i386-netbsd/types.conf +87 -87
  481. data/lib/ffi/platform/i386-openbsd/types.conf +89 -87
  482. data/lib/ffi/platform/i386-solaris/types.conf +96 -96
  483. data/lib/ffi/platform/i386-windows/types.conf +43 -96
  484. data/lib/ffi/platform/ia64-linux/types.conf +79 -79
  485. data/lib/ffi/platform/mips-linux/types.conf +79 -79
  486. data/lib/ffi/platform/mips64-linux/types.conf +104 -0
  487. data/lib/ffi/platform/mips64el-linux/types.conf +104 -0
  488. data/lib/ffi/platform/mipsel-linux/types.conf +79 -79
  489. data/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
  490. data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
  491. data/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
  492. data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
  493. data/lib/ffi/platform/powerpc-aix/types.conf +155 -155
  494. data/lib/ffi/platform/powerpc-darwin/types.conf +63 -63
  495. data/lib/ffi/platform/powerpc-linux/types.conf +108 -78
  496. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  497. data/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
  498. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  499. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  500. data/lib/ffi/platform/s390-linux/types.conf +79 -79
  501. data/lib/ffi/platform/s390x-linux/types.conf +79 -79
  502. data/lib/ffi/platform/sparc-linux/types.conf +79 -79
  503. data/lib/ffi/platform/sparc-solaris/types.conf +103 -103
  504. data/lib/ffi/platform/sparc64-linux/types.conf +102 -0
  505. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  506. data/lib/ffi/platform/sparcv9-solaris/types.conf +103 -103
  507. data/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
  508. data/lib/ffi/platform/x86_64-darwin/types.conf +93 -63
  509. data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  510. data/lib/ffi/platform/x86_64-freebsd/types.conf +90 -88
  511. data/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
  512. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  513. data/lib/ffi/platform/x86_64-linux/types.conf +107 -77
  514. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  515. data/lib/ffi/platform/x86_64-netbsd/types.conf +89 -87
  516. data/lib/ffi/platform/x86_64-openbsd/types.conf +100 -92
  517. data/lib/ffi/platform/x86_64-solaris/types.conf +96 -96
  518. data/lib/ffi/platform/x86_64-windows/types.conf +52 -0
  519. data/lib/ffi/platform.rb +81 -26
  520. data/lib/ffi/pointer.rb +72 -27
  521. data/lib/ffi/struct.rb +99 -66
  522. data/lib/ffi/struct_by_reference.rb +72 -0
  523. data/lib/ffi/struct_layout.rb +96 -0
  524. data/lib/ffi/struct_layout_builder.rb +82 -17
  525. data/lib/ffi/tools/const_generator.rb +11 -8
  526. data/lib/ffi/tools/generator.rb +48 -1
  527. data/lib/ffi/tools/generator_task.rb +13 -16
  528. data/lib/ffi/tools/struct_generator.rb +6 -5
  529. data/lib/ffi/tools/types_generator.rb +14 -10
  530. data/lib/ffi/types.rb +31 -14
  531. data/lib/ffi/union.rb +23 -12
  532. data/lib/ffi/variadic.rb +25 -21
  533. data/lib/ffi/version.rb +3 -0
  534. data/lib/ffi.rb +20 -8
  535. data/rakelib/ffi_gem_helper.rb +65 -0
  536. data/samples/getlogin.rb +8 -0
  537. data/samples/getpid.rb +8 -0
  538. data/samples/gettimeofday.rb +18 -0
  539. data/samples/hello.rb +8 -0
  540. data/samples/inotify.rb +60 -0
  541. data/samples/pty.rb +75 -0
  542. data/samples/qsort.rb +20 -0
  543. metadata +413 -263
  544. data/History.txt +0 -1
  545. data/README.rdoc +0 -102
  546. data/ext/ffi_c/DataConverter.c +0 -91
  547. data/ext/ffi_c/Ffi_c.iml +0 -12
  548. data/ext/ffi_c/StructByReference.c +0 -158
  549. data/ext/ffi_c/StructByReference.h +0 -50
  550. data/ext/ffi_c/libffi/ChangeLog.libffi +0 -584
  551. data/ext/ffi_c/libffi/ChangeLog.libgcj +0 -40
  552. data/ext/ffi_c/libffi/ChangeLog.v1 +0 -764
  553. data/ext/ffi_c/libffi/Makefile.vc +0 -141
  554. data/ext/ffi_c/libffi/Makefile.vc64 +0 -141
  555. data/ext/ffi_c/libffi/README +0 -342
  556. data/ext/ffi_c/libffi/aclocal.m4 +0 -1873
  557. data/ext/ffi_c/libffi/build-ios.sh +0 -67
  558. data/ext/ffi_c/libffi/compile +0 -143
  559. data/ext/ffi_c/libffi/depcomp +0 -630
  560. data/ext/ffi_c/libffi/doc/libffi.info +0 -593
  561. data/ext/ffi_c/libffi/doc/stamp-vti +0 -4
  562. data/ext/ffi_c/libffi/include/ffi.h.vc +0 -427
  563. data/ext/ffi_c/libffi/m4/ax_check_compiler_flags.m4 +0 -76
  564. data/ext/ffi_c/libffi/m4/libtool.m4 +0 -7831
  565. data/ext/ffi_c/libffi/m4/ltoptions.m4 +0 -369
  566. data/ext/ffi_c/libffi/m4/ltsugar.m4 +0 -123
  567. data/ext/ffi_c/libffi/m4/ltversion.m4 +0 -23
  568. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +0 -98
  569. data/ext/ffi_c/libffi/mdate-sh +0 -201
  570. data/ext/ffi_c/libffi/src/arm/gentramp.sh +0 -118
  571. data/ext/ffi_c/libffi/src/arm/trampoline.S +0 -4450
  572. data/ext/ffi_c/libffi/src/x86/darwin.S +0 -444
  573. data/ext/ffi_c/libffi/src/x86/darwin64.S +0 -416
  574. data/ext/ffi_c/libffi/src/x86/freebsd.S +0 -458
  575. data/ext/ffi_c/libffi/src/x86/win32.S +0 -1065
  576. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +0 -300
  577. data/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +0 -63
  578. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +0 -44
  579. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +0 -96
  580. data/ext/ffi_c/libffi/texinfo.tex +0 -7210
  581. data/ext/ffi_c/win32/stdint.h +0 -199
  582. data/gen/Rakefile +0 -30
  583. data/gen/log +0 -1
  584. data/lib/Lib.iml +0 -13
  585. data/spec/ffi/Ffi.iml +0 -12
  586. data/spec/ffi/async_callback_spec.rb +0 -46
  587. data/spec/ffi/bool_spec.rb +0 -40
  588. data/spec/ffi/buffer_spec.rb +0 -215
  589. data/spec/ffi/callback_spec.rb +0 -668
  590. data/spec/ffi/custom_param_type.rb +0 -47
  591. data/spec/ffi/custom_type_spec.rb +0 -85
  592. data/spec/ffi/dup_spec.rb +0 -65
  593. data/spec/ffi/enum_spec.rb +0 -227
  594. data/spec/ffi/errno_spec.rb +0 -29
  595. data/spec/ffi/ffi_spec.rb +0 -40
  596. data/spec/ffi/function_spec.rb +0 -87
  597. data/spec/ffi/library_spec.rb +0 -208
  598. data/spec/ffi/long_double.rb +0 -41
  599. data/spec/ffi/managed_struct_spec.rb +0 -72
  600. data/spec/ffi/number_spec.rb +0 -247
  601. data/spec/ffi/pointer_spec.rb +0 -214
  602. data/spec/ffi/rbx/attach_function_spec.rb +0 -28
  603. data/spec/ffi/rbx/memory_pointer_spec.rb +0 -115
  604. data/spec/ffi/rbx/spec_helper.rb +0 -1
  605. data/spec/ffi/rbx/struct_spec.rb +0 -13
  606. data/spec/ffi/spec_helper.rb +0 -35
  607. data/spec/ffi/string_spec.rb +0 -119
  608. data/spec/ffi/strptr_spec.rb +0 -61
  609. data/spec/ffi/struct_callback_spec.rb +0 -80
  610. data/spec/ffi/struct_initialize_spec.rb +0 -46
  611. data/spec/ffi/struct_packed_spec.rb +0 -62
  612. data/spec/ffi/struct_spec.rb +0 -719
  613. data/spec/ffi/typedef_spec.rb +0 -89
  614. data/spec/ffi/union_spec.rb +0 -76
  615. data/spec/ffi/variadic_spec.rb +0 -103
  616. data/spec/spec.opts +0 -4
  617. data/tasks/ann.rake +0 -80
  618. data/tasks/extension.rake +0 -32
  619. data/tasks/gem.rake +0 -199
  620. data/tasks/git.rake +0 -41
  621. data/tasks/notes.rake +0 -27
  622. data/tasks/post_load.rake +0 -34
  623. data/tasks/rdoc.rake +0 -50
  624. data/tasks/rubyforge.rake +0 -55
  625. data/tasks/setup.rb +0 -301
  626. data/tasks/spec.rake +0 -54
  627. data/tasks/svn.rake +0 -47
  628. data/tasks/test.rake +0 -40
  629. data/tasks/yard.rake +0 -11
@@ -1,1873 +0,0 @@
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])