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
6 +dnl Check for `struct utimbuf'.
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)],
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.
28 +AC_DEFUN([WGET_SOCKLEN_T], [
29 + AC_MSG_CHECKING(for socklen_t)
31 +#include <sys/types.h>
32 +#include <sys/socket.h>
35 + [], [AC_MSG_RESULT(yes)], [
37 +#include <sys/types.h>
38 +#include <sys/socket.h>
39 +int accept (int, struct sockaddr *, size_t *);
42 + AC_MSG_RESULT(size_t)
43 + AC_DEFINE(socklen_t, size_t, [socklen_t availability])
46 + AC_DEFINE(socklen_t, int, [socklen_t availability])
52 +dnl ************************************************************
53 +dnl START OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
54 +dnl ************************************************************
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
61 + ds6_have_sockaddr_in6=no
63 +#include <sys/types.h>
64 +#include <sys/socket.h>
65 +#include <netinet/in.h>
68 + if test "X$ds6_have_sockaddr_in6" = "Xyes"; then :
76 +AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
77 + AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6])
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
84 + ds6_member_sin6_scope_id=no
86 +#include <sys/types.h>
87 +#include <sys/socket.h>
88 +#include <netinet/in.h>
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])
102 +AC_DEFUN([PROTO_INET6],[
103 + AC_CACHE_CHECK([for INET6 protocol support], [ds6_cv_proto_inet6],[
105 +#include <sys/types.h>
106 +#include <sys/socket.h>
109 +#error Missing PF_INET6
112 +#error Mlssing AF_INET6
115 + ds6_cv_proto_inet6=yes
117 + ds6_cv_proto_inet6=no
121 + if test "X$ds6_cv_proto_inet6" = "Xyes"; then :
129 +AC_DEFUN([GETADDRINFO_AI_ADDRCONFIG],[
130 + AC_CACHE_CHECK([if getaddrinfo supports AI_ADDRCONFIG],
131 + [ds6_cv_gai_ai_addrconfig],[
135 +#ifndef AI_ADDRCONFIG
136 +#error Missing AI_ADDRCONFIG
139 + ds6_cv_gai_ai_addrconfig=yes
141 + ds6_cv_gai_ai_addrconfig=no
145 + if test "X$ds6_cv_gai_ai_addrconfig" = "Xyes"; then :
153 +AC_DEFUN([GETADDRINFO_AI_ALL],[
154 + AC_CACHE_CHECK([if getaddrinfo supports AI_ALL],[ds6_cv_gai_ai_all],[
159 +#error Missing AI_ALL
162 + ds6_cv_gai_ai_all=yes
164 + ds6_cv_gai_ai_all=no
168 + if test "X$ds6_cv_gai_ai_all" = "Xyes"; then :
176 +AC_DEFUN([GETADDRINFO_AI_V4MAPPED],[
177 + AC_CACHE_CHECK([if getaddrinfo supports AI_V4MAPPED],[ds6_cv_gai_ai_v4mapped],[
182 +#error Missing AI_V4MAPPED
185 + ds6_cv_gai_ai_v4mapped=yes
187 + ds6_cv_gai_ai_v4mapped=no
191 + if test "X$ds6_cv_gai_ai_v4mapped" = "Xyes"; then :
198 +dnl ************************************************************
199 +dnl END OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
200 +dnl ************************************************************
202 +# This code originates from Ulrich Drepper's AM_WITH_NLS.
204 +AC_DEFUN(WGET_WITH_NLS,
205 + [AC_MSG_CHECKING([whether NLS is requested])
206 + dnl Default is enabled NLS
208 + [ --disable-nls do not use Native Language Support],
209 + HAVE_NLS=$enableval, HAVE_NLS=yes)
210 + AC_MSG_RESULT($HAVE_NLS)
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
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)'`"], :)
223 + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
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
236 + [found xgettext programs is not GNU xgettext; ignore it])
241 + AC_CHECK_HEADERS(locale.h libintl.h)
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.)
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)
254 + AC_CHECK_FUNCS(gettext, [], [
255 + AC_MSG_RESULT([gettext not found; disabling NLS])
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"
267 + dnl Construct list of names of catalog files to be constructed.
268 + for lang in $ALL_LINGUAS; do
269 + CATALOGS="$CATALOGS ${lang}${CATOBJEXT}"
272 + dnl Make all variables we use known to autoconf.
274 + AC_SUBST(CATOBJEXT)
275 + AC_SUBST(DATADIRNAME)
277 + AC_SUBST(INSTOBJEXT)
282 + dnl Some independently maintained files, such as po/Makefile.in,
283 + dnl use `USE_NLS', so support it.
286 + if test "x$HAVE_NLS" = xyes; then
287 + AC_DEFINE(HAVE_NLS)
291 +dnl Generate list of files to be processed by xgettext which will
292 +dnl be included in po/Makefile.
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,
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/"
304 + posrcprefix="../$srcdir/"
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