summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTero Pulkkinen <terop@src.gnome.org>1999-01-11 05:12:24 +0000
committerTero Pulkkinen <terop@src.gnome.org>1999-01-11 05:12:24 +0000
commit415bc22e1bb9c78aef40f3410a210c3566df199e (patch)
tree48bb2e4827e3da520521b867da5a8b9b4783cc93
parentf04f097e60a940f995212c0e09999eec06381b9d (diff)
downloadgnome-common-415bc22e1bb9c78aef40f3410a210c3566df199e.tar.gz
(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=571
-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 07f85c1..ae85b26 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"
])