Commit 542aa8de authored by Youness Alaoui's avatar Youness Alaoui

correctly pass -Wall and -Werror dependending on whether we are in a release or not

parent 9c86aafb
ERROR_CFLAGS = \
-Wall \
-Werror \
$(NICE_CFLAGS) \
-Wextra \
-Wundef \
-Wnested-externs \
......
AC_PREREQ(2.59c)
dnl releases only do -Wall, cvs and prerelease does -Werror too
dnl use a three digit version number for releases, and four for cvs/prerelease
AC_INIT(nice, 0.0.1.1)
NICE_RELEASE="no"
AC_CONFIG_SRCDIR([agent/agent.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([-Wall])
......@@ -28,13 +33,14 @@ NICE_LIBVERSION=${NICE_CURRENT}:${NICE_REVISION}:${NICE_AGE}
NICE_LT_LDFLAGS="-version-info ${NICE_LIBVERSION}"
AC_SUBST(NICE_LT_LDFLAGS)
# Checks for programs.
AC_PROG_CC
dnl AC_PROG_CC_C99
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_LIBTOOL
# Checks for compiler features
AC_C_RESTRICT
......@@ -45,6 +51,15 @@ AC_DEFINE([_FORTIFY_SOURCE], [2], [Define to `2' to get GNU/libc warnings.])
AC_DEFINE([NICEAPI_EXPORT], [ ], [Public library function implementation])
AC_CHECK_HEADERS([arpa/inet.h net/in.h ifaddrs.h])
NICE_CFLAGS="-Wall"
dnl if asked for, add -Werror if supported
if test "x$NICE_RELEASE" != "xyes"; then
NICE_CFLAGS="$NICE_CFLAGS -Werror"
fi
AC_SUBST(NICE_CFLAGS)
AC_MSG_NOTICE([set NICE_CFLAGS to $NICE_CFLAGS])
# Checks for libraries.
AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"], [LIBRT=""])
AC_CHECK_FUNCS([poll])
......
......@@ -6,7 +6,7 @@
#
# Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
AM_CFLAGS = -Wall -Werror \
AM_CFLAGS = $(NICE_CFLAGS) \
$(GST_CFLAGS) \
-I $(top_srcdir) \
-I $(top_srcdir)/socket \
......
......@@ -8,7 +8,7 @@
#
include $(top_srcdir)/common.mk
AM_CFLAGS = -std=gnu99
AM_CFLAGS = -std=gnu99 $(ERROR_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)
bin_PROGRAMS = stunbdc stund
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment