From c72e245a0e2c979f4c14279b56183e2200905c6c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 20 Nov 2009 09:45:26 -0800 Subject: Add InMon's sFlow Agent library to the build system. The C source and header files added in this commit is covered under the InMon sFlow license at http://www.inmon.com/technology/sflowlicense.txt The library requires -Wno-unused to compile without warnings, so this commit adds that for building the sFlow code only. Automake can only change compiler flags on a per-library or per-program basis, so sFlow is built as a separate library. The library will be used in upcoming commits. --- acinclude.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index e37a316df..e074c7d47 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -235,4 +235,14 @@ dnl Example: OVS_ENABLE_OPTION([-Wdeclaration-after-statement]) AC_DEFUN([OVS_ENABLE_OPTION], [OVS_CHECK_CC_OPTION([$1], [WARNING_FLAGS="$WARNING_FLAGS $1"]) AC_SUBST([WARNING_FLAGS])]) + +dnl OVS_CONDITIONAL_CC_OPTION([OPTION], [CONDITIONAL]) +dnl Check whether the given C compiler OPTION is accepted. +dnl If so, enable the given Automake CONDITIONAL. + +dnl Example: OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED]) +AC_DEFUN([OVS_CONDITIONAL_CC_OPTION], + [OVS_CHECK_CC_OPTION( + [$1], [ovs_have_cc_option=yes], [ovs_have_cc_option=no]) + AM_CONDITIONAL([$2], [test $ovs_have_cc_option = yes])]) dnl ---------------------------------------------------------------------- -- cgit v1.2.1 From 5819a7cdcf44f0277c538353672fb27701c764f9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 25 Jan 2010 10:32:39 -0800 Subject: configure: Silence check for broken strtok_r(). The check for strtok_r() prints a line of text on stdout as part of its run. This is noticeable when running "configure", especially with -q. This commit fixes it. (The apparent alternative of not printing anything at all seems like a bad idea because this might encourage the compiler to completely optimize everything out of main().) --- acinclude.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index e074c7d47..a254c2328 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,6 +1,6 @@ # -*- autoconf -*- -# Copyright (c) 2008, 2009 Nicira Networks. +# Copyright (c) 2008, 2009, 2010 Nicira Networks. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -191,6 +191,7 @@ AC_DEFUN([OVS_CHECK_STRTOK_R], char *token1, *token2; token1 = strtok_r(string, ":", &save_ptr); token2 = strtok_r(NULL, ":", &save_ptr); + freopen ("/dev/null", "w", stdout); printf ("%s %s\n", token1, token2); return 0; ]])], -- cgit v1.2.1