Since IDNA support is the default in the lynx configuration, I built
libidn for mingw (under Cygwin), but found that the lynx configuration
script doesn't pick it up because of unresolved dependencies. My
libidn.a file has dependencies on both libintl and on libiconv. The
attached patch is a partial fix for this, making minimal changes in
the current configuration. It adds libiconv in CF_WITH_IDNA and
changes the link order of libraries in src/makefile so that libintl
and libiconv come after libidn. I don't think this will work properly,
however, if someone tries to configure for libidn on a system where
it has dependencies, but configures lynx without NLS. In that case
INTLLIB may not be defined. It is easy to add 'LIBS="$LIBS $LIBICONV"'
in CF_WITH_IDNA, to ensure the presence of libiconv, but I don't see
an easy way to ensure the presence of libintl if lynx is configured
without NLS. The libtool file libidna.la specifies the dependencies,
but I didn't see how to use that information when we aren't using
libtool in the compilation.

Doug

-- 
Doug Kaufman
Internet: [email protected]
--- aclocal.m4.ori      2010-11-24 00:54:36.000000000 -0800
+++ aclocal.m4  2010-11-24 19:03:46.000000000 -0800
@@ -5972,7 +5972,7 @@
 ],[
        char *output = 0;
     int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
-],idn)
+],idn,,,,[$LIBICONV])
 
 if test "x$cf_cv_find_linkage_idn" = xyes ; then
        AC_DEFINE(USE_IDNA)
--- src/makefile.in.ori 2010-11-24 18:55:06.000000000 -0800
+++ src/makefile.in     2010-11-24 18:57:06.000000000 -0800
@@ -102,7 +102,7 @@
 
 lynx$x:   message do_chartrans_stuff $(top_builddir)/LYHelp.h $(OBJS) $(WWWLIB)
        @echo "Linking and creating Lynx executable"
-       $(CC) $(CC_OPTS) $(LDFLAGS) -o $@  $(OBJS) $(WWWLIB) $(INTLLIB) 
$(LDFLAGS) $(LIBS)
+       $(CC) $(CC_OPTS) $(LDFLAGS) -o $@  $(OBJS) $(WWWLIB) $(LDFLAGS) $(LIBS) 
$(INTLLIB)
        @echo "Copying Lynx executable into top-level directory"
        rm -f $(top_builddir)/$@
        cp $@ $(top_builddir)/
_______________________________________________
Lynx-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lynx-dev

Reply via email to