Don't use autoconf variables for the resource object files on Win32 any
authorTor Lillqvist <tml@novell.com>
Fri, 8 Jul 2005 23:04:06 +0000 (23:04 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Fri, 8 Jul 2005 23:04:06 +0000 (23:04 +0000)
2005-07-09  Tor Lillqvist  <tml@novell.com>

* configure.in: Don't use autoconf variables for the resource
object files on Win32 any longer. Instead handle that in the
Makefile.am files. Check for windres.

* glibconfig.h.win32.in: Minor tuning to match the
configure-produced glibconfig.h closely.

* */Makefile.am: Don't use the scripts in build/win32 to
compile the .rc file into a resource object file. (This means
we loose the build number increment magic, but I doubt it was
that useful anyway.) Instead use windres directly. To pass the
normal .o file produced by windres through libtool, which
wants .lo files, pass it directly to the linker using a -Wl
option.

* */*.rc.in: Thus replace BUILDNUMBER with 0.

17 files changed:
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-8
configure.in
glib/Makefile.am
glib/glib.rc.in
glibconfig.h.win32.in
gmodule/ChangeLog
gmodule/Makefile.am
gmodule/gmodule.rc.in
gobject/ChangeLog
gobject/Makefile.am
gobject/gobject.rc.in
gthread/ChangeLog
gthread/Makefile.am
gthread/gthread.rc.in

index 20c8824..0ac607f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2005-07-09  Tor Lillqvist  <tml@novell.com>
+
+       * configure.in: Don't use autoconf variables for the resource
+       object files on Win32 any longer. Instead handle that in the
+       Makefile.am files. Check for windres.
+
+       * glibconfig.h.win32.in: Minor tuning to match the
+       configure-produced glibconfig.h closely.
+
+       * glib/Makefile.am: Don't use the scripts in build/win32 to
+       compile glib.rc into a resource object file. (This means we loose
+       the build number increment magic, but I doubt it was that useful
+       anyway.) Instead use windres directly. To pass the normal .o file
+       produced by windres through libtool, which wants .lo files, pass
+       it directly to the linker using a -Wl option.
+
+       * glib/glib.rc.in: Thus replace BUILDNUMBER with 0.
+
 2005-07-08  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Bump version
index 20c8824..0ac607f 100644 (file)
@@ -1,3 +1,21 @@
+2005-07-09  Tor Lillqvist  <tml@novell.com>
+
+       * configure.in: Don't use autoconf variables for the resource
+       object files on Win32 any longer. Instead handle that in the
+       Makefile.am files. Check for windres.
+
+       * glibconfig.h.win32.in: Minor tuning to match the
+       configure-produced glibconfig.h closely.
+
+       * glib/Makefile.am: Don't use the scripts in build/win32 to
+       compile glib.rc into a resource object file. (This means we loose
+       the build number increment magic, but I doubt it was that useful
+       anyway.) Instead use windres directly. To pass the normal .o file
+       produced by windres through libtool, which wants .lo files, pass
+       it directly to the linker using a -Wl option.
+
+       * glib/glib.rc.in: Thus replace BUILDNUMBER with 0.
+
 2005-07-08  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Bump version
index 20c8824..0ac607f 100644 (file)
@@ -1,3 +1,21 @@
+2005-07-09  Tor Lillqvist  <tml@novell.com>
+
+       * configure.in: Don't use autoconf variables for the resource
+       object files on Win32 any longer. Instead handle that in the
+       Makefile.am files. Check for windres.
+
+       * glibconfig.h.win32.in: Minor tuning to match the
+       configure-produced glibconfig.h closely.
+
+       * glib/Makefile.am: Don't use the scripts in build/win32 to
+       compile glib.rc into a resource object file. (This means we loose
+       the build number increment magic, but I doubt it was that useful
+       anyway.) Instead use windres directly. To pass the normal .o file
+       produced by windres through libtool, which wants .lo files, pass
+       it directly to the linker using a -Wl option.
+
+       * glib/glib.rc.in: Thus replace BUILDNUMBER with 0.
+
 2005-07-08  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Bump version
index 20c8824..0ac607f 100644 (file)
@@ -1,3 +1,21 @@
+2005-07-09  Tor Lillqvist  <tml@novell.com>
+
+       * configure.in: Don't use autoconf variables for the resource
+       object files on Win32 any longer. Instead handle that in the
+       Makefile.am files. Check for windres.
+
+       * glibconfig.h.win32.in: Minor tuning to match the
+       configure-produced glibconfig.h closely.
+
+       * glib/Makefile.am: Don't use the scripts in build/win32 to
+       compile glib.rc into a resource object file. (This means we loose
+       the build number increment magic, but I doubt it was that useful
+       anyway.) Instead use windres directly. To pass the normal .o file
+       produced by windres through libtool, which wants .lo files, pass
+       it directly to the linker using a -Wl option.
+
+       * glib/glib.rc.in: Thus replace BUILDNUMBER with 0.
+
 2005-07-08  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Bump version
index fe7066c..c419f2d 100644 (file)
@@ -122,10 +122,6 @@ AC_MSG_CHECKING([for Win32])
 case "$host" in
   *-*-mingw*)
     glib_native_win32=yes
-    G_LIB_WIN32_RESOURCE=glib-win32res.lo
-    G_MODULE_WIN32_RESOURCE=gmodule-win32res.lo
-    G_OBJECT_WIN32_RESOURCE=gobject-win32res.lo
-    G_THREAD_WIN32_RESOURCE=gthread-win32res.lo
     GLIB_DEF=glib.def
     GMODULE_DEF=gmodule.def
     GOBJECT_DEF=gobject.def
@@ -135,10 +131,6 @@ case "$host" in
     ;;
   *)
     glib_native_win32=no
-    G_LIB_WIN32_RESOURCE=
-    G_MODULE_WIN32_RESOURCE=
-    G_OBJECT_WIN32_RESOURCE=
-    G_THREAD_WIN32_RESOURCE=
     GLIB_DEF=
     GMODULE_DEF=
     GOBJECT_DEF=
@@ -158,10 +150,6 @@ AC_MSG_RESULT([$glib_native_win32])
 AM_CONDITIONAL(OS_WIN32, [test "$glib_native_win32" = "yes"])
 AM_CONDITIONAL(OS_UNIX, [test "$glib_native_win32" != "yes"])
 AM_CONDITIONAL(OS_LINUX, [test "$glib_os_linux" = "yes"])
-AC_SUBST(G_LIB_WIN32_RESOURCE)
-AC_SUBST(G_MODULE_WIN32_RESOURCE)
-AC_SUBST(G_OBJECT_WIN32_RESOURCE)
-AC_SUBST(G_THREAD_WIN32_RESOURCE)
 AC_SUBST(GLIB_DEF)
 AC_SUBST(GMODULE_DEF)
 AC_SUBST(GOBJECT_DEF)
@@ -169,6 +157,10 @@ AC_SUBST(GTHREAD_DEF)
 AC_SUBST(TESTGMODULE_EXP)
 
 if test "$glib_native_win32" = "yes"; then
+  AC_CHECK_TOOL(WINDRES, windres, no)
+  if test "$WINDRES" = no; then
+    AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
+  fi
   AC_CHECK_TOOL(NM, nm, no)
   if test "$NM" = no; then
     AC_MSG_ERROR([*** Could not find an implementation of nm in your PATH.])
index ad051b0..e47791d 100644 (file)
@@ -215,10 +215,16 @@ uninstall-def-file:
 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
 endif
 
-libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
-libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @GLIB_DEF@
+if OS_WIN32
+glib_win32_res = glib-win32-res.o
+glib_win32_res_ldflag = -Wl,$(glib_win32_res)
+endif
+
+libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
+libglib_2_0_la_DEPENDENCIES = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ $(glib_win32_res) @GLIB_DEF@
 
 libglib_2_0_la_LDFLAGS = \
+        $(glib_win32_res_ldflag) \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic $(no_undefined) $(export_symbols)
 
@@ -227,8 +233,8 @@ bin_PROGRAMS = gspawn-win32-helper
 gspawn_win32_helper_LDADD = libglib-2.0.la
 gspawn_win32_helper_LDFLAGS = -mwindows
 
-$(G_LIB_WIN32_RESOURCE): glib.rc
-       $(top_srcdir)/build/win32/lt-compile-resource glib.rc $@
+glib-win32-res.o: glib.rc
+       $(WINDRES) glib.rc $@
 endif
 
 glib-2.0.lib: libglib-2.0.la glib.def
index 7851411..77596cc 100644 (file)
@@ -1,7 +1,7 @@
 #include <winver.h>
 
 VS_VERSION_INFO VERSIONINFO
-  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,BUILDNUMBER
+  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   PRODUCTVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   FILEFLAGSMASK 0
   FILEFLAGS 0
@@ -15,7 +15,7 @@ VS_VERSION_INFO VERSIONINFO
       BEGIN
        VALUE "CompanyName", "The GLib developer community"
        VALUE "FileDescription", "GLib"
-       VALUE "FileVersion", "@GLIB_VERSION@.BUILDNUMBER"
+       VALUE "FileVersion", "@GLIB_VERSION@.0"
        VALUE "InternalName", "libglib-2.0-@LT_CURRENT_MINUS_AGE@"
        VALUE "LegalCopyright", "Copyright © 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald. Modified by the GLib Team and others 1997-2004."
        VALUE "OriginalFilename", "libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll"
index ec0b87a..9e71ea7 100644 (file)
@@ -8,6 +8,7 @@
 #define __G_LIBCONFIG_H__
 
 #include <glib/gmacros.h>
+
 #include <limits.h>
 #include <float.h>
 
@@ -82,7 +83,7 @@ typedef unsigned int gsize;
 # define g_ATEXIT(proc)        (atexit (proc))
 #endif
 
-#define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END
+#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
 
 #define GLIB_MAJOR_VERSION @GLIB_MAJOR_VERSION@
 #define GLIB_MINOR_VERSION @GLIB_MINOR_VERSION@
@@ -100,8 +101,6 @@ typedef unsigned int gsize;
 #else  /* !__cplusplus */
 #ifndef _MSC_VER
 #define G_HAVE_INLINE 1
-#else /* _MSC_VER */
-
 #endif /* _MSC_VER */
 #define G_HAVE___INLINE 1
 #ifndef _MSC_VER
@@ -109,6 +108,14 @@ typedef unsigned int gsize;
 #endif /* not _MSC_VER */
 #endif /* !__cplusplus */
 
+#ifdef __cplusplus
+#define G_CAN_INLINE   1
+#else  /* !__cplusplus */
+#ifndef _MSC_VER
+#define G_CAN_INLINE   1
+#endif
+#endif
+
 #ifndef _MSC_VER
 #ifndef __cplusplus
 # define G_HAVE_ISO_VARARGS 1
@@ -129,7 +136,6 @@ typedef unsigned int gsize;
 #endif /* not _MSC_VER */
 #define G_HAVE_GROWING_STACK 0
 
-
 #define G_GNUC_INTERNAL
 
 #define G_THREADS_ENABLED
index a9cc647..d130df3 100644 (file)
@@ -1,3 +1,14 @@
+2005-07-09  Tor Lillqvist  <tml@novell.com>
+
+       * Makefile.am: Don't use the scripts in build/win32 to compile
+       gmodule.rc into a resource object file. (This means we loose the
+       build number increment magic, but I doubt it was that useful
+       anyway.) Instead use windres directly. To pass the normal .o file
+       produced by windres through libtool, which wants .lo files, pass
+       it directly to the linker using a -Wl option.
+
+       * gmodule.rc.in: Thus replace BUILDNUMBER with 0.
+
 2005-07-08  Matthias Clasen  <mclasen@redhat.com>
        
        * === Released 2.7.2 ===
index 0c9cbbd..d07325a 100644 (file)
@@ -64,19 +64,25 @@ install-def-file:
 uninstall-def-file:
 endif
 
+if OS_WIN32
+gmodule_win32_res = gmodule-win32-res.o
+gmodule_win32_res_ldflag = -Wl,$(gmodule_win32_res)
+endif
+
 libgmodule_2_0_la_SOURCES = gmodule.c
 libgmodule_2_0_la_LDFLAGS = \
+       $(gmodule_win32_res_ldflag) \
        $(G_MODULE_LDFLAGS) \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic $(no_undefined) $(export_symbols)
 
-libgmodule_2_0_la_LIBADD = $(G_MODULE_WIN32_RESOURCE) $(G_MODULE_LIBS_EXTRA) $(G_MODULE_LIBS) $(libglib)
+libgmodule_2_0_la_LIBADD = $(G_MODULE_LIBS_EXTRA) $(G_MODULE_LIBS) $(libglib)
 
-libgmodule_2_0_la_DEPENDENCIES = $(G_MODULE_WIN32_RESOURCE) $(GMODULE_DEF)
+libgmodule_2_0_la_DEPENDENCIES = $(gmodule_win32_res) $(GMODULE_DEF)
 
 if OS_WIN32
-$(G_MODULE_WIN32_RESOURCE): gmodule.rc
-       $(top_srcdir)/build/win32/lt-compile-resource gmodule.rc $@
+gmodule-win32-res.o: gmodule.rc
+       $(WINDRES) gmodule.rc $@
 endif
 
 gmodule-2.0.lib: libgmodule-2.0.la gmodule.def
index 0a3ae0a..cc49014 100644 (file)
@@ -1,7 +1,7 @@
 #include <winver.h>
 
 VS_VERSION_INFO VERSIONINFO
-  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,BUILDNUMBER
+  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   PRODUCTVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   FILEFLAGSMASK 0
   FILEFLAGS 0
@@ -15,7 +15,7 @@ VS_VERSION_INFO VERSIONINFO
       BEGIN
        VALUE "CompanyName", "The GLib developer community"
        VALUE "FileDescription", "GModule"
-       VALUE "FileVersion", "@GLIB_VERSION@.BUILDNUMBER"
+       VALUE "FileVersion", "@GLIB_VERSION@.0"
        VALUE "InternalName", "libgmodule-2.0-@LT_CURRENT_MINUS_AGE@"
        VALUE "LegalCopyright", "Copyright © 1998-2000 Tim Janik. Modified by the GLib Team and others 1998-2004."
        VALUE "OriginalFilename", "libgmodule-2.0-@LT_CURRENT_MINUS_AGE@.dll"
index c9c6487..ab250f9 100644 (file)
@@ -1,3 +1,14 @@
+2005-07-09  Tor Lillqvist  <tml@novell.com>
+
+       * Makefile.am: Don't use the scripts in build/win32 to compile
+       gobject.rc into a resource object file. (This means we loose the
+       build number increment magic, but I doubt it was that useful
+       anyway.) Instead use windres directly. To pass the normal .o file
+       produced by windres through libtool, which wants .lo files, pass
+       it directly to the linker using a -Wl option.
+
+       * gobject.rc.in: Thus replace BUILDNUMBER with 0.
+
 2005-07-08  Matthias Clasen  <mclasen@redhat.com>
        
        * === Released 2.7.2 ===
index d758a03..09d732b 100644 (file)
@@ -65,15 +65,21 @@ uninstall-def-file:
 export_symbols = $(LIBTOOL_EXPORT_OPTIONS)
 endif
 
+if OS_WIN32
+gobject_win32_res = gobject-win32-res.o
+gobject_win32_res_ldflag = -Wl,$(gobject_win32_res)
+endif
+
 # libtool stuff: set version and export symbols for resolving
 libgobjectincludedir = $(includedir)/glib-2.0/gobject
 libgobject_2_0_la_LDFLAGS = \
-  -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+  $(gobject_win32_res_ldflag) \
+  -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
   -export-dynamic $(no_undefined) $(export_symbols)
 
-libgobject_2_0_la_LIBADD = $(G_OBJECT_WIN32_RESOURCE) $(libglib)
+libgobject_2_0_la_LIBADD = $(libglib)
 
-libgobject_2_0_la_DEPENDENCIES = $(G_OBJECT_WIN32_RESOURCE) $(GOBJECT_DEF)
+libgobject_2_0_la_DEPENDENCIES = $(gobject_win32_res) $(GOBJECT_DEF)
 
 #
 # setup source file variables
@@ -230,8 +236,8 @@ BUILT_EXTRA_DIST = \
 
 
 if OS_WIN32
-$(G_OBJECT_WIN32_RESOURCE): gobject.rc
-       $(top_srcdir)/build/win32/lt-compile-resource gobject.rc $@
+gobject-win32-res.o: gobject.rc
+       $(WINDRES) gobject.rc $@
 endif
 
 gobject-2.0.lib: libgobject-2.0.la gobject.def
index 0f489d3..0c819b8 100644 (file)
@@ -1,7 +1,7 @@
 #include <winver.h>
 
 VS_VERSION_INFO VERSIONINFO
-  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,BUILDNUMBER
+  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   PRODUCTVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   FILEFLAGSMASK 0
   FILEFLAGS 0
@@ -15,7 +15,7 @@ VS_VERSION_INFO VERSIONINFO
       BEGIN
        VALUE "CompanyName", "The GLib developer community"
        VALUE "FileDescription", "GObject"
-       VALUE "FileVersion", "@GLIB_VERSION@.BUILDNUMBER"
+       VALUE "FileVersion", "@GLIB_VERSION@.0"
        VALUE "InternalName", "libgobject-2.0-@LT_CURRENT_MINUS_AGE@"
        VALUE "LegalCopyright", "Copyright © 1998-2004 Tim Janik and Red Hat, Inc."
        VALUE "OriginalFilename", "libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll"
index d47b1f1..bc05683 100644 (file)
@@ -1,3 +1,14 @@
+2005-07-09  Tor Lillqvist  <tml@novell.com>
+
+       * Makefile.am: Don't use the scripts in build/win32 to compile
+       gthread.rc into a resource object file. (This means we loose the
+       build number increment magic, but I doubt it was that useful
+       anyway.) Instead use windres directly. To pass the normal .o file
+       produced by windres through libtool, which wants .lo files, pass
+       it directly to the linker using a -Wl option.
+
+       * gthread.rc.in: Thus replace BUILDNUMBER with 0.
+
 2005-07-08  Matthias Clasen  <mclasen@redhat.com>
        
        * === Released 2.7.2 ===
index 7f39f04..5f244ab 100644 (file)
@@ -53,18 +53,24 @@ install-def-file:
 uninstall-def-file:
 endif
 
+if OS_WIN32
+gthread_win32_res = gthread-win32-res.o
+gthread_win32_res_ldflag = -Wl,$(gthread_win32_res)
+endif
+
 libgthread_2_0_la_SOURCES = gthread-impl.c
 libgthread_2_0_la_LDFLAGS = \
+       $(gthread_win32_res_ldflag) \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic $(no_undefined) $(export_symbols)
 
-libgthread_2_0_la_LIBADD = $(G_THREAD_WIN32_RESOURCE) $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(libglib)
+libgthread_2_0_la_LIBADD = $(G_THREAD_LIBS_EXTRA) $(G_THREAD_LIBS_FOR_GTHREAD) $(libglib)
 
-libgthread_2_0_la_DEPENDENCIES = $(G_THREAD_WIN32_RESOURCE) $(GTHREAD_DEF)
+libgthread_2_0_la_DEPENDENCIES = $(gthread_win32_res) $(GTHREAD_DEF)
 
 if OS_WIN32
-$(G_THREAD_WIN32_RESOURCE): gthread.rc
-       $(top_srcdir)/build/win32/lt-compile-resource gthread.rc $@
+gthread-win32-res.o: gthread.rc
+       $(WINDRES) gthread.rc $@
 endif
 
 gthread-2.0.lib: libgthread-2.0.la gthread.def
index 3a9e2da..b70f871 100644 (file)
@@ -1,7 +1,7 @@
 #include <winver.h>
 
 VS_VERSION_INFO VERSIONINFO
-  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,BUILDNUMBER
+  FILEVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   PRODUCTVERSION @GLIB_MAJOR_VERSION@,@GLIB_MINOR_VERSION@,@GLIB_MICRO_VERSION@,0
   FILEFLAGSMASK 0
   FILEFLAGS 0
@@ -15,7 +15,7 @@ VS_VERSION_INFO VERSIONINFO
       BEGIN
        VALUE "CompanyName", "The GLib developer community"
        VALUE "FileDescription", "GThread"
-       VALUE "FileVersion", "@GLIB_VERSION@.BUILDNUMBER"
+       VALUE "FileVersion", "@GLIB_VERSION@.0"
        VALUE "InternalName", "libgthread-2.0-@LT_CURRENT_MINUS_AGE@"
        VALUE "LegalCopyright", "Copyright © 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald. Copyright © 1998 Sebastian Wilhelmi. Modified by the GLib Team and others 1997-2004."
        VALUE "OriginalFilename", "libgthread-2.0-@LT_CURRENT_MINUS_AGE@.dll"