From efd514c825e6f433f3672228f724818b9e10889d Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Fri, 3 Jul 2009 22:36:14 -0700 Subject: [PATCH] Fixes for when IRIs are disabled. --- ChangeLog | 2 ++ configure.ac | 8 ++++++-- src/ChangeLog | 6 ++++++ src/Makefile.am | 4 ++-- src/iri.h | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea2b1589..330d4c6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-07-03 Micah Cowan + * configure.ac: Ensure LIBICONV is empty if IRIs are disabled. + * AUTHORS: Added Ted Mielczarek and Saint Xavier. * NEWS: Added items for IRI support, new --version information. diff --git a/configure.ac b/configure.ac index dcb302fa..98d0926f 100644 --- a/configure.ac +++ b/configure.ac @@ -497,7 +497,7 @@ AC_ARG_ENABLE(iri, AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]], [Support IDN/IRIs (needs GNU Libidn)]), libidn=$withval, libidn="") -if test "X$iri" != "Xno"; then +AS_IF([test "X$iri" != "Xno"],[ AM_ICONV 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]) 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 "$libidn" != ""; then diff --git a/src/ChangeLog b/src/ChangeLog index be7f3e02..77466d04 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,12 @@ 2009-07-03 Micah Cowan + * iri.h (iri_dup): Provide macro definition for when IRIs are + disabled. + * 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 diff --git a/src/Makefile.am b/src/Makefile.am index 3bbae672..523f1957 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ 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 \ - 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 -EXTRA_wget_SOURCES = mswindows.c +EXTRA_wget_SOURCES = mswindows.c iri.c LDADD = $(LIBOBJS) ../lib/libgnu.a @MD5_LDADD@ AM_CPPFLAGS = -I$(top_srcdir)/lib @MD5_CPPFLAGS@ diff --git a/src/iri.h b/src/iri.h index fe3da15c..dd5876be 100644 --- a/src/iri.h +++ b/src/iri.h @@ -64,6 +64,7 @@ struct iri dummy_iri; #define idn_decode(str) NULL #define remote_to_utf8(a,b,c) false #define iri_new() (&dummy_iri) +#define iri_dup(a) (&dummy_iri) #define iri_free(a) #define set_uri_encoding(a,b,c) #define set_content_encoding(a,b) -- 2.39.2