diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2024-12-19 10:23:57 -0800 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2024-12-19 10:23:57 -0800 |
commit | d8acad350a52a20918c46c09cb0a0f5479400923 (patch) | |
tree | 7d9c4b64daa60d3ac121743dfa3735c6fc5687a4 /auto/otel | |
parent | 624debcf17ea7faab01fa841bd4dcd9f308cf306 (diff) | |
parent | 27bde184dedcbf687db2f314c60c037623318a8d (diff) | |
download | unit-d8acad350a52a20918c46c09cb0a0f5479400923.tar.gz unit-d8acad350a52a20918c46c09cb0a0f5479400923.tar.bz2 |
Merge tag '1.34.0' into packaging1.34.0-1
Unit 1.34.0 release.
Diffstat (limited to 'auto/otel')
-rw-r--r-- | auto/otel | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/auto/otel b/auto/otel new file mode 100644 index 00000000..f23aac3b --- /dev/null +++ b/auto/otel @@ -0,0 +1,52 @@ + +# Copyright (C) NGINX, Inc. + +if [ $NXT_OTEL = YES ]; then + + $echo "checking for OTEL requirements:" + + $echo -n " - checking for rust compiler ... " + if [ -z $(which rustc 2>/dev/null) ]; then + $echo "not found" + exit 1; + fi + $echo "found" + + $echo -n " - checking for cargo ... " + if [ -z $(which cargo 2>/dev/null) ]; then + $echo "not found." + exit 1; + fi + $echo "found" + + $echo -n " - " + + nxt_feature="OpenSSL library" + nxt_feature_run=yes + nxt_feature_incs= + nxt_feature_libs="-lssl -lcrypto" + nxt_feature_test="#include <openssl/ssl.h> + + int main(void) { + SSL_library_init(); + return 0; + }" + . auto/feature + + if [ ! $nxt_found = yes ]; then + $echo + $echo $0: error: OpenTelemetry support requires OpenSSL. + $echo + exit 1; + fi + + NXT_OTEL_LIBS="-lssl -lcrypto" + + cat << END >> $NXT_AUTO_CONFIG_H + +#ifndef NXT_HAVE_OTEL +#define NXT_HAVE_OTEL 1 +#endif + +END +fi |