1 --- wget-1.9.1/acinclude.m4.orig 1970-01-01 01:00:00.000000000 +0100
2 +++ wget-1.9.1/acinclude.m4 2004-07-13 23:09:12.390661874 +0200
5 +dnl Check for `struct utimbuf'.
8 +AC_DEFUN([WGET_STRUCT_UTIMBUF],
9 +[AC_MSG_CHECKING([for struct utimbuf])
10 +if test x"$ac_cv_header_utime_h" = xyes; then
11 + AC_EGREP_CPP([struct[ ]+utimbuf],
12 + [#include <utime.h>],
13 + [AC_DEFINE(HAVE_STRUCT_UTIMBUF,,[Have struct utimbuf])
14 + AC_MSG_RESULT(yes)],
21 +dnl Check for socklen_t. The third argument of accept, getsockname,
22 +dnl etc. is int * on some systems, but size_t * on others. POSIX
23 +dnl finally standardized on socklen_t, but older systems don't have
24 +dnl it. If socklen_t exists, we use it, else if accept() accepts
25 +dnl size_t *, we use that, else we use int.
27 +AC_DEFUN([WGET_SOCKLEN_T], [
28 + AC_MSG_CHECKING(for socklen_t)
30 +#include <sys/types.h>
31 +#include <sys/socket.h>
34 + [], [AC_MSG_RESULT(yes)], [
36 +#include <sys/types.h>
37 +#include <sys/socket.h>
38 +int accept (int, struct sockaddr *, size_t *);
41 + AC_MSG_RESULT(size_t)
42 + AC_DEFINE(socklen_t, size_t, [socklen_t availability])
45 + AC_DEFINE(socklen_t, int, [socklen_t availability])
50 +dnl Check whether fnmatch.h can be included. This doesn't use
51 +dnl AC_FUNC_FNMATCH because Wget is already careful to only use
52 +dnl fnmatch on certain OS'es. However, fnmatch.h is sometimes broken
53 +dnl even on those because Apache installs its own fnmatch.h to
54 +dnl /usr/local/include (!), which GCC uses before /usr/include.
56 +AC_DEFUN([WGET_FNMATCH], [
57 + AC_MSG_CHECKING([for working fnmatch.h])
58 + AC_COMPILE_IFELSE([#include <fnmatch.h>
61 + AC_DEFINE(HAVE_WORKING_FNMATCH_H,,[Have working fnmatch.h])
68 +dnl ************************************************************
69 +dnl START OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
70 +dnl ************************************************************
72 +AC_DEFUN([TYPE_STRUCT_SOCKADDR_IN6],[
73 + ds6_have_sockaddr_in6=
74 + AC_CHECK_TYPES([struct sockaddr_in6],[
75 + ds6_have_sockaddr_in6=yes
77 + ds6_have_sockaddr_in6=no
79 +#include <sys/types.h>
80 +#include <sys/socket.h>
81 +#include <netinet/in.h>
84 + if test "X$ds6_have_sockaddr_in6" = "Xyes"; then :
92 +AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
93 + AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6])
95 + ds6_member_sin6_scope_id=
96 + if test "X$ds6_have_sockaddr_in6" = "Xyes"; then
97 + AC_CHECK_MEMBER([struct sockaddr_in6.sin6_scope_id],[
98 + ds6_member_sin6_scope_id=yes
100 + ds6_member_sin6_scope_id=no
102 +#include <sys/types.h>
103 +#include <sys/socket.h>
104 +#include <netinet/in.h>
108 + if test "X$ds6_member_sin6_scope_id" = "Xyes"; then
109 + AC_DEFINE([HAVE_SOCKADDR_IN6_SCOPE_ID], 1,
110 + [Define if struct sockaddr_in6 has the sin6_scope_id member])
118 +AC_DEFUN([PROTO_INET6],[
119 + AC_CACHE_CHECK([for INET6 protocol support], [ds6_cv_proto_inet6],[
121 +#include <sys/types.h>
122 +#include <sys/socket.h>
125 +#error Missing PF_INET6
128 +#error Mlssing AF_INET6
131 + ds6_cv_proto_inet6=yes
133 + ds6_cv_proto_inet6=no
137 + if test "X$ds6_cv_proto_inet6" = "Xyes"; then :
145 +AC_DEFUN([GETADDRINFO_AI_ADDRCONFIG],[
146 + AC_CACHE_CHECK([if getaddrinfo supports AI_ADDRCONFIG],
147 + [ds6_cv_gai_ai_addrconfig],[
151 +#ifndef AI_ADDRCONFIG
152 +#error Missing AI_ADDRCONFIG
155 + ds6_cv_gai_ai_addrconfig=yes
157 + ds6_cv_gai_ai_addrconfig=no
161 + if test "X$ds6_cv_gai_ai_addrconfig" = "Xyes"; then :
169 +AC_DEFUN([GETADDRINFO_AI_ALL],[
170 + AC_CACHE_CHECK([if getaddrinfo supports AI_ALL],[ds6_cv_gai_ai_all],[
175 +#error Missing AI_ALL
178 + ds6_cv_gai_ai_all=yes
180 + ds6_cv_gai_ai_all=no
184 + if test "X$ds6_cv_gai_ai_all" = "Xyes"; then :
192 +AC_DEFUN([GETADDRINFO_AI_V4MAPPED],[
193 + AC_CACHE_CHECK([if getaddrinfo supports AI_V4MAPPED],[ds6_cv_gai_ai_v4mapped],[
198 +#error Missing AI_V4MAPPED
201 + ds6_cv_gai_ai_v4mapped=yes
203 + ds6_cv_gai_ai_v4mapped=no
207 + if test "X$ds6_cv_gai_ai_v4mapped" = "Xyes"; then :
214 +dnl ************************************************************
215 +dnl END OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
216 +dnl ************************************************************
218 +# This code originates from Ulrich Drepper's AM_WITH_NLS.
220 +AC_DEFUN(WGET_WITH_NLS,
221 + [AC_MSG_CHECKING([whether NLS is requested])
222 + dnl Default is enabled NLS
224 + [ --disable-nls do not use Native Language Support],
225 + HAVE_NLS=$enableval, HAVE_NLS=yes)
226 + AC_MSG_RESULT($HAVE_NLS)
228 + dnl If something goes wrong, we may still decide not to use NLS.
229 + dnl For this reason, defer AC_SUBST'ing HAVE_NLS until the very
232 + if test x"$HAVE_NLS" = xyes; then
233 + AC_MSG_RESULT([language catalogs: $ALL_LINGUAS])
234 + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
235 + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
236 + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
237 + [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
239 + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
244 + dnl Test whether we really found GNU xgettext.
245 + if test "$XGETTEXT" != ":"; then
246 + dnl If it is no GNU xgettext we define it as : so that the
247 + dnl Makefiles still can work.
248 + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
252 + [found xgettext programs is not GNU xgettext; ignore it])
257 + AC_CHECK_HEADERS(locale.h libintl.h)
259 + dnl Prefer gettext found in -lintl to the one in libc.
260 + dnl Otherwise it can happen that we include libintl.h from
261 + dnl /usr/local/lib, but fail to specify -lintl, which results in
262 + dnl link or run-time failures. (Symptom: libintl_bindtextdomain
263 + dnl not found at link-time.)
265 + AC_CHECK_LIB(intl, gettext, [
266 + dnl gettext is in libintl; announce the fact manually.
267 + LIBS="-lintl $LIBS"
268 + AC_DEFINE(HAVE_GETTEXT)
270 + AC_CHECK_FUNCS(gettext, [], [
271 + AC_MSG_RESULT([gettext not found; disabling NLS])
276 + dnl These rules are solely for the distribution goal. While doing this
277 + dnl we only have to keep exactly one list of the available catalogs
278 + dnl in configure.in.
279 + for lang in $ALL_LINGUAS; do
280 + GMOFILES="$GMOFILES $lang.gmo"
281 + POFILES="$POFILES $lang.po"
283 + dnl Construct list of names of catalog files to be constructed.
284 + for lang in $ALL_LINGUAS; do
285 + CATALOGS="$CATALOGS ${lang}${CATOBJEXT}"
288 + dnl Make all variables we use known to autoconf.
290 + AC_SUBST(CATOBJEXT)
291 + AC_SUBST(DATADIRNAME)
293 + AC_SUBST(INSTOBJEXT)
298 + dnl Some independently maintained files, such as po/Makefile.in,
299 + dnl use `USE_NLS', so support it.
302 + if test "x$HAVE_NLS" = xyes; then
303 + AC_DEFINE(HAVE_NLS)
307 +dnl Generate list of files to be processed by xgettext which will
308 +dnl be included in po/Makefile.
310 +dnl This is not strictly an Autoconf macro, because it is run from
311 +dnl within `config.status' rather than from within configure. This
312 +dnl is why special rules must be applied for it.
313 +AC_DEFUN(WGET_PROCESS_PO,
315 + dnl I wonder what the following several lines do...
316 + if test "x$srcdir" != "x."; then
317 + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
318 + posrcprefix="$srcdir/"
320 + posrcprefix="../$srcdir/"
326 + dnl Use `echo' rather than AC_MSG_RESULT, because this is run from
327 + dnl `config.status'.
328 + echo "generating po/POTFILES from $srcdir/po/POTFILES.in"
329 + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," \
330 + -e "\$s/\(.*\) \\\\/\1/" \
331 + < $srcdir/po/POTFILES.in > po/POTFILES
332 + echo "creating po/Makefile"
333 + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile