]> git.pld-linux.org Git - packages/wget.git/blob - wget-m4.patch
- got it to build, release 1
[packages/wget.git] / wget-m4.patch
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
3 @@ -0,0 +1,333 @@
4 +dnl
5 +dnl Check for `struct utimbuf'.
6 +dnl
7 +
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)],
15 +    AC_MSG_RESULT(no))
16 +else
17 +  AC_MSG_RESULT(no)
18 +fi])
19 +
20 +
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.
26 +
27 +AC_DEFUN([WGET_SOCKLEN_T], [
28 +  AC_MSG_CHECKING(for socklen_t)
29 +  AC_TRY_COMPILE([
30 +#include <sys/types.h>
31 +#include <sys/socket.h>
32 +socklen_t x;
33 +],
34 +    [], [AC_MSG_RESULT(yes)], [
35 +      AC_TRY_COMPILE([
36 +#include <sys/types.h>
37 +#include <sys/socket.h>
38 +int accept (int, struct sockaddr *, size_t *);
39 +],
40 +      [], [
41 +      AC_MSG_RESULT(size_t)
42 +      AC_DEFINE(socklen_t, size_t, [socklen_t availability])
43 +    ], [
44 +      AC_MSG_RESULT(int)
45 +      AC_DEFINE(socklen_t, int, [socklen_t availability])
46 +    ])
47 +  ])
48 +])
49 +
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.
55 +
56 +AC_DEFUN([WGET_FNMATCH], [
57 +  AC_MSG_CHECKING([for working fnmatch.h])
58 +  AC_COMPILE_IFELSE([#include <fnmatch.h>
59 +                    ], [
60 +    AC_MSG_RESULT(yes)
61 +    AC_DEFINE(HAVE_WORKING_FNMATCH_H,,[Have working fnmatch.h])
62 +  ], [
63 +    AC_MSG_RESULT(no)
64 +  ])
65 +])
66 +
67 +
68 +dnl ************************************************************
69 +dnl START OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
70 +dnl ************************************************************
71 +
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
76 +  ],[
77 +    ds6_have_sockaddr_in6=no
78 +  ],[
79 +#include <sys/types.h>
80 +#include <sys/socket.h>
81 +#include <netinet/in.h>
82 +  ])
83 +
84 +  if test "X$ds6_have_sockaddr_in6" = "Xyes"; then :
85 +    $1
86 +  else :
87 +    $2
88 +  fi
89 +])
90 +
91 +
92 +AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
93 +  AC_REQUIRE([TYPE_STRUCT_SOCKADDR_IN6])
94 +  
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
99 +    ],[
100 +      ds6_member_sin6_scope_id=no
101 +    ],[
102 +#include <sys/types.h>
103 +#include <sys/socket.h>
104 +#include <netinet/in.h>
105 +    ])
106 +  fi
107 +
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])
111 +    $1
112 +  else :
113 +    $2
114 +  fi
115 +])
116 +
117 +
118 +AC_DEFUN([PROTO_INET6],[
119 +  AC_CACHE_CHECK([for INET6 protocol support], [ds6_cv_proto_inet6],[
120 +    AC_TRY_CPP([
121 +#include <sys/types.h>
122 +#include <sys/socket.h>
123 +
124 +#ifndef PF_INET6
125 +#error Missing PF_INET6
126 +#endif
127 +#ifndef AF_INET6
128 +#error Mlssing AF_INET6
129 +#endif
130 +    ],[
131 +      ds6_cv_proto_inet6=yes
132 +    ],[
133 +      ds6_cv_proto_inet6=no
134 +    ])
135 +  ])
136 +
137 +  if test "X$ds6_cv_proto_inet6" = "Xyes"; then :
138 +    $1
139 +  else :
140 +    $2
141 +  fi
142 +])
143 +
144 +
145 +AC_DEFUN([GETADDRINFO_AI_ADDRCONFIG],[
146 +  AC_CACHE_CHECK([if getaddrinfo supports AI_ADDRCONFIG],
147 +    [ds6_cv_gai_ai_addrconfig],[
148 +    AC_TRY_CPP([
149 +#include <netdb.h>
150 +
151 +#ifndef AI_ADDRCONFIG
152 +#error Missing AI_ADDRCONFIG
153 +#endif
154 +    ],[
155 +      ds6_cv_gai_ai_addrconfig=yes
156 +    ],[
157 +      ds6_cv_gai_ai_addrconfig=no
158 +    ])
159 +  ])
160 +
161 +  if test "X$ds6_cv_gai_ai_addrconfig" = "Xyes"; then :
162 +    $1
163 +  else :
164 +    $2
165 +  fi
166 +])
167 +
168 +
169 +AC_DEFUN([GETADDRINFO_AI_ALL],[
170 +  AC_CACHE_CHECK([if getaddrinfo supports AI_ALL],[ds6_cv_gai_ai_all],[
171 +    AC_TRY_CPP([
172 +#include <netdb.h>
173 +
174 +#ifndef AI_ALL
175 +#error Missing AI_ALL
176 +#endif
177 +    ],[
178 +      ds6_cv_gai_ai_all=yes
179 +    ],[
180 +      ds6_cv_gai_ai_all=no
181 +    ])
182 +  ])
183 +
184 +  if test "X$ds6_cv_gai_ai_all" = "Xyes"; then :
185 +    $1
186 +  else :
187 +    $2
188 +  fi
189 +])
190 +
191 +
192 +AC_DEFUN([GETADDRINFO_AI_V4MAPPED],[
193 +  AC_CACHE_CHECK([if getaddrinfo supports AI_V4MAPPED],[ds6_cv_gai_ai_v4mapped],[
194 +    AC_TRY_CPP([
195 +#include <netdb.h>
196 +
197 +#ifndef AI_V4MAPPED
198 +#error Missing AI_V4MAPPED
199 +#endif
200 +    ],[
201 +      ds6_cv_gai_ai_v4mapped=yes
202 +    ],[
203 +      ds6_cv_gai_ai_v4mapped=no
204 +    ])
205 +  ])
206 +
207 +  if test "X$ds6_cv_gai_ai_v4mapped" = "Xyes"; then :
208 +    $1
209 +  else :
210 +    $2
211 +  fi
212 +])
213 +
214 +dnl ************************************************************
215 +dnl END OF IPv6 AUTOCONFIGURATION SUPPORT MACROS
216 +dnl ************************************************************
217 +\f
218 +# This code originates from Ulrich Drepper's AM_WITH_NLS.
219 +
220 +AC_DEFUN(WGET_WITH_NLS,
221 +  [AC_MSG_CHECKING([whether NLS is requested])
222 +    dnl Default is enabled NLS
223 +    AC_ARG_ENABLE(nls,
224 +      [  --disable-nls           do not use Native Language Support],
225 +      HAVE_NLS=$enableval, HAVE_NLS=yes)
226 +    AC_MSG_RESULT($HAVE_NLS)
227 +
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
230 +    dnl last moment.
231 +
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)'`"], :)
238 +      AC_SUBST(MSGFMT)
239 +      AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
240 +      CATOBJEXT=.gmo
241 +      INSTOBJEXT=.mo
242 +      DATADIRNAME=share
243 +
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
249 +         : ;
250 +       else
251 +         AC_MSG_RESULT(
252 +           [found xgettext programs is not GNU xgettext; ignore it])
253 +         XGETTEXT=":"
254 +       fi
255 +      fi
256 +
257 +      AC_CHECK_HEADERS(locale.h libintl.h)
258 +
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.)
264 +
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)
269 +      ], [
270 +        AC_CHECK_FUNCS(gettext, [], [
271 +          AC_MSG_RESULT([gettext not found; disabling NLS])
272 +          HAVE_NLS=no
273 +        ])
274 +      ])
275 +
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"
282 +      done
283 +      dnl Construct list of names of catalog files to be constructed.
284 +      for lang in $ALL_LINGUAS; do
285 +        CATALOGS="$CATALOGS ${lang}${CATOBJEXT}"
286 +      done
287 +
288 +      dnl Make all variables we use known to autoconf.
289 +      AC_SUBST(CATALOGS)
290 +      AC_SUBST(CATOBJEXT)
291 +      AC_SUBST(DATADIRNAME)
292 +      AC_SUBST(GMOFILES)
293 +      AC_SUBST(INSTOBJEXT)
294 +      AC_SUBST(INTLLIBS)
295 +      AC_SUBST(POFILES)
296 +    fi
297 +    AC_SUBST(HAVE_NLS)
298 +    dnl Some independently maintained files, such as po/Makefile.in,
299 +    dnl use `USE_NLS', so support it.
300 +    USE_NLS=$HAVE_NLS
301 +    AC_SUBST(USE_NLS)
302 +    if test "x$HAVE_NLS" = xyes; then
303 +      AC_DEFINE(HAVE_NLS)
304 +    fi
305 +  ])
306 +
307 +dnl Generate list of files to be processed by xgettext which will
308 +dnl be included in po/Makefile.
309 +dnl
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,
314 +  [
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/"
319 +     else
320 +       posrcprefix="../$srcdir/"
321 +     fi
322 +   else
323 +     posrcprefix="../"
324 +   fi
325 +   rm -f po/POTFILES
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
334 +  ])
335 +
336 +
This page took 0.0894470000000001 seconds and 3 git commands to generate.