[gtranslator] Added stuff to autotools files to build for win
- From: Pablo Sanxiao Roca <psanxiao src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtranslator] Added stuff to autotools files to build for win
- Date: Thu, 30 Jul 2009 21:19:01 +0000 (UTC)
commit ef795ba5a9147a79b379fb708adf4faca5bab380
Author: Francisco Puga <francisco puga ghandalf org>
Date: Sun Jul 19 21:25:55 2009 +0200
Added stuff to autotools files to build for win
configure.ac | 26 +++++++++++++++++++++++++-
src/Makefile.am | 4 ++++
2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1e09dab..8fb9758 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,12 +109,36 @@ AC_SUBST(GTRANSLATOR_LIBS)
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
+dnl ------------------------
+dnl Check for win32 platform
+dnl ------------------------
+AC_MSG_CHECKING([for Win32 platform])
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+ platform_win32=yes
+ AC_CHECK_TOOL(WINDRES, windres)
+ ;;
+ *)
+ platform_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$platform_win32])
+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+
+
dnl -----------------------------------
dnl Plugins libraries compilation flags
dnl -----------------------------------
-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
+ PLUGIN_LIBTOOL_FLAGS="-module -avoid-version -no-undefined -mwindows -Wl,\$(top_builddir)/src/libgtranslator-\$(GTR_API_VERSION).a"
+else
+ PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
+fi
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
+
dnl -------------------------------------------------------------------
dnl Whether we use the broken, unsupported gtk+ functions
dnl -------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 3917a64..5383e45 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,11 @@ gtranslator_SOURCES = main.c
gtranslator_LDADD = libgtranslator.la $(GTRANSLATOR_LIBS) $(GTKSPELL_LIBS) $(INTLLIBS)
+if PLATFORM_WIN32
+gtranslator_LDFLAGS = -Wl,--export-all-symbols -mwindows -Wl,--out-implib,libgedit-$(GTR_API_VERSION).a
+else
gtranslator_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
+endif
libgtranslator_la_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]