]> sjero.net Git - wget/commitdiff
Fixes for when IRIs are disabled.
authorMicah Cowan <micah@cowan.name>
Sat, 4 Jul 2009 05:36:14 +0000 (22:36 -0700)
committerMicah Cowan <micah@cowan.name>
Sat, 4 Jul 2009 05:36:14 +0000 (22:36 -0700)
ChangeLog
configure.ac
src/ChangeLog
src/Makefile.am
src/iri.h

index ea2b1589f9ed904c3d8f29ebaf7d9361e3a04261..330d4c6cb14c1c6f130719fca2c359ffe7443c50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
 
        * NEWS: Added items for IRI support, new --version information.
        * AUTHORS: Added Ted Mielczarek and Saint Xavier.
 
        * NEWS: Added items for IRI support, new --version information.
index dcb302fa187cd2d5e3cf69397825098f08e5f8e4..98d0926f991eae668c9a88d8583149784881959f 100644 (file)
@@ -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="")
 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
   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
       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
 
 if test "X$iri" != "Xno"; then
   if test "$libidn" != ""; then
index be7f3e023d06ae7b8629c2c1e2b929237633107f..77466d042ebcab089d50a8ad4df287dfd4aca35f 100644 (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>
 
index 3bbae6724c1fa80824d94ba6f16c020a4c3ec78f..523f1957bc6a312e8d8257ef0ce09ee34eab6a25 100644 (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      \
               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         \
               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
 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@
 
 LDADD = $(LIBOBJS) ../lib/libgnu.a @MD5_LDADD@
 AM_CPPFLAGS = -I$(top_srcdir)/lib @MD5_CPPFLAGS@
 
index fe3da15cf416bd6a104e84d855e0e261de9b960d..dd5876bec49264e58ad7fbfb1743e684396247d9 100644 (file)
--- 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 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)
 #define iri_free(a)
 #define set_uri_encoding(a,b,c)
 #define set_content_encoding(a,b)