comparison auto/lib/openssl/conf @ 9316:b40149d062cb

Win32: checking for system PCRE, zlib, and OpenSSL libs. Checking for system libs on Windows is beneficial when compiling in MSYS2 environments with GCC or Clang, as most libraries are readily available.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 07 Aug 2024 03:58:50 +0300
parents 0ba26c99b3a1
children
comparison
equal deleted inserted replaced
9315:d286426eab1a 9316:b40149d062cb
53 ;; 53 ;;
54 esac 54 esac
55 55
56 else 56 else
57 57
58 if [ "$NGX_PLATFORM" != win32 ]; then 58 OPENSSL=NO
59 59
60 OPENSSL=NO 60 ngx_feature="OpenSSL library"
61 ngx_feature_name="NGX_OPENSSL"
62 ngx_feature_run=no
63 ngx_feature_incs="#include <openssl/ssl.h>"
64 ngx_feature_path=
65 ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
66 ngx_feature_test="SSL_CTX_set_options(NULL, 0)"
67 . auto/feature
61 68
62 ngx_feature="OpenSSL library" 69 if [ $ngx_found = no ]; then
63 ngx_feature_name="NGX_OPENSSL" 70
64 ngx_feature_run=no 71 # FreeBSD port
65 ngx_feature_incs="#include <openssl/ssl.h>" 72
66 ngx_feature_path= 73 ngx_feature="OpenSSL library in /usr/local/"
67 ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD" 74 ngx_feature_path="/usr/local/include"
68 ngx_feature_test="SSL_CTX_set_options(NULL, 0)" 75
76 if [ $NGX_RPATH = YES ]; then
77 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lssl -lcrypto"
78 else
79 ngx_feature_libs="-L/usr/local/lib -lssl -lcrypto"
80 fi
81
82 ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
83
69 . auto/feature 84 . auto/feature
85 fi
70 86
71 if [ $ngx_found = no ]; then 87 if [ $ngx_found = no ]; then
72 88
73 # FreeBSD port 89 # NetBSD port
74 90
75 ngx_feature="OpenSSL library in /usr/local/" 91 ngx_feature="OpenSSL library in /usr/pkg/"
76 ngx_feature_path="/usr/local/include" 92 ngx_feature_path="/usr/pkg/include"
77 93
78 if [ $NGX_RPATH = YES ]; then 94 if [ $NGX_RPATH = YES ]; then
79 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lssl -lcrypto" 95 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lssl -lcrypto"
80 else 96 else
81 ngx_feature_libs="-L/usr/local/lib -lssl -lcrypto" 97 ngx_feature_libs="-L/usr/pkg/lib -lssl -lcrypto"
98 fi
99
100 ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
101
102 . auto/feature
103 fi
104
105 if [ $ngx_found = no ]; then
106
107 # MacPorts
108
109 ngx_feature="OpenSSL library in /opt/local/"
110 ngx_feature_path="/opt/local/include"
111
112 if [ $NGX_RPATH = YES ]; then
113 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto"
114 else
115 ngx_feature_libs="-L/opt/local/lib -lssl -lcrypto"
116 fi
117
118 ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
119
120 . auto/feature
121 fi
122
123 if [ $ngx_found = yes ]; then
124 have=NGX_SSL . auto/have
125 CORE_INCS="$CORE_INCS $ngx_feature_path"
126 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
127 OPENSSL=YES
128
129 if [ $USE_OPENSSL_QUIC = YES ]; then
130
131 ngx_feature="OpenSSL QUIC support"
132 ngx_feature_name="NGX_QUIC"
133 ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
134 . auto/feature
135
136 if [ $ngx_found = no ]; then
137 have=NGX_QUIC_OPENSSL_COMPAT . auto/have
138
139 ngx_feature="OpenSSL QUIC compatibility"
140 ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
141 NULL, NULL, NULL, NULL, NULL)"
142 . auto/feature
82 fi 143 fi
83 144
84 ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD" 145 if [ $ngx_found = no ]; then
85
86 . auto/feature
87 fi
88
89 if [ $ngx_found = no ]; then
90
91 # NetBSD port
92
93 ngx_feature="OpenSSL library in /usr/pkg/"
94 ngx_feature_path="/usr/pkg/include"
95
96 if [ $NGX_RPATH = YES ]; then
97 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lssl -lcrypto"
98 else
99 ngx_feature_libs="-L/usr/pkg/lib -lssl -lcrypto"
100 fi
101
102 ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
103
104 . auto/feature
105 fi
106
107 if [ $ngx_found = no ]; then
108
109 # MacPorts
110
111 ngx_feature="OpenSSL library in /opt/local/"
112 ngx_feature_path="/opt/local/include"
113
114 if [ $NGX_RPATH = YES ]; then
115 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto"
116 else
117 ngx_feature_libs="-L/opt/local/lib -lssl -lcrypto"
118 fi
119
120 ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
121
122 . auto/feature
123 fi
124
125 if [ $ngx_found = yes ]; then
126 have=NGX_SSL . auto/have
127 CORE_INCS="$CORE_INCS $ngx_feature_path"
128 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
129 OPENSSL=YES
130
131 if [ $USE_OPENSSL_QUIC = YES ]; then
132
133 ngx_feature="OpenSSL QUIC support"
134 ngx_feature_name="NGX_QUIC"
135 ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
136 . auto/feature
137
138 if [ $ngx_found = no ]; then
139 have=NGX_QUIC_OPENSSL_COMPAT . auto/have
140
141 ngx_feature="OpenSSL QUIC compatibility"
142 ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
143 NULL, NULL, NULL, NULL, NULL)"
144 . auto/feature
145 fi
146
147 if [ $ngx_found = no ]; then
148 cat << END 146 cat << END
149 147
150 $0: error: certain modules require OpenSSL QUIC support. 148 $0: error: certain modules require OpenSSL QUIC support.
151 You can either do not enable the modules, or install the OpenSSL library with 149 You can either do not enable the modules, or install the OpenSSL library with
152 QUIC support into the system, or build the OpenSSL library with QUIC support 150 QUIC support into the system, or build the OpenSSL library with QUIC support
153 statically from the source with nginx by using --with-openssl=<path> option. 151 statically from the source with nginx by using --with-openssl=<path> option.
154 152
155 END 153 END
156 exit 1 154 exit 1
157 fi
158 fi 155 fi
159 fi 156 fi
160 fi 157 fi
161 158
162 if [ $OPENSSL != YES ]; then 159 if [ $OPENSSL != YES ]; then