Update media-service-upnp to version 0.3.0 ( ca17a69 )
[profile/ivi/media-service-upnp.git] / m4 / compiler-flags.m4
1 dnl
2 dnl media-service-upnp
3 dnl
4 dnl Copyright (C) 2012 Intel Corporation. All rights reserved.
5 dnl
6 dnl This program is free software; you can redistribute it and/or modify it
7 dnl under the terms and conditions of the GNU Lesser General Public License,
8 dnl version 2.1, as published by the Free Software Foundation.
9 dnl
10 dnl This program is distributed in the hope it will be useful, but WITHOUT
11 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
13 dnl for more details.
14 dnl
15 dnl You should have received a copy of the GNU Lesser General Public License
16 dnl along with this program; if not, write to the Free Software Foundation, Inc.,
17 dnl 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 dnl
19 dnl Ludovic Ferrandis <ludovic.ferrandis@intel.com>
20 dnl
21
22 AC_DEFUN_ONCE([MSU_COMPILER_FLAGS], [
23         if (test x"${CFLAGS}" = x""); then
24                 CFLAGS="-Wall"
25                 CFLAGS+=" -O2"
26                 CFLAGS+=" -D_FORTIFY_SOURCE=2"
27         fi
28
29         if (test x"$USE_MAINTAINER_MODE" = x"yes"); then
30                 CFLAGS+=" -Wextra"
31                 CFLAGS+=" -Wno-unused-parameter"
32                 CFLAGS+=" -Wno-missing-field-initializers"
33                 CFLAGS+=" -Wdeclaration-after-statement"
34                 CFLAGS+=" -Wmissing-declarations"
35                 CFLAGS+=" -Wredundant-decls"
36                 CFLAGS+=" -Wcast-align"
37
38                 CFLAGS+=" -Wstrict-prototypes"
39                 CFLAGS+=" -Wmissing-prototypes"
40                 CFLAGS+=" -Wnested-externs"
41                 CFLAGS+=" -Wshadow"
42                 CFLAGS+=" -Wformat=2"
43                 CFLAGS+=" -Winit-self"
44
45                 CFLAGS+=" -std=gnu99"
46                 CFLAGS+=" -pedantic"
47                 CFLAGS+=" -Wno-overlength-strings"
48
49                 CFLAGS+=" -DG_DISABLE_DEPRECATED"
50                 CFLAGS+=" -DGLIB_DISABLE_DEPRECATION_WARNINGS"
51         fi
52
53         CFLAGS+=" -Wno-format-extra-args"
54 ])