File: ax_arg_enable_warnings.m4

package info (click to toggle)
ircd-hybrid 1%3A8.2.24%2Bdfsg.1-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,292 kB
  • sloc: ansic: 33,546; sh: 4,614; yacc: 2,508; makefile: 621; lex: 477; cpp: 42
file content (32 lines) | stat: -rw-r--r-- 1,464 bytes parent folder | download
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
AC_DEFUN([AX_ARG_ENABLE_WARNINGS],[
  AC_ARG_ENABLE([warnings],[AS_HELP_STRING([--enable-warnings],[Enable compiler warnings.])],[warnings="$enableval"],[warnings="no"])

  AS_IF([test "$warnings" = "yes"], [
    AX_APPEND_COMPILE_FLAGS([-Wall])
    AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast])
    AX_APPEND_COMPILE_FLAGS([-Wcast-align])
    AX_APPEND_COMPILE_FLAGS([-Wcast-qual])
    AX_APPEND_COMPILE_FLAGS([-Wclobbered])
    AX_APPEND_COMPILE_FLAGS([-Wduplicated-cond])
    AX_APPEND_COMPILE_FLAGS([-Wempty-body])
    AX_APPEND_COMPILE_FLAGS([-Wignored-qualifiers])
    AX_APPEND_COMPILE_FLAGS([-Wlogical-op])
    AX_APPEND_COMPILE_FLAGS([-Wmissing-declarations])
    AX_APPEND_COMPILE_FLAGS([-Wmissing-field-initializers])
    AX_APPEND_COMPILE_FLAGS([-Wmissing-include-dirs])
    AX_APPEND_COMPILE_FLAGS([-Wmissing-parameter-type])
    AX_APPEND_COMPILE_FLAGS([-Wmissing-prototypes])
    AX_APPEND_COMPILE_FLAGS([-Wnested-externs])
    AX_APPEND_COMPILE_FLAGS([-Wold-style-declaration])
    AX_APPEND_COMPILE_FLAGS([-Woverride-init])
    AX_APPEND_COMPILE_FLAGS([-Wpointer-arith])
    AX_APPEND_COMPILE_FLAGS([-Wredundant-decls])
    AX_APPEND_COMPILE_FLAGS([-Wshadow])
    AX_APPEND_COMPILE_FLAGS([-Wshift-negative-value])
    AX_APPEND_COMPILE_FLAGS([-Wsign-compare])
    AX_APPEND_COMPILE_FLAGS([-Wtype-limits])
    AX_APPEND_COMPILE_FLAGS([-Wundef])
    AX_APPEND_COMPILE_FLAGS([-Wuninitialized])
    AX_APPEND_COMPILE_FLAGS([-Wwrite-strings])
  ])
])