| @@ -1,50 +1,48 @@ | | | @@ -1,50 +1,48 @@ |
1 | $NetBSD: patch-configure,v 1.5 2020/04/23 13:52:24 mef Exp $ | | 1 | $NetBSD: patch-configure,v 1.6 2020/06/19 13:44:28 taca Exp $ |
2 | | | 2 | |
3 | * More support for OpenSSL 1.1; not only check SSL_Library_init() but | | 3 | * More support for OpenSSL 1.1; not only check SSL_Library_init() but |
4 | also check OPENSSL_init_ssl(). | | 4 | also check OPENSSL_init_ssl(). |
5 | * Fix syntax error by accidental new line. | | 5 | * Fix syntax error by accidental new line. |
6 | * Utilize <stdlib.h> on BSD. | | 6 | * Utilize <stdlib.h> on BSD. |
7 | * Do not override CFLAGS/CXXFLAGS except linux. | | 7 | * Do not override CFLAGS/CXXFLAGS except linux. |
8 | * Fix detection of IPv6 NAT in IPFilter by including correct headers | | | |
9 | and generating correct #defines without trailing underscores | | | |
10 | | | 8 | |
11 | --- configure.orig 2020-01-20 02:51:59.000000000 +0000 | | 9 | --- configure.orig 2020-06-09 07:15:48.000000000 +0000 |
12 | +++ configure 2020-04-09 16:05:04.000000000 +0100 | | 10 | +++ configure |
13 | @@ -23201,10 +23201,12 @@ | | 11 | @@ -23226,10 +23226,12 @@ do |
14 | done | | 12 | done |
15 | | | 13 | |
16 | # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later. | | 14 | # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later. |
17 | - CFLAGS=$SQUID_CFLAGS | | 15 | - CFLAGS=$SQUID_CFLAGS |
18 | - CXXFLAGS=$SQUID_CXXFLAGS | | 16 | - CXXFLAGS=$SQUID_CXXFLAGS |
19 | case "$squid_host_os" in | | 17 | case "$squid_host_os" in |
20 | - linux|solaris|freebsd|openbsd|netbsd|cygwin) | | 18 | - linux|solaris|freebsd|openbsd|netbsd|cygwin) |
21 | + linux) | | 19 | + linux) |
22 | + CFLAGS=$SQUID_CFLAGS | | 20 | + CFLAGS=$SQUID_CFLAGS |
23 | + CXXFLAGS=$SQUID_CXXFLAGS | | 21 | + CXXFLAGS=$SQUID_CXXFLAGS |
24 | + ;; | | 22 | + ;; |
25 | + solaris|freebsd|openbsd|netbsd|cygwin) | | 23 | + solaris|freebsd|openbsd|netbsd|cygwin) |
26 | ${TRUE} | | 24 | ${TRUE} |
27 | ;; | | 25 | ;; |
28 | mingw) | | 26 | mingw) |
29 | @@ -23244,6 +23246,7 @@ | | 27 | @@ -23269,6 +23271,7 @@ done |
30 | do : | | 28 | do : |
31 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | | 29 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
32 | ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " | | 30 | ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " |
33 | +#include <stdio.h> | | 31 | +#include <stdio.h> |
34 | #include <sys/types.h> | | 32 | #include <sys/types.h> |
35 | #include <sys/socket.h> | | 33 | #include <sys/socket.h> |
36 | | | 34 | |
37 | @@ -24080,7 +24083,51 @@ | | 35 | @@ -24105,7 +24108,51 @@ if test "x$ac_cv_lib_ssl_SSL_CTX_new" = |
38 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 36 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
39 | else | | 37 | else |
40 | | | 38 | |
41 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 39 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
42 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 | | 40 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 |
43 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } | | 41 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } |
44 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : | | 42 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : |
45 | + $as_echo_n "(cached) " >&6 | | 43 | + $as_echo_n "(cached) " >&6 |
46 | +else | | 44 | +else |
47 | + ac_check_lib_save_LIBS=$LIBS | | 45 | + ac_check_lib_save_LIBS=$LIBS |
48 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" | | 46 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" |
49 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | 47 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
50 | +/* end confdefs.h. */ | | 48 | +/* end confdefs.h. */ |
| @@ -77,27 +75,27 @@ $NetBSD: patch-configure,v 1.5 2020/04/2 | | | @@ -77,27 +75,27 @@ $NetBSD: patch-configure,v 1.5 2020/04/2 |
77 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } | | 75 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } |
78 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : | | 76 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : |
79 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 77 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
80 | +else | | 78 | +else |
81 | + | | 79 | + |
82 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 80 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
83 | + | | 81 | + |
84 | +fi | | 82 | +fi |
85 | + | | 83 | + |
86 | + | | 84 | + |
87 | | | 85 | |
88 | fi | | 86 | fi |
89 | | | 87 | |
90 | @@ -24183,7 +24230,51 @@ | | 88 | @@ -24208,7 +24255,51 @@ if test "x$ac_cv_lib_ssl_SSL_CTX_new" = |
91 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 89 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
92 | else | | 90 | else |
93 | | | 91 | |
94 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 92 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
95 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 | | 93 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 |
96 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } | | 94 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } |
97 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : | | 95 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : |
98 | + $as_echo_n "(cached) " >&6 | | 96 | + $as_echo_n "(cached) " >&6 |
99 | +else | | 97 | +else |
100 | + ac_check_lib_save_LIBS=$LIBS | | 98 | + ac_check_lib_save_LIBS=$LIBS |
101 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" | | 99 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" |
102 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | 100 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
103 | +/* end confdefs.h. */ | | 101 | +/* end confdefs.h. */ |
| @@ -130,81 +128,32 @@ $NetBSD: patch-configure,v 1.5 2020/04/2 | | | @@ -130,81 +128,32 @@ $NetBSD: patch-configure,v 1.5 2020/04/2 |
130 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } | | 128 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } |
131 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : | | 129 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : |
132 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 130 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
133 | +else | | 131 | +else |
134 | + | | 132 | + |
135 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 133 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
136 | + | | 134 | + |
137 | +fi | | 135 | +fi |
138 | + | | 136 | + |
139 | + | | 137 | + |
140 | | | 138 | |
141 | fi | | 139 | fi |
142 | | | 140 | |
143 | @@ -39234,6 +39325,8 @@ | | 141 | @@ -39571,6 +39662,8 @@ else |
144 | # ifdef _MSC_VER | | 142 | # ifdef _MSC_VER |
145 | # include <malloc.h> | | 143 | # include <malloc.h> |
146 | # define alloca _alloca | | 144 | # define alloca _alloca |
147 | +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) | | 145 | +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) |
148 | +# include <stdlib.h> | | 146 | +# include <stdlib.h> |
149 | # else | | 147 | # else |
150 | # ifdef HAVE_ALLOCA_H | | 148 | # ifdef HAVE_ALLOCA_H |
151 | # include <alloca.h> | | 149 | # include <alloca.h> |
152 | @@ -42021,6 +42114,9 @@ | | 150 | @@ -42313,6 +42406,9 @@ ac_fn_cxx_check_header_compile "$LINENO" |
153 | #if USE_SOLARIS_IPFILTER_MINOR_T_HACK | | 151 | #if USE_SOLARIS_IPFILTER_MINOR_T_HACK |
154 | #define minor_t fubar | | 152 | #define minor_t fubar |
155 | #endif | | 153 | #endif |
156 | +#if HAVE_SYS_PARAM_H | | 154 | +#if HAVE_SYS_PARAM_H |
157 | +#include <sys/param.h> | | 155 | +#include <sys/param.h> |
158 | +#endif | | 156 | +#endif |
159 | #if HAVE_SYS_TYPES_H | | 157 | #if HAVE_SYS_TYPES_H |
160 | #include <sys/types.h> | | 158 | #include <sys/types.h> |
161 | #endif | | 159 | #endif |
162 | @@ -42046,7 +42142,11 @@ | | | |
163 | #elif HAVE_NETINET_IP_FIL_H | | | |
164 | #include <netinet/ip_fil.h> | | | |
165 | #endif | | | |
166 | +#if HAVE_IP_NAT_H | | | |
167 | #include <ip_nat.h> | | | |
168 | +#elif HAVE_NETINET_IP_NAT_H | | | |
169 | +#include <netinet/ip_nat.h> | | | |
170 | +#endif | | | |
171 | | | | |
172 | " | | | |
173 | if test "x$ac_cv_member_struct_natlookup_nl_inipaddr_in6" = xyes; then : | | | |
174 | @@ -42057,11 +42157,14 @@ | | | |
175 | | | | |
176 | | | | |
177 | fi | | | |
178 | -ac_fn_cxx_check_member "$LINENO" "struct natlookup" "nl_realipaddr.in6" | | | |
179 | - "ac_cv_member_struct_natlookup_nl_realipaddr_in6___" " | | | |
180 | +ac_fn_cxx_check_member "$LINENO" "struct natlookup" "nl_realipaddr.in6" \ | | | |
181 | + "ac_cv_member_struct_natlookup_nl_realipaddr_in6" " | | | |
182 | #if USE_SOLARIS_IPFILTER_MINOR_T_HACK | | | |
183 | #define minor_t fubar | | | |
184 | #endif | | | |
185 | +#if HAVE_SYS_PARAM_H | | | |
186 | +#include <sys/param.h> | | | |
187 | +#endif | | | |
188 | #if HAVE_SYS_TYPES_H | | | |
189 | #include <sys/types.h> | | | |
190 | #endif | | | |
191 | @@ -42087,13 +42190,17 @@ | | | |
192 | #elif HAVE_NETINET_IP_FIL_H | | | |
193 | #include <netinet/ip_fil.h> | | | |
194 | #endif | | | |
195 | +#if HAVE_IP_NAT_H | | | |
196 | #include <ip_nat.h> | | | |
197 | +#elif HAVE_NETINET_IP_NAT_H | | | |
198 | +#include <netinet/ip_nat.h> | | | |
199 | +#endif | | | |
200 | | | | |
201 | " | | | |
202 | -if test "x$ac_cv_member_struct_natlookup_nl_realipaddr_in6___" = xyes; then : | | | |
203 | +if test "x$ac_cv_member_struct_natlookup_nl_realipaddr_in6" = xyes; then : | | | |
204 | | | | |
205 | cat >>confdefs.h <<_ACEOF | | | |
206 | -#define HAVE_STRUCT_NATLOOKUP_NL_REALIPADDR_IN6___ 1 | | | |
207 | +#define HAVE_STRUCT_NATLOOKUP_NL_REALIPADDR_IN6 1 | | | |
208 | _ACEOF | | | |
209 | | | | |
210 | | | | |