ffi 1.9.18 → 1.9.21

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

Potentially problematic release.


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

Files changed (366) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/Rakefile +14 -3
  4. data/ext/ffi_c/AbstractMemory.c +6 -1
  5. data/ext/ffi_c/Platform.c +10 -2
  6. data/ext/ffi_c/extconf.rb +7 -2
  7. data/ext/ffi_c/libffi.bsd.mk +9 -3
  8. data/ext/ffi_c/libffi.darwin.mk +14 -4
  9. data/ext/ffi_c/libffi.gnu.mk +2 -1
  10. data/ext/ffi_c/libffi.mk +9 -4
  11. data/ext/ffi_c/libffi/ChangeLog.libffi +2 -2
  12. data/ext/ffi_c/libffi/{ChangeLog → ChangeLog.libffi-3.1} +1402 -2
  13. data/ext/ffi_c/libffi/ChangeLog.v1 +1 -1
  14. data/ext/ffi_c/libffi/LICENSE +1 -1
  15. data/ext/ffi_c/libffi/Makefile.am +166 -157
  16. data/ext/ffi_c/libffi/README +164 -52
  17. data/ext/ffi_c/libffi/acinclude.m4 +381 -0
  18. data/ext/ffi_c/libffi/autogen.sh +2 -0
  19. data/ext/ffi_c/libffi/configure.ac +148 -256
  20. data/ext/ffi_c/libffi/configure.host +265 -4
  21. data/ext/ffi_c/libffi/doc/Makefile.am +3 -0
  22. data/ext/ffi_c/libffi/doc/libffi.texi +430 -45
  23. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  24. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +207 -0
  25. data/ext/ffi_c/libffi/include/Makefile.am +3 -3
  26. data/ext/ffi_c/libffi/include/ffi.h.in +107 -50
  27. data/ext/ffi_c/libffi/include/ffi_cfi.h +55 -0
  28. data/ext/ffi_c/libffi/include/ffi_common.h +32 -11
  29. data/ext/ffi_c/libffi/libffi.map.in +80 -0
  30. data/ext/ffi_c/libffi/libffi.pc.in +3 -2
  31. data/ext/ffi_c/libffi/libffi.xcodeproj/project.pbxproj +637 -0
  32. data/ext/ffi_c/libffi/libtool-ldflags +106 -0
  33. data/ext/ffi_c/libffi/libtool-version +1 -1
  34. data/ext/ffi_c/libffi/m4/asmcfi.m4 +13 -0
  35. data/ext/ffi_c/libffi/m4/ax_append_flag.m4 +69 -0
  36. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +13 -8
  37. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +31 -104
  38. data/ext/ffi_c/libffi/m4/{ax_check_compiler_flags.m4 → ax_check_compile_flag.m4} +30 -34
  39. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +32 -11
  40. data/ext/ffi_c/libffi/m4/ax_enable_builddir.m4 +6 -5
  41. data/ext/ffi_c/libffi/m4/ax_gcc_archflag.m4 +31 -21
  42. data/ext/ffi_c/libffi/man/Makefile.am +2 -2
  43. data/ext/ffi_c/libffi/man/ffi.3 +10 -0
  44. data/ext/ffi_c/libffi/man/ffi_prep_cif.3 +6 -4
  45. data/ext/ffi_c/libffi/man/ffi_prep_cif_var.3 +73 -0
  46. data/ext/ffi_c/libffi/msvcc.sh +72 -9
  47. data/ext/ffi_c/libffi/src/aarch64/ffi.c +941 -0
  48. data/ext/ffi_c/libffi/src/aarch64/ffitarget.h +81 -0
  49. data/ext/ffi_c/libffi/src/aarch64/internal.h +67 -0
  50. data/ext/ffi_c/libffi/src/aarch64/sysv.S +438 -0
  51. data/ext/ffi_c/libffi/src/alpha/ffi.c +335 -98
  52. data/ext/ffi_c/libffi/src/alpha/ffitarget.h +10 -1
  53. data/ext/ffi_c/libffi/src/alpha/internal.h +23 -0
  54. data/ext/ffi_c/libffi/src/alpha/osf.S +161 -266
  55. data/ext/ffi_c/libffi/src/arc/arcompact.S +135 -0
  56. data/ext/ffi_c/libffi/src/arc/ffi.c +266 -0
  57. data/ext/ffi_c/libffi/src/arc/ffitarget.h +53 -0
  58. data/ext/ffi_c/libffi/src/arm/ffi.c +597 -517
  59. data/ext/ffi_c/libffi/src/arm/ffitarget.h +24 -7
  60. data/ext/ffi_c/libffi/src/arm/internal.h +7 -0
  61. data/ext/ffi_c/libffi/src/arm/sysv.S +303 -417
  62. data/ext/ffi_c/libffi/src/avr32/ffitarget.h +6 -1
  63. data/ext/ffi_c/libffi/src/bfin/ffi.c +196 -0
  64. data/ext/ffi_c/libffi/src/bfin/ffitarget.h +43 -0
  65. data/ext/ffi_c/libffi/src/bfin/sysv.S +179 -0
  66. data/ext/ffi_c/libffi/src/closures.c +319 -44
  67. data/ext/ffi_c/libffi/src/cris/ffi.c +10 -7
  68. data/ext/ffi_c/libffi/src/cris/ffitarget.h +6 -1
  69. data/ext/ffi_c/libffi/src/debug.c +6 -1
  70. data/ext/ffi_c/libffi/src/dlmalloc.c +16 -11
  71. data/ext/ffi_c/libffi/src/frv/ffi.c +1 -1
  72. data/ext/ffi_c/libffi/src/frv/ffitarget.h +6 -1
  73. data/ext/ffi_c/libffi/src/ia64/ffi.c +11 -7
  74. data/ext/ffi_c/libffi/src/ia64/ffitarget.h +6 -1
  75. data/ext/ffi_c/libffi/src/java_raw_api.c +23 -5
  76. data/ext/ffi_c/libffi/src/m32r/ffi.c +1 -1
  77. data/ext/ffi_c/libffi/src/m32r/ffitarget.h +6 -1
  78. data/ext/ffi_c/libffi/src/m68k/ffi.c +87 -13
  79. data/ext/ffi_c/libffi/src/m68k/ffitarget.h +6 -1
  80. data/ext/ffi_c/libffi/src/m68k/sysv.S +119 -32
  81. data/ext/ffi_c/libffi/src/m88k/ffi.c +400 -0
  82. data/ext/ffi_c/libffi/src/m88k/ffitarget.h +49 -0
  83. data/ext/ffi_c/libffi/src/m88k/obsd.S +209 -0
  84. data/ext/ffi_c/libffi/src/metag/ffi.c +330 -0
  85. data/ext/ffi_c/libffi/{fficonfig.hw → src/metag/ffitarget.h} +22 -26
  86. data/ext/ffi_c/libffi/src/metag/sysv.S +311 -0
  87. data/ext/ffi_c/libffi/src/microblaze/ffi.c +321 -0
  88. data/ext/ffi_c/libffi/src/microblaze/ffitarget.h +53 -0
  89. data/ext/ffi_c/libffi/src/microblaze/sysv.S +302 -0
  90. data/ext/ffi_c/libffi/src/mips/ffi.c +95 -28
  91. data/ext/ffi_c/libffi/src/mips/ffitarget.h +9 -2
  92. data/ext/ffi_c/libffi/src/mips/n32.S +126 -56
  93. data/ext/ffi_c/libffi/src/mips/o32.S +148 -27
  94. data/ext/ffi_c/libffi/src/moxie/eabi.S +55 -82
  95. data/ext/ffi_c/libffi/src/moxie/ffi.c +40 -44
  96. data/ext/ffi_c/libffi/src/moxie/ffitarget.h +52 -0
  97. data/ext/ffi_c/libffi/src/nios2/ffi.c +304 -0
  98. data/ext/ffi_c/libffi/src/nios2/ffitarget.h +52 -0
  99. data/ext/ffi_c/libffi/src/nios2/sysv.S +136 -0
  100. data/ext/ffi_c/libffi/src/or1k/ffi.c +328 -0
  101. data/ext/ffi_c/libffi/src/or1k/ffitarget.h +58 -0
  102. data/ext/ffi_c/libffi/src/or1k/sysv.S +107 -0
  103. data/ext/ffi_c/libffi/src/pa/ffitarget.h +8 -1
  104. data/ext/ffi_c/libffi/src/powerpc/aix.S +6 -6
  105. data/ext/ffi_c/libffi/src/powerpc/aix_closure.S +3 -1
  106. data/ext/ffi_c/libffi/src/powerpc/asm.h +2 -2
  107. data/ext/ffi_c/libffi/src/powerpc/darwin.S +2 -7
  108. data/ext/ffi_c/libffi/src/powerpc/darwin_closure.S +22 -26
  109. data/ext/ffi_c/libffi/src/powerpc/ffi.c +103 -1378
  110. data/ext/ffi_c/libffi/src/powerpc/ffi_darwin.c +25 -25
  111. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +945 -0
  112. data/ext/ffi_c/libffi/src/powerpc/ffi_powerpc.h +94 -0
  113. data/ext/ffi_c/libffi/src/powerpc/ffi_sysv.c +923 -0
  114. data/ext/ffi_c/libffi/src/powerpc/ffitarget.h +100 -44
  115. data/ext/ffi_c/libffi/src/powerpc/linux64.S +100 -59
  116. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +360 -108
  117. data/ext/ffi_c/libffi/src/powerpc/ppc_closure.S +138 -68
  118. data/ext/ffi_c/libffi/src/powerpc/sysv.S +68 -112
  119. data/ext/ffi_c/libffi/src/prep_cif.c +108 -24
  120. data/ext/ffi_c/libffi/src/raw_api.c +18 -5
  121. data/ext/ffi_c/libffi/src/s390/ffi.c +294 -318
  122. data/ext/ffi_c/libffi/src/s390/ffitarget.h +9 -1
  123. data/ext/ffi_c/libffi/src/s390/internal.h +11 -0
  124. data/ext/ffi_c/libffi/src/s390/sysv.S +257 -366
  125. data/ext/ffi_c/libffi/src/sh/ffi.c +4 -3
  126. data/ext/ffi_c/libffi/src/sh/ffitarget.h +6 -1
  127. data/ext/ffi_c/libffi/src/sh64/ffi.c +3 -2
  128. data/ext/ffi_c/libffi/src/sh64/ffitarget.h +6 -1
  129. data/ext/ffi_c/libffi/src/sparc/ffi.c +326 -527
  130. data/ext/ffi_c/libffi/src/sparc/ffi64.c +608 -0
  131. data/ext/ffi_c/libffi/src/sparc/ffitarget.h +20 -7
  132. data/ext/ffi_c/libffi/src/sparc/internal.h +26 -0
  133. data/ext/ffi_c/libffi/src/sparc/v8.S +364 -234
  134. data/ext/ffi_c/libffi/src/sparc/v9.S +340 -207
  135. data/ext/ffi_c/libffi/src/tile/ffi.c +355 -0
  136. data/ext/ffi_c/libffi/src/tile/ffitarget.h +65 -0
  137. data/ext/ffi_c/libffi/src/tile/tile.S +360 -0
  138. data/ext/ffi_c/libffi/src/types.c +43 -14
  139. data/ext/ffi_c/libffi/src/vax/elfbsd.S +195 -0
  140. data/ext/ffi_c/libffi/src/vax/ffi.c +276 -0
  141. data/ext/ffi_c/libffi/src/vax/ffitarget.h +49 -0
  142. data/ext/ffi_c/libffi/src/x86/asmnames.h +30 -0
  143. data/ext/ffi_c/libffi/src/x86/ffi.c +589 -500
  144. data/ext/ffi_c/libffi/src/x86/ffi64.c +338 -116
  145. data/ext/ffi_c/libffi/src/x86/ffitarget.h +55 -35
  146. data/ext/ffi_c/libffi/src/x86/ffiw64.c +287 -0
  147. data/ext/ffi_c/libffi/src/x86/internal.h +29 -0
  148. data/ext/ffi_c/libffi/src/x86/internal64.h +22 -0
  149. data/ext/ffi_c/libffi/src/x86/sysv.S +975 -400
  150. data/ext/ffi_c/libffi/src/x86/unix64.S +398 -299
  151. data/ext/ffi_c/libffi/src/x86/win64.S +222 -458
  152. data/ext/ffi_c/libffi/src/x86/win64_intel.S +237 -0
  153. data/ext/ffi_c/libffi/src/xtensa/ffi.c +298 -0
  154. data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +53 -0
  155. data/ext/ffi_c/libffi/src/xtensa/sysv.S +253 -0
  156. data/ext/ffi_c/libffi/stamp-h.in +1 -0
  157. data/ext/ffi_c/libffi/testsuite/Makefile.am +78 -73
  158. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +120 -25
  159. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +21 -1
  160. data/ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c +46 -0
  161. data/ext/ffi_c/libffi/testsuite/libffi.call/call.exp +4 -6
  162. data/ext/ffi_c/libffi/testsuite/libffi.call/{closure_stdcall.c → closure_simple.c} +7 -16
  163. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_12byte.c +4 -4
  164. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_16byte.c +4 -4
  165. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_18byte.c +4 -4
  166. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_19byte.c +4 -4
  167. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_1_1byte.c +4 -4
  168. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte.c +4 -4
  169. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_20byte1.c +4 -4
  170. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_24byte.c +5 -5
  171. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_2byte.c +4 -4
  172. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3_1byte.c +4 -4
  173. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte1.c +4 -4
  174. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_3byte2.c +4 -4
  175. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4_1byte.c +4 -4
  176. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_4byte.c +4 -4
  177. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5_1_byte.c +4 -4
  178. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_5byte.c +4 -4
  179. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_64byte.c +5 -5
  180. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6_1_byte.c +4 -4
  181. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_6byte.c +4 -4
  182. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7_1_byte.c +4 -4
  183. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_7byte.c +4 -4
  184. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_8byte.c +4 -4
  185. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte1.c +4 -4
  186. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_9byte2.c +4 -4
  187. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_double.c +4 -4
  188. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_float.c +4 -4
  189. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble.c +4 -4
  190. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split.c +4 -6
  191. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_longdouble_split2.c +4 -6
  192. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_pointer.c +4 -4
  193. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint16.c +4 -4
  194. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint32.c +4 -4
  195. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_sint64.c +4 -4
  196. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint16.c +4 -4
  197. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint32.c +4 -4
  198. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_align_uint64.c +4 -4
  199. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_dbls_struct.c +4 -4
  200. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_double_va.c +10 -9
  201. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble.c +3 -3
  202. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_longdouble_va.c +10 -9
  203. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_args.c +70 -0
  204. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_many_mixed_float_double.c +55 -0
  205. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer.c +1 -1
  206. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_pointer_stack.c +11 -9
  207. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_struct_va1.c +114 -0
  208. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uchar_va.c +44 -0
  209. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_uint_va.c +45 -0
  210. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulong_va.c +45 -0
  211. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ulonglong.c +5 -5
  212. data/ext/ffi_c/libffi/testsuite/libffi.call/cls_ushort_va.c +44 -0
  213. data/ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c +2 -2
  214. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +23 -40
  215. data/ext/ffi_c/libffi/testsuite/libffi.call/float1.c +3 -1
  216. data/ext/ffi_c/libffi/testsuite/libffi.call/float2.c +6 -4
  217. data/ext/ffi_c/libffi/testsuite/libffi.call/float3.c +4 -2
  218. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +107 -0
  219. data/ext/ffi_c/libffi/testsuite/libffi.call/huge_struct.c +18 -19
  220. data/ext/ffi_c/libffi/testsuite/libffi.call/many.c +6 -16
  221. data/ext/ffi_c/libffi/testsuite/libffi.call/many2.c +57 -0
  222. data/ext/ffi_c/libffi/testsuite/libffi.call/many_double.c +70 -0
  223. data/ext/ffi_c/libffi/testsuite/libffi.call/many_mixed.c +78 -0
  224. data/ext/ffi_c/libffi/testsuite/libffi.call/negint.c +0 -1
  225. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct.c +6 -6
  226. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct1.c +8 -8
  227. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct10.c +6 -6
  228. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct11.c +121 -0
  229. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct2.c +5 -5
  230. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct3.c +5 -5
  231. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct4.c +5 -5
  232. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct5.c +5 -5
  233. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct6.c +6 -6
  234. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct7.c +5 -5
  235. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct8.c +6 -6
  236. data/ext/ffi_c/libffi/testsuite/libffi.call/nested_struct9.c +6 -6
  237. data/ext/ffi_c/libffi/testsuite/libffi.call/offsets.c +46 -0
  238. data/ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c +127 -0
  239. data/ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c +1 -0
  240. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ldl.c +1 -1
  241. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sc.c +1 -1
  242. data/ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c +1 -1
  243. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large.c +7 -7
  244. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_large2.c +7 -7
  245. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium.c +5 -5
  246. data/ext/ffi_c/libffi/testsuite/libffi.call/stret_medium2.c +5 -5
  247. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +2 -2
  248. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +49 -0
  249. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +49 -0
  250. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +55 -0
  251. data/ext/ffi_c/libffi/testsuite/libffi.call/struct1.c +9 -7
  252. data/ext/ffi_c/libffi/testsuite/libffi.call/struct2.c +7 -7
  253. data/ext/ffi_c/libffi/testsuite/libffi.call/struct3.c +7 -6
  254. data/ext/ffi_c/libffi/testsuite/libffi.call/struct4.c +9 -8
  255. data/ext/ffi_c/libffi/testsuite/libffi.call/struct5.c +9 -8
  256. data/ext/ffi_c/libffi/testsuite/libffi.call/struct6.c +9 -9
  257. data/ext/ffi_c/libffi/testsuite/libffi.call/struct7.c +9 -9
  258. data/ext/ffi_c/libffi/testsuite/libffi.call/struct8.c +9 -8
  259. data/ext/ffi_c/libffi/testsuite/libffi.call/struct9.c +9 -8
  260. data/ext/ffi_c/libffi/testsuite/libffi.call/testclosure.c +2 -2
  261. data/ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c +61 -0
  262. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest.cc +3 -10
  263. data/ext/ffi_c/libffi/testsuite/{libffi.special → libffi.call}/unwindtest_ffi_call.cc +2 -1
  264. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +196 -0
  265. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +121 -0
  266. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +123 -0
  267. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +125 -0
  268. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex.inc +91 -0
  269. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_double.c +10 -0
  270. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_float.c +10 -0
  271. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_align_complex_longdouble.c +10 -0
  272. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex.inc +42 -0
  273. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_double.c +10 -0
  274. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_float.c +10 -0
  275. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_longdouble.c +10 -0
  276. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct.inc +71 -0
  277. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_double.c +10 -0
  278. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_float.c +10 -0
  279. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_struct_longdouble.c +10 -0
  280. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va.inc +80 -0
  281. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_double.c +10 -0
  282. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_float.c +16 -0
  283. data/ext/ffi_c/libffi/testsuite/libffi.complex/cls_complex_va_longdouble.c +10 -0
  284. data/ext/ffi_c/libffi/testsuite/{libffi.special/special.exp → libffi.complex/complex.exp} +9 -8
  285. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex.inc +51 -0
  286. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_double.inc +7 -0
  287. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_float.inc +7 -0
  288. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_defs_longdouble.inc +7 -0
  289. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_double.c +10 -0
  290. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_float.c +10 -0
  291. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_int.c +86 -0
  292. data/ext/ffi_c/libffi/testsuite/libffi.complex/complex_longdouble.c +10 -0
  293. data/ext/ffi_c/libffi/testsuite/libffi.complex/ffitest.h +1 -0
  294. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex.inc +78 -0
  295. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_double.c +10 -0
  296. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_float.c +10 -0
  297. data/ext/ffi_c/libffi/testsuite/libffi.complex/many_complex_longdouble.c +10 -0
  298. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex.inc +37 -0
  299. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1.inc +41 -0
  300. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_double.c +10 -0
  301. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_float.c +10 -0
  302. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex1_longdouble.c +10 -0
  303. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2.inc +44 -0
  304. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_double.c +10 -0
  305. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_float.c +10 -0
  306. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex2_longdouble.c +10 -0
  307. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_double.c +10 -0
  308. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_float.c +10 -0
  309. data/ext/ffi_c/libffi/testsuite/libffi.complex/return_complex_longdouble.c +10 -0
  310. data/ext/ffi_c/libffi/testsuite/libffi.go/aa-direct.c +34 -0
  311. data/ext/ffi_c/libffi/testsuite/libffi.go/closure1.c +28 -0
  312. data/ext/ffi_c/libffi/testsuite/libffi.go/ffitest.h +1 -0
  313. data/ext/ffi_c/libffi/testsuite/libffi.go/go.exp +36 -0
  314. data/ext/ffi_c/libffi/testsuite/libffi.go/static-chain.h +19 -0
  315. data/ffi.gemspec +2 -2
  316. data/lib/ffi/enum.rb +124 -0
  317. data/lib/ffi/library.rb +65 -13
  318. data/lib/ffi/platform.rb +7 -2
  319. data/lib/ffi/platform/sparc64-linux/types.conf +102 -0
  320. data/lib/ffi/platform/x86_64-windows/types.conf +113 -20
  321. data/lib/ffi/pointer.rb +1 -0
  322. data/lib/ffi/struct.rb +0 -2
  323. data/lib/ffi/version.rb +1 -1
  324. data/spec/ffi/bitmask_spec.rb +575 -0
  325. data/spec/ffi/fixtures/BitmaskTest.c +51 -0
  326. data/spec/ffi/rbx/memory_pointer_spec.rb +4 -0
  327. data/spec/ffi/struct_spec.rb +0 -4
  328. metadata +143 -51
  329. data/ext/ffi_c/libffi/Makefile.in +0 -1820
  330. data/ext/ffi_c/libffi/Makefile.vc +0 -141
  331. data/ext/ffi_c/libffi/Makefile.vc64 +0 -141
  332. data/ext/ffi_c/libffi/aclocal.m4 +0 -1873
  333. data/ext/ffi_c/libffi/build-ios.sh +0 -67
  334. data/ext/ffi_c/libffi/compile +0 -143
  335. data/ext/ffi_c/libffi/config.guess +0 -1501
  336. data/ext/ffi_c/libffi/config.sub +0 -1705
  337. data/ext/ffi_c/libffi/configure +0 -17191
  338. data/ext/ffi_c/libffi/depcomp +0 -630
  339. data/ext/ffi_c/libffi/doc/libffi.info +0 -593
  340. data/ext/ffi_c/libffi/doc/stamp-vti +0 -4
  341. data/ext/ffi_c/libffi/fficonfig.h.in +0 -199
  342. data/ext/ffi_c/libffi/include/Makefile.in +0 -487
  343. data/ext/ffi_c/libffi/include/ffi.h.vc +0 -427
  344. data/ext/ffi_c/libffi/include/ffi.h.vc64 +0 -427
  345. data/ext/ffi_c/libffi/install-sh +0 -520
  346. data/ext/ffi_c/libffi/ltmain.sh +0 -9636
  347. data/ext/ffi_c/libffi/m4/libtool.m4 +0 -7831
  348. data/ext/ffi_c/libffi/m4/ltoptions.m4 +0 -369
  349. data/ext/ffi_c/libffi/m4/ltsugar.m4 +0 -123
  350. data/ext/ffi_c/libffi/m4/ltversion.m4 +0 -23
  351. data/ext/ffi_c/libffi/m4/lt~obsolete.m4 +0 -98
  352. data/ext/ffi_c/libffi/man/Makefile.in +0 -466
  353. data/ext/ffi_c/libffi/mdate-sh +0 -201
  354. data/ext/ffi_c/libffi/missing +0 -376
  355. data/ext/ffi_c/libffi/src/arm/gentramp.sh +0 -118
  356. data/ext/ffi_c/libffi/src/arm/trampoline.S +0 -4450
  357. data/ext/ffi_c/libffi/src/x86/darwin.S +0 -444
  358. data/ext/ffi_c/libffi/src/x86/darwin64.S +0 -416
  359. data/ext/ffi_c/libffi/src/x86/freebsd.S +0 -458
  360. data/ext/ffi_c/libffi/src/x86/win32.S +0 -1065
  361. data/ext/ffi_c/libffi/testsuite/Makefile.in +0 -500
  362. data/ext/ffi_c/libffi/testsuite/lib/libffi-dg.exp +0 -300
  363. data/ext/ffi_c/libffi/testsuite/libffi.call/many_win32.c +0 -63
  364. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen_win32.c +0 -44
  365. data/ext/ffi_c/libffi/testsuite/libffi.special/ffitestcxx.h +0 -96
  366. data/ext/ffi_c/libffi/texinfo.tex +0 -7210
