mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
f098193d15
A simple check for CommonCrypto/CommonRandom.h does not work on earlier macOS. Must also pull in sys/types.h for size_t, Availability.h for __OSX_AVAILABLE_STARTING, and CommonCrypto/CommonCryptoError.h for CCCryptorStatus. Closes GH-9479.
31 lines
691 B
Plaintext
31 lines
691 B
Plaintext
dnl
|
|
dnl Check for arc4random on BSD systems
|
|
dnl
|
|
AC_CHECK_DECLS([arc4random_buf])
|
|
|
|
dnl
|
|
dnl Check for CCRandomGenerateBytes
|
|
dnl header absent in previous macOs releases
|
|
dnl
|
|
AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h], [], [],
|
|
[
|
|
#include <sys/types.h>
|
|
#include <Availability.h>
|
|
#include <CommonCrypto/CommonCryptoError.h>
|
|
])
|
|
|
|
dnl
|
|
dnl Setup extension
|
|
dnl
|
|
PHP_NEW_EXTENSION(random,
|
|
random.c \
|
|
engine_combinedlcg.c \
|
|
engine_mt19937.c \
|
|
engine_pcgoneseq128xslrr64.c \
|
|
engine_xoshiro256starstar.c \
|
|
engine_secure.c \
|
|
engine_user.c \
|
|
randomizer.c,
|
|
no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
|
PHP_INSTALL_HEADERS([ext/random], [php_random.h])
|