aboutsummaryrefslogtreecommitdiffstats
path: root/macros/compiler-flags.m4
diff options
context:
space:
mode:
authorTero Pulkkinen <terop@src.gnome.org>1999-01-11 13:12:24 +0800
committerTero Pulkkinen <terop@src.gnome.org>1999-01-11 13:12:24 +0800
commitf598a336e314ff4609196307d7c1bea3e016c3b3 (patch)
tree1a6b02dc47c07085298fafae0f07e89202c832a3 /macros/compiler-flags.m4
parent3e1e7873f1d271423312e7e9f26ae8a4736b1f42 (diff)
downloadgsoc2013-evolution-f598a336e314ff4609196307d7c1bea3e016c3b3.tar
gsoc2013-evolution-f598a336e314ff4609196307d7c1bea3e016c3b3.tar.gz
gsoc2013-evolution-f598a336e314ff4609196307d7c1bea3e016c3b3.tar.bz2
gsoc2013-evolution-f598a336e314ff4609196307d7c1bea3e016c3b3.tar.lz
gsoc2013-evolution-f598a336e314ff4609196307d7c1bea3e016c3b3.tar.xz
gsoc2013-evolution-f598a336e314ff4609196307d7c1bea3e016c3b3.tar.zst
gsoc2013-evolution-f598a336e314ff4609196307d7c1bea3e016c3b3.zip
(This is a patch from Nix <nix@esperi.demon.co.uk>) Brought C++ language
(This is a patch from Nix <nix@esperi.demon.co.uk>) * compiler-flags.m4 (GNOME_CXX_WARNINGS): Brought C++ language compliance into line with C language compliance. Fixed typo (`C' for `C++'). (--enable-iso-cxx): New flag to *permit* -pedantic rather than requiring it. svn path=/trunk/; revision=592
Diffstat (limited to 'macros/compiler-flags.m4')
-rw-r--r--macros/compiler-flags.m414
1 files changed, 10 insertions, 4 deletions
diff --git a/macros/compiler-flags.m4 b/macros/compiler-flags.m4
index 07f85c1521..ae85b26f22 100644
--- a/macros/compiler-flags.m4
+++ b/macros/compiler-flags.m4
@@ -70,9 +70,14 @@ AC_DEFUN([GNOME_CXX_WARNINGS],[
fi
AC_MSG_RESULT($warnCXXFLAGS)
- AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
- complCFLAGS=
- if test "x$GCC" = "xyes"; then
+ AC_ARG_ENABLE(iso-cxx,
+ [ --enable-iso-cxx Try to warn if code is not ISO C++ ],,
+ enable_iso_cxx=no)
+
+ AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
+ complCXXFLAGS=
+ if test "x$enable_iso_cxx" != "xno"; then
+ if test "x$GCC" = "xyes"; then
case " $CXXFLAGS " in
*[\ \ ]-ansi[\ \ ]*) ;;
*) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
@@ -82,7 +87,8 @@ AC_DEFUN([GNOME_CXX_WARNINGS],[
*[\ \ ]-pedantic[\ \ ]*) ;;
*) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
esac
- fi
+ fi
+ fi
AC_MSG_RESULT($complCXXFLAGS)
CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
])