From f598a336e314ff4609196307d7c1bea3e016c3b3 Mon Sep 17 00:00:00 2001 From: Tero Pulkkinen Date: Mon, 11 Jan 1999 05:12:24 +0000 Subject: (This is a patch from Nix ) Brought C++ language (This is a patch from Nix ) * 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 --- macros/compiler-flags.m4 | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'macros') 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" ]) -- cgit v1.2.3