diff options
author | Ethan Jackson <ethan@nicira.com> | 2012-10-16 18:16:16 -0700 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2012-10-17 13:10:02 -0700 |
commit | 3d7cab5fe02a7c7181d1479f3b41f4b6d3fa0264 (patch) | |
tree | 928b17e19b524242b07b94d9b29198829c1c7400 /m4 | |
parent | 2e22e1c732b826e4251a28b14143fcea170c89ed (diff) |
timeval: Optionally enable cached timing at configure time.
Often when developing, it would be convenient to force OVS to
either enable or disable cached timing so that a feature can be
tested under both strategies.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/openvswitch.m4 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index dc99cd04..74690115 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -46,6 +46,22 @@ AC_DEFUN([OVS_CHECK_NDEBUG], [ndebug=false]) AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])]) +dnl Checks for --enable-cache-time and defines CACHE_TIME if it is specified. +AC_DEFUN([OVS_CHECK_CACHE_TIME], + [AC_ARG_ENABLE( + [cache-time], + [AC_HELP_STRING([--enable-cache-time], + [Override time caching default (for testing only)])], + [case "${enableval}" in + (yes) cache_time=1;; + (no) cache_time=0;; + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-cache-time]) ;; + esac + AC_DEFINE_UNQUOTED([CACHE_TIME], [$cache_time], + [Define to 1 to enable time caching, to 0 to disable time caching, or + leave undefined to use the default (as one should + ordinarily do).])])]) + dnl Checks for ESX. AC_DEFUN([OVS_CHECK_ESX], [AC_CHECK_HEADER([vmware.h], |