File: CheckSSL.m4

package info (click to toggle)
php-mongodb 1.15.0%2B1.11.1%2B1.9.2%2B1.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 63,984 kB
  • sloc: ansic: 328,429; xml: 10,797; php: 4,235; sh: 179; python: 47; pascal: 36; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 1,435 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
if test "$PHP_MONGODB_CLIENT_SIDE_ENCRYPTION" != "no"; then
  AC_MSG_CHECKING([which crypto library to use for libmongocrypt])
  AC_MSG_RESULT([$PHP_MONGODB_SSL])

  dnl Disable Windows crypto
  AC_SUBST(MONGOCRYPT_ENABLE_CRYPTO_CNG, 0)

  if test "$PHP_MONGODB_SSL" = "darwin"; then
    PHP_MONGODB_CLIENT_SIDE_ENCRYPTION="yes"

    AC_SUBST(MONGOCRYPT_ENABLE_CRYPTO, 1)
    AC_SUBST(MONGOCRYPT_ENABLE_CRYPTO_LIBCRYPTO, 0)
    AC_SUBST(MONGOCRYPT_ENABLE_CRYPTO_COMMON_CRYPTO, 1)

    PHP_MONGODB_LIBMONGOCRYPT_CFLAGS="$PHP_MONGODB_LIBMONGOCRYPT_CFLAGS -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_COMMON_CRYPTO=1"
  elif test "$PHP_MONGODB_SSL" = "openssl" -o "$PHP_MONGODB_SSL" = "libressl"; then
    PHP_MONGODB_CLIENT_SIDE_ENCRYPTION="yes"

    AC_SUBST(MONGOCRYPT_ENABLE_CRYPTO, 1)
    AC_SUBST(MONGOCRYPT_ENABLE_CRYPTO_LIBCRYPTO, 1)
    AC_SUBST(MONGOCRYPT_ENABLE_CRYPTO_COMMON_CRYPTO, 0)

    PHP_MONGODB_LIBMONGOCRYPT_CFLAGS="$PHP_MONGODB_LIBMONGOCRYPT_CFLAGS -DKMS_MESSAGE_ENABLE_CRYPTO=1 -DKMS_MESSAGE_ENABLE_CRYPTO_LIBCRYPTO=1"
  elif test "$PHP_MONGODB_CLIENT_SIDE_ENCRYPTION" = "auto"; then
    PHP_MONGODB_CLIENT_SIDE_ENCRYPTION="no"

    AC_MSG_RESULT(No SSL library found. Compiling without libmongocrypt. Please specify a library using the --with-mongodb-ssl option)
  else
    AC_MSG_ERROR(Need an SSL library to compile with libmongocrypt. Please specify it using the --with-mongodb-ssl option)
  fi
fi