Repository: trafficserver Updated Branches: refs/heads/master 08f6e5e44 -> a292af956
TS-2885 Change LuaJIT to build statically, and add --disable-luajit Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a292af95 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a292af95 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a292af95 Branch: refs/heads/master Commit: a292af9564a907f701b0f78a775a4e0f1a141429 Parents: 08f6e5e Author: Leif Hedstrom <[email protected]> Authored: Thu Jun 12 09:59:45 2014 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Thu Jun 12 09:59:45 2014 -0600 ---------------------------------------------------------------------- CHANGES | 3 + configure.ac | 112 +++++++++++++++++++++------------- lib/Makefile.am | 5 +- plugins/Makefile.am | 6 ++ plugins/experimental/Makefile.am | 5 +- proxy/Makefile.am | 4 +- 6 files changed, 86 insertions(+), 49 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a292af95/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 9228160..57afcfb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.1.0 + *) [TS-2885] Change LuaJIT to build statically, and add --disable-luajit. This + is an option that will eventually be removed as we make LuaJIT mandatory. + *) [TS-2879] Remap errors and redirects should honor keep-alive *) [TS-2236] Remove trailing null in response body set by fabricate_with_old_api. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a292af95/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index db11f1d..f256650 100644 --- a/configure.ac +++ b/configure.ac @@ -486,6 +486,21 @@ AC_MSG_RESULT([$enable_cppapi]) AM_CONDITIONAL([ENABLE_CPPAPI], [ test "x${enable_cppapi}" = "xyes" ]) # +# Disable LuaJIT? This is a interrim option, when Lua becomes part of the core +# requirements, we will remove this option. +# +AC_MSG_CHECKING([whether to disable LuaJIT]) +AC_ARG_ENABLE([luajit], + [AS_HELP_STRING([--disable-luajit],[turn off LuaJIT])], + [], + [enable_luajit="yes"] +) +AC_MSG_RESULT([$enable_luajit]) +TS_ARG_ENABLE_VAR([use], [luajit]) +AC_SUBST(use_luajit) +AM_CONDITIONAL([ENABLE_LUAJIT], [ test "x${enable_luajit}" = "xyes" ]) + +# # Installation directories # For each var the following is evaluated # foo Standard variable eg. ${prefix}/foo @@ -1862,29 +1877,6 @@ AC_CONFIG_FILES([ iocore/net/Makefile iocore/utils/Makefile lib/Makefile - lib/atscppapi/Makefile - lib/atscppapi/examples/Makefile - lib/atscppapi/examples/async_http_fetch/Makefile - lib/atscppapi/examples/async_timer/Makefile - lib/atscppapi/examples/clientredirect/Makefile - lib/atscppapi/examples/clientrequest/Makefile - lib/atscppapi/examples/customresponse/Makefile - lib/atscppapi/examples/boom/Makefile - lib/atscppapi/examples/globalhook/Makefile - lib/atscppapi/examples/gzip_transformation/Makefile - lib/atscppapi/examples/helloworld/Makefile - lib/atscppapi/examples/intercept/Makefile - lib/atscppapi/examples/internal_transaction_handling/Makefile - lib/atscppapi/examples/logger_example/Makefile - lib/atscppapi/examples/multiple_transaction_hooks/Makefile - lib/atscppapi/examples/null_transformation_plugin/Makefile - lib/atscppapi/examples/post_buffer/Makefile - lib/atscppapi/examples/remap_plugin/Makefile - lib/atscppapi/examples/serverresponse/Makefile - lib/atscppapi/examples/stat_example/Makefile - lib/atscppapi/examples/timeout_example/Makefile - lib/atscppapi/examples/transactionhook/Makefile - lib/atscppapi/src/Makefile lib/perl/Makefile lib/perl/lib/Apache/TS.pm lib/records/Makefile @@ -1909,27 +1901,6 @@ AC_CONFIG_FILES([ plugins/regex_remap/Makefile plugins/stats_over_http/Makefile plugins/tcpinfo/Makefile - plugins/experimental/Makefile - plugins/experimental/authproxy/Makefile - plugins/experimental/background_fetch/Makefile - plugins/experimental/balancer/Makefile - plugins/experimental/buffer_upload/Makefile - plugins/experimental/channel_stats/Makefile - plugins/experimental/collapsed_connection/Makefile - plugins/experimental/custom_redirect/Makefile - plugins/experimental/escalate/Makefile - plugins/experimental/esi/Makefile - plugins/experimental/geoip_acl/Makefile - plugins/experimental/healthchecks/Makefile - plugins/experimental/hipes/Makefile - plugins/experimental/metalink/Makefile - plugins/experimental/remap_stats/Makefile - plugins/experimental/regex_revalidate/Makefile - plugins/experimental/s3_auth/Makefile - plugins/experimental/stale_while_revalidate/Makefile - plugins/experimental/ts_lua/Makefile - plugins/experimental/url_sig/Makefile - plugins/experimental/xdebug/Makefile proxy/Makefile proxy/api/ts/Makefile proxy/config/Makefile @@ -1953,6 +1924,59 @@ AC_CONFIG_FILES([ tools/tsxs ]) +AS_IF([test "x$enable_experimental_plugins" = xyes], [ + AC_CONFIG_FILES([ + plugins/experimental/Makefile + plugins/experimental/authproxy/Makefile + plugins/experimental/background_fetch/Makefile + plugins/experimental/balancer/Makefile + plugins/experimental/buffer_upload/Makefile + plugins/experimental/channel_stats/Makefile + plugins/experimental/collapsed_connection/Makefile + plugins/experimental/custom_redirect/Makefile + plugins/experimental/escalate/Makefile + plugins/experimental/esi/Makefile + plugins/experimental/geoip_acl/Makefile + plugins/experimental/healthchecks/Makefile + plugins/experimental/hipes/Makefile + plugins/experimental/metalink/Makefile + plugins/experimental/remap_stats/Makefile + plugins/experimental/regex_revalidate/Makefile + plugins/experimental/s3_auth/Makefile + plugins/experimental/stale_while_revalidate/Makefile + plugins/experimental/ts_lua/Makefile + plugins/experimental/url_sig/Makefile + plugins/experimental/xdebug/Makefile +])]) + +AS_IF([test "x$enable_cppapi" = xyes], [ + AC_CONFIG_FILES([ + lib/atscppapi/Makefile + lib/atscppapi/examples/Makefile + lib/atscppapi/examples/async_http_fetch/Makefile + lib/atscppapi/examples/async_timer/Makefile + lib/atscppapi/examples/clientredirect/Makefile + lib/atscppapi/examples/clientrequest/Makefile + lib/atscppapi/examples/customresponse/Makefile + lib/atscppapi/examples/boom/Makefile + lib/atscppapi/examples/globalhook/Makefile + lib/atscppapi/examples/gzip_transformation/Makefile + lib/atscppapi/examples/helloworld/Makefile + lib/atscppapi/examples/intercept/Makefile + lib/atscppapi/examples/internal_transaction_handling/Makefile + lib/atscppapi/examples/logger_example/Makefile + lib/atscppapi/examples/multiple_transaction_hooks/Makefile + lib/atscppapi/examples/null_transformation_plugin/Makefile + lib/atscppapi/examples/post_buffer/Makefile + lib/atscppapi/examples/remap_plugin/Makefile + lib/atscppapi/examples/serverresponse/Makefile + lib/atscppapi/examples/stat_example/Makefile + lib/atscppapi/examples/timeout_example/Makefile + lib/atscppapi/examples/transactionhook/Makefile + lib/atscppapi/src/Makefile +])]) + + # ----------------------------------------------------------------------------- # 7. autoheader TEMPLATES http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a292af95/lib/Makefile.am ---------------------------------------------------------------------- diff --git a/lib/Makefile.am b/lib/Makefile.am index cf45bd6..48da294 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -39,14 +39,17 @@ endif # Note: The LUA_LDFLAGS is a bit of a hack, since LuaJIT on OmniOS needs # the -m64 flag. See configure.ac. # +if ENABLE_LUAJIT LUA_CFLAGS=$(CFLAGS) -DLUA_COMPAT_ALL -DLUA_USE_POSIX -DLUA_USE_DLOPEN all-local: @echo "Making all in luajit" test -d "$(top_srcdir)/$(subdir)/luajit/src" || (cd "$(top_srcdir)" && git submodule update --init) test -d "$(top_builddir)/$(subdir)/luajit/src" || cp -rf "$(srcdir)/luajit" "$(top_builddir)/$(subdir)/" - cd luajit && $(MAKE) $(AM_MAKEFLAGS) PREFIX="$(prefix)" CC="$(CC)" CFLAGS="$(LUA_CFLAGS)" LDFLAGS="@LUA_LDFLAGS@" + cd luajit && $(MAKE) $(AM_MAKEFLAGS) BUILDMODE="static" PREFIX="$(prefix)" CC="$(CC)" \ + CFLAGS="$(LUA_CFLAGS)" LDFLAGS="@LUA_LDFLAGS@" clean-local: test "$(top_srcdir)" != "$(top_builddir)" || (cd "$(top_builddir)/$(subdir)/luajit" && make clean) test "$(top_srcdir)" = "$(top_builddir)" || rm -rf "$(top_builddir)/$(subdir)/luajit" +endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a292af95/plugins/Makefile.am ---------------------------------------------------------------------- diff --git a/plugins/Makefile.am b/plugins/Makefile.am index a810f8a..07da928 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -26,3 +26,9 @@ SUBDIRS = \ stats_over_http \ tcpinfo \ experimental + +if BUILD_EXPERIMENTAL_PLUGINS + +SUBDIRS += experimental + +endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a292af95/plugins/experimental/Makefile.am ---------------------------------------------------------------------- diff --git a/plugins/experimental/Makefile.am b/plugins/experimental/Makefile.am index 05ca267..249c435 100644 --- a/plugins/experimental/Makefile.am +++ b/plugins/experimental/Makefile.am @@ -14,8 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -if BUILD_EXPERIMENTAL_PLUGINS - SUBDIRS = \ authproxy \ background_fetch \ @@ -34,8 +32,9 @@ SUBDIRS = \ remap_stats \ s3_auth \ stale_while_revalidate \ - ts_lua \ url_sig \ xdebug +if ENABLE_LUAJIT + SUBDIRS += ts_lua endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a292af95/proxy/Makefile.am ---------------------------------------------------------------------- diff --git a/proxy/Makefile.am b/proxy/Makefile.am index e40c8e9..f714fbf 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -217,7 +217,6 @@ traffic_server_LDADD = \ $(top_builddir)/lib/records/librecprocess.a \ $(top_builddir)/iocore/eventsystem/libinkevent.a \ $(which_libts) \ - $(LUAJIT:%=$(top_builddir)/lib/luajit/src/%) \ @HWLOC_LIBS@ \ @LIBPCRE@ \ @OPENSSL_LIBS@ \ @@ -232,6 +231,9 @@ traffic_server_LDADD = \ @SPDYLAY_LIBS@ \ -lm +if ENABLE_LUAJIT + traffic_server_LDADD += $(LUAJIT:%=$(top_builddir)/lib/luajit/src/%) +endif # On Darwin LuaJIT requires magic link options, otherwise it will crash in luaL_openlibs() at startup. See # http://luajit.org/install.html.
