Macro: peti_pedantic_gcc

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

# peti_pedantic_gcc

## Synopsis

`PETI_PEDANTIC_GCC`

## Version

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

## 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
        ])