Port bind to -ng, and fix the cross_compile patch to detect the right OpenSSL include...
[openwrt/svn-archive/archive.git] / net / bind / patches / cross-compile.patch
1 diff -urN bind-9.3.1/configure bind-9.3.1.new/configure
2 --- bind-9.3.1/configure 2004-12-09 05:09:03.000000000 +0100
3 +++ bind-9.3.1.new/configure 2006-07-31 14:24:19.000000000 +0200
4 @@ -4750,7 +4750,7 @@
5 use_openssl="auto"
6 fi;
7
8 -openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg"
9 +openssldirs="-I$STAGING_DIR/usr/include"
10 if test "$use_openssl" = "auto"
11 then
12 for d in $openssldirs
13 @@ -5289,6 +5289,7 @@
14 if eval "test \"\${$as_ac_File+set}\" = set"; then
15 echo $ECHO_N "(cached) $ECHO_C" >&6
16 else
17 +cross_compiling=no
18 test "$cross_compiling" = yes &&
19 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
20 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
21 @@ -23675,175 +23676,6 @@
22 # which provides some (all?) of the desired functions.
23 #
24
25 -echo "$as_me:$LINENO: checking for inet_ntop with IPv6 support" >&5
26 -echo $ECHO_N "checking for inet_ntop with IPv6 support... $ECHO_C" >&6
27 -if test "$cross_compiling" = yes; then
28 - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
29 -See \`config.log' for more details." >&5
30 -echo "$as_me: error: cannot run test program while cross compiling
31 -See \`config.log' for more details." >&2;}
32 - { (exit 1); exit 1; }; }
33 -else
34 - cat >conftest.$ac_ext <<_ACEOF
35 -/* confdefs.h. */
36 -_ACEOF
37 -cat confdefs.h >>conftest.$ac_ext
38 -cat >>conftest.$ac_ext <<_ACEOF
39 -/* end confdefs.h. */
40 -
41 -#include <sys/types.h>
42 -#include <sys/socket.h>
43 -#include <netinet/in.h>
44 -#include <arpa/inet.h>
45 -main() {
46 -char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}
47 -_ACEOF
48 -rm -f conftest$ac_exeext
49 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
50 - (eval $ac_link) 2>&5
51 - ac_status=$?
52 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
53 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
54 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
55 - (eval $ac_try) 2>&5
56 - ac_status=$?
57 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
58 - (exit $ac_status); }; }; then
59 - echo "$as_me:$LINENO: result: yes" >&5
60 -echo "${ECHO_T}yes" >&6
61 - ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"
62 -else
63 - echo "$as_me: program exited with status $ac_status" >&5
64 -echo "$as_me: failed program was:" >&5
65 -sed 's/^/| /' conftest.$ac_ext >&5
66 -
67 -( exit $ac_status )
68 -echo "$as_me:$LINENO: result: no" >&5
69 -echo "${ECHO_T}no" >&6
70 - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
71 - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
72 - ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"
73 -fi
74 -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
75 -fi
76 -
77 -
78 -# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
79 -# addresses with less than four octets, like "1.2.3". Also leading
80 -# zeros should also be rejected.
81 -
82 -echo "$as_me:$LINENO: checking for working inet_pton with IPv6 support" >&5
83 -echo $ECHO_N "checking for working inet_pton with IPv6 support... $ECHO_C" >&6
84 -if test "$cross_compiling" = yes; then
85 - echo "$as_me:$LINENO: result: assuming target platform has working inet_pton" >&5
86 -echo "${ECHO_T}assuming target platform has working inet_pton" >&6
87 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"
88 -else
89 - cat >conftest.$ac_ext <<_ACEOF
90 -/* confdefs.h. */
91 -_ACEOF
92 -cat confdefs.h >>conftest.$ac_ext
93 -cat >>conftest.$ac_ext <<_ACEOF
94 -/* end confdefs.h. */
95 -
96 -#include <sys/types.h>
97 -#include <sys/socket.h>
98 -#include <netinet/in.h>
99 -#include <arpa/inet.h>
100 -main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
101 - inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
102 - (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }
103 -_ACEOF
104 -rm -f conftest$ac_exeext
105 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
106 - (eval $ac_link) 2>&5
107 - ac_status=$?
108 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
109 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
110 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
111 - (eval $ac_try) 2>&5
112 - ac_status=$?
113 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
114 - (exit $ac_status); }; }; then
115 - echo "$as_me:$LINENO: result: yes" >&5
116 -echo "${ECHO_T}yes" >&6
117 - ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"
118 -else
119 - echo "$as_me: program exited with status $ac_status" >&5
120 -echo "$as_me: failed program was:" >&5
121 -sed 's/^/| /' conftest.$ac_ext >&5
122 -
123 -( exit $ac_status )
124 -echo "$as_me:$LINENO: result: no" >&5
125 -echo "${ECHO_T}no" >&6
126 - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
127 - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
128 - ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"
129 -fi
130 -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
131 -fi
132 -
133 -echo "$as_me:$LINENO: checking for inet_aton" >&5
134 -echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
135 -cat >conftest.$ac_ext <<_ACEOF
136 -/* confdefs.h. */
137 -_ACEOF
138 -cat confdefs.h >>conftest.$ac_ext
139 -cat >>conftest.$ac_ext <<_ACEOF
140 -/* end confdefs.h. */
141 -
142 -#include <sys/types.h>
143 -#include <netinet/in.h>
144 -#include <arpa/inet.h>
145 -int
146 -main ()
147 -{
148 -struct in_addr in; inet_aton(0, &in); return (0);
149 - ;
150 - return 0;
151 -}
152 -_ACEOF
153 -rm -f conftest.$ac_objext conftest$ac_exeext
154 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
155 - (eval $ac_link) 2>conftest.er1
156 - ac_status=$?
157 - grep -v '^ *+' conftest.er1 >conftest.err
158 - rm -f conftest.er1
159 - cat conftest.err >&5
160 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
161 - (exit $ac_status); } &&
162 - { ac_try='test -z "$ac_c_werror_flag"
163 - || test ! -s conftest.err'
164 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
165 - (eval $ac_try) 2>&5
166 - ac_status=$?
167 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
168 - (exit $ac_status); }; } &&
169 - { ac_try='test -s conftest$ac_exeext'
170 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
171 - (eval $ac_try) 2>&5
172 - ac_status=$?
173 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
174 - (exit $ac_status); }; }; then
175 - echo "$as_me:$LINENO: result: yes" >&5
176 -echo "${ECHO_T}yes" >&6
177 - ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"
178 -else
179 - echo "$as_me: failed program was:" >&5
180 -sed 's/^/| /' conftest.$ac_ext >&5
181 -
182 -echo "$as_me:$LINENO: result: no" >&5
183 -echo "${ECHO_T}no" >&6
184 - ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
185 - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
186 - ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"
187 -fi
188 -rm -f conftest.err conftest.$ac_objext \
189 - conftest$ac_exeext conftest.$ac_ext
190 -
191 -
192 -
193 -
194
195 #
196 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
197 diff -urN bind-9.3.1/configure.in bind-9.3.1.new/configure.in
198 --- bind-9.3.1/configure.in 2004-12-09 05:07:10.000000000 +0100
199 +++ bind-9.3.1.new/configure.in 2006-07-31 14:16:55.000000000 +0200
200 @@ -362,7 +362,7 @@
201 (Required for DNSSEC)],
202 use_openssl="$withval", use_openssl="auto")
203
204 -openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg"
205 +openssldirs="$STAGING_DIR/usr/include $STAGING_DIR/include"
206 if test "$use_openssl" = "auto"
207 then
208 for d in $openssldirs