[geos-commits] r2248 - trunk

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Jan 19 15:00:57 EST 2009


Author: pramsey
Date: 2009-01-19 15:00:56 -0500 (Mon, 19 Jan 2009)
New Revision: 2248

Modified:
   trunk/configure.in
Log:
Make warning flags conditional behind a compiler test... fix to bug #192 ?


Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2009-01-19 16:44:50 UTC (rev 2247)
+++ trunk/configure.in	2009-01-19 20:00:56 UTC (rev 2248)
@@ -111,8 +111,13 @@
 # Set default CXXFLAGS and CFLAGS if not set by the user
 # -pedantic: ISO does not support long long
 # we add -Wno-long-long to avoid those messages
-CXXFLAGS="${CXXFLAGS} -Wall -ansi -pedantic -Wno-long-long"
-CFLAGS="${CFLAGS} -Wall -ansi -pedantic -Wno-long-long"
+WARNFLAGS=""
+AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -pedantic], [dummy], [-pedantic], [], [WARNFLAGS="$WARNFLAGS -pedantic"], [])
+AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -Wall], [dummy], [-Wall], [], [WARNFLAGS="$WARNFLAGS -Wall"], [])
+AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -ansi], [dummy], [-ansi], [], [WARNFLAGS="$WARNFLAGS -ansi"], [])
+AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -Wno-long-long], [dummy], [-Wno-long-long], [], [WARNFLAGS="$WARNFLAGS -Wno-long-long"], [])
+CXXFLAGS="${CXXFLAGS} ${WARNFLAGS}"
+CFLAGS="${CFLAGS} ${WARNFLAGS}"
 
 dnl --------------------------------------------------------------------
 dnl - Look for a 64bit integer (do after CFLAGS is set)



More information about the geos-commits mailing list