Add variable for LT_CURRENT minus LT_AGE (the suffix used by libtool on
authorTor Lillqvist <tml@iki.fi>
Mon, 17 Sep 2001 00:41:39 +0000 (00:41 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 17 Sep 2001 00:41:39 +0000 (00:41 +0000)
2001-09-17  Tor Lillqvist  <tml@iki.fi>

* configure.in: Add variable for LT_CURRENT minus LT_AGE (the
suffix used by libtool on Win32 for DLLs). Set variables for the
compiled resource files on Windows. Handle the native Win32
gthread stuff.

* glib/Makefile.am
* gmodule/Makefile.am
* gobject/Makefile.am: (Win32) Add minor hacks to link in the object
file produced from the resource file. Use the lt-compile-resource
script from the build module. The non-hack way would be to teach
libtool, autoconf and automake about .rc files (which are a kind
of source code, after all, that gets compiled to object
files). But then there would be problems for those who wouldn't have
bleeding edge auto* and libtool.

* glib/glib.def
* gobject/gobject.def: Updates.

* glib/glib.rc.in
* gmodule/gmodule.rc.in
* gobject/gobject.rc.in
* gthread/gthread.rc.in: Update InternalName and OriginalFilename to
match libtool's naming convention for DLLs.

* glib/gutils.c: Ditto when constructing the DLL name in the
definition for GLIB_LOCALE_DIR.

* glib/makefile.mingw.in
* gmodule/makefile.mingw.in
* gobject/makefile.mingw.in
* gthread/makefile.mingw.in: Update import library names.

24 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
README.win32
config.h.win32.in
configure.in
glib/Makefile.am
glib/glib.def
glib/glib.rc.in
glib/gspawn-win32.c
glib/gutils.c
glib/makefile.mingw.in
gmodule/Makefile.am
gmodule/makefile.mingw.in
gobject/Makefile.am
gobject/gobject.def
gobject/makefile.mingw.in
gthread/Makefile.am
gthread/makefile.mingw.in

index 07fe08f..766bb99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 07fe08f..766bb99 100644 (file)
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 07fe08f..766bb99 100644 (file)
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 07fe08f..766bb99 100644 (file)
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 07fe08f..766bb99 100644 (file)
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 07fe08f..766bb99 100644 (file)
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 07fe08f..766bb99 100644 (file)
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 07fe08f..766bb99 100644 (file)
@@ -1,4 +1,37 @@
+2001-09-17  Tor Lillqvist  <tml@iki.fi>
 
+       * configure.in: Add variable for LT_CURRENT minus LT_AGE (the
+       suffix used by libtool on Win32 for DLLs). Set variables for the
+       compiled resource files on Windows. Handle the native Win32
+       threads gmodule.
+
+       * glib/Makefile.am
+       * gmodule/Makefile.am
+       * gobject/Makefile.am: (Win32) Add hacks to link in the object
+       file produced from the resource file. Use the lt-compile-resource
+       script from the build module. The non-hack way would be to teach
+       libtool, autoconf and automake about .rc files (which are a kind
+       of source code, after all, that gets compiled to object
+       files). But then there would be problems with those who don't have
+       bleeding edge auto* and libtool.
+
+       * glib/glib.def
+       * gobject/gobject.def: Updates.
+
+       * glib/glib.rc.in
+       * gmodule/gmodule.rc.in
+       * gobject/gobject.rc.in
+       * gthread/gthread.rc.in: Update InternalName and OriginalFilename to
+       match libtool's naming convention for DLLs.
+
+       * glib/gutils.c: Ditto when constructing the DLL name in the
+       definition for GLIB_LOCALE_DIR.
+
+       * glib/makefile.mingw.in
+       * gmodule/makefile.mingw.in
+       * gobject/makefile.mingw.in
+       * gthread/makefile.mingw.in: Update import library names.
+       
 Fri Sep 14 20:34:27 2001  Matthias Clasen  <matthiasc@poet.de>
 
        * glib/gconvert.c (g_filename_from_uri): Replace `is contains'
index 43919f6..b56f0e9 100644 (file)
@@ -14,30 +14,6 @@ have been used successfully.
 But note that to just *use* GLib on Windows, there is no need to build
 it, prebuilt DLLs are available from the webiste above.
 
-With gcc I mean gcc-2.95.3 from www.mingw.org. It might be possible
-also to use gcc from Cygwin. (But also in that case, we want to use
-gcc -mno-cygwin, i.e. produce executables (.exe and .dll files) that
-do *not* require the cygwin runtime library. This is called "mingw".)
-
-To successfully use gcc, follow the instructions below.  I also use
-the -fnative-struct flag, which means that in order to use the
-prebuilt DLLs (especially of GTK+), you *must* also use that flag.
-(This flag means that the struct layout is identical to that used by
-MSVC.)
-
-If you would want to use the Cygwin tools to generate a GLib that
-*does* use the Cygwin runtime, the normal Unix configuration method
-should work as if on Unix. Note that successfully producing shared
-libraries (DLLs) most probably requires you to have a very new
-libtool. (And a new libtool probably requires rather new autoconf and
-automake.)
-
-It might also be possible to use the ./configure mechanism when
-building for a mingw configuration. You should be running Cygwin for
-the configure script to work, obviously. The same libtool issue has to
-be taken into account as when building for Cygwin: You most probably
-should have a very new libtool.
-
 The following preprocessor macros are used for conditional compilation
 related to Win32:
 
@@ -80,7 +56,7 @@ Before building GLib you must also have the libiconv library, either
 from the same website mentioned above, or from it's homepage at
 http://clisp.cons.org/~haible/packages-libiconv.html. Libiconv has
 makefiles for building with MS Visual C only, but as it is one source
-file only, building iot "by hand" with gcc isn't hard.
+file only, building it "by hand" with gcc isn't hard.
 
 Where are the makefiles?
 ========================
@@ -103,17 +79,56 @@ You can either use gcc running on Cygwin, or the "pure" mingw
 gcc. Using the latter is much easier. 
 
 Just fetch the latest version of gcc for mingw and the msvcrt runtime,
-from www.mingw.org..
+from www.mingw.org.
 
 Set up your PATH so that the gcc from the bin directory that got
 created above is the one that gets used. Even if you run the mingw
 gcc, you still want to have Cygwin to run make in.
 
-If you want to run a Cygwin-based gcc, it gets a bit more
+Then run make -f makefile.mingw. 
+
+I use the -fnative-struct flag, which means that in order to use the
+prebuilt DLLs (especially of GTK+), you *must* also use that flag.
+(This flag means that the struct layout is identical to that used by
+MSVC. This is essential if the same DLLs are to be usable both from
+gcc- and MSVC-compiled code, which definitely is a good thing.)
+
+It is also possible to use the auto*, ./configure and libtool
+mechanism when building for mingw. You should be running Cygwin, or
+maybe cross-compiling from real Unix, for the configure script to
+work, obviously. The same libtool issue has to be taken into account
+as when building for Cygwin: You most probably should have a very new
+libtool. Remember to invoke configure with CC='gcc -fnative-struct' if
+you want to produce DLLs binary compatible with the "official" ones.
+
+But please note that the ./configure mechanism should not blindly be
+used to build a GLib to be distributed to potential developers because
+it produces a compiler-dependent glibconfig.h (and config.h, but that
+shouldn't matter). For instance, the typedef for gint64 is long long
+with gcc, but __int64 with MSVC. Otherwise, there really shouldn't be
+any reason to distribute separate GLib DLLs for gcc and MSVC users, as
+both compiler+tools generate code that uses the same C runtime
+library. Thus one either has to edit glibconfig.h afterwards, or use
+the hand-written config.h.win32 and glibconfig.h.win32.
+
+There are probably also other hickups when using auto* and configure
+to build for mingw, sigh. Every now and then I try to get rid of the
+hand-written makefiles and configuration headers for Win32, and start
+fooling around with auto* etc, but after a while give up and fall
+back.
+
+If you want to run the Cygwin-based gcc, it gets a bit more
 complicated. We still want gcc to produce code that does not use
 Cygwin, but the msvcrt runtime. In theory it should work to use the
 -no-cygwin flag, but I haven't tested that lately.
 
+If you would want to use the Cygwin tools to generate a GLib that
+*does* use the Cygwin runtime, the normal Unix configuration method
+should work as if on Unix. Note that successfully producing shared
+libraries (DLLs) most probably requires you to have a very new
+libtool. (And a new libtool probably requires rather new autoconf and
+automake.)
+
 Building with MSVC
 ==================
 
index e98a9cd..a6360ab 100644 (file)
@@ -1,4 +1,4 @@
-/* config.h.win32. Handcrafted for Microsoft C */
+/* config.h.win32. Handcrafted for the Microsoft C library. */
 
 /* Define to empty if the keyword does not work.  */
 /* #undef const */
@@ -6,9 +6,6 @@
 /* Define if you don't have vprintf but do have _doprnt.  */
 /* #undef HAVE_DOPRNT */
 
-/* Define if you have <unistd.h>.  */
-/* #undef HAVE_UNISTD_H */
-
 /* Define if you have the vprintf function.  */
 #define HAVE_VPRINTF 1
 
 
 /* #undef HAVE_BROKEN_WCTYPE */
 /* #undef HAVE_DOPRNT */
-#define HAVE_FLOAT_H 1
 #define HAVE_GETCWD 1
-#define HAVE_LIMITS_H 1
 /* #undef HAVE_LOCALTIME_R */
 /* #undef HAVE_LONG_DOUBLE */
 /* #undef HAVE_POLL */
-/* #undef HAVE_PWD_H */
-/* #undef HAVE_SYS_PARAM_H */
 /* #undef HAVE_SYS_POLL_H */
-/* #undef HAVE_SYS_SELECT_H */
-/* #undef HAVE_SYS_TIME_H */
-/* #undef HAVE_SYS_TIMES_H */
 #define HAVE_STRERROR 1
-/* #undef HAVE_STRSIGNAL */
-/* #undef HAVE_UNISTD_H */
-/* #undef HAVE_VSNPRINTF */
-/* #undef HAVE_VALUES_H */
 #define HAVE_VPRINTF 1
 #define HAVE_WCHAR_H 1
 #define HAVE_WCTYPE_H 1
index 65abfd3..649dd8e 100644 (file)
@@ -49,10 +49,12 @@ LT_RELEASE=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION
 LT_CURRENT=`expr $GLIB_MICRO_VERSION - $GLIB_INTERFACE_AGE`
 LT_REVISION=$GLIB_INTERFACE_AGE
 LT_AGE=`expr $GLIB_BINARY_AGE - $GLIB_INTERFACE_AGE`
+LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
 AC_SUBST(LT_RELEASE)
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
 AC_SUBST(LT_AGE)
+AC_SUBST(LT_CURRENT_MINUS_AGE)
 
 VERSION=$GLIB_VERSION
 PACKAGE=glib
@@ -913,19 +915,31 @@ AC_MSG_CHECKING([if building for pure Win32])
 case "$host" in
   *-*-mingw*)
     os_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
     ;;
   *)
     os_win32=no
+    G_LIB_WIN32_RESOURCE=
+    G_MODULE_WIN32_RESOURCE=
+    G_OBJECT_WIN32_RESOURCE=
+    G_THREAD_WIN32_RESOURCE=
     ;;
 esac
 AC_MSG_RESULT($os_win32)
 AM_CONDITIONAL(OS_WIN32, test x$os_win32 = xyes)
+AC_SUBST(G_LIB_WIN32_RESOURCE)
+AC_SUBST(G_MODULE_WIN32_RESOURCE)
+AC_SUBST(G_OBJECT_WIN32_RESOURCE)
+AC_SUBST(G_THREAD_WIN32_RESOURCE)
 
 dnl ***********************
 dnl *** g_thread checks ***
 dnl ***********************
 
-AC_ARG_WITH(threads, [  --with-threads=[none/posix/dce/solaris] specify a thread implementation to use],
+AC_ARG_WITH(threads, [  --with-threads=[none/posix/dce/solaris/win32] specify a thread implementation to use],
        if test "x$with_threads" = x; then
                want_threads=yes
        else
@@ -1006,6 +1020,13 @@ if test "x$want_threads" = xyes || test "x$want_threads" = xposix \
         fi
        CPPFLAGS="$glib_save_CPPFLAGS"
 fi
+if test "x$want_threads" = xyes || test "x$want_threads" = xwin32; then
+               case $host in
+                       *-*-mingw*|*-*-cygwin*)
+               have_threads=win32
+               ;;
+       esac
+fi
 
 AC_MSG_CHECKING(for thread implementation)
 
@@ -1180,6 +1201,10 @@ case $have_threads in
            mutex_header_file='thread.h'
           g_threads_impl="SOLARIS"
            ;;
+       win32)
+          g_threads_impl="WIN32"
+          G_THREAD_LIBS=""
+          ;;
         none)
           g_threads_impl="NONE"
            ;;
@@ -1325,6 +1350,9 @@ if test x"$have_threads" != xnone; then
                          AC_DEFINE(G_THREAD_USE_PID_SURROGATE, 1, [whether to use the PID niceness surrogate for thread priorities])
                         ],
                        [AC_MSG_RESULT(no)])
+       elif test x"$have_threads" = xwin32; then
+               # It's a pointer to a private struct
+               GLIB_SIZEOF(,struct _GThreadData *, system_thread)
        else # solaris threads
                GLIB_SIZEOF([#include <thread.h>], thread_t, system_thread)
        fi
index fa7822a..e4cb746 100644 (file)
@@ -128,18 +128,18 @@ install-data-local:
          false ;                                                                       \
         fi
 
-libglib_1_3_la_LIBADD = @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@
-libglib_1_3_la_DEPENDENCIES = @GIO@ @GSPAWN@ @PLATFORMDEP@ 
-
-
 if PLATFORM_WIN32
 no_undefined = -no-undefined
+
 endif
 if OS_WIN32
 # This requires a very new libtool
 export_symbols = -export-symbols glib.def
 endif
 
+libglib_1_3_la_LIBADD = @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@ @ICONV_LIBS@ @G_LIBS_EXTRA@ 
+libglib_1_3_la_DEPENDENCIES = @GIO@ @GSPAWN@ @PLATFORMDEP@ @G_LIB_WIN32_RESOURCE@
+
 libglib_1_3_la_LDFLAGS = \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic $(no_undefined) $(export_symbols)
@@ -147,5 +147,22 @@ libglib_1_3_la_LDFLAGS = \
 if OS_WIN32
 bin_PROGRAMS = gspawn-win32-helper
 gspawn_win32_helper_LDADD = libglib-1.3.la
+
+@G_LIB_WIN32_RESOURCE@ : glib.rc
+       $(top_srcdir)/build/win32/lt-compile-resource glib.rc @G_LIB_WIN32_RESOURCE@
 endif
 
+glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib/glib.rc.in
+       cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/glib/makefile.mingw.in
+       cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+makefile.msc: $(top_builddir)/config.status $(top_srcdir)/glib/makefile.msc.in
+       cd $(top_builddir) && CONFIG_FILES=glib/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+dist-hook: $(BUILT_EXTRA_DIST)
+       files='$(BUILT_EXTRA_DIST)'; \
+       for f in $$files; do \
+         if test -f $$f; then d=.; else d=$(srcdir); fi; \
+         cp $$d/$$f $(distdir) || exit 1; done
index 325660a..b06c9d6 100644 (file)
@@ -44,6 +44,14 @@ EXPORTS
        g_bit_nth_msf
        g_bit_storage
        g_blow_chunks
+       g_bsearch_array_destroy
+       g_bsearch_array_get_index
+       g_bsearch_array_get_nth
+       g_bsearch_array_new
+       g_bsearch_array_insert
+       g_bsearch_array_lookup
+       g_bsearch_array_remove
+       g_bsearch_array_remove_node
        g_byte_array_append
        g_byte_array_free
        g_byte_array_new
@@ -433,12 +441,9 @@ EXPORTS
        g_scanner_unexp_token
        g_scanner_warn
        g_set_error
-       g_set_error_handler
-       g_set_message_handler
        g_set_prgname
        g_set_print_handler
        g_set_printerr_handler
-       g_set_warning_handler
        g_shell_error_quark
        g_shell_parse_argv
        g_shell_quote
index 1e778c3..03d4101 100644 (file)
@@ -16,9 +16,9 @@ VS_VERSION_INFO VERSIONINFO
        VALUE "CompanyName", "The GLib developer community"
        VALUE "FileDescription", "GLib"
        VALUE "FileVersion", "@GLIB_VERSION@.BUILDNUMBER"
-       VALUE "InternalName", "glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@"
+       VALUE "InternalName", "libglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@"
        VALUE "LegalCopyright", "Copyright © 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald. Modified by the GLib Team and others 1997-2000."
-       VALUE "OriginalFilename", "glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.dll"
+       VALUE "OriginalFilename", "libglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll"
        VALUE "ProductName", "GLib"
        VALUE "ProductVersion", "@GLIB_VERSION@"
       END
index 91acb46..4746ed3 100644 (file)
@@ -35,7 +35,7 @@
  */
 
 /* Define this to get some logging all the time */
-#define G_SPAWN_WIN32_DEBUG
+/* #define G_SPAWN_WIN32_DEBUG */
 
 #include "glib.h"
 
index 17e1514..fd8458b 100644 (file)
@@ -1092,11 +1092,13 @@ g_get_codeset (void)
 #ifndef GLIB_LOCALE_DIR
 #ifdef G_PLATFORM_WIN32
 
-#define GLIB_LOCALE_DIR                                                \
+#define GLIB_LOCALE_DIR                                                \
   g_win32_get_package_installation_subdirectory                        \
-  (GETTEXT_PACKAGE, g_strdup_printf ("glib-%d.%d.dll",         \
-                                    GLIB_MAJOR_VERSION,        \
-                                    GLIB_MINOR_VERSION),       \
+  (GETTEXT_PACKAGE,                                            \
+   g_strdup_printf ("libglib-%d.%d-%d.dll",                    \
+                   GLIB_MAJOR_VERSION,                         \
+                   GLIB_MINOR_VERSION,                         \
+                   GLIB_MICRO_VERSION - GLIB_BINARY_AGE),      \
    "locale")
 
 #endif /* G_PLATFORM_WIN32 */
index 7388b95..dbfacb6 100644 (file)
@@ -18,13 +18,14 @@ DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
 all :                          \
        ../config.h             \
        ../glibconfig.h         \
-       glib-@GLIB_VERSION@.dll \
+       libglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a \
        gspawn-win32-helper.exe
 
 glib_OBJECTS =                 \
        garray.o                \
        gasyncqueue.o           \
        gbacktrace.o            \
+       gbsearcharray.o         \
        gcache.o                \
        gcompletion.o           \
        gconvert.o              \
@@ -72,16 +73,13 @@ glib_OBJECTS =                      \
 ../config.h: ../config.h.win32
        cp $< $@
 
-ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
-makefile.mingw: makefile.mingw.in
-       sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
-endif
-
 ################ The glib DLL
 
-glib-@GLIB_VERSION@.dll : $(glib_OBJECTS) glib.def
-       $(BUILD_DLL) glib @GLIB_VERSION@ glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
+libglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a : $(glib_OBJECTS) glib.def glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc
+       $(BUILD_DLL) glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
 
-gspawn-win32-helper.exe : gspawn-win32-helper.c
-       $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib
+glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc : glib.rc
+       cp $< $@
 
+gspawn-win32-helper.exe : gspawn-win32-helper.c
+       $(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
index faa8d1d..22d451c 100644 (file)
@@ -48,7 +48,9 @@ libgmodule_1_3_la_LDFLAGS = \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic $(no_undefined) $(export_symbols)
 
-libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
+libgmodule_1_3_la_LIBADD = @G_MODULE_WIN32_RESOURCE@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
+
+libgmodule_1_3_la_DEPENDENCIES = @G_MODULE_WIN32_RESOURCE@
 
 libgplugin_a_la_SOURCES = libgplugin_a.c
 libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
@@ -62,6 +64,11 @@ noinst_PROGRAMS = testgmodule
 testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
 testgmodule_LDADD = libgmodule-1.3.la $(libglib) @G_MODULE_LIBS@
 
+if OS_WIN32
+@G_MODULE_WIN32_RESOURCE@ : gmodule.rc
+       $(top_srcdir)/build/win32/lt-compile-resource gmodule.rc @G_MODULE_WIN32_RESOURCE@
+endif
+
 gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
        cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
index 416c7d4..45a7169 100644 (file)
@@ -16,15 +16,10 @@ DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" -DG_ENABLE_DEBUG
 
 all : \
        gmoduleconf.h \
-       gmodule-@GLIB_VERSION@.dll \
+       libgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a \
        testgmodule.exe \
        libgplugin_a.dll libgplugin_b.dll
 
-ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
-makefile.mingw: makefile.mingw.in
-       sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
-endif
-
 gmodule_OBJECTS = \
        gmodule.o
 
@@ -33,22 +28,25 @@ gmoduleconf.h: gmoduleconf.h.win32
 
 ################ The gmodule DLL
 
-gmodule-@GLIB_VERSION@.dll : $(gmodule_OBJECTS) gmodule.def
-       $(BUILD_DLL) gmodule @GLIB_VERSION@ $(CFLAGS) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib
+libgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a : $(gmodule_OBJECTS) gmodule.def gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc
+       $(BUILD_DLL) gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ @LT_CURRENT:@LT_REVISION@:@LT_AGE@ $(CFLAGS) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc : gmodule.rc
+       cp $< $@
 
 ################ test prog
 
-testgmodule.exe : gmodule-@GLIB_VERSION@.dll testgmodule.o 
+testgmodule.exe : libgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a testgmodule.o 
 # We have to generate an .exp file separately with dlltool, and link
 # with that. Sigh.
        dlltool --output-exp testgmodule.exp testgmodule.o
-       $(CC) $(CFLAGS) -o testgmodule.exe testgmodule.o testgmodule.exp -L ../glib -lglib -L . -lgmodule $(LFLAGS)
+       $(CC) $(CFLAGS) -o testgmodule.exe testgmodule.o testgmodule.exp -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ $(LFLAGS)
 
 libgplugin_a.dll : libgplugin_a.o
-       $(BUILD_DLL) libgplugin_a - libgplugin_a.o -L ../glib -lglib -L . -lgmodule
+       $(BUILD_DLL) libgplugin_a - libgplugin_a.o -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
 
 libgplugin_b.dll : libgplugin_b.o
-       $(BUILD_DLL) libgplugin_b - libgplugin_b.o -L ../glib -lglib -L . -lgmodule
+       $(BUILD_DLL) libgplugin_b - libgplugin_b.o -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
 
 ################ Other stuff
 
index 952af74..b76b3c8 100644 (file)
@@ -31,7 +31,9 @@ libgobject_1_3_la_LDFLAGS = @STRIP_BEGIN@ \
        -export-dynamic $(no_undefined) $(export_symbols)       \
 @STRIP_END@
 
-libgobject_1_3_la_LIBADD = $(libglib)
+libgobject_1_3_la_LIBADD = @G_OBJECT_WIN32_RESOURCE@ $(libglib)
+
+libgobject_1_3_la_DEPENDENCIES = @G_OBJECT_WIN32_RESOURCE@
 
 #
 # setup source file variables
@@ -197,6 +199,11 @@ glib-mkenums: $(srcdir)/glib-mkenums
         fi;                                    \
        cp $(srcdir)/glib-mkenums glib-mkenums
 
+if OS_WIN32
+@G_OBJECT_WIN32_RESOURCE@ : gobject.rc
+       $(top_srcdir)/build/win32/lt-compile-resource gobject.rc @G_OBJECT_WIN32_RESOURCE@
+endif
+
 gobject.rc: $(top_builddir)/config.status $(top_srcdir)/gobject/gobject.rc.in
        cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
index e7174a1..06153af 100644 (file)
@@ -2,14 +2,6 @@ EXPORTS
        g_boxed_copy
        g_boxed_free
        g_boxed_type_register_static
-       g_bsearch_array_destroy
-       g_bsearch_array_get_index
-       g_bsearch_array_get_nth
-       g_bsearch_array_new
-       g_bsearch_array_insert
-       g_bsearch_array_lookup
-       g_bsearch_array_remove
-       g_bsearch_array_remove_node
        g_cclosure_marshal_STRING__OBJECT_POINTER
        g_cclosure_marshal_VOID__BOOLEAN
        g_cclosure_marshal_VOID__BOXED
@@ -192,6 +184,7 @@ EXPORTS
        g_type_interface_add_prerequisite
        g_type_interface_get_plugin
        g_type_interface_peek
+       g_type_interface_peek_parent
        g_type_interfaces
        g_type_is_a
        g_type_module_add_interface
index e7a56a8..e350ef4 100644 (file)
@@ -16,21 +16,13 @@ DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_grun
 
 srcdir=.
 
-BUILD_DLL = ../build-dll
-
 all : \
-       gobject-@GLIB_VERSION@.dll      \
+       libgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a \
+       testgruntime.exe \
        glib-genmarshal.exe
 
-ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
-makefile.mingw: makefile.mingw.in
-       sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' \
-           -e 's,@RE[B]UILD@,,' <$< >$@
-endif
-
 gobject_OBJECTS =              \
        gboxed.o                \
-       gbsearcharray.o         \
        gclosure.o              \
        genums.o                \
        gobject.o               \
@@ -45,11 +37,14 @@ gobject_OBJECTS =           \
        gvaluetransform.o       \
        gvaluetypes.o
 
-gobject-@GLIB_VERSION@.dll : $(srcdir)/stamp-gmarshal.h gmarshal.c $(gobject_OBJECTS) gobject.def 
-       $(BUILD_DLL) gobject @GLIB_VERSION@ gobject.def $(gobject_OBJECTS) -L ../glib -lglib
+libgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a : $(srcdir)/stamp-gmarshal.h gmarshal.c $(gobject_OBJECTS) gobject.def 
+       $(BUILD_DLL) gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ @LT_CURRENT@:@LT_REVISION@:@LT_AGE@ gobject.def $(gobject_OBJECTS) -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
 
 glib-genmarshal.exe : glib-genmarshal.c
-       $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L ../glib -lglib
+       $(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+testgruntime.exe: libgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a testgruntime.o
+       $(CC) $(CFLAGS) -o testgruntime.exe testgruntime.o -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ $(LFLAGS)
 
 # Copied from Makefile.am:
 # initial creation of the real stamp-* files
index 0928fd9..4a03529 100644 (file)
@@ -37,7 +37,14 @@ libgthread_1_3_la_LDFLAGS = \
        -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
        -export-dynamic $(no_undefined) $(export_symbols)
 
-libgthread_1_3_la_LIBADD = @G_THREAD_LIBS_EXTRA@ @G_THREAD_LIBS@ $(libglib)
+libgthread_1_3_la_LIBADD = @G_THREAD_WIN32_RESOURCE@ @G_THREAD_LIBS_EXTRA@ @G_THREAD_LIBS@ $(libglib)
+
+libgthread_1_3_la_DEPENDENCIES = @G_THREAD_WIN32_RESOURCE@
+
+if OS_WIN32
+@G_THREAD_WIN32_RESOURCE@ : gthread.rc
+       $(top_srcdir)/build/win32/lt-compile-resource gthread.rc @G_THREAD_WIN32_RESOURCE@
+endif
 
 gthread.rc: $(top_builddir)/config.status $(top_srcdir)/gthread/gthread.rc.in
        cd $(top_builddir) && CONFIG_FILES=gthread/$@ CONFIG_HEADERS= $(SHELL) ./config.status
index dadcaf4..78949cf 100644 (file)
@@ -15,15 +15,13 @@ INCLUDES = -I .. -I ../glib -I .
 DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GThread\" -DG_ENABLE_DEBUG
 
 all : \
-       gthread-@GLIB_VERSION@.dll
-
-ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
-makefile.mingw: makefile.mingw.in
-       sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
-endif
+       libgthread-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a
 
 gthread_OBJECTS = \
        gthread-impl.o
 
-gthread-@GLIB_VERSION@.dll : $(gthread_OBJECTS) gthread.def
-       $(BUILD_DLL) gthread @GLIB_VERSION@ gthread.def $(gthread_OBJECTS) -L ../glib -lglib
+libgthread-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a : $(gthread_OBJECTS) gthread.def gthread-@GLIB_VERSION@.rc
+       $(BUILD_DLL) gthread-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ @LT_CURRENT:@LT_REVISION@:@LT_AGE@ gthread.def $(gthread_OBJECTS) -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+gthread-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc : gthread.rc
+       cp $< $@