summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Geddes <vgeddes@src.gnome.org>2007-06-26 19:59:09 +0000
committerVincent Geddes <vgeddes@src.gnome.org>2007-06-26 19:59:09 +0000
commit475909cac3d58395a2f5db76bc378dec376a6947 (patch)
tree3c6392ef0e1a6de4d2303ebe66fb5e9d174af5ae
parent7c3efed4a0c33b4776fc35ee8654513bb11771cc (diff)
downloadglade-475909cac3d58395a2f5db76bc378dec376a6947.tar.gz
Cygwin build fixes. Only apply "-mwindows" ld flag if we are in unstable
* src/Makefile.am configure.ac gladeui/Makefile.am: Cygwin build fixes. Only apply "-mwindows" ld flag if we are in unstable development. svn path=/trunk/; revision=1397
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac27
-rw-r--r--gladeui/Makefile.am8
-rw-r--r--src/Makefile.am7
4 files changed, 44 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 8902be81..a7fa7cae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-06-26 Vincent Geddes <vgeddes@gnome.org>
+
+ * src/Makefile.am
+ configure.ac
+ gladeui/Makefile.am: Cygwin build fixes. Only apply "-mwindows" ld flag
+ if we are in unstable development.
+
2007-06-24 Vincent Geddes <vgeddes@gnome.org>
* gladeui/Makefile.am: Set log domain for libgladeui to "GladeUI".
diff --git a/configure.ac b/configure.ac
index a3c55992..3fc41fc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,21 @@ AC_SUBST(GLADE_CURRENT)
AC_SUBST(GLADE_AGE)
AC_SUBST(GLADE_CURRENT_MINUS_AGE)
+dnl are we unstable or stable?
+m4_define([glade_unstable],
+ m4_if(m4_eval(glade_minor_version % 2), [1], [yes], [no]))
+GLADE_UNSTABLE=glade_unstable
+AC_SUBST(GLADE_UNSTABLE)
+
+dnl The symbol GLADE_UNSTABLE is defined above for substitution in
+dnl Makefiles and conditionally defined here as a preprocessor symbol
+dnl and automake conditional.
+if test "x$GLADE_UNSTABLE" = "xyes"; then
+ AC_DEFINE(GLADE_UNSTABLE, 1,
+ [Define to 1 if this is an unstable version of Glade])
+fi
+AM_CONDITIONAL(GLADE_UNSTABLE, test "x$GLADE_UNSTABLE" = "xyes")
+
# ================================================================
GNOME_COMMON_INIT
@@ -252,7 +267,17 @@ case $host_os in
esac
AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = "xyes")
-if test "$platform_win32" = "yes"; then
+case $host_os in
+ *mingw*)
+ native_win32=yes
+ ;;
+ *)
+ native_win32=no
+ ;;
+esac
+AM_CONDITIONAL(NATIVE_WIN32, test x"$native_win32" = "xyes")
+
+if test "$native_win32" = "yes"; then
AC_CHECK_TOOL(WINDRES, windres, no)
if test "$WINDRES" = no; then
AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
diff --git a/gladeui/Makefile.am b/gladeui/Makefile.am
index e699e577..6ba2385b 100644
--- a/gladeui/Makefile.am
+++ b/gladeui/Makefile.am
@@ -119,8 +119,12 @@ libgladeuiinclude_HEADERS = \
if PLATFORM_WIN32
-libgladeui_1_la_LDFLAGS += -no-undefined -Wl,gladeui-win32-res.o -export-symbols gladeui.def
-libgladeui_1_la_DEPENDENCIES = gladeui.def gladeui-win32-res.o
+libgladeui_1_la_LDFLAGS += -no-undefined
+endif
+
+if NATIVE_WIN32
+libgladeui_1_la_LDFLAGS += -Wl,gladeui-win32-res.o -export-symbols gladeui.def
+libgladeui_1_la_DEPENDENCIES = gladeui-win32-res.o gladeui.def
endif
gladeui-win32-res.o: gladeui.rc
diff --git a/src/Makefile.am b/src/Makefile.am
index 7878b103..ef28b0d8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,8 +22,11 @@ glade_3_SOURCES = \
glade-project-window.h \
main.c
-if PLATFORM_WIN32
- glade_3_LDADD += glade-win32-res.o
+if NATIVE_WIN32
+glade_3_LDADD += glade-win32-res.o
+if !GLADE_UNSTABLE
+glade_3_LDFLAGS += -mwindows
+endif
endif
glade-win32-res.o: glade-3.rc