Blame m4/compiler-flags.m4

Packit Service ce9802
dnl
Packit Service ce9802
dnl dLeyna
Packit Service ce9802
dnl
Packit Service ce9802
dnl Copyright (C) 2012-2015 Intel Corporation. All rights reserved.
Packit Service ce9802
dnl
Packit Service ce9802
dnl This program is free software; you can redistribute it and/or modify it
Packit Service ce9802
dnl under the terms and conditions of the GNU Lesser General Public License,
Packit Service ce9802
dnl version 2.1, as published by the Free Software Foundation.
Packit Service ce9802
dnl
Packit Service ce9802
dnl This program is distributed in the hope it will be useful, but WITHOUT
Packit Service ce9802
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Packit Service ce9802
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
Packit Service ce9802
dnl for more details.
Packit Service ce9802
dnl
Packit Service ce9802
dnl You should have received a copy of the GNU Lesser General Public License
Packit Service ce9802
dnl along with this program; if not, write to the Free Software Foundation, Inc.,
Packit Service ce9802
dnl 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
Packit Service ce9802
dnl
Packit Service ce9802
dnl Ludovic Ferrandis <ludovic.ferrandis@intel.com>
Packit Service ce9802
dnl Regis Merlino <regis.merlino@intel.com>
Packit Service ce9802
dnl
Packit Service ce9802
Packit Service ce9802
AC_DEFUN_ONCE([DLEYNA_SERVER_COMPILER_FLAGS], [
Packit Service ce9802
	if test x"${CFLAGS}" = x""; then
Packit Service ce9802
		CFLAGS="-Wall"
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -O2"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -D_FORTIFY_SOURCE=2"])
Packit Service ce9802
	fi
Packit Service ce9802
Packit Service ce9802
	if test x"$USE_MAINTAINER_MODE" = x"yes"; then
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wextra"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wno-unused-parameter"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wno-missing-field-initializers"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wdeclaration-after-statement"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wmissing-declarations"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wredundant-decls"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wcast-align"])
Packit Service ce9802
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wstrict-prototypes"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wmissing-prototypes"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wnested-externs"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wshadow"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wformat=2"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Winit-self"])
Packit Service ce9802
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -std=gnu99"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -pedantic"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -Wno-overlength-strings"])
Packit Service ce9802
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -DG_DISABLE_DEPRECATED"])
Packit Service ce9802
		AS_VAR_APPEND([CFLAGS], [" -DGLIB_DISABLE_DEPRECATION_WARNINGS"])
Packit Service ce9802
	fi
Packit Service ce9802
Packit Service ce9802
	AS_VAR_APPEND([CFLAGS], [" -Wno-format-extra-args"])
Packit Service ce9802
	AS_VAR_APPEND([CFLAGS], [" -Wl,--no-undefined"])
Packit Service ce9802
])