@@ -1,141 +0,0 @@
1
- #
2
- # ====================================================================
3
- #
4
- # libffi Windows Makefile
5
- #
6
- #
7
- # ====================================================================
8
- #
9
-
10
- NAME=ffi-3
11
- VERSION=3.0.10
12
- TARGET=X86_WIN32
13
- CC=cl.exe
14
- AS=ml.exe
15
- RC=rc.exe
16
- MT=mt.exe
17
- AR="link.exe"
18
- SO=.dll
19
- OBJ=.obj
20
- EXE=.exe
21
- LA=.lib
22
- LINK="link.exe"
23
- PREFIX=
24
- TOPDIR=.
25
- CPP=cl.exe -EP
26
- CFLAGS=-nologo -Zi -D_MD -W3 -DWIN32 -DWINNT -D_WIN32 -D_WINDOWS -D_WINNT -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0600 -D_X86_=1 -DNDEBUG -MD -O2 -Ob2 -Oy-
27
- LDFLAGS=/NOLOGO /MACHINE:X86
28
- SHFLAGS=/DLL /INCREMENTAL:NO /DEBUG /SUBSYSTEM:WINDOWS /OPT:REF
29
- ARFLAGS=/LIB
30
- ASFLAGS=-coff -W3 -Cx -Zm -Di386 -DQUIET -D?QUIET
31
- RCFLAGS=/l 0x409 -DNDEBUG
32
- INCLUDES=-I . -I .\include -I .\src\x86
33
- LIBS=kernel32.lib advapi32.lib shell32.lib user32.lib gdi32.lib
34
-
35
- VERSION_MAJOR=3
36
- VERSION_MINOR=1
37
- VERSION_PATCH=10rc
38
-
39
- DESTDIR=$(PREFIX)
40
- DESTBIN=$(PREFIX)\bin
41
- DESTLIB=$(PREFIX)\lib
42
- DESTINC=$(PREFIX)\include
43
- SRCDIR=$(TOPDIR)\src
44
-
45
- WORKDIR=$(TOPDIR)\.libs
46
- SOLIBNAME=lib$(NAME)
47
- LALIBNAME=libffi_convenience
48
- STATICLIB=$(WORKDIR)\$(LALIBNAME)$(LA)
49
-
50
- BUILDPDB = $(WORKDIR)\$(SOLIBNAME).pdb
51
-
52
- HEADERS = \
53
- $(TOPDIR)\fficonfig.h
54
-
55
- FFI_HEADERS = \
56
- $(TOPDIR)\include\ffi.h
57
-
58
- OBJECTS = \
59
- $(SRCDIR)\closures.obj \
60
- $(SRCDIR)\debug.obj \
61
- $(SRCDIR)\java_raw_api.obj \
62
- $(SRCDIR)\prep_cif.obj \
63
- $(SRCDIR)\raw_api.obj \
64
- $(SRCDIR)\types.obj \
65
- $(SRCDIR)\x86\ffi.obj
66
-
67
- !IF "$(TARGET)" == "X86_WIN32"
68
- OBJECTS = $(OBJECTS) \
69
- $(SRCDIR)\x86\win32.obj
70
- ASMSRCS = \
71
- $(SRCDIR)\x86\win32.asm
72
-
73
- !ENDIF
74
- !IF "$(TARGET)" == "X86_WIN64"
75
- OBJECTS = $(OBJECTS) \
76
- $(SRCDIR)\x86\win64.obj
77
- ASMSRCS = \
78
- $(SRCDIR)\x86\win64.asm
79
-
80
- !ENDIF
81
-
82
- .SUFFIXES : .S .asm
83
-
84
- all: $(WORKDIR) $(STATICLIB)
85
-
86
- .c$(OBJ):
87
- $(CC) -c $(CFLAGS) $(INCLUDES) -Fo$@ -Fd$(WORKDIR)\$(NAME)-src $<
88
-
89
- .asm$(OBJ):
90
- $(AS) -c $(ASFLAGS) /Fo $@ $<
91
-
92
- .S.asm:
93
- $(CPP) $(CFLAGS) $(INCLUDES) $< >$@
94
-
95
- .rc.res:
96
- $(RC) $(RCFLAGS) /fo $@ $<
97
-
98
- $(WORKDIR) :
99
- -@if not exist "$(WORKDIR)\$(NULL)" mkdir $(WORKDIR)
100
-
101
- $(HEADERS) :
102
- -@if not exist $(HEADERS) copy $(HEADERS)w $(HEADERS)
103
-
104
- $(FFI_HEADERS) :
105
- -@if not exist $(FFI_HEADERS) copy $(FFI_HEADERS).vc $(FFI_HEADERS)
106
-
107
- $(STATICLIB): $(WORKDIR) $(FFI_HEADERS) $(HEADERS) $(ASMSRCS) $(OBJECTS)
108
- $(AR) $(ARFLAGS) $(LDFLAGS) /out:$(STATICLIB) @<<
109
- $(OBJECTS)
110
- <<
111
-
112
-
113
- !IF !DEFINED(PREFIX) || "$(PREFIX)" == ""
114
-
115
- install:
116
- @echo ERROR: You must define installation PREFIX=destination
117
-
118
- !ELSE
119
-
120
- install: all
121
- -@xcopy "$(TOPDIR)\include\*.h" "$(DESTINC)\" /Y /Q
122
- -@xcopy "$(SRCDIR)\x86\ffitarget.h" "$(DESTINC)\" /Y /Q
123
- -@xcopy "$(WORKDIR)\$(LALIBNAME)$(LA)" "$(DESTLIB)\" /Y /Q
124
- -@xcopy "$(WORKDIR)\$(SOLIBNAME)$(LA)" "$(DESTLIB)\" /Y /Q
125
- -@xcopy "$(WORKDIR)\$(SOLIBNAME)$(SO)" "$(DESTBIN)\" /Y /Q
126
- -@xcopy "$(WORKDIR)\$(SOLIBNAME).pdb" "$(DESTLIB)\" /Y /Q
127
-
128
- !ENDIF
129
-
130
- clean:
131
- -@del /Q $(OBJECTS) 2>NUL
132
- -@del /Q $(RESOURCES) 2>NUL
133
- -@del /Q $(ASMSRCS) 2>NUL
134
- -@del /Q /S $(WORKDIR) 2>NUL
135
-
136
- distclean: clean
137
- -@del /Q $(HEADERS) 2>NUL
138
- -@del /Q $(TOPDIR)\include\ffi.h 2>NUL
139
- -@del /Q $(TOPDIR)\fficonfig.h 2>NUL
140
- -@del /Q $(TOPDIR)\Makefile.vc 2>NUL
141
-
@@ -1,141 +0,0 @@
1
- #
2
- # ====================================================================
3
- #
4
- # libffi Windows Makefile
5
- #
6
- #
7
- # ====================================================================
8
- #
9
-
10
- NAME=ffi-3
11
- VERSION=3.0.10
12
- TARGET=X86_WIN64
13
- CC=cl.exe
14
- AS=ml64.exe
15
- RC=rc.exe
16
- MT=mt.exe
17
- AR="link.exe"
18
- SO=.dll
19
- OBJ=.obj
20
- EXE=.exe
21
- LA=.lib
22
- LINK="link.exe"
23
- PREFIX=
24
- TOPDIR=.
25
- CPP=cl.exe -EP
26
- CFLAGS=-nologo -Zi -D_MD -W3 -DWIN64 -DWINNT -D_WIN32 -D_WINDOWS -D_WINNT -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0600 -D_AMD64_=1 -DNDEBUG -MD -O2 -Ob2 -Oy-
27
- LDFLAGS=/NOLOGO /MACHINE:X64
28
- SHFLAGS=/DLL /INCREMENTAL:NO /DEBUG /SUBSYSTEM:WINDOWS /OPT:REF
29
- ARFLAGS=/LIB
30
- ASFLAGS=-coff -W3 -Cx -Zm -Di386 -DQUIET -D?QUIET
31
- RCFLAGS=/l 0x409 -DNDEBUG
32
- INCLUDES=-I . -I .\include -I .\src\x86
33
- LIBS=kernel32.lib advapi32.lib shell32.lib user32.lib gdi32.lib
34
-
35
- VERSION_MAJOR=3
36
- VERSION_MINOR=1
37
- VERSION_PATCH=10rc
38
-
39
- DESTDIR=$(PREFIX)
40
- DESTBIN=$(PREFIX)\bin
41
- DESTLIB=$(PREFIX)\lib
42
- DESTINC=$(PREFIX)\include
43
- SRCDIR=$(TOPDIR)\src
44
-
45
- WORKDIR=$(TOPDIR)\.libs
46
- SOLIBNAME=lib$(NAME)
47
- LALIBNAME=libffi_convenience
48
- STATICLIB=$(WORKDIR)\$(LALIBNAME)$(LA)
49
-
50
- BUILDPDB = $(WORKDIR)\$(SOLIBNAME).pdb
51
-
52
- HEADERS = \
53
- $(TOPDIR)\fficonfig.h
54
-
55
- FFI_HEADERS = \
56
- $(TOPDIR)\include\ffi.h
57
-
58
- OBJECTS = \
59
- $(SRCDIR)\closures.obj \
60
- $(SRCDIR)\debug.obj \
61
- $(SRCDIR)\java_raw_api.obj \
62
- $(SRCDIR)\prep_cif.obj \
63
- $(SRCDIR)\raw_api.obj \
64
- $(SRCDIR)\types.obj \
65
- $(SRCDIR)\x86\ffi.obj
66
-
67
- !IF "$(TARGET)" == "X86_WIN32"
68
- OBJECTS = $(OBJECTS) \
69
- $(SRCDIR)\x86\win32.obj
70
- ASMSRCS = \
71
- $(SRCDIR)\x86\win32.asm
72
-
73
- !ENDIF
74
- !IF "$(TARGET)" == "X86_WIN64"
75
- OBJECTS = $(OBJECTS) \
76
- $(SRCDIR)\x86\win64.obj
77
- ASMSRCS = \
78
- $(SRCDIR)\x86\win64.asm
79
-
80
- !ENDIF
81
-
82
- .SUFFIXES : .S .asm
83
-
84
- all: $(WORKDIR) $(STATICLIB)
85
-
86
- .c$(OBJ):
87
- $(CC) -c $(CFLAGS) $(INCLUDES) -Fo$@ -Fd$(WORKDIR)\$(NAME)-src $<
88
-
89
- .asm$(OBJ):
90
- $(AS) -c $(ASFLAGS) /Fo $@ $<
91
-
92
- .S.asm:
93
- $(CPP) $(CFLAGS) $(INCLUDES) $< >$@
94
-
95
- .rc.res:
96
- $(RC) $(RCFLAGS) /fo $@ $<
97
-
98
- $(WORKDIR) :
99
- -@if not exist "$(WORKDIR)\$(NULL)" mkdir $(WORKDIR)
100
-
101
- $(HEADERS) :
102
- -@if not exist $(HEADERS) copy $(HEADERS)w $(HEADERS)
103
-
104
- $(FFI_HEADERS) :
105
- -@if not exist $(FFI_HEADERS) copy $(FFI_HEADERS).vc64 $(FFI_HEADERS)
106
-
107
- $(STATICLIB): $(WORKDIR) $(FFI_HEADERS) $(HEADERS) $(ASMSRCS) $(OBJECTS)
108
- $(AR) $(ARFLAGS) $(LDFLAGS) /out:$(STATICLIB) @<<
109
- $(OBJECTS)
110
- <<
111
-
112
-
113
- !IF !DEFINED(PREFIX) || "$(PREFIX)" == ""
114
-
115
- install:
116
- @echo ERROR: You must define installation PREFIX=destination
117
-
118
- !ELSE
119
-
120
- install: all
121
- -@xcopy "$(TOPDIR)\include\*.h" "$(DESTINC)\" /Y /Q
122
- -@xcopy "$(SRCDIR)\x86\ffitarget.h" "$(DESTINC)\" /Y /Q
123
- -@xcopy "$(WORKDIR)\$(LALIBNAME)$(LA)" "$(DESTLIB)\" /Y /Q
124
- -@xcopy "$(WORKDIR)\$(SOLIBNAME)$(LA)" "$(DESTLIB)\" /Y /Q
125
- -@xcopy "$(WORKDIR)\$(SOLIBNAME)$(SO)" "$(DESTBIN)\" /Y /Q
126
- -@xcopy "$(WORKDIR)\$(SOLIBNAME).pdb" "$(DESTLIB)\" /Y /Q
127
-
128
- !ENDIF
129
-
130
- clean:
131
- -@del /Q $(OBJECTS) 2>NUL
132
- -@del /Q $(RESOURCES) 2>NUL
133
- -@del /Q $(ASMSRCS) 2>NUL
134
- -@del /Q /S $(WORKDIR) 2>NUL
135
-
136
- distclean: clean
137
- -@del /Q $(HEADERS) 2>NUL
138
- -@del /Q $(TOPDIR)\include\ffi.h 2>NUL
139
- -@del /Q $(TOPDIR)\fficonfig.h 2>NUL
140
- -@del /Q $(TOPDIR)\Makefile.vc 2>NUL
141
-
@@ -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])