]>
Commit | Line | Data |
---|---|---|
5bcba57f AM |
1 | diff -urN wget-1.9-b5.org/acinclude.m4 wget-1.9-b5/acinclude.m4 |
2 | --- wget-1.9-b5.org/acinclude.m4 1970-01-01 01:00:00.000000000 +0100 | |
3 | +++ wget-1.9-b5/acinclude.m4 2003-10-13 00:11:57.000000000 +0200 | |
4 | @@ -0,0 +1,316 @@ | |
5 | +dnl | |
6 | +dnl Check for `struct utimbuf'. | |
7 | +dnl | |
8 | + | |
9 | +AC_DEFUN([WGET_STRUCT_UTIMBUF], | |
10 | +[AC_MSG_CHECKING([for struct utimbuf]) | |
11 | +if test x"$ac_cv_header_utime_h" = xyes; then | |
12 | + AC_EGREP_CPP([struct[ ]+utimbuf], | |
13 | + [#include <utime.h>], | |
14 | + [AC_DEFINE(HAVE_STRUCT_UTIMBUF,,[Have struct utimbuf]) | |
15 | + AC_MSG_RESULT(yes)], | |
16 | + AC_MSG_RESULT(no)) | |
17 | +else | |
18 | + AC_MSG_RESULT(no) | |
19 | +fi]) | |
20 | + | |
21 | + | |
22 | +dnl Check for socklen_t. The third argument of accept, getsockname, | |
23 | +dnl etc. is int * on some systems, but size_t * on others. POSIX | |
24 | +dnl finally standardized on socklen_t, but older systems don't have | |
25 | +dnl it. If socklen_t exists, we use it, else if accept() accepts | |
26 | +dnl size_t *, we use that, else we use int. | |
27 | + | |
28 | +AC_DEFUN([WGET_SOCKLEN_T], [ | |
29 | + AC_MSG_CHECKING(for socklen_t) | |
30 | + AC_TRY_COMPILE([ | |
31 | +#include <sys/types.h> | |
32 | +#include <sys/socket.h> | |
33 | +socklen_t x; | |
34 | +], | |
35 | + [], [AC_MSG_RESULT(yes)], [ | |
36 | + AC_TRY_COMPILE([ | |
37 | +#include <sys/types.h> | |
38 | +#include <sys/socket.h> | |
39 | +int accept (int, struct sockaddr *, size_t *); | |
40 | +], | |
41 | + [], [ | |
42 | + AC_MSG_RESULT(size_t) | |
43 | + AC_DEFINE(socklen_t, size_t, [socklen_t availability]) | |
44 | + ], [ | |
45 | + AC_MSG_RESULT(int) | |
46 | + AC_DEFINE(socklen_t, int, [socklen_t availability]) | |
47 | + ]) | |
48 | + ]) | |
49 | +]) | |
50 | + | |
51 | + | |
52 | +dnl ************************************************************ | |
53 | +dnl START OF IPv6 AUTOCONFIGURATION SUPPORT MACROS | |
54 | +dnl ************************************************************ | |
55 | + | |
56 | +AC_DEFUN([TYPE_STRUCT_SOCKADDR_IN6],[ | |
57 | + ds6_have_sockaddr_in6= | |
58 | + AC_CHECK_TYPES([struct sockaddr_in6],[ | |
59 | + ds6_have_sockaddr_in6=yes | |
60 | + ],[ | |
61 | + ds6_have_sockaddr_in6=no | |
62 | + ],[ | |
63 | +#include <sys/types.h> | |
64 | +#include <sys/socket.h> | |
65 | +#include <netinet/in.h> | |
66 | + ]) | |
67 | + | |
68 | + if test "X$ds6_have_sockaddr_in6" = "Xyes"; then : | |
69 | + $1 | |
70 | + else : | |
71 | + $2 | |
72 | + fi | |
73 | +]) | |
74 | + | |
75 | + | |
76 | +AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[ | |
77 | + AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6]) | |
78 | + | |
79 | + ds6_member_sin6_scope_id= | |
80 | + if test "X$ds6_have_sockaddr_in6" = "Xyes"; then | |
81 | + AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],[ | |
82 | + ds6_member_sin6_scope_id=yes | |
83 | + ],[ | |
84 | + ds6_member_sin6_scope_id=no | |
85 | + ],[ | |
86 | +#include <sys/types.h> | |
87 | +#include <sys/socket.h> | |
88 | +#include <netinet/in.h> | |
89 | + ]) | |
90 | + fi | |
91 | + | |
92 | + if test "X$ds6_member_sin6_scope_id" = "Xyes"; then | |
93 | + AC_DEFINE([HAVE_SOCKADDR_IN6_SCOPE_ID], 1, | |
94 | + [Define if struct sockaddr_in6 has the sin6_scope_id member]) | |
95 | + $1 | |
96 | + else : | |
97 | + $2 | |
98 | + fi | |
99 | +]) | |
100 | + | |
101 | + | |
102 | +AC_DEFUN([PROTO_INET6],[ | |
103 | + AC_CACHE_CHECK([for INET6 protocol support], [ds6_cv_proto_inet6],[ | |
104 | + AC_TRY_CPP([ | |
105 | +#include <sys/types.h> | |
106 | +#include <sys/socket.h> | |
107 | + | |
108 | +#ifndef PF_INET6 | |
109 | +#error Missing PF_INET6 | |
110 | +#endif | |
111 | +#ifndef AF_INET6 | |
112 | +#error Mlssing AF_INET6 | |
113 | +#endif | |
114 | + ],[ | |
115 | + ds6_cv_proto_inet6=yes | |
116 | + ],[ | |
117 | + ds6_cv_proto_inet6=no | |
118 | + ]) | |
119 | + ]) | |
120 | + | |
121 | + if test "X$ds6_cv_proto_inet6" = "Xyes"; then : | |
122 | + $1 | |
123 | + else : | |
124 | + $2 | |
125 | + fi | |
126 | +]) | |
127 | + | |
128 | + | |
129 | +AC_DEFUN([GETADDRINFO_AI_ADDRCONFIG],[ | |
130 | + AC_CACHE_CHECK([if getaddrinfo supports AI_ADDRCONFIG], | |
131 | + [ds6_cv_gai_ai_addrconfig],[ | |
132 | + AC_TRY_CPP([ | |
133 | +#include <netdb.h> | |
134 | + | |
135 | +#ifndef AI_ADDRCONFIG | |
136 | +#error Missing AI_ADDRCONFIG | |
137 | +#endif | |
138 | + ],[ | |
139 | + ds6_cv_gai_ai_addrconfig=yes | |
140 | + ],[ | |
141 | + ds6_cv_gai_ai_addrconfig=no | |
142 | + ]) | |
143 | + ]) | |
144 | + | |
145 | + if test "X$ds6_cv_gai_ai_addrconfig" = "Xyes"; then : | |
146 | + $1 | |
147 | + else : | |
148 | + $2 | |
149 | + fi | |
150 | +]) | |
151 | + | |
152 | + | |
153 | +AC_DEFUN([GETADDRINFO_AI_ALL],[ | |
154 | + AC_CACHE_CHECK([if getaddrinfo supports AI_ALL],[ds6_cv_gai_ai_all],[ | |
155 | + AC_TRY_CPP([ | |
156 | +#include <netdb.h> | |
157 | + | |
158 | +#ifndef AI_ALL | |
159 | +#error Missing AI_ALL | |
160 | +#endif | |
161 | + ],[ | |
162 | + ds6_cv_gai_ai_all=yes | |
163 | + ],[ | |
164 | + ds6_cv_gai_ai_all=no | |
165 | + ]) | |
166 | + ]) | |
167 | + | |
168 | + if test "X$ds6_cv_gai_ai_all" = "Xyes"; then : | |
169 | + $1 | |
170 | + else : | |
171 | + $2 | |
172 | + fi | |
173 | +]) | |
174 | + | |
175 | + | |
176 | +AC_DEFUN([GETADDRINFO_AI_V4MAPPED],[ | |
177 | + AC_CACHE_CHECK([if getaddrinfo supports AI_V4MAPPED],[ds6_cv_gai_ai_v4mapped],[ | |
178 | + AC_TRY_CPP([ | |
179 | +#include <netdb.h> | |
180 | + | |
181 | +#ifndef AI_V4MAPPED | |
182 | +#error Missing AI_V4MAPPED | |
183 | +#endif | |
184 | + ],[ | |
185 | + ds6_cv_gai_ai_v4mapped=yes | |
186 | + ],[ | |
187 | + ds6_cv_gai_ai_v4mapped=no | |
188 | + ]) | |
189 | + ]) | |
190 | + | |
191 | + if test "X$ds6_cv_gai_ai_v4mapped" = "Xyes"; then : | |
192 | + $1 | |
193 | + else : | |
194 | + $2 | |
195 | + fi | |
196 | +]) | |
197 | + | |
198 | +dnl ************************************************************ | |
199 | +dnl END OF IPv6 AUTOCONFIGURATION SUPPORT MACROS | |
200 | +dnl ************************************************************ | |
201 | +\f | |
202 | +# This code originates from Ulrich Drepper's AM_WITH_NLS. | |
203 | + | |
204 | +AC_DEFUN(WGET_WITH_NLS, | |
205 | + [AC_MSG_CHECKING([whether NLS is requested]) | |
206 | + dnl Default is enabled NLS | |
207 | + AC_ARG_ENABLE(nls, | |
208 | + [ --disable-nls do not use Native Language Support], | |
209 | + HAVE_NLS=$enableval, HAVE_NLS=yes) | |
210 | + AC_MSG_RESULT($HAVE_NLS) | |
211 | + | |
212 | + dnl If something goes wrong, we may still decide not to use NLS. | |
213 | + dnl For this reason, defer AC_SUBST'ing HAVE_NLS until the very | |
214 | + dnl last moment. | |
215 | + | |
216 | + if test x"$HAVE_NLS" = xyes; then | |
217 | + AC_MSG_RESULT([language catalogs: $ALL_LINGUAS]) | |
218 | + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, | |
219 | + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) | |
220 | + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, | |
221 | + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) | |
222 | + AC_SUBST(MSGFMT) | |
223 | + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | |
224 | + CATOBJEXT=.gmo | |
225 | + INSTOBJEXT=.mo | |
226 | + DATADIRNAME=share | |
227 | + | |
228 | + dnl Test whether we really found GNU xgettext. | |
229 | + if test "$XGETTEXT" != ":"; then | |
230 | + dnl If it is no GNU xgettext we define it as : so that the | |
231 | + dnl Makefiles still can work. | |
232 | + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
233 | + : ; | |
234 | + else | |
235 | + AC_MSG_RESULT( | |
236 | + [found xgettext programs is not GNU xgettext; ignore it]) | |
237 | + XGETTEXT=":" | |
238 | + fi | |
239 | + fi | |
240 | + | |
241 | + AC_CHECK_HEADERS(locale.h libintl.h) | |
242 | + | |
243 | + dnl Prefer gettext found in -lintl to the one in libc. | |
244 | + dnl Otherwise it can happen that we include libintl.h from | |
245 | + dnl /usr/local/lib, but fail to specify -lintl, which results in | |
246 | + dnl link or run-time failures. (Symptom: libintl_bindtextdomain | |
247 | + dnl not found at link-time.) | |
248 | + | |
249 | + AC_CHECK_LIB(intl, gettext, [ | |
250 | + dnl gettext is in libintl; announce the fact manually. | |
251 | + LIBS="-lintl $LIBS" | |
252 | + AC_DEFINE(HAVE_GETTEXT) | |
253 | + ], [ | |
254 | + AC_CHECK_FUNCS(gettext, [], [ | |
255 | + AC_MSG_RESULT([gettext not found; disabling NLS]) | |
256 | + HAVE_NLS=no | |
257 | + ]) | |
258 | + ]) | |
259 | + | |
260 | + dnl These rules are solely for the distribution goal. While doing this | |
261 | + dnl we only have to keep exactly one list of the available catalogs | |
262 | + dnl in configure.in. | |
263 | + for lang in $ALL_LINGUAS; do | |
264 | + GMOFILES="$GMOFILES $lang.gmo" | |
265 | + POFILES="$POFILES $lang.po" | |
266 | + done | |
267 | + dnl Construct list of names of catalog files to be constructed. | |
268 | + for lang in $ALL_LINGUAS; do | |
269 | + CATALOGS="$CATALOGS ${lang}${CATOBJEXT}" | |
270 | + done | |
271 | + | |
272 | + dnl Make all variables we use known to autoconf. | |
273 | + AC_SUBST(CATALOGS) | |
274 | + AC_SUBST(CATOBJEXT) | |
275 | + AC_SUBST(DATADIRNAME) | |
276 | + AC_SUBST(GMOFILES) | |
277 | + AC_SUBST(INSTOBJEXT) | |
278 | + AC_SUBST(INTLLIBS) | |
279 | + AC_SUBST(POFILES) | |
280 | + fi | |
281 | + AC_SUBST(HAVE_NLS) | |
282 | + dnl Some independently maintained files, such as po/Makefile.in, | |
283 | + dnl use `USE_NLS', so support it. | |
284 | + USE_NLS=$HAVE_NLS | |
285 | + AC_SUBST(USE_NLS) | |
286 | + if test "x$HAVE_NLS" = xyes; then | |
287 | + AC_DEFINE(HAVE_NLS) | |
288 | + fi | |
289 | + ]) | |
290 | + | |
291 | +dnl Generate list of files to be processed by xgettext which will | |
292 | +dnl be included in po/Makefile. | |
293 | +dnl | |
294 | +dnl This is not strictly an Autoconf macro, because it is run from | |
295 | +dnl within `config.status' rather than from within configure. This | |
296 | +dnl is why special rules must be applied for it. | |
297 | +AC_DEFUN(WGET_PROCESS_PO, | |
298 | + [ | |
299 | + dnl I wonder what the following several lines do... | |
300 | + if test "x$srcdir" != "x."; then | |
301 | + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
302 | + posrcprefix="$srcdir/" | |
303 | + else | |
304 | + posrcprefix="../$srcdir/" | |
305 | + fi | |
306 | + else | |
307 | + posrcprefix="../" | |
308 | + fi | |
309 | + rm -f po/POTFILES | |
310 | + dnl Use `echo' rather than AC_MSG_RESULT, because this is run from | |
311 | + dnl `config.status'. | |
312 | + echo "generating po/POTFILES from $srcdir/po/POTFILES.in" | |
313 | + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," \ | |
314 | + -e "\$s/\(.*\) \\\\/\1/" \ | |
315 | + < $srcdir/po/POTFILES.in > po/POTFILES | |
316 | + echo "creating po/Makefile" | |
317 | + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile | |
318 | + ]) | |
319 | + | |
320 | + |