rbnacl-libsodium 0.4.5a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (409) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +35 -0
  3. data/.gitmodules +3 -0
  4. data/CHANGES.md +3 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE +21 -0
  7. data/README.md +23 -0
  8. data/Rakefile +1 -0
  9. data/ext/rbnacl/extconf.rb +30 -0
  10. data/lib/rbnacl/libsodium.rb +11 -0
  11. data/lib/rbnacl/libsodium/version.rb +5 -0
  12. data/rbnacl-libsodium.gemspec +25 -0
  13. data/vendor/libsodium/AUTHORS +101 -0
  14. data/vendor/libsodium/ChangeLog +68 -0
  15. data/vendor/libsodium/LICENSE +16 -0
  16. data/vendor/libsodium/Makefile.am +20 -0
  17. data/vendor/libsodium/README +1 -0
  18. data/vendor/libsodium/README.markdown +246 -0
  19. data/vendor/libsodium/THANKS +17 -0
  20. data/vendor/libsodium/autogen.sh +16 -0
  21. data/vendor/libsodium/configure.ac +405 -0
  22. data/vendor/libsodium/dist-build/android.sh +48 -0
  23. data/vendor/libsodium/dist-build/iphone.sh +16 -0
  24. data/vendor/libsodium/dist-build/msys.sh +9 -0
  25. data/vendor/libsodium/libsodium.pc.in +11 -0
  26. data/vendor/libsodium/libsodium.sln +38 -0
  27. data/vendor/libsodium/libsodium.vcxproj +508 -0
  28. data/vendor/libsodium/libsodium.vcxproj.filters +569 -0
  29. data/vendor/libsodium/logo.png +0 -0
  30. data/vendor/libsodium/m4/ax_check_compile_flag.m4 +73 -0
  31. data/vendor/libsodium/m4/ax_check_gnu_make.m4 +78 -0
  32. data/vendor/libsodium/m4/ax_check_link_flag.m4 +72 -0
  33. data/vendor/libsodium/m4/ld-output-def.m4 +29 -0
  34. data/vendor/libsodium/m4/pkg.m4 +214 -0
  35. data/vendor/libsodium/msvc-scripts/Makefile.am +4 -0
  36. data/vendor/libsodium/msvc-scripts/process.bat +8 -0
  37. data/vendor/libsodium/msvc-scripts/rep.vbs +12 -0
  38. data/vendor/libsodium/msvc-scripts/sodium.props +25 -0
  39. data/vendor/libsodium/src/Makefile.am +3 -0
  40. data/vendor/libsodium/src/libsodium/Makefile.am +232 -0
  41. data/vendor/libsodium/src/libsodium/crypto_auth/crypto_auth.c +34 -0
  42. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c +16 -0
  43. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/checksum +1 -0
  44. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/api.h +10 -0
  45. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c +83 -0
  46. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha256/ref/verify_hmacsha256.c +9 -0
  47. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c +16 -0
  48. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/checksum +1 -0
  49. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/api.h +10 -0
  50. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/hmac_hmacsha512256.c +86 -0
  51. data/vendor/libsodium/src/libsodium/crypto_auth/hmacsha512256/ref/verify_hmacsha512256.c +9 -0
  52. data/vendor/libsodium/src/libsodium/crypto_auth/try.c +119 -0
  53. data/vendor/libsodium/src/libsodium/crypto_box/crypto_box.c +95 -0
  54. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c +41 -0
  55. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/checksum +1 -0
  56. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c +22 -0
  57. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/api.h +19 -0
  58. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c +19 -0
  59. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c +27 -0
  60. data/vendor/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c +12 -0
  61. data/vendor/libsodium/src/libsodium/crypto_box/try.c +195 -0
  62. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/checksum +1 -0
  63. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c +26 -0
  64. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/api.h +11 -0
  65. data/vendor/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20.c +108 -0
  66. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/checksum +1 -0
  67. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c +26 -0
  68. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/api.h +11 -0
  69. data/vendor/libsodium/src/libsodium/crypto_core/salsa20/ref/core_salsa20.c +134 -0
  70. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/checksum +1 -0
  71. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c +26 -0
  72. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/api.h +11 -0
  73. data/vendor/libsodium/src/libsodium/crypto_core/salsa2012/ref/core_salsa2012.c +134 -0
  74. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/checksum +1 -0
  75. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c +26 -0
  76. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/api.h +11 -0
  77. data/vendor/libsodium/src/libsodium/crypto_core/salsa208/ref/core_salsa208.c +134 -0
  78. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c +31 -0
  79. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/api.h +4 -0
  80. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2-impl.h +132 -0
  81. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2.h +169 -0
  82. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-ref.c +364 -0
  83. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2s-ref.c +355 -0
  84. data/vendor/libsodium/src/libsodium/crypto_generichash/blake2/ref/generichash_blake2b.c +61 -0
  85. data/vendor/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c +84 -0
  86. data/vendor/libsodium/src/libsodium/crypto_hash/crypto_hash.c +9 -0
  87. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/checksum +1 -0
  88. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256_api.c +11 -0
  89. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/api.h +8 -0
  90. data/vendor/libsodium/src/libsodium/crypto_hash/sha256/ref/hash_sha256.c +69 -0
  91. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/checksum +1 -0
  92. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c +11 -0
  93. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/api.h +8 -0
  94. data/vendor/libsodium/src/libsodium/crypto_hash/sha512/ref/hash_sha512.c +71 -0
  95. data/vendor/libsodium/src/libsodium/crypto_hash/try.c +76 -0
  96. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/checksum +1 -0
  97. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/hashblocks_sha256_api.c +16 -0
  98. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/api.h +9 -0
  99. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha256/ref/blocks_sha256.c +212 -0
  100. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/checksum +1 -0
  101. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/hashblocks_sha512_api.c +16 -0
  102. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/api.h +9 -0
  103. data/vendor/libsodium/src/libsodium/crypto_hashblocks/sha512/ref/blocks_sha512.c +239 -0
  104. data/vendor/libsodium/src/libsodium/crypto_hashblocks/try.c +78 -0
  105. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c +34 -0
  106. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/api.h +8 -0
  107. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/auth_poly1305_53.c +1661 -0
  108. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/53/verify_poly1305_53.c +10 -0
  109. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/api.h +8 -0
  110. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/auth_poly1305_donna.c +151 -0
  111. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/portable-jane.h +772 -0
  112. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/verify_poly1305_donna.c +10 -0
  113. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +36 -0
  114. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_api.c +16 -0
  115. data/vendor/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305_try.c +152 -0
  116. data/vendor/libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c +34 -0
  117. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/checksum +1 -0
  118. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/api.h +9 -0
  119. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c +13 -0
  120. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c +426 -0
  121. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/api.h +8 -0
  122. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/base_curve25519_ref.c +20 -0
  123. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref/smult_curve25519_ref.c +268 -0
  124. data/vendor/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519_api.c +14 -0
  125. data/vendor/libsodium/src/libsodium/crypto_scalarmult/try.c +125 -0
  126. data/vendor/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c +48 -0
  127. data/vendor/libsodium/src/libsodium/crypto_secretbox/try.c +129 -0
  128. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/checksum +1 -0
  129. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/api.h +12 -0
  130. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c +35 -0
  131. data/vendor/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c +26 -0
  132. data/vendor/libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c +27 -0
  133. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/api.h +8 -0
  134. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24.c +91 -0
  135. data/vendor/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c +11 -0
  136. data/vendor/libsodium/src/libsodium/crypto_sign/crypto_sign.c +61 -0
  137. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/description +1 -0
  138. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/api.h +14 -0
  139. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base.h +1344 -0
  140. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/base2.h +40 -0
  141. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d.h +1 -0
  142. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/d2.h +1 -0
  143. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe.h +56 -0
  144. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_0.c +19 -0
  145. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_1.c +19 -0
  146. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_add.c +57 -0
  147. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_cmov.c +63 -0
  148. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_copy.c +29 -0
  149. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_frombytes.c +73 -0
  150. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_invert.c +14 -0
  151. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnegative.c +16 -0
  152. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_isnonzero.c +19 -0
  153. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_mul.c +253 -0
  154. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_neg.c +45 -0
  155. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_pow22523.c +13 -0
  156. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq.c +149 -0
  157. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sq2.c +160 -0
  158. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_sub.c +57 -0
  159. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/fe_tobytes.c +119 -0
  160. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge.h +95 -0
  161. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.c +11 -0
  162. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_add.h +97 -0
  163. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_double_scalarmult.c +96 -0
  164. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_frombytes.c +50 -0
  165. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.c +11 -0
  166. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_madd.h +88 -0
  167. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.c +11 -0
  168. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_msub.h +88 -0
  169. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p2.c +12 -0
  170. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p1p1_to_p3.c +13 -0
  171. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_0.c +8 -0
  172. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.c +11 -0
  173. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p2_dbl.h +73 -0
  174. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_0.c +9 -0
  175. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_dbl.c +12 -0
  176. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_cached.c +17 -0
  177. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_to_p2.c +12 -0
  178. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_p3_tobytes.c +14 -0
  179. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_precomp_0.c +8 -0
  180. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_scalarmult_base.c +105 -0
  181. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.c +11 -0
  182. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_sub.h +97 -0
  183. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/ge_tobytes.c +14 -0
  184. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +31 -0
  185. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c +40 -0
  186. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow22523.h +160 -0
  187. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/pow225521.h +160 -0
  188. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc.h +15 -0
  189. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_muladd.c +368 -0
  190. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sc_reduce.c +275 -0
  191. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c +38 -0
  192. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sqrtm1.h +1 -0
  193. data/vendor/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c +26 -0
  194. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/api.h +13 -0
  195. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519.h +54 -0
  196. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/fe25519_edwards25519sha512batch.c +348 -0
  197. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519.h +34 -0
  198. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/ge25519_edwards25519sha512batch.c +230 -0
  199. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519.h +51 -0
  200. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sc25519_edwards25519sha512batch.c +146 -0
  201. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/ref/sign_edwards25519sha512batch.c +102 -0
  202. data/vendor/libsodium/src/libsodium/crypto_sign/edwards25519sha512batch/sign_edwards25519sha512batch_api.c +21 -0
  203. data/vendor/libsodium/src/libsodium/crypto_sign/try.c +87 -0
  204. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/checksum +1 -0
  205. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/afternm_aes128ctr.c +159 -0
  206. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/api.h +14 -0
  207. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/beforenm_aes128ctr.c +59 -0
  208. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common.h +788 -0
  209. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/common_aes128ctr.c +64 -0
  210. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts.h +28 -0
  211. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts_aes128ctr.c +14 -0
  212. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128.h +47 -0
  213. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/int128_aes128ctr.c +131 -0
  214. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c +28 -0
  215. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h +10 -0
  216. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/portable/xor_afternm_aes128ctr.c +181 -0
  217. data/vendor/libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c +21 -0
  218. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-be.h +274 -0
  219. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table-le.h +274 -0
  220. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes-table.h +56 -0
  221. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256-ctr.c +238 -0
  222. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/aes256.h +171 -0
  223. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/api.h +14 -0
  224. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/hongjun/ecrypt-sync.h +27 -0
  225. data/vendor/libsodium/src/libsodium/crypto_stream/aes256estream/stream_aes256estream_api.c +21 -0
  226. data/vendor/libsodium/src/libsodium/crypto_stream/crypto_stream.c +36 -0
  227. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/api.h +1 -0
  228. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/amd64_xmm6/stream_salsa20_amd64_xmm6.S +950 -0
  229. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/checksum +1 -0
  230. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/api.h +8 -0
  231. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c +55 -0
  232. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/ref/xor_salsa20_ref.c +58 -0
  233. data/vendor/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c +16 -0
  234. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/checksum +1 -0
  235. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/api.h +11 -0
  236. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c +51 -0
  237. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c +54 -0
  238. data/vendor/libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c +16 -0
  239. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/checksum +1 -0
  240. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/api.h +10 -0
  241. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c +51 -0
  242. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c +54 -0
  243. data/vendor/libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c +16 -0
  244. data/vendor/libsodium/src/libsodium/crypto_stream/try.c +122 -0
  245. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/checksum +1 -0
  246. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/api.h +11 -0
  247. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c +24 -0
  248. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c +25 -0
  249. data/vendor/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c +16 -0
  250. data/vendor/libsodium/src/libsodium/crypto_verify/16/checksum +1 -0
  251. data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/api.h +2 -0
  252. data/vendor/libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c +24 -0
  253. data/vendor/libsodium/src/libsodium/crypto_verify/16/verify_16_api.c +6 -0
  254. data/vendor/libsodium/src/libsodium/crypto_verify/32/checksum +1 -0
  255. data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/api.h +2 -0
  256. data/vendor/libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c +40 -0
  257. data/vendor/libsodium/src/libsodium/crypto_verify/32/verify_32_api.c +6 -0
  258. data/vendor/libsodium/src/libsodium/crypto_verify/try.c +76 -0
  259. data/vendor/libsodium/src/libsodium/include/Makefile.am +63 -0
  260. data/vendor/libsodium/src/libsodium/include/sodium.h +48 -0
  261. data/vendor/libsodium/src/libsodium/include/sodium/core.h +18 -0
  262. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth.h +36 -0
  263. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h +36 -0
  264. data/vendor/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h +36 -0
  265. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box.h +83 -0
  266. data/vendor/libsodium/src/libsodium/include/sodium/crypto_box_curve25519xsalsa20poly1305.h +72 -0
  267. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_hsalsa20.h +40 -0
  268. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa20.h +40 -0
  269. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa2012.h +40 -0
  270. data/vendor/libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h +40 -0
  271. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash.h +70 -0
  272. data/vendor/libsodium/src/libsodium/include/sodium/crypto_generichash_blake2b.h +87 -0
  273. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash.h +23 -0
  274. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h +29 -0
  275. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h +29 -0
  276. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha256.h +32 -0
  277. data/vendor/libsodium/src/libsodium/include/sodium/crypto_hashblocks_sha512.h +32 -0
  278. data/vendor/libsodium/src/libsodium/include/sodium/crypto_int32.h +8 -0
  279. data/vendor/libsodium/src/libsodium/include/sodium/crypto_int64.h +8 -0
  280. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth.h +37 -0
  281. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305.h +65 -0
  282. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_53.h +34 -0
  283. data/vendor/libsodium/src/libsodium/include/sodium/crypto_onetimeauth_poly1305_donna.h +34 -0
  284. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult.h +36 -0
  285. data/vendor/libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h.in +44 -0
  286. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox.h +47 -0
  287. data/vendor/libsodium/src/libsodium/include/sodium/crypto_secretbox_xsalsa20poly1305.h +44 -0
  288. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash.h +33 -0
  289. data/vendor/libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h +29 -0
  290. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign.h +61 -0
  291. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_ed25519.h +52 -0
  292. data/vendor/libsodium/src/libsodium/include/sodium/crypto_sign_edwards25519sha512batch.h +44 -0
  293. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream.h +46 -0
  294. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes128ctr.h +60 -0
  295. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_aes256estream.h +61 -0
  296. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa20.h.in +54 -0
  297. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h +43 -0
  298. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h +43 -0
  299. data/vendor/libsodium/src/libsodium/include/sodium/crypto_stream_xsalsa20.h +44 -0
  300. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint16.h +8 -0
  301. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint32.h +8 -0
  302. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint64.h +8 -0
  303. data/vendor/libsodium/src/libsodium/include/sodium/crypto_uint8.h +8 -0
  304. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_16.h +25 -0
  305. data/vendor/libsodium/src/libsodium/include/sodium/crypto_verify_32.h +25 -0
  306. data/vendor/libsodium/src/libsodium/include/sodium/export.h +32 -0
  307. data/vendor/libsodium/src/libsodium/include/sodium/randombytes.h +53 -0
  308. data/vendor/libsodium/src/libsodium/include/sodium/randombytes_salsa20_random.h +45 -0
  309. data/vendor/libsodium/src/libsodium/include/sodium/randombytes_sysrandom.h +45 -0
  310. data/vendor/libsodium/src/libsodium/include/sodium/utils.h +36 -0
  311. data/vendor/libsodium/src/libsodium/include/sodium/version.h.in +29 -0
  312. data/vendor/libsodium/src/libsodium/randombytes/randombytes.c +63 -0
  313. data/vendor/libsodium/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +317 -0
  314. data/vendor/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +212 -0
  315. data/vendor/libsodium/src/libsodium/sodium/compat.c +248 -0
  316. data/vendor/libsodium/src/libsodium/sodium/core.c +21 -0
  317. data/vendor/libsodium/src/libsodium/sodium/utils.c +94 -0
  318. data/vendor/libsodium/src/libsodium/sodium/version.c +20 -0
  319. data/vendor/libsodium/test/Makefile.am +5 -0
  320. data/vendor/libsodium/test/default/Makefile.am +277 -0
  321. data/vendor/libsodium/test/default/auth.c +21 -0
  322. data/vendor/libsodium/test/default/auth.exp +4 -0
  323. data/vendor/libsodium/test/default/auth2.c +36 -0
  324. data/vendor/libsodium/test/default/auth2.exp +4 -0
  325. data/vendor/libsodium/test/default/auth3.c +36 -0
  326. data/vendor/libsodium/test/default/auth3.exp +1 -0
  327. data/vendor/libsodium/test/default/auth5.c +37 -0
  328. data/vendor/libsodium/test/default/auth5.exp +0 -0
  329. data/vendor/libsodium/test/default/box.c +65 -0
  330. data/vendor/libsodium/test/default/box.exp +19 -0
  331. data/vendor/libsodium/test/default/box2.c +66 -0
  332. data/vendor/libsodium/test/default/box2.exp +17 -0
  333. data/vendor/libsodium/test/default/box7.c +37 -0
  334. data/vendor/libsodium/test/default/box7.exp +0 -0
  335. data/vendor/libsodium/test/default/box8.c +44 -0
  336. data/vendor/libsodium/test/default/box8.exp +0 -0
  337. data/vendor/libsodium/test/default/cmptest.h +51 -0
  338. data/vendor/libsodium/test/default/core1.c +32 -0
  339. data/vendor/libsodium/test/default/core1.exp +4 -0
  340. data/vendor/libsodium/test/default/core2.c +35 -0
  341. data/vendor/libsodium/test/default/core2.exp +4 -0
  342. data/vendor/libsodium/test/default/core3.c +42 -0
  343. data/vendor/libsodium/test/default/core3.exp +1 -0
  344. data/vendor/libsodium/test/default/core4.c +35 -0
  345. data/vendor/libsodium/test/default/core4.exp +8 -0
  346. data/vendor/libsodium/test/default/core5.c +34 -0
  347. data/vendor/libsodium/test/default/core5.exp +4 -0
  348. data/vendor/libsodium/test/default/core6.c +49 -0
  349. data/vendor/libsodium/test/default/core6.exp +4 -0
  350. data/vendor/libsodium/test/default/generichash.c +27 -0
  351. data/vendor/libsodium/test/default/generichash.exp +64 -0
  352. data/vendor/libsodium/test/default/generichash2.c +31 -0
  353. data/vendor/libsodium/test/default/generichash2.exp +64 -0
  354. data/vendor/libsodium/test/default/hash.c +16 -0
  355. data/vendor/libsodium/test/default/hash.exp +1 -0
  356. data/vendor/libsodium/test/default/hash2.exp +1 -0
  357. data/vendor/libsodium/test/default/hash3.c +16 -0
  358. data/vendor/libsodium/test/default/hash3.exp +1 -0
  359. data/vendor/libsodium/test/default/onetimeauth.c +44 -0
  360. data/vendor/libsodium/test/default/onetimeauth.exp +2 -0
  361. data/vendor/libsodium/test/default/onetimeauth2.c +42 -0
  362. data/vendor/libsodium/test/default/onetimeauth2.exp +1 -0
  363. data/vendor/libsodium/test/default/onetimeauth7.c +37 -0
  364. data/vendor/libsodium/test/default/onetimeauth7.exp +0 -0
  365. data/vendor/libsodium/test/default/pre.js +33 -0
  366. data/vendor/libsodium/test/default/randombytes.c +16 -0
  367. data/vendor/libsodium/test/default/scalarmult.c +25 -0
  368. data/vendor/libsodium/test/default/scalarmult.exp +4 -0
  369. data/vendor/libsodium/test/default/scalarmult2.c +25 -0
  370. data/vendor/libsodium/test/default/scalarmult2.exp +4 -0
  371. data/vendor/libsodium/test/default/scalarmult5.c +32 -0
  372. data/vendor/libsodium/test/default/scalarmult5.exp +4 -0
  373. data/vendor/libsodium/test/default/scalarmult6.c +32 -0
  374. data/vendor/libsodium/test/default/scalarmult6.exp +4 -0
  375. data/vendor/libsodium/test/default/scalarmult7.c +34 -0
  376. data/vendor/libsodium/test/default/scalarmult7.exp +1 -0
  377. data/vendor/libsodium/test/default/scalarmult8.c +34 -0
  378. data/vendor/libsodium/test/default/scalarmult8.exp +1 -0
  379. data/vendor/libsodium/test/default/secretbox.c +58 -0
  380. data/vendor/libsodium/test/default/secretbox.exp +19 -0
  381. data/vendor/libsodium/test/default/secretbox2.c +59 -0
  382. data/vendor/libsodium/test/default/secretbox2.exp +17 -0
  383. data/vendor/libsodium/test/default/secretbox7.c +33 -0
  384. data/vendor/libsodium/test/default/secretbox7.exp +0 -0
  385. data/vendor/libsodium/test/default/secretbox8.c +40 -0
  386. data/vendor/libsodium/test/default/secretbox8.exp +0 -0
  387. data/vendor/libsodium/test/default/shorthash.c +23 -0
  388. data/vendor/libsodium/test/default/shorthash.exp +64 -0
  389. data/vendor/libsodium/test/default/sodium_core.c +11 -0
  390. data/vendor/libsodium/test/default/sodium_core.exp +1 -0
  391. data/vendor/libsodium/test/default/sodium_utils.c +27 -0
  392. data/vendor/libsodium/test/default/sodium_utils.exp +6 -0
  393. data/vendor/libsodium/test/default/sodium_version.c +13 -0
  394. data/vendor/libsodium/test/default/sodium_version.exp +3 -0
  395. data/vendor/libsodium/test/default/stream.c +30 -0
  396. data/vendor/libsodium/test/default/stream.exp +1 -0
  397. data/vendor/libsodium/test/default/stream2.c +28 -0
  398. data/vendor/libsodium/test/default/stream2.exp +1 -0
  399. data/vendor/libsodium/test/default/stream3.c +30 -0
  400. data/vendor/libsodium/test/default/stream3.exp +4 -0
  401. data/vendor/libsodium/test/default/stream4.c +55 -0
  402. data/vendor/libsodium/test/default/stream4.exp +17 -0
  403. data/vendor/libsodium/test/default/stream5.c +29 -0
  404. data/vendor/libsodium/test/default/stream5.exp +1 -0
  405. data/vendor/libsodium/test/default/stream6.c +54 -0
  406. data/vendor/libsodium/test/default/stream6.exp +17 -0
  407. data/vendor/libsodium/test/default/wintest.bat +56 -0
  408. data/vendor/libsodium/test/quirks/windows/windows-quirks.h +18 -0
  409. metadata +500 -0
