[gedit] Build fixes for cygwin. Fixes bug #601630.



commit b5dd402aef022a9bda29f0fee6819b8beda86377
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Nov 12 12:49:44 2009 +0100

    Build fixes for cygwin. Fixes bug #601630.
    
    Fix some confusions between cygwin and mingw. Patch made by the
    cygwin ports maintainer.

 configure.ac      |   14 +++++++++-----
 gedit/Makefile.am |   11 +++++++----
 2 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8805ce6..80627d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,8 +66,6 @@ AC_MSG_CHECKING([for Win32 platform])
 case "$host" in
   *-*-mingw*|*-*-cygwin*)
     platform_win32=yes
-    AC_CHECK_TOOL(WINDRES, windres)
-    ACTIVE_PLUGINS="${ACTIVE_PLUGINS},checkupdate"
     TOOLBAR_STYLE="GEDIT_TOOLBAR_ICONS"
     ;;
   *)
@@ -81,6 +79,8 @@ AC_MSG_CHECKING([for native Win32])
 case "$host" in
   *-*-mingw*)
     os_win32=yes
+    AC_CHECK_TOOL(WINDRES, windres)
+    ACTIVE_PLUGINS="${ACTIVE_PLUGINS},checkupdate"
     ;;
   *)
     os_win32=no
@@ -184,7 +184,7 @@ if test "x$enable_updater" != "xno"; then
 		have_libsoup=no)
 	
 	if test "x$have_libsoup" = "xyes"; then
-		if test "x$platform_win32" = "xyes"; then
+		if test "x$os_win32" = "xyes"; then
 			enable_updater=yes
 		elif test "x$os_osx" = "xyes"; then
 			enable_updater=yes
@@ -468,8 +468,12 @@ fi
 # so we create a lib
 if test "$platform_win32" = yes; then
 	GEDIT_IMPLIB="-lgedit-$GEDIT_API_VERSION"
-	PLUGIN_LIBTOOL_FLAGS="-module -avoid-version -no-undefined -mwindows -Wl,\$(top_builddir)/gedit/libgedit-\$(GEDIT_API_VERSION).a"
-	LOADER_LIBTOOL_FLAGS="-module -avoid-version -no-undefined -mwindows -Wl,\$(top_builddir)/gedit/libgedit-\$(GEDIT_API_VERSION).a"
+	PLUGIN_LIBTOOL_FLAGS="-module -avoid-version -no-undefined -Wl,\$(top_builddir)/gedit/libgedit-\$(GEDIT_API_VERSION).a"
+	LOADER_LIBTOOL_FLAGS="-module -avoid-version -no-undefined -Wl,\$(top_builddir)/gedit/libgedit-\$(GEDIT_API_VERSION).a"
+	if test "$os_win32" = yes; then
+		PLUGIN_LIBTOOL_FLAGS="${PLUGIN_LIBTOOL_FLAGS} -mwindows"
+		LOADER_LIBTOOL_FLAGS="${LOADER_LIBTOOL_FLAGS} -mwindows"
+	fi
 else
 	GEDIT_IMPLIB=""
 	PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index ddba2c8..877e56d 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -26,7 +26,10 @@ gedit_SOURCES = \
 gedit_LDADD = libgedit.la $(GEDIT_LIBS) $(IGE_MAC_LIBS) $(EGG_SMCLIENT_LIBS)
  
 if PLATFORM_WIN32
-gedit_LDFLAGS = -Wl,--export-all-symbols -mwindows -Wl,--out-implib,libgedit-$(GEDIT_API_VERSION).a
+gedit_LDFLAGS = -Wl,--export-all-symbols -Wl,--out-implib,libgedit-$(GEDIT_API_VERSION).a
+if OS_WIN32
+gedit_LDFLAGS += -mwindows
+endif
 else
 gedit_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
 endif
@@ -52,7 +55,7 @@ BUILT_SOURCES = 			\
 	gedit-marshal.c			\
 	gedit-marshal.h
 
-if PLATFORM_WIN32
+if OS_WIN32
 gedit-res.o: gedit.rc
 	$(WINDRES) -i gedit.rc --input-format=rc -o gedit-res.o -O coff
 
@@ -117,7 +120,7 @@ headerdir = $(prefix)/include/gedit- GEDIT_API_VERSION@/gedit
 header_DATA = 				\
 	$(INST_H_FILES)	
 
-if !PLATFORM_WIN32
+if !OS_WIN32
 POSIXIO_FILES = 			\
 	gedit-local-document-saver.c	
 else
@@ -222,7 +225,7 @@ else
 	ln -s gedit $(DESTDIR)$(bindir)/gnome-text-editor
 endif
 
-if !PLATFORM_WIN32
+if !OS_WIN32
 BACON_DIR=$(srcdir)/../../libbacon/src/
 BACON_FILES=bacon-message-connection.h bacon-message-connection.c
 



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