Skip to content

Commit

Permalink
Add InMon's sFlow Agent library to the build system.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
blp committed Dec 21, 2009
1 parent e4bfff8 commit c72e245
Show file tree
Hide file tree
Showing 10 changed files with 2,565 additions and 0 deletions.
4 changes: 4 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ Public License, version 2.
Files under the xenserver directory are licensed on a file-by-file
basis. Some files are under an uncertain license that may not be
DFSG-compliant or GPL-compatible. Refer to each file for details.

Files lib/sflow*.[ch] are licensed under the terms of the InMon sFlow
licence that is available at:
http://www.inmon.com/technology/sflowlicense.txt
10 changes: 10 additions & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------------------------------------------------------------------
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ OVS_ENABLE_OPTION([-Wold-style-definition])
OVS_ENABLE_OPTION([-Wmissing-prototypes])
OVS_ENABLE_OPTION([-Wmissing-field-initializers])
OVS_ENABLE_OPTION([-Wno-override-init])
OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])

AC_ARG_VAR(KARCH, [Kernel Architecture String])
AC_SUBST(KARCH)
Expand Down
13 changes: 13 additions & 0 deletions lib/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ nodist_lib_libopenvswitch_a_SOURCES = \
lib/dirs.c
CLEANFILES += $(nodist_lib_libopenvswitch_a_SOURCES)

noinst_LIBRARIES += lib/libsflow.a
lib_libsflow_a_SOURCES = \
lib/sflow_api.h \
lib/sflow.h \
lib/sflow_agent.c \
lib/sflow_sampler.c \
lib/sflow_poller.c \
lib/sflow_receiver.c
lib_libsflow_a_CFLAGS = $(AM_CFLAGS)
if HAVE_WNO_UNUSED
lib_libsflow_a_CFLAGS += -Wno-unused
endif

if HAVE_NETLINK
lib_libopenvswitch_a_SOURCES += \
lib/netlink-protocol.h \
Expand Down
Loading

0 comments on commit c72e245

Please sign in to comment.