TS-2431: Add autoconf options for SPDY *) Add '--enable-spdy' opton. *) Add 'TS_HAS_SPDY' macro. *) Conditional checking spdylay library.
Signed-off-by: Yunkai Zhang <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f1a005e8 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f1a005e8 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f1a005e8 Branch: refs/heads/lua_config Commit: f1a005e8c882d716c39475079614530b9abc8de4 Parents: 89c7dae Author: Yunkai Zhang <[email protected]> Authored: Mon Dec 30 22:41:06 2013 +0800 Committer: Yunkai Zhang <[email protected]> Committed: Fri Mar 21 01:29:16 2014 +0800 ---------------------------------------------------------------------- configure.ac | 19 +++++++++++++++++++ lib/ts/ink_config.h.in | 1 + 2 files changed, 20 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f1a005e8/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 75ec359..f87674d 100644 --- a/configure.ac +++ b/configure.ac @@ -381,6 +381,20 @@ fi TS_ARG_ENABLE_VAR([use], [reclaimable_freelist]) AC_SUBST(use_reclaimable_freelist) +# +# Options for SPDY +# +AC_MSG_CHECKING([whether to enable spdy]) +AC_ARG_ENABLE([spdy], + [AS_HELP_STRING([--enable-spdy], [turn on spdy protocol])], + [], + [enable_spdy="no"]) +AC_MSG_RESULT([$enable_spdy]) +TS_ARG_ENABLE_VAR([has], [spdy]) +AC_SUBST(has_spdy) +AM_CONDITIONAL([BUILD_SPDY], [test 0 -ne $has_spdy]) + +# # Configure how many stats to allocate for plugins. Default is 512. # AC_ARG_WITH([max-api-stats], @@ -1468,6 +1482,11 @@ AC_SUBST(LUA_LUAJIT_LDFLAGS) # We should be able to build http_load if epoll(2) is available. AM_CONDITIONAL([BUILD_HTTP_LOAD], [test x"$ac_cv_func_epoll_ctl" = x"yes"]) +# Check for spdylay library +if test "x${enable_spdy}" = "xyes"; then + PKG_CHECK_MODULES([SPDYLAY],[libspdylay]) +fi + # ----------------------------------------------------------------------------- # 5. CHECK FOR HEADER FILES http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f1a005e8/lib/ts/ink_config.h.in ---------------------------------------------------------------------- diff --git a/lib/ts/ink_config.h.in b/lib/ts/ink_config.h.in index 44e4df3..9d88417 100644 --- a/lib/ts/ink_config.h.in +++ b/lib/ts/ink_config.h.in @@ -61,6 +61,7 @@ #define TS_USE_POSIX_CAP @use_posix_cap@ #define TS_USE_TPROXY @use_tproxy@ #define TS_HAS_SO_MARK @has_so_mark@ +#define TS_HAS_SPDY @has_spdy@ #define TS_HAS_IP_TOS @has_ip_tos@ #define TS_USE_HWLOC @use_hwloc@ #define TS_USE_FREELIST @use_freelist@
