From e6e871ac1c77e77a97fa5f66db56ed54111cc512 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 5 Jan 2015 17:13:52 +0100 Subject: [PATCH] build: move flags from Makefile.am to configure.ac MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move compile-time flags that are not platform-specific defines to configure.ac where they can be properly feature-detected. PR-URL: https://github.com/libuv/libuv/pull/24 Reviewed-By: Saúl Ibarra Corretgé --- Makefile.am | 3 ++- configure.ac | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 16a7da40..c5b8a1fa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,8 @@ libuv_la_SOURCES = src/fs-poll.c \ src/version.c if SUNOS +# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers +# on other platforms complain that the argument is unused during compilation. libuv_la_CFLAGS += -pthread endif @@ -81,7 +83,6 @@ else # WINNT include_HEADERS += include/uv-unix.h AM_CPPFLAGS += -I$(top_srcdir)/src/unix -libuv_la_CFLAGS += -g --std=gnu89 -pedantic -Wall -Wextra -Wno-unused-parameter libuv_la_SOURCES += src/unix/async.c \ src/unix/atomic-ops.h \ src/unix/core.c \ diff --git a/configure.ac b/configure.ac index fe2d6327..c9b2c41c 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,9 @@ AC_ENABLE_SHARED AC_ENABLE_STATIC AC_PROG_CC AM_PROG_CC_C_O +CC_CHECK_CFLAGS_APPEND([-g]) +CC_CHECK_CFLAGS_APPEND([-std=gnu89]) +CC_CHECK_CFLAGS_APPEND([-pedantic]) CC_CHECK_CFLAGS_APPEND([-Wall]) CC_CHECK_CFLAGS_APPEND([-Wextra]) CC_CHECK_CFLAGS_APPEND([-Wno-unused-parameter])