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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
# Copyright (C) Dmitry Volyntsev
# Copyright (C) NGINX, Inc.
NJS_OPENSSL_LIB=
NJS_HAVE_OPENSSL=NO
if [ $NJS_OPENSSL = YES ]; then
njs_found=no
njs_feature="OpenSSL library"
njs_feature_name=NJS_HAVE_OPENSSL
njs_feature_run=yes
njs_feature_incs=
njs_feature_libs=""
njs_feature_test="#include <openssl/evp.h>
int main() {
EVP_CIPHER_CTX *ctx;
ctx = EVP_CIPHER_CTX_new();
EVP_CIPHER_CTX_free(ctx);
return 0;
}"
. auto/feature
if [ $njs_found = no ]; then
njs_feature="OpenSSL library -lcrypto"
njs_feature_libs="-lcrypto"
. auto/feature
fi
if [ $njs_found = yes ]; then
njs_feature="OpenSSL version"
njs_feature_name=NJS_OPENSSL_VERSION
njs_feature_run=value
njs_feature_test="#include <openssl/ssl.h>
int main() {
printf(\"\\\"%s\\\"\", OPENSSL_VERSION_TEXT);
return 0;
}"
. auto/feature
NJS_HAVE_OPENSSL=YES
NJS_OPENSSL_LIB="$njs_feature_libs"
NJS_LIB_AUX_LIBS="$NJS_LIB_AUX_LIBS $njs_feature_libs"
fi
fi
|