Binary file
@@ -0,0 +1,73 @@
1
+ # ===========================================================================
2
+ # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
3
+ # ===========================================================================
4
+ #
5
+ # SYNOPSIS
6
+ #
7
+ # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
8
+ #
9
+ # DESCRIPTION
10
+ #
11
+ # Check whether the given FLAG works with the current language's compiler
12
+ # or gives an error. (Warnings, however, are ignored)
13
+ #
14
+ # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
15
+ # success/failure.
16
+ #
17
+ # If EXTRA-FLAGS is defined, it is added to the current language's default
18
+ # flags (e.g. CFLAGS) when the check is done. The check is thus made with
19
+ # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
20
+ # force the compiler to issue an error when a bad flag is given.
21
+ #
22
+ # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
23
+ # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
24
+ #
25
+ # LICENSE
26
+ #
27
+ # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
28
+ # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
29
+ #
30
+ # This program is free software: you can redistribute it and/or modify it
31
+ # under the terms of the GNU General Public License as published by the
32
+ # Free Software Foundation, either version 3 of the License, or (at your
33
+ # option) any later version.
34
+ #
35
+ # This program is distributed in the hope that it will be useful, but
36
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
37
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
38
+ # Public License for more details.
39
+ #
40
+ # You should have received a copy of the GNU General Public License along
41
+ # with this program. If not, see <http://www.gnu.org/licenses/>.
42
+ #
43
+ # As a special exception, the respective Autoconf Macro's copyright owner
44
+ # gives unlimited permission to copy, distribute and modify the configure
45
+ # scripts that are the output of Autoconf when processing the Macro. You
46
+ # need not follow the terms of the GNU General Public License when using
47
+ # or distributing such scripts, even though portions of the text of the
48
+ # Macro appear in them. The GNU General Public License (GPL) does govern
49
+ # all other use of the material that constitutes the Autoconf Macro.
50
+ #
51
+ # This special exception to the GPL applies to versions of the Autoconf
52
+ # Macro released by the Autoconf Archive. When you make and distribute a
53
+ # modified version of the Autoconf Macro, you may extend this special
54
+ # exception to the GPL to apply to your modified version as well.
55
+
56
+ #serial 2
57
+
58
+ AC_DEFUN([AX_CHECK_COMPILE_FLAG],
59
+ [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
60
+ AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
61
+ AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
62
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
63
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
64
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
65
+ [[char x[42U], fodder = 0;if (fodder > -1000 && fgets(x,1000,stdin)) puts(x)]])],
66
+ [AS_VAR_SET(CACHEVAR,[yes])],
67
+ [AS_VAR_SET(CACHEVAR,[no])])
68
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
69
+ AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
70
+ [m4_default([$2], :)],
71
+ [m4_default([$3], :)])
72
+ AS_VAR_POPDEF([CACHEVAR])dnl
73
+ ])dnl AX_CHECK_COMPILE_FLAGS
@@ -0,0 +1,78 @@
1
+ # ===========================================================================
2
+ # http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
3
+ # ===========================================================================
4
+ #
5
+ # SYNOPSIS
6
+ #
7
+ # AX_CHECK_GNU_MAKE()
8
+ #
9
+ # DESCRIPTION
10
+ #
11
+ # This macro searches for a GNU version of make. If a match is found, the
12
+ # makefile variable `ifGNUmake' is set to the empty string, otherwise it
13
+ # is set to "#". This is useful for including a special features in a
14
+ # Makefile, which cannot be handled by other versions of make. The
15
+ # variable _cv_gnu_make_command is set to the command to invoke GNU make
16
+ # if it exists, the empty string otherwise.
17
+ #
18
+ # Here is an example of its use:
19
+ #
20
+ # Makefile.in might contain:
21
+ #
22
+ # # A failsafe way of putting a dependency rule into a makefile
23
+ # $(DEPEND):
24
+ # $(CC) -MM $(srcdir)/*.c > $(DEPEND)
25
+ #
26
+ # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
27
+ # @ifGNUmake@ include $(DEPEND)
28
+ # @ifGNUmake@ endif
29
+ #
30
+ # Then configure.in would normally contain:
31
+ #
32
+ # AX_CHECK_GNU_MAKE()
33
+ # AC_OUTPUT(Makefile)
34
+ #
35
+ # Then perhaps to cause gnu make to override any other make, we could do
36
+ # something like this (note that GNU make always looks for GNUmakefile
37
+ # first):
38
+ #
39
+ # if ! test x$_cv_gnu_make_command = x ; then
40
+ # mv Makefile GNUmakefile
41
+ # echo .DEFAULT: > Makefile ;
42
+ # echo \ $_cv_gnu_make_command \$@ >> Makefile;
43
+ # fi
44
+ #
45
+ # Then, if any (well almost any) other make is called, and GNU make also
46
+ # exists, then the other make wraps the GNU make.
47
+ #
48
+ # LICENSE
49
+ #
50
+ # Copyright (c) 2008 John Darrington <j.darrington@elvis.murdoch.edu.au>
51
+ #
52
+ # Copying and distribution of this file, with or without modification, are
53
+ # permitted in any medium without royalty provided the copyright notice
54
+ # and this notice are preserved. This file is offered as-is, without any
55
+ # warranty.
56
+
57
+ #serial 7
58
+
59
+ AC_DEFUN([AX_CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
60
+ _cv_gnu_make_command='' ;
61
+ dnl Search all the common names for GNU make
62
+ for a in "$MAKE" make gmake gnumake ; do
63
+ if test -z "$a" ; then continue ; fi ;
64
+ if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
65
+ _cv_gnu_make_command=$a ;
66
+ break;
67
+ fi
68
+ done ;
69
+ ) ;
70
+ dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
71
+ if test "x$_cv_gnu_make_command" != "x" ; then
72
+ ifGNUmake='' ;
73
+ else
74
+ ifGNUmake='#' ;
75
+ AC_MSG_RESULT("Not found");
76
+ fi
77
+ AC_SUBST(ifGNUmake)
78
+ ] )
@@ -0,0 +1,72 @@
1
+ # ===========================================================================
2
+ # http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
3
+ # ===========================================================================
4
+ #
5
+ # SYNOPSIS
6
+ #
7
+ # AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
8
+ #
9
+ # DESCRIPTION
10
+ #
11
+ # Check whether the given FLAG works with the linker or gives an error.
12
+ # (Warnings, however, are ignored)
13
+ #
14
+ # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
15
+ # success/failure.
16
+ #
17
+ # If EXTRA-FLAGS is defined, it is added to the linker's default flags
18
+ # when the check is done. The check is thus made with the flags: "LDFLAGS
19
+ # EXTRA-FLAGS FLAG". This can for example be used to force the linker to
20
+ # issue an error when a bad flag is given.
21
+ #
22
+ # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
23
+ # macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
24
+ #
25
+ # LICENSE
26
+ #
27
+ # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
28
+ # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
29
+ #
30
+ # This program is free software: you can redistribute it and/or modify it
31
+ # under the terms of the GNU General Public License as published by the
32
+ # Free Software Foundation, either version 3 of the License, or (at your
33
+ # option) any later version.
34
+ #
35
+ # This program is distributed in the hope that it will be useful, but
36
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
37
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
38
+ # Public License for more details.
39
+ #
40
+ # You should have received a copy of the GNU General Public License along
41
+ # with this program. If not, see <http://www.gnu.org/licenses/>.
42
+ #
43
+ # As a special exception, the respective Autoconf Macro's copyright owner
44
+ # gives unlimited permission to copy, distribute and modify the configure
45
+ # scripts that are the output of Autoconf when processing the Macro. You
46
+ # need not follow the terms of the GNU General Public License when using
47
+ # or distributing such scripts, even though portions of the text of the
48
+ # Macro appear in them. The GNU General Public License (GPL) does govern
49
+ # all other use of the material that constitutes the Autoconf Macro.
50
+ #
51
+ # This special exception to the GPL applies to versions of the Autoconf
52
+ # Macro released by the Autoconf Archive. When you make and distribute a
53
+ # modified version of the Autoconf Macro, you may extend this special
54
+ # exception to the GPL to apply to your modified version as well.
55
+
56
+ #serial 2
57
+
58
+ AC_DEFUN([AX_CHECK_LINK_FLAG],
59
+ [AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
60
+ AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
61
+ ax_check_save_flags=$LDFLAGS
62
+ LDFLAGS="$LDFLAGS $4 $1"
63
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
64
+ [[char x[42U];if (fgets(x,1000,stdin)) puts(x)]])],
65
+ [AS_VAR_SET(CACHEVAR,[yes])],
66
+ [AS_VAR_SET(CACHEVAR,[no])])
67
+ LDFLAGS=$ax_check_save_flags])
68
+ AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
69
+ [m4_default([$2], :)],
70
+ [m4_default([$3], :)])
71
+ AS_VAR_POPDEF([CACHEVAR])dnl
72
+ ])dnl AX_CHECK_LINK_FLAGS
@@ -0,0 +1,29 @@
1
+ # ld-output-def.m4 serial 2
2
+ dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
3
+ dnl This file is free software; the Free Software Foundation
4
+ dnl gives unlimited permission to copy and/or distribute it,
5
+ dnl with or without modifications, as long as this notice is preserved.
6
+
7
+ dnl From Simon Josefsson
8
+
9
+ # gl_LD_OUTPUT_DEF()
10
+ # -------------
11
+ # Check if linker supports -Wl,--output-def and define automake
12
+ # conditional HAVE_LD_OUTPUT_DEF if it is.
13
+ AC_DEFUN([gl_LD_OUTPUT_DEF],
14
+ [
15
+ AC_CACHE_CHECK([if gcc/ld supports -Wl,--output-def],
16
+ [gl_cv_ld_output_def],
17
+ [if test "$enable_shared" = no; then
18
+ gl_cv_ld_output_def="not needed, shared libraries are disabled"
19
+ else
20
+ gl_ldflags_save=$LDFLAGS
21
+ LDFLAGS="-Wl,--output-def,conftest.def"
22
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
23
+ [gl_cv_ld_output_def=yes],
24
+ [gl_cv_ld_output_def=no])
25
+ rm -f conftest.def
26
+ LDFLAGS="$gl_ldflags_save"
27
+ fi])
28
+ AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "x$gl_cv_ld_output_def" = "xyes")
29
+ ])
@@ -0,0 +1,214 @@
1
+ # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2
+ # serial 1 (pkg-config-0.24)
3
+ #
4
+ # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
5
+ #
6
+ # This program is free software; you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation; either version 2 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful, but
12
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ # General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with this program; if not, write to the Free Software
18
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
+ #
20
+ # As a special exception to the GNU General Public License, if you
21
+ # distribute this file as part of a program that contains a
22
+ # configuration script generated by Autoconf, you may include it under
23
+ # the same distribution terms that you use for the rest of that program.
24
+
25
+ # PKG_PROG_PKG_CONFIG([MIN-VERSION])
26
+ # ----------------------------------
27
+ AC_DEFUN([PKG_PROG_PKG_CONFIG],
28
+ [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
29
+ m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
30
+ m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
31
+ AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
32
+ AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
33
+ AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
34
+
35
+ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
36
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
37
+ fi
38
+ if test -n "$PKG_CONFIG"; then
39
+ _pkg_min_version=m4_default([$1], [0.9.0])
40
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
41
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
42
+ AC_MSG_RESULT([yes])
43
+ else
44
+ AC_MSG_RESULT([no])
45
+ PKG_CONFIG=""
46
+ fi
47
+ fi[]dnl
48
+ ])# PKG_PROG_PKG_CONFIG
49
+
50
+ # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
51
+ #
52
+ # Check to see whether a particular set of modules exists. Similar
53
+ # to PKG_CHECK_MODULES(), but does not set variables or print errors.
54
+ #
55
+ # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
56
+ # only at the first occurence in configure.ac, so if the first place
57
+ # it's called might be skipped (such as if it is within an "if", you
58
+ # have to call PKG_CHECK_EXISTS manually
59
+ # --------------------------------------------------------------
60
+ AC_DEFUN([PKG_CHECK_EXISTS],
61
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
62
+ if test -n "$PKG_CONFIG" && \
63
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
64
+ m4_default([$2], [:])
65
+ m4_ifvaln([$3], [else
66
+ $3])dnl
67
+ fi])
68
+
69
+ # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
70
+ # ---------------------------------------------
71
+ m4_define([_PKG_CONFIG],
72
+ [if test -n "$$1"; then
73
+ pkg_cv_[]$1="$$1"
74
+ elif test -n "$PKG_CONFIG"; then
75
+ PKG_CHECK_EXISTS([$3],
76
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
77
+ test "x$?" != "x0" && pkg_failed=yes ],
78
+ [pkg_failed=yes])
79
+ else
80
+ pkg_failed=untried
81
+ fi[]dnl
82
+ ])# _PKG_CONFIG
83
+
84
+ # _PKG_SHORT_ERRORS_SUPPORTED
85
+ # -----------------------------
86
+ AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
87
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
88
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
89
+ _pkg_short_errors_supported=yes
90
+ else
91
+ _pkg_short_errors_supported=no
92
+ fi[]dnl
93
+ ])# _PKG_SHORT_ERRORS_SUPPORTED
94
+
95
+
96
+ # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
97
+ # [ACTION-IF-NOT-FOUND])
98
+ #
99
+ #
100
+ # Note that if there is a possibility the first call to
101
+ # PKG_CHECK_MODULES might not happen, you should be sure to include an
102
+ # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
103
+ #
104
+ #
105
+ # --------------------------------------------------------------
106
+ AC_DEFUN([PKG_CHECK_MODULES],
107
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
108
+ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
109
+ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
110
+
111
+ pkg_failed=no
112
+ AC_MSG_CHECKING([for $1])
113
+
114
+ _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
115
+ _PKG_CONFIG([$1][_LIBS], [libs], [$2])
116
+
117
+ m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
118
+ and $1[]_LIBS to avoid the need to call pkg-config.
119
+ See the pkg-config man page for more details.])
120
+
121
+ if test $pkg_failed = yes; then
122
+ AC_MSG_RESULT([no])
123
+ _PKG_SHORT_ERRORS_SUPPORTED
124
+ if test $_pkg_short_errors_supported = yes; then
125
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
126
+ else
127
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
128
+ fi
129
+ # Put the nasty error message in config.log where it belongs
130
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
131
+
132
+ m4_default([$4], [AC_MSG_ERROR(
133
+ [Package requirements ($2) were not met:
134
+
135
+ $$1_PKG_ERRORS
136
+
137
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
138
+ installed software in a non-standard prefix.
139
+
140
+ _PKG_TEXT])[]dnl
141
+ ])
142
+ elif test $pkg_failed = untried; then
143
+ AC_MSG_RESULT([no])
144
+ m4_default([$4], [AC_MSG_FAILURE(
145
+ [The pkg-config script could not be found or is too old. Make sure it
146
+ is in your PATH or set the PKG_CONFIG environment variable to the full
147
+ path to pkg-config.
148
+
149
+ _PKG_TEXT
150
+
151
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
152
+ ])
153
+ else
154
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
155
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
156
+ AC_MSG_RESULT([yes])
157
+ $3
158
+ fi[]dnl
159
+ ])# PKG_CHECK_MODULES
160
+
161
+
162
+ # PKG_INSTALLDIR(DIRECTORY)
163
+ # -------------------------
164
+ # Substitutes the variable pkgconfigdir as the location where a module
165
+ # should install pkg-config .pc files. By default the directory is
166
+ # $libdir/pkgconfig, but the default can be changed by passing
167
+ # DIRECTORY. The user can override through the --with-pkgconfigdir
168
+ # parameter.
169
+ AC_DEFUN([PKG_INSTALLDIR],
170
+ [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
171
+ m4_pushdef([pkg_description],
172
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
173
+ AC_ARG_WITH([pkgconfigdir],
174
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
175
+ [with_pkgconfigdir=]pkg_default)
176
+ AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
177
+ m4_popdef([pkg_default])
178
+ m4_popdef([pkg_description])
179
+ ]) dnl PKG_INSTALLDIR
180
+
181
+
182
+ # PKG_NOARCH_INSTALLDIR(DIRECTORY)
183
+ # -------------------------
184
+ # Substitutes the variable noarch_pkgconfigdir as the location where a
185
+ # module should install arch-independent pkg-config .pc files. By
186
+ # default the directory is $datadir/pkgconfig, but the default can be
187
+ # changed by passing DIRECTORY. The user can override through the
188
+ # --with-noarch-pkgconfigdir parameter.
189
+ AC_DEFUN([PKG_NOARCH_INSTALLDIR],
190
+ [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
191
+ m4_pushdef([pkg_description],
192
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
193
+ AC_ARG_WITH([noarch-pkgconfigdir],
194
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
195
+ [with_noarch_pkgconfigdir=]pkg_default)
196
+ AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
197
+ m4_popdef([pkg_default])
198
+ m4_popdef([pkg_description])
199
+ ]) dnl PKG_NOARCH_INSTALLDIR
200
+
201
+
202
+ # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
203
+ # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
204
+ # -------------------------------------------
205
+ # Retrieves the value of the pkg-config variable for the given module.
206
+ AC_DEFUN([PKG_CHECK_VAR],
207
+ [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
208
+ AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
209
+
210
+ _PKG_CONFIG([$1], [variable="][$3]["], [$2])
211
+ AS_VAR_COPY([$1], [pkg_cv_][$1])
212
+
213
+ AS_VAR_IF([$1], [""], [$5], [$4])dnl
214
+ ])# PKG_CHECK_VAR