[ovs-dev] [PATCH 1/2] m4/openvswitch.m4: add OVS_ARG_ENABLE wrapper
Alexandru Ardelean
ardeleanalex at gmail.com
Sat Jan 9 18:49:43 UTC 2016
Adapted from:
https://github.com/vincentbernat/lldpd/blob/master/m4/args.m4
Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
---
m4/openvswitch.m4 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index 6d4e5da..70a6fdc 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -60,6 +60,19 @@ AC_DEFUN([OVS_CHECK_NDEBUG],
[ndebug=false])
AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])])
+dnl OVS_ARG_ENABLE(name, help1, default)
+AC_DEFUN([OVS_ARG_ENABLE],
+ [AC_ARG_ENABLE(
+ [$1],
+ [AS_HELP_STRING([--enable-$1],
+ [Enable $2 @<:@default=$3@:>@])],
+ [enable_$1=$enableval],
+ [enable_$1=$3])
+ AM_CONDITIONAL([ENABLE_]AS_TR_CPP([$1]), [test x"$enable_$1" = x"yes"])
+ if test x"$enable_$1" = x"yes"; then
+ AC_DEFINE([ENABLE_]AS_TR_CPP([$1]),1,[$2])
+ fi])
+
dnl Checks for ESX.
AC_DEFUN([OVS_CHECK_ESX],
[AC_CHECK_HEADER([vmware.h],
--
1.9.1
More information about the dev
mailing list