Skip to content

Commit 1ac4e40

Browse files
thresheekac000
authored andcommitted
auto/otel: don't look for OpenSSL on Darwin
Rust code relies on macOS-provided frameworks for TLS. Fixes: 9d3dcb8 ("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>
1 parent bfb86ed commit 1ac4e40

File tree

1 file changed

+39
-23
lines changed

1 file changed

+39
-23
lines changed

auto/otel

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,44 @@ if [ $NXT_OTEL = YES ]; then
1919
fi
2020
$echo "found"
2121

22-
$echo -n " - "
23-
24-
nxt_feature="OpenSSL library"
25-
nxt_feature_name=NXT_HAVE_OTEL
26-
nxt_feature_run=yes
27-
nxt_feature_incs=
28-
nxt_feature_libs="-lssl -lcrypto"
29-
nxt_feature_test="#include <openssl/ssl.h>
30-
31-
int main(void) {
32-
SSL_library_init();
33-
return 0;
34-
}"
35-
. auto/feature
36-
37-
if [ ! $nxt_found = yes ]; then
38-
$echo
39-
$echo $0: error: OpenTelemetry support requires OpenSSL.
40-
$echo
41-
exit 1;
42-
fi
43-
44-
NXT_OTEL_LIBS="-lssl -lcrypto"
22+
case "$NXT_SYSTEM" in
23+
Darwin)
24+
NXT_OTEL_LIBS="-framework CoreFoundation -framework Security -framework SystemConfiguration"
25+
26+
cat << END >> $NXT_AUTO_CONFIG_H
27+
28+
#ifndef NXT_HAVE_OTEL
29+
#define NXT_HAVE_OTEL 1
30+
#endif
31+
32+
END
33+
;;
34+
*)
35+
36+
$echo -n " - "
37+
38+
nxt_feature="OpenSSL library"
39+
nxt_feature_name=NXT_HAVE_OTEL
40+
nxt_feature_run=yes
41+
nxt_feature_incs=
42+
nxt_feature_libs="-lssl -lcrypto"
43+
nxt_feature_test="#include <openssl/ssl.h>
44+
45+
int main(void) {
46+
SSL_library_init();
47+
return 0;
48+
}"
49+
. auto/feature
50+
51+
if [ ! $nxt_found = yes ]; then
52+
$echo
53+
$echo $0: error: OpenTelemetry support requires OpenSSL.
54+
$echo
55+
exit 1;
56+
fi
57+
58+
NXT_OTEL_LIBS="-lssl -lcrypto"
59+
;;
60+
esac
4561

4662
fi

0 commit comments

Comments
 (0)