gedit r6595 - in trunk: . data gedit



Author: pborelli
Date: Sun Nov  2 11:33:42 2008
New Revision: 6595
URL: http://svn.gnome.org/viewvc/gedit?rev=6595&view=rev

Log:
2008-11-02  Paolo Borelli  <pborelli katamail com>

	* configure.ac:
	* data/gedit.pc.in:
	* gedit/Makefile.am:
	Long overdue build fixes for cygwin. Bug #317567.



Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/data/gedit.pc.in
   trunk/gedit/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sun Nov  2 11:33:42 2008
@@ -44,6 +44,19 @@
 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
 
+dnl check for win32 platform
+AC_MSG_CHECKING([for some Win32 platform])
+case "$host" in
+  *-*-mingw*|*-*-cygwin*)
+    platform_win32=yes
+    ;;
+  *)
+    platform_win32=no
+    ;;
+esac
+AC_MSG_RESULT([$platform_win32])
+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+
 dnl ===============================================================
 dnl Expanded dirs
 dnl ===============================================================
@@ -345,7 +358,16 @@
    AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
 fi
 
-PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
+# on win32 plugins must be able to resolve all symbols at link time
+# 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 -Wl,\$(top_builddir)/gedit/libgedit-\$(GEDIT_API_VERSION).a"
+else
+	GEDIT_IMPLIB=""
+	PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
+fi
+AC_SUBST(GEDIT_IMPLIB)
 AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
 
 AC_CONFIG_FILES([

Modified: trunk/data/gedit.pc.in
==============================================================================
--- trunk/data/gedit.pc.in	(original)
+++ trunk/data/gedit.pc.in	Sun Nov  2 11:33:42 2008
@@ -8,3 +8,4 @@
 Requires: gtksourceview-2.0
 Version: @VERSION@
 Cflags: -I${includedir}/gedit- GEDIT_API_VERSION@
+Libs: -L${libdir} @GEDIT_IMPLIB@

Modified: trunk/gedit/Makefile.am
==============================================================================
--- trunk/gedit/Makefile.am	(original)
+++ trunk/gedit/Makefile.am	Sun Nov  2 11:33:42 2008
@@ -28,22 +28,27 @@
 endif
 
 gedit_SOURCES = gedit.c
-gedit_LDADD = libgedit.la smclient/libeggsmclient.la $(GEDIT_LIBS)
-
+gedit_LDADD = libgedit.la $(GEDIT_LIBS)
+ 
+if PLATFORM_WIN32
+gedit_LDFLAGS = -Wl,--export-all-symbols -Wl,--out-implib,libgedit-$(GEDIT_API_VERSION).a
+else
 gedit_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
-
+endif
 
 libgedit_la_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
 
-libgedit_la_LIBADD =			\
-	$(GEDIT_LIBS)			\
-	dialogs/libdialogs.la
+libgedit_la_LIBADD = \
+	dialogs/libdialogs.la		\
+	smclient/libeggsmclient.la
 
 if ENABLE_PYTHON
-libgedit_la_LIBADD += \
-	$(top_builddir)/bindings/python/gedit.la
+libgedit_la_LIBADD += $(top_builddir)/bindings/python/gedit.la
 endif
 
+# GEDIT_LIBS must be the last to ensure correct order on some platforms
+libgedit_la_LIBADD += $(GEDIT_LIBS)
+
 BUILT_SOURCES = 			\
 	gedit-enum-types.c		\
 	gedit-enum-types.h		\
@@ -209,6 +214,10 @@
 install-exec-hook:
 	rm -f $(DESTDIR)$(bindir)/gnome-text-editor
 	ln -s gedit $(DESTDIR)$(bindir)/gnome-text-editor
+if PLATFORM_WIN32
+	$(mkinstalldirs) "$(DESTDIR)$(libdir)"
+	$(INSTALL_DATA) libgedit-$(GEDIT_API_VERSION).a "$(DESTDIR)$(libdir)"
+endif
 
 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]