bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnu-libiconv] Patch suggestion


From: Roumen Petrov
Subject: Re: [bug-gnu-libiconv] Patch suggestion
Date: Fri, 28 Nov 2008 22:33:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081114 SeaMonkey/1.1.13

Hi Bruno,

Michael start two mail threads:
1)
http://lists.gnu.org/archive/html/bug-gnu-libiconv/2008-11/msg00002.html
2)
http://lists.gnu.org/archive/html/bug-gnu-libiconv/2008-11/msg00012.html

The first (1) is with two parts a) for sed and resource file b) resource isn't linked. Since I think that sed problem (if I remember well) is fixed in CVS HEAD so I will not comment it in this email.
The patch for resource may be work (adding "-Wl,libiconv.res" solves it).

The second (2) is only for resource isn't linked. The patch from this thread is obsolete and is part from 1.12.

I check the reported "resource issue" and confirm that problem exist.
The CVS HEAD version (makefiles with resources) is not changed I to me problems is not resolved.


I would like to propose a solution based on libtool. To the email is attach file libiconv-1.12.patch-RC. This file is only to show how libtool can compile and link windows resources.

The libtool provide a macro AC_LIBTOOL_RC (v<2). This macro isn't well documented. It has to be called before AC_PROG_LIBTOOL. For libtool (v>=2+) it is replaced with LT_LANG([Windows Resource]) called after LT_INIT. This macro detect resource compilers (windres for mingw) and enable a libtool tag (--tag=RC) to work. For details search internet for LTRCCOMPILE author Charles Wilson. So the attached file follow libtool rules for windows resources.

Bruno what you think about this ?
If is acceptable I'm ready to propose a patch to CVS HEAD.

Roumen

--- ./lib/Makefile.in.RC        2007-05-28 01:15:31.000000000 +0300
+++ ./lib/Makefile.in   2008-11-28 02:21:39.000000000 +0200
@@ -30,7 +30,7 @@
 LIBTOOL_LINK = $(LIBTOOL) --mode=link
 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
 LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
-WINDRES = @WINDRES@
+RC = @RC@
 CP = cp
 MV = mv
 LN = @LN@
@@ -61,7 +61,7 @@
 OBJECTS = iconv.lo localcharset.lo relocatable.lo $(address@hidden@) 
$(address@hidden@)
 OBJECTS_EXP_yes = iconv-exports.lo
 OBJECTS_EXP_no =
-OBJECTS_RES_yes = libiconv.res
+OBJECTS_RES_yes = iconv-res.lo
 OBJECTS_RES_no =
 
 all : @PLUGLIB@ libiconv.la
@@ -111,8 +111,8 @@
 iconv-exports.lo : $(srcdir)/../woe32dll/iconv-exports.c
        $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c 
$(srcdir)/../woe32dll/iconv-exports.c
 
-libiconv.res : $(srcdir)/../windows/libiconv.rc
-       $(WINDRES) `$(SHELL) $(srcdir)/../windows/windres-options --escape 
$(PACKAGE_VERSION)` -i $(srcdir)/../windows/libiconv.rc -o libiconv.res 
--output-format=coff
+iconv-res.lo : $(srcdir)/../windows/libiconv.rc
+       $(LIBTOOL_COMPILE) --tag=RC $(RC) `$(SHELL) 
$(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $< -o $@ 
--output-format=coff
 
 # Installs the library and include files only. Typically called with only
 # $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
--- ./configure.ac.RC   2007-12-09 00:12:54.000000000 +0200
+++ ./configure.ac      2008-11-28 01:54:53.000000000 +0200
@@ -76,6 +76,7 @@
 AC_DISABLE_STATIC
 AC_LIBTOOL_WIN32_DLL
 AC_LIBTOOL_NOSHPREFIX
+AC_LIBTOOL_RC
 AC_PROG_LIBTOOL
 gl_VISIBILITY
 AM_ICONV
@@ -170,6 +171,7 @@
 esac
 WOE32=$is_woe32
 AC_SUBST([WOE32])
+# this is left as is in use by makefiles
 if test $WOE32 = yes; then
   dnl Check for a program that compiles Windows resource files.
   AC_CHECK_TOOL([WINDRES], [windres])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]