1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fixes for when IRIs are disabled.

This commit is contained in:
Micah Cowan 2009-07-03 22:36:14 -07:00
parent 8bc61d7026
commit efd514c825
5 changed files with 17 additions and 4 deletions

View File

@ -1,5 +1,7 @@
2009-07-03 Micah Cowan <micah@cowan.name> 2009-07-03 Micah Cowan <micah@cowan.name>
* configure.ac: Ensure LIBICONV is empty if IRIs are disabled.
* AUTHORS: Added Ted Mielczarek and Saint Xavier. * AUTHORS: Added Ted Mielczarek and Saint Xavier.
* NEWS: Added items for IRI support, new --version information. * NEWS: Added items for IRI support, new --version information.

View File

@ -497,7 +497,7 @@ AC_ARG_ENABLE(iri,
AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]], AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
[Support IDN/IRIs (needs GNU Libidn)]), [Support IDN/IRIs (needs GNU Libidn)]),
libidn=$withval, libidn="") libidn=$withval, libidn="")
if test "X$iri" != "Xno"; then AS_IF([test "X$iri" != "Xno"],[
AM_ICONV AM_ICONV
if test "X$am_cv_func_iconv" != "Xyes"; then if test "X$am_cv_func_iconv" != "Xyes"; then
@ -508,7 +508,11 @@ if test "X$iri" != "Xno"; then
AC_MSG_NOTICE([disabling IRIs because libiconv wasn't found]) AC_MSG_NOTICE([disabling IRIs because libiconv wasn't found])
fi fi
fi fi
fi ],[ # else
# For some reason, this seems to be set even when we don't check.
# Explicitly unset.
LIBICONV=
])
if test "X$iri" != "Xno"; then if test "X$iri" != "Xno"; then
if test "$libidn" != ""; then if test "$libidn" != ""; then

View File

@ -1,6 +1,12 @@
2009-07-03 Micah Cowan <micah@cowan.name> 2009-07-03 Micah Cowan <micah@cowan.name>
* iri.h (iri_dup): Provide macro definition for when IRIs are
disabled.
* Makefile.am (LIBS): Added @LIBICONV@. * Makefile.am (LIBS): Added @LIBICONV@.
(wget_SOURCES): Added iri.h.
(EXTRA_wget_SOURCES): Added iri.c, so it gets packaged even if IRI
support was disabled.
2009-07-02 Micah Cowan <micah@cowan.name> 2009-07-02 Micah Cowan <micah@cowan.name>

View File

@ -49,9 +49,9 @@ wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c \
ftp.h gen-md5.h hash.h host.h html-parse.h html-url.h \ ftp.h gen-md5.h hash.h host.h html-parse.h html-url.h \
http.h http-ntlm.h init.h log.h mswindows.h netrc.h \ http.h http-ntlm.h init.h log.h mswindows.h netrc.h \
options.h progress.h ptimer.h recur.h res.h retr.h \ options.h progress.h ptimer.h recur.h res.h retr.h \
spider.h ssl.h sysdep.h url.h utils.h wget.h spider.h ssl.h sysdep.h url.h utils.h wget.h iri.h
nodist_wget_SOURCES = build_info.c version.c nodist_wget_SOURCES = build_info.c version.c
EXTRA_wget_SOURCES = mswindows.c EXTRA_wget_SOURCES = mswindows.c iri.c
LDADD = $(LIBOBJS) ../lib/libgnu.a @MD5_LDADD@ LDADD = $(LIBOBJS) ../lib/libgnu.a @MD5_LDADD@
AM_CPPFLAGS = -I$(top_srcdir)/lib @MD5_CPPFLAGS@ AM_CPPFLAGS = -I$(top_srcdir)/lib @MD5_CPPFLAGS@

View File

@ -64,6 +64,7 @@ struct iri dummy_iri;
#define idn_decode(str) NULL #define idn_decode(str) NULL
#define remote_to_utf8(a,b,c) false #define remote_to_utf8(a,b,c) false
#define iri_new() (&dummy_iri) #define iri_new() (&dummy_iri)
#define iri_dup(a) (&dummy_iri)
#define iri_free(a) #define iri_free(a)
#define set_uri_encoding(a,b,c) #define set_uri_encoding(a,b,c)
#define set_content_encoding(a,b) #define set_content_encoding(a,b)