1dnl 2dnl Check for arc4random on BSD systems 3dnl 4AC_CHECK_DECLS([arc4random_buf]) 5 6dnl 7dnl Check for CCRandomGenerateBytes 8dnl header absent in previous macOs releases 9dnl 10AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h], [], [], 11[ 12 #include <sys/types.h> 13 #include <Availability.h> 14 #include <CommonCrypto/CommonCryptoError.h> 15]) 16 17dnl 18dnl Mostly for non Linux systems 19dnl 20AC_CHECK_FUNCS([getrandom]) 21 22dnl 23dnl Setup extension 24dnl 25PHP_NEW_EXTENSION(random, 26 random.c \ 27 csprng.c \ 28 engine_combinedlcg.c \ 29 engine_mt19937.c \ 30 engine_pcgoneseq128xslrr64.c \ 31 engine_xoshiro256starstar.c \ 32 engine_secure.c \ 33 engine_user.c \ 34 gammasection.c \ 35 randomizer.c, 36 no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) 37PHP_INSTALL_HEADERS([ext/random], [php_random.h]) 38