Macro: peti_pedantic_gcc

Back to the Main Page. | # peti_pedantic_gcc | Download the M4 Source.

Synopsis

  `PETI_PEDANTIC_GCC`

Version

  1.1.1.1 (2001/07/26) Miscellaneous @ ac-archive-0.5.39

Author

  Peter Simons <simons@computer.org>

Description

  For development purposes, it is desirable to have autoconf automatically enable warnings when compiling C or C++ sources. In case the underlying compiler is a gcc, the appropriate flags are "-Wall -pedantic". This macro will add them to $CFLAGS and $CXXFLAGS if $CC is found to be a gcc.

M4 Source Code

      AC_DEFUN([PETI_PEDANTIC_GCC],
          [
          if test "$GCC" = yes; then
              CFLAGS="$CFLAGS -Wall -pedantic"
              CXXFLAGS="$CXXFLAGS -Wall -pedantic"
              fi
          ])