File: compiler-flags.m4

package info (click to toggle)
dleyna-core 0.6.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 316 kB
  • sloc: ansic: 1,707; makefile: 67; sh: 20
file content (56 lines) | stat: -rw-r--r-- 2,161 bytes parent folder | download | duplicates (2)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
dnl
dnl dLeyna
dnl
dnl Copyright (C) 2012-2017 Intel Corporation. All rights reserved.
dnl
dnl This program is free software; you can redistribute it and/or modify it
dnl under the terms and conditions of the GNU Lesser General Public License,
dnl version 2.1, as published by the Free Software Foundation.
dnl
dnl This program is distributed in the hope it will be useful, but WITHOUT
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
dnl for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public License
dnl along with this program; if not, write to the Free Software Foundation, Inc.,
dnl 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
dnl
dnl Ludovic Ferrandis <ludovic.ferrandis@intel.com>
dnl Regis Merlino <regis.merlino@intel.com>
dnl

AC_DEFUN_ONCE([DLEYNA_CORE_COMPILER_FLAGS], [
	if test x"${CFLAGS}" = x""; then
		CFLAGS="-Wall"
		AS_VAR_APPEND([CFLAGS], [" -O2"])
		AS_VAR_APPEND([CFLAGS], [" -D_FORTIFY_SOURCE=2"])
	fi

	if test x"$USE_MAINTAINER_MODE" = x"yes"; then
		AS_VAR_APPEND([CFLAGS], [" -Wextra"])
		AS_VAR_APPEND([CFLAGS], [" -Wno-unused-parameter"])
		AS_VAR_APPEND([CFLAGS], [" -Wno-missing-field-initializers"])
		AS_VAR_APPEND([CFLAGS], [" -Wdeclaration-after-statement"])
		AS_VAR_APPEND([CFLAGS], [" -Wmissing-declarations"])
		AS_VAR_APPEND([CFLAGS], [" -Wredundant-decls"])
		AS_VAR_APPEND([CFLAGS], [" -Wcast-align"])

		AS_VAR_APPEND([CFLAGS], [" -Wstrict-prototypes"])
		AS_VAR_APPEND([CFLAGS], [" -Wmissing-prototypes"])
		AS_VAR_APPEND([CFLAGS], [" -Wnested-externs"])
		AS_VAR_APPEND([CFLAGS], [" -Wshadow"])
		AS_VAR_APPEND([CFLAGS], [" -Wformat=2"])
		AS_VAR_APPEND([CFLAGS], [" -Winit-self"])

		AS_VAR_APPEND([CFLAGS], [" -std=gnu99"])
		AS_VAR_APPEND([CFLAGS], [" -pedantic"])
		AS_VAR_APPEND([CFLAGS], [" -Wno-overlength-strings"])

		AS_VAR_APPEND([CFLAGS], [" -DG_DISABLE_DEPRECATED"])
		AS_VAR_APPEND([CFLAGS], [" -DGLIB_DISABLE_DEPRECATION_WARNINGS"])
	fi

	AS_VAR_APPEND([CFLAGS], [" -Wno-format-extra-args"])
	AS_VAR_APPEND([CFLAGS], [" -Wl,--no-undefined"])
])