gnucash master: Allow building for mac integration with gcc-4.8

John Ralls jralls at code.gnucash.org
Sun May 18 21:13:07 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/6e62ce99 (commit)
	from  https://github.com/Gnucash/gnucash/commit/de1de4f0 (commit)



commit 6e62ce9938a7488cf259e1b7b28d440f6c68ae80
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun May 18 17:40:35 2014 -0700

    Allow building for mac integration with gcc-4.8

diff --git a/configure.ac b/configure.ac
index 81981a1..c47ed1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,6 +332,7 @@ AC_SUBST(SED)
 
 # Set some defaults, they may be overridden below
 REGEX_LIBS=""
+GCC_VERSION=`${CC} -dumpversion`
 
 AC_MSG_CHECKING(operating system)
 #NOUNDEF for use with mingw
@@ -358,7 +359,13 @@ update to latest  darwin])
       if test "x$_gtk_mac" = xyes; then
         GTK_MAC_LIBS="${GTK_MAC_LIBS} -lobjc -framework Cocoa"
         GTK_MAC_CFLAGS="${GTK_MAC_CFLAGS} -xobjective-c"
-      fi
+ 	if test "`echo ${GCC_VERSION} | cut -d. -f1`" -eq 4; then
+	   if test "`echo ${GCC_VERSION} | cut -d. -f2`" -ge 8; then
+      	   # This is gcc >= 4.8.x
+	      GTK_MAC_CFLAGS="${GTK_MAC_CFLAGS} -fobjc-exceptions"
+	   fi
+	fi
+     fi
       AC_MSG_RESULT(${_gtk_mac})
       AC_SUBST(GTK_MAC_LIBS)
       AC_SUBST(GTK_MAC_CFLAGS)
@@ -1322,7 +1329,7 @@ then
   # For gcc >= 3.4.x, specifically enable the new warning switch
   # -Wdeclaration-after-statement in order to preserve source code
   # compatibility to gcc 2.95 and other compilers.
-  GCC_VERSION=`${CC} -dumpversion`
+
   if test "`echo ${GCC_VERSION} | cut -d. -f1`" -eq 3; then
     # This is gcc 3.x.x
     if test "`echo ${GCC_VERSION} | cut -d. -f2`" -ge 4; then



Summary of changes:
 configure.ac | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list