| @@ -1,56 +1,67 @@ | | | @@ -1,56 +1,67 @@ |
1 | $NetBSD: patch-configure,v 1.7 2021/10/10 15:55:47 taca Exp $ | | 1 | $NetBSD: patch-configure,v 1.8 2022/08/15 08:51:16 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 | * Prevent WRKDIR reference. |
8 | | | 9 | |
9 | --- configure.orig 2021-10-03 17:15:01.000000000 +0000 | | 10 | --- configure.orig 2021-10-03 17:15:01.000000000 +0000 |
10 | +++ configure | | 11 | +++ configure |
11 | @@ -24425,10 +24425,12 @@ do | | 12 | @@ -1114,9 +1114,6 @@ CXXFLAGS |
| | | 13 | CCC |
| | | 14 | BUILDCXX |
| | | 15 | CPP |
| | | 16 | -PKG_CONFIG |
| | | 17 | -PKG_CONFIG_PATH |
| | | 18 | -PKG_CONFIG_LIBDIR |
| | | 19 | LT_SYS_LIBRARY_PATH |
| | | 20 | CXXCPP |
| | | 21 | LIBXML2_CFLAGS |
| | | 22 | @@ -24425,10 +24422,12 @@ do |
12 | done | | 23 | done |
13 | | | 24 | |
14 | # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later. | | 25 | # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later. |
15 | - CFLAGS=$SQUID_CFLAGS | | 26 | - CFLAGS=$SQUID_CFLAGS |
16 | - CXXFLAGS=$SQUID_CXXFLAGS | | 27 | - CXXFLAGS=$SQUID_CXXFLAGS |
17 | case "$squid_host_os" in | | 28 | case "$squid_host_os" in |
18 | - linux|solaris|freebsd|openbsd|netbsd|cygwin) | | 29 | - linux|solaris|freebsd|openbsd|netbsd|cygwin) |
19 | + linux) | | 30 | + linux) |
20 | + CFLAGS=$SQUID_CFLAGS | | 31 | + CFLAGS=$SQUID_CFLAGS |
21 | + CXXFLAGS=$SQUID_CXXFLAGS | | 32 | + CXXFLAGS=$SQUID_CXXFLAGS |
22 | + ;; | | 33 | + ;; |
23 | + solaris|freebsd|openbsd|netbsd|cygwin) | | 34 | + solaris|freebsd|openbsd|netbsd|cygwin) |
24 | ${TRUE} | | 35 | ${TRUE} |
25 | ;; | | 36 | ;; |
26 | mingw) | | 37 | mingw) |
27 | @@ -24478,6 +24480,7 @@ then : | | 38 | @@ -24478,6 +24477,7 @@ then : |
28 | fi | | 39 | fi |
29 | | | 40 | |
30 | ac_fn_cxx_check_header_compile "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" " | | 41 | ac_fn_cxx_check_header_compile "$LINENO" "net/if_arp.h" "ac_cv_header_net_if_arp_h" " |
31 | +#include <stdio.h> | | 42 | +#include <stdio.h> |
32 | #include <sys/types.h> | | 43 | #include <sys/types.h> |
33 | #include <sys/socket.h> | | 44 | #include <sys/socket.h> |
34 | | | 45 | |
35 | @@ -24488,6 +24491,7 @@ then : | | 46 | @@ -24488,6 +24488,7 @@ then : |
36 | | | 47 | |
37 | fi | | 48 | fi |
38 | ac_fn_cxx_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" " | | 49 | ac_fn_cxx_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" " |
39 | +#include <stdio.h> | | 50 | +#include <stdio.h> |
40 | #include <sys/types.h> | | 51 | #include <sys/types.h> |
41 | #include <sys/socket.h> | | 52 | #include <sys/socket.h> |
42 | | | 53 | |
43 | @@ -25381,7 +25385,51 @@ then : | | 54 | @@ -25381,7 +25382,51 @@ then : |
44 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 55 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
45 | else $as_nop | | 56 | else $as_nop |
46 | | | 57 | |
47 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 58 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
48 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 | | 59 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 |
49 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } | | 60 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } |
50 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : | | 61 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : |
51 | + $as_echo_n "(cached) " >&6 | | 62 | + $as_echo_n "(cached) " >&6 |
52 | +else | | 63 | +else |
53 | + ac_check_lib_save_LIBS=$LIBS | | 64 | + ac_check_lib_save_LIBS=$LIBS |
54 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" | | 65 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" |
55 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | 66 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
56 | +/* end confdefs.h. */ | | 67 | +/* end confdefs.h. */ |
| @@ -83,27 +94,27 @@ $NetBSD: patch-configure,v 1.7 2021/10/1 | | | @@ -83,27 +94,27 @@ $NetBSD: patch-configure,v 1.7 2021/10/1 |
83 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } | | 94 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } |
84 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : | | 95 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : |
85 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 96 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
86 | +else | | 97 | +else |
87 | + | | 98 | + |
88 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 99 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
89 | + | | 100 | + |
90 | +fi | | 101 | +fi |
91 | + | | 102 | + |
92 | + | | 103 | + |
93 | | | 104 | |
94 | fi | | 105 | fi |
95 | | | 106 | |
96 | @@ -25482,7 +25530,51 @@ then : | | 107 | @@ -25482,7 +25527,51 @@ then : |
97 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 108 | LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
98 | else $as_nop | | 109 | else $as_nop |
99 | | | 110 | |
100 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 111 | - as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
101 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 | | 112 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 |
102 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } | | 113 | +$as_echo_n "checking for OPENSSL_init_ssl in -lssl... " >&6; } |
103 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : | | 114 | +if ${ac_cv_lib_ssl_OPENSSL_init_ssl+:} false; then : |
104 | + $as_echo_n "(cached) " >&6 | | 115 | + $as_echo_n "(cached) " >&6 |
105 | +else | | 116 | +else |
106 | + ac_check_lib_save_LIBS=$LIBS | | 117 | + ac_check_lib_save_LIBS=$LIBS |
107 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" | | 118 | +LIBS="-lssl $LIBOPENSSL_LIBS $LIBS" |
108 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | 119 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
109 | +/* end confdefs.h. */ | | 120 | +/* end confdefs.h. */ |
| @@ -136,32 +147,32 @@ $NetBSD: patch-configure,v 1.7 2021/10/1 | | | @@ -136,32 +147,32 @@ $NetBSD: patch-configure,v 1.7 2021/10/1 |
136 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } | | 147 | +$as_echo "$ac_cv_lib_ssl_OPENSSL_init_ssl" >&6; } |
137 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : | | 148 | +if test "x$ac_cv_lib_ssl_OPENSSL_init_ssl" = xyes; then : |
138 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" | | 149 | + LIBOPENSSL_LIBS="-lssl $LIBOPENSSL_LIBS" |
139 | +else | | 150 | +else |
140 | + | | 151 | + |
141 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 | | 152 | + as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5 |
142 | + | | 153 | + |
143 | +fi | | 154 | +fi |
144 | + | | 155 | + |
145 | + | | 156 | + |
146 | | | 157 | |
147 | fi | | 158 | fi |
148 | | | 159 | |
149 | @@ -42202,6 +42294,8 @@ else | | 160 | @@ -42202,6 +42291,8 @@ else |
150 | # elif defined _MSC_VER | | 161 | # elif defined _MSC_VER |
151 | # include <malloc.h> | | 162 | # include <malloc.h> |
152 | # define alloca _alloca | | 163 | # define alloca _alloca |
153 | +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) | | 164 | +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) |
154 | +# include <stdlib.h> | | 165 | +# include <stdlib.h> |
155 | # else | | 166 | # else |
156 | # ifdef __cplusplus | | 167 | # ifdef __cplusplus |
157 | extern "C" | | 168 | extern "C" |
158 | @@ -45149,6 +45243,9 @@ printf "%s\n" "#define USE_SOLARIS_IPFIL | | 169 | @@ -45149,6 +45240,9 @@ printf "%s\n" "#define USE_SOLARIS_IPFIL |
159 | #if USE_SOLARIS_IPFILTER_MINOR_T_HACK | | 170 | #if USE_SOLARIS_IPFILTER_MINOR_T_HACK |
160 | #define minor_t fubar | | 171 | #define minor_t fubar |
161 | #endif | | 172 | #endif |
162 | +#if HAVE_SYS_PARAM_H | | 173 | +#if HAVE_SYS_PARAM_H |
163 | +#include <sys/param.h> | | 174 | +#include <sys/param.h> |
164 | +#endif | | 175 | +#endif |
165 | #if HAVE_SYS_TYPES_H | | 176 | #if HAVE_SYS_TYPES_H |
166 | #include <sys/types.h> | | 177 | #include <sys/types.h> |
167 | #endif | | 178 | #endif |