comparison auto/lib/openssl/conf @ 8628:8c163ce5b55a quic

Configure: fixed QUIC support test. OpenSSL library QUIC support cannot be tested at configure time when using the --with-openssl option so assume it's present if requested. While here, fixed the error message in case QUIC support is missing.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 27 Sep 2021 10:10:38 +0300
parents 646bb5361437
children 7da4791e0264
comparison
equal deleted inserted replaced
8627:646bb5361437 8628:8c163ce5b55a
3 # Copyright (C) Nginx, Inc. 3 # Copyright (C) Nginx, Inc.
4 4
5 5
6 if [ $OPENSSL != NONE ]; then 6 if [ $OPENSSL != NONE ]; then
7 7
8 have=NGX_OPENSSL . auto/have
9 have=NGX_SSL . auto/have
10
11 if [ $USE_OPENSSL_QUIC = YES ]; then
12 have=NGX_QUIC . auto/have
13 fi
14
8 case "$CC" in 15 case "$CC" in
9 16
10 cl | bcc32) 17 cl | bcc32)
11 have=NGX_OPENSSL . auto/have
12 have=NGX_SSL . auto/have
13
14 CFLAGS="$CFLAGS -DNO_SYS_TYPES_H" 18 CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
15 19
16 CORE_INCS="$CORE_INCS $OPENSSL/openssl/include" 20 CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
17 CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h" 21 CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h"
18 22
31 # OpenSSL 1.0.0 requires crypt32.lib 35 # OpenSSL 1.0.0 requires crypt32.lib
32 CORE_LIBS="$CORE_LIBS crypt32.lib" 36 CORE_LIBS="$CORE_LIBS crypt32.lib"
33 ;; 37 ;;
34 38
35 *) 39 *)
36 have=NGX_OPENSSL . auto/have
37 have=NGX_SSL . auto/have
38
39 CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include" 40 CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
40 CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h" 41 CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
41 CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a" 42 CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
42 CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a" 43 CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
43 CORE_LIBS="$CORE_LIBS $NGX_LIBDL" 44 CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
137 138
138 END 139 END
139 exit 1 140 exit 1
140 fi 141 fi
141 142
142 fi 143 if [ $USE_OPENSSL_QUIC = YES ]; then
143 144
145 ngx_feature="OpenSSL QUIC support"
146 ngx_feature_name="NGX_QUIC"
147 ngx_feature_run=no
148 ngx_feature_incs="#include <openssl/ssl.h>"
149 ngx_feature_path=
150 ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
151 ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
152 . auto/feature
144 153
145 if [ $USE_OPENSSL_QUIC = YES ]; then 154 if [ $ngx_found = no ]; then
146
147 ngx_feature="OpenSSL QUIC support"
148 ngx_feature_name="NGX_QUIC"
149 ngx_feature_run=no
150 ngx_feature_incs="#include <openssl/ssl.h>"
151 ngx_feature_path=
152 ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
153 ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
154 . auto/feature
155
156 if [ $ngx_found = no ]; then
157 155
158 cat << END 156 cat << END
159 157
160 $0: error: certain modules require OpenSSL QUIC support. 158 $0: error: certain modules require OpenSSL QUIC support.
161 You can either do not enable the modules, or install the OpenSSL library 159 You can either do not enable the modules, or install the OpenSSL library with
162 into the system, or build the OpenSSL library statically from the source 160 QUIC support into the system, or build the OpenSSL library with QUIC support
163 with nginx by using --with-openssl=<path> option. 161 statically from the source with nginx by using --with-openssl=<path> option.
164 162
165 END 163 END
166 exit 1 164 exit 1
165 fi
167 fi 166 fi
168 fi 167 fi