glib r6849 - in branches/glib-2-16: . glib



Author: tml
Date: Fri Apr 11 16:28:53 2008
New Revision: 6849
URL: http://svn.gnome.org/viewvc/glib?rev=6849&view=rev

Log:
2008-04-11  Tor Lillqvist  <tml novell com>

	* configure.in
	* glibconfig.h.win32.in
	* glib/gutils.c: Revert my changes for static build for Win32
	from 2008-04-03--04. They were not complete and it's not
	apropriate to do changes like that in the stable branch anyway. I
	will continue that effort in trunk.



Modified:
   branches/glib-2-16/ChangeLog
   branches/glib-2-16/configure.in
   branches/glib-2-16/glib/gutils.c
   branches/glib-2-16/glibconfig.h.win32.in

Modified: branches/glib-2-16/configure.in
==============================================================================
--- branches/glib-2-16/configure.in	(original)
+++ branches/glib-2-16/configure.in	Fri Apr 11 16:28:53 2008
@@ -250,6 +250,17 @@
   AC_MSG_RESULT([yes])
 fi
 
+if test "$glib_native_win32" = "yes"; then
+  if test x$enable_static = xyes -o x$enable_static = x; then
+    AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
+    enable_static=no
+  fi
+  if test x$enable_shared = xno; then
+    AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
+  fi
+  enable_shared=yes
+fi
+
 dnl Checks for programs.
 AC_PROG_CC
 
@@ -500,17 +511,6 @@
   esac
 fi
 
-if test "$glib_native_win32" = "yes"; then
-  if test x$enable_static = xyes -a x$enable_shared = xyes; then
-    AC_MSG_ERROR([Can not build both shared and static at the same time on Windows.])
-  fi
-  if test x$enable_static = xyes; then
-    glib_win32_static_compilation=yes
-    GLIB_WIN32_STATIC_COMPILATION_DEFINE="#define GLIB_STATIC_COMPILATION 1"
-    AC_SUBST(GLIB_WIN32_STATIC_COMPILATION_DEFINE)
-  fi
-fi
-
 dnl
 dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
 dnl
@@ -2721,7 +2721,6 @@
 $glib_memmove
 $glib_defines
 $glib_os
-$glib_static_compilation
 
 $glib_vacopy
 
@@ -3200,10 +3199,6 @@
     glib_os="#define G_OS_UNIX"
     ;;
 esac
-glib_static_compilation=""
-if test x$glib_win32_static_compilation = xyes; then
-  glib_static_compilation="#define GLIB_STATIC_COMPILATION 1"
-fi
 ])
 
 AC_CONFIG_FILES([

Modified: branches/glib-2-16/glib/gutils.c
==============================================================================
--- branches/glib-2-16/glib/gutils.c	(original)
+++ branches/glib-2-16/glib/gutils.c	Fri Apr 11 16:28:53 2008
@@ -134,8 +134,6 @@
 
 static HMODULE glib_dll = NULL;
 
-#ifdef DLL_EXPORT
-
 BOOL WINAPI
 DllMain (HINSTANCE hinstDLL,
 	 DWORD     fdwReason,
@@ -147,18 +145,12 @@
   return TRUE;
 }
 
-#endif
-
 gchar *
 _glib_get_installation_directory (void)
 {
-#ifdef DLL_EXPORT
   if (glib_dll == NULL)
     return NULL;
-#endif
-  /* In a static build of GLib just use the application's .exe file's
-   * installation directory...
-   */
+
   return g_win32_get_package_installation_directory_of_module (glib_dll);
 }
 

Modified: branches/glib-2-16/glibconfig.h.win32.in
==============================================================================
--- branches/glib-2-16/glibconfig.h.win32.in	(original)
+++ branches/glib-2-16/glibconfig.h.win32.in	Fri Apr 11 16:28:53 2008
@@ -103,7 +103,6 @@
 
 #define G_OS_WIN32
 #define G_PLATFORM_WIN32
- GLIB_WIN32_STATIC_COMPILATION_DEFINE@
 
 #ifndef _MSC_VER
 #define G_VA_COPY	va_copy



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