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

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

[bug-gnu-libiconv] Re: adding version identification to libiconv and lib


From: amores perros
Subject: [bug-gnu-libiconv] Re: adding version identification to libiconv and libintl
Date: Sun, 20 May 2007 23:08:06 +0000

However, I am not sure whether it is worth the possibly substantial
amount of help I'd probably need to get through the auto-infrastructure
to get to the point where I can test putting in the relatively simple
part of converting, e.g., gettext.rc.in to gettext.rc.

I don't think that help will be forthcoming, so I don't think that
effort is going anywhere.

So instead, I switched to GNU hello, which is a much simpler
project, and which works out of the box on my test setup.

I revised it so that it includes a windows version resource
when built with cygwin -- and hopefully this should
work with mingw as well.

I don't know if you'd want to adapt this to gettext, but
if you'd like to, I'm more than happy to send you the pieces.

I made a new src/windows subdirectory, which has
a file hello.rc.in, which is just a simple rc file, with
99 values for all version numbers, and which subdirectory
also contains an empty Makefile.am (all work is done
by the Makefile.am in the parent src dir), and
also contains the shell script to parse & rebuild
version strings as needed in an rc file.

Of course I had to add windows specific
processing into the auto-infrastructure, and
because I'm far from any kind of expert on
that stuff, there are probably ways to make
it much better.

I generated a context diff (diff -r -u3),
and am pasting it subsequently
(apparently context diffs do not include new files,
so I'd have to send the new files in some fashion,
if you wanted to see this full solution).

--------------------------

diff -r -u3 orig/hello/configure.ac new/hello/configure.ac
--- orig/hello/configure.ac     2006-11-23 10:02:24.000000000 -0500
+++ new/hello/configure.ac      2007-05-20 16:54:31.348504000 -0400
@@ -46,6 +46,25 @@
AM_GNU_GETTEXT_VERSION([0.16])
AM_GNU_GETTEXT([external])

+AC_MSG_CHECKING([whether to enable WIN32 specific flags])
+case "$host_os" in
+*mingw*)
+        win32=true
+        AC_MSG_RESULT([yes(mingw)])
+        AC_CHECK_TOOL(WINDRES, windres)
+        ;;
+*cygwin*)
+        win32=true
+        AC_MSG_RESULT([yes(cygwin)])
+        AC_CHECK_TOOL(WINDRES, windres)
+        ;;
+*)
+        win32=false
+        AC_MSG_RESULT([no])
+        ;;
+esac
+AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
+
AC_CONFIG_FILES([Makefile
           contrib/Makefile
           doc/Makefile
@@ -53,5 +72,6 @@
           man/Makefile
           po/Makefile.in
           src/Makefile
+           src/windows/Makefile
           tests/Makefile])
AC_OUTPUT
diff -r -u3 orig/hello/src/Makefile.am new/hello/src/Makefile.am
--- orig/hello/src/Makefile.am  2006-10-17 17:57:42.000000000 -0400
+++ new/hello/src/Makefile.am   2007-05-20 18:19:34.196038400 -0400
@@ -26,3 +26,15 @@

AM_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+if WIN32
+windows/hello.res: windows/hello.rc
+ $(WINDRES) -i windows/hello.rc --input-format=rc -o windows/hello.res -O coff
+BUILT_SOURCES = windows/hello.res
+hello_LDFLAGS = -Wl,--enable-runtime-pseudo-reloc -mwindows windows/hello.res
+windows/hello.rc: $(srcdir)/windows/hello.rc.in Makefile
+ sh $(srcdir)/windows/makewinrc.sh $(VERSION) $(srcdir)/windows/hello.rc.in address@hidden
+       mv address@hidden $@
+SUBDIRS = windows
+endif
+
Seulement dans new/hello/src: windows

_________________________________________________________________
Like the way Microsoft Office Outlook works? YouÂ’ll love Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507





reply via email to

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