[sword-svn] r3465 - trunk

scribe at crosswire.org scribe at crosswire.org
Sun May 21 01:43:45 MST 2017


Author: scribe
Date: 2017-05-21 01:43:44 -0700 (Sun, 21 May 2017)
New Revision: 3465

Modified:
   trunk/configure.ac
Log:
fixed compile on older (RHEL 6.x) gcc compilers


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2017-05-21 07:38:20 UTC (rev 3464)
+++ trunk/configure.ac	2017-05-21 08:43:44 UTC (rev 3465)
@@ -120,8 +120,15 @@
 fi
 
 AM_CFLAGS="$AM_CFLAGS -fPIC"
-AM_CXXFLAGS="$AM_CXXFLAGS -fPIC -ftemplate-depth=100"
+AM_CXXFLAGS="$AM_CXXFLAGS -fPIC"
 
+#stupid check for old or new g++ compiler param syntax for this compiler option
+saved_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -ftemplate-depth=100"
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],,[CXXFLAGS="$saved_CXXFLAGS -ftemplate-depth-100";])
+AC_LANG_POP([C++])
+
 # ---------------------------------------------------------------------
 # Check libraries
 # ---------------------------------------------------------------------




More information about the sword-cvs mailing list