diff options
| author | Konstantin Pavlov <thresh@nginx.com> | 2024-12-19 16:09:43 -0800 |
|---|---|---|
| committer | Andrew Clayton <a.clayton@nginx.com> | 2025-01-10 16:33:06 +0000 |
| commit | 035b523af06815c5d23c63701cf85c9c931d2c0a (patch) | |
| tree | 65caf4492e2f7459d93568a3149dad3bd3d7fdc2 | |
| parent | f1cf5fe010012d0a173c95bc1ff0e622594c68d3 (diff) | |
| download | unit-035b523af06815c5d23c63701cf85c9c931d2c0a.tar.gz unit-035b523af06815c5d23c63701cf85c9c931d2c0a.tar.bz2 | |
auto/otel: don't look for OpenSSL on Darwin
Rust code relies on macOS-provided frameworks for TLS.
Fixes: 9d3dcb800 ("otel: add build tooling to include otel code")
[ Tweaked subject prefix. Some minor tweaks for current changes. -
Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
| -rw-r--r-- | auto/otel | 62 |
1 files changed, 39 insertions, 23 deletions
@@ -19,28 +19,44 @@ if [ $NXT_OTEL = YES ]; then fi $echo "found" - $echo -n " - " - - nxt_feature="OpenSSL library" - nxt_feature_name=NXT_HAVE_OTEL - 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" + case "$NXT_SYSTEM" in + Darwin) + NXT_OTEL_LIBS="-framework CoreFoundation -framework Security -framework SystemConfiguration" + + cat << END >> $NXT_AUTO_CONFIG_H + +#ifndef NXT_HAVE_OTEL +#define NXT_HAVE_OTEL 1 +#endif + +END + ;; + *) + + $echo -n " - " + + nxt_feature="OpenSSL library" + nxt_feature_name=NXT_HAVE_OTEL + 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" + ;; + esac fi |
