File: ac_compile_warnings.m4

package info (click to toggle)
sagasu 2.0.10-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 1,532 kB
  • ctags: 1,064
  • sloc: ansic: 6,198; sh: 4,475; cpp: 1,831; makefile: 412; yacc: 316; perl: 144; sed: 16
file content (36 lines) | stat: -rw-r--r-- 956 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
dnl  AC_COMPILE_WARNINGS
dnl
dnl  Set the maximum warning verbosity according to compiler
dnl  used. Currently supports g++ and gcc. This macro must be put after
dnl  AC_PROG_CC and AC_PROG_CXX in configure.in
dnl
dnl  Author: Loic Dachary
dnl
dnl  Source:
dnl  http://www.gnu.org/software/ac-archive/htmldoc/ac_compile_warnings.html

AC_DEFUN([AC_COMPILE_WARNINGS],
[AC_MSG_CHECKING(maximum warning verbosity option)
if test -n "$CXX"
then
  if test "$GXX" = "yes"
  then
    ac_compile_warnings_opt='-Wall'
  fi
  CXXFLAGS="$CXXFLAGS $ac_compile_warnings_opt"
  ac_compile_warnings_msg="$ac_compile_warnings_opt for C++"
fi

if test -n "$CC"
then
  if test "$GCC" = "yes"
  then
    ac_compile_warnings_opt='-Wall'
  fi
  CFLAGS="$CFLAGS $ac_compile_warnings_opt"
  ac_compile_warnings_msg="$ac_compile_warnings_msg $ac_compile_warnings_opt for C"
fi
AC_MSG_RESULT($ac_compile_warnings_msg)
unset ac_compile_warnings_msg
unset ac_compile_warnings_opt
])