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 04:16:09 +0000 |
| commit | 1ac4e40941df4fac62c471545aec3e3c75abe50e (patch) | |
| tree | 16b08b43acb89962f3d4e64d849dde4546d78ffa | |
| parent | bfb86ed0b97f886f1e979d3e68a04585af1792f4 (diff) | |
| download | unit-1ac4e40941df4fac62c471545aec3e3c75abe50e.tar.gz unit-1ac4e40941df4fac62c471545aec3e3c75abe50e.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 |
