Skip to content

Commit

Permalink
configure: add configure option to disable building brcompat
Browse files Browse the repository at this point in the history
This adds ability to do:

  ./configure --disable-brcompat

to disable building userspace and kernel module associated with
providing linux bridge compatibility.  Sources should still be
distributed w/ make dist.

While there, update comment referring to long removed veth driver
which is now relevant for brcompat module.

Cc: Jesse Gross <[email protected]>
Signed-off-by: Chris Wright <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
Signed-off-by: Jesse Gross <[email protected]>
  • Loading branch information
chriswright authored and jessegross committed Mar 13, 2012
1 parent 1992531 commit d896575
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ OVS_CHECK_SOCKET_LIBS
OVS_CHECK_LINKER_SECTIONS
OVS_CHECK_XENSERVER_VERSION
OVS_CHECK_GROFF
OVS_CHECK_BRCOMPAT

OVS_ENABLE_OPTION([-Wall])
OVS_ENABLE_OPTION([-Wno-sign-compare])
Expand Down
2 changes: 1 addition & 1 deletion datapath/Modules.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Some modules should be built and distributed, e.g. openvswitch.
#
# Some modules should be distributed but not built, e.g. we do not build
# veth if the kernel in question already has it.
# brcompat if configured without it
#
# Some modules should be built but not distributed, e.g. third-party
# hwtable modules.
Expand Down
1 change: 1 addition & 0 deletions datapath/linux/Makefile.main.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export srcdir = @abs_srcdir@
export top_srcdir = @abs_top_srcdir@
export KSRC = @KBUILD@
export VERSION = @VERSION@
export BUILD_BRCOMPAT = @BUILD_BRCOMPAT@

include $(srcdir)/../Modules.mk
include $(srcdir)/Modules.mk
Expand Down
4 changes: 3 additions & 1 deletion datapath/linux/Modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ openvswitch_headers += \
linux/compat/include/net/netns/generic.h \
linux/compat/genetlink.inc

both_modules += brcompat
# always distribute brcompat source regardless of local build configuration
dist_modules += brcompat
build_modules += $(if $(BUILD_BRCOMPAT),brcompat)
brcompat_sources = linux/compat/genetlink-brcompat.c brcompat_main.c
brcompat_headers =
20 changes: 20 additions & 0 deletions m4/openvswitch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -354,3 +354,23 @@ AC_DEFUN([OVS_CHECK_GROFF],
ovs_cv_groff=no
fi])
AM_CONDITIONAL([HAVE_GROFF], [test "$ovs_cv_groff" = yes])])

dnl Checks for --disable-brcompat and undefines BUILD_BRCOMPAT if it is specified.
AC_DEFUN([OVS_CHECK_BRCOMPAT],
[AC_ARG_ENABLE(
[brcompat],
[AC_HELP_STRING([--disable-brcompat],
[Disable building brcompat])],
[case "${enableval}" in
(yes) brcompat=true ;;
(no) brcompat=false ;;
(*) AC_MSG_ERROR([bad value ${enableval} for --enable-brcompat]) ;;
esac],
[brcompat=true])
if test x$brcompat = xtrue; then
BUILD_BRCOMPAT=yes
else
BUILD_BRCOMPAT=""
fi
AC_SUBST([BUILD_BRCOMPAT])
AM_CONDITIONAL([BUILD_BRCOMPAT], [test x$brcompat = xtrue])])
9 changes: 6 additions & 3 deletions vswitchd/automake.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
sbin_PROGRAMS += vswitchd/ovs-vswitchd
man_MANS += \
vswitchd/ovs-vswitchd.8 \
vswitchd/ovs-brcompatd.8
man_MANS += vswitchd/ovs-vswitchd.8
if BUILD_BRCOMPAT
man_MANS += vswitchd/ovs-brcompatd.8
endif
DISTCLEANFILES += \
vswitchd/ovs-vswitchd.8 \
vswitchd/ovs-brcompatd.8
Expand All @@ -24,6 +25,7 @@ vswitchd_ovs_vswitchd_LDADD = \
EXTRA_DIST += vswitchd/INTERNALS
MAN_ROOTS += vswitchd/ovs-vswitchd.8.in

if BUILD_BRCOMPAT
if HAVE_NETLINK
sbin_PROGRAMS += vswitchd/ovs-brcompatd
vswitchd_ovs_brcompatd_SOURCES = \
Expand All @@ -33,6 +35,7 @@ vswitchd_ovs_brcompatd_SOURCES = \
vswitchd_ovs_brcompatd_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
endif
MAN_ROOTS += vswitchd/ovs-brcompatd.8.in
endif

# vswitch schema and IDL
OVSIDL_BUILT += \
Expand Down

0 comments on commit d896575

Please sign in to comment.