TS-1857: the Lua plugin is built whether Lua is found or not Autoconf 2.59 seems to have a bug where AS_IF constructs with multiple conditions are not emitted correctly. It only emits the first condition and the final else clause. Fortunately we can work around this by using a switch statement.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2651663d Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2651663d Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2651663d Branch: refs/heads/3.3.x Commit: 2651663d5040f76fe49da5c9ca3ae7884796090c Parents: ee13bf3 Author: James Peach <[email protected]> Authored: Mon Jun 3 14:51:41 2013 -0700 Committer: James Peach <[email protected]> Committed: Mon Jun 3 14:53:49 2013 -0700 ---------------------------------------------------------------------- CHANGES | 2 ++ configure.ac | 21 ++++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2651663d/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 57e90fd..d77bcbe 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changes with Apache Traffic Server 3.3.3 + *) [TS-1857] On CentOS the Lua plugin is built whether Lua is found or not. + *) [TS-1492] Prevent net-throttling from locking out the health checks from traffic_cop. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2651663d/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 0be2869..b2cf3ff 100644 --- a/configure.ac +++ b/configure.ac @@ -1258,14 +1258,13 @@ AC_ARG_ENABLE([luajit], [enable_luajit="${enableval}"], [enable_luajit=check] ) +AC_MSG_RESULT([$enable_luajit]) PKG_CHECK_MODULES([luajit], [luajit], [have_luajit=yes], [have_luajit=no]) CHECK_LUA([have_lua=yes], [have_lua=no]) -AS_IF([ test "x$enable_luajit" = "xno" ], [ - # LuaJIT disabled, just check for the regular Lua support. - enable_lua_support="${have_lua}" -], [test "x$enable_luajit" = "xyes"], [ +case $enable_luajit in +yes) # LuaJIT required. Fail if it's not available. AS_IF([ test "x${have_luajit}" = "xyes" ], [ LUA_CFLAGS="${luajit_CFLAGS}" @@ -1274,7 +1273,14 @@ AS_IF([ test "x$enable_luajit" = "xno" ], [ ], [ AC_MSG_ERROR([LuaJIT package not available]) ]) -], [ + ;; + +no) + # LuaJIT disabled, just check for the regular Lua support. + enable_lua_support="${have_lua}" + ;; + +*) # No user preference, prefer LuaJIT over standard Lua. AS_IF([ test "x${have_luajit}" = "xyes" ], [ LUA_CFLAGS="${luajit_CFLAGS}" @@ -1283,7 +1289,8 @@ AS_IF([ test "x$enable_luajit" = "xno" ], [ ], [ enable_lua_support="${have_lua}" ]) -]) + ;; +esac AC_SUBST(LUA_CFLAGS) AC_SUBST(LUA_LIBS) @@ -1296,7 +1303,7 @@ AC_MSG_RESULT([$enable_lua_support]) # http://luajit.org/install.html. case $host_os in darwin) - if test "x${have_luajit}" = "xyes"; then + if test "x${enable_lua_support}" = "xLuaJIT"; then LUA_LUAJIT_LDFLAGS="-Wl,-pagezero_size,10000 -Wl,-image_base,100000000" fi ;;
