mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-09 00:32:33 -04:00
BUILD: makefile: search for Lua 5.5 as well
Support for Lua 5.5 was brought in 3.4-dev2 with commit 1c0f781994
("MINOR: hlua: Add support for lua 5.5") but the Makefile doesn't look
for it, which can be quite confusing on recent distros which start to
ship with it. Let's add it to the looked up names.
This commit is contained in:
parent
24455aa4e0
commit
bfbca23dc2
2 changed files with 6 additions and 6 deletions
6
INSTALL
6
INSTALL
|
|
@ -426,9 +426,9 @@ Lua is an embedded programming language supported by HAProxy to provide more
|
||||||
advanced scripting capabilities. Only versions 5.3 and above are supported.
|
advanced scripting capabilities. Only versions 5.3 and above are supported.
|
||||||
In order to enable Lua support, please specify "USE_LUA=1" on the command line.
|
In order to enable Lua support, please specify "USE_LUA=1" on the command line.
|
||||||
Some systems provide this library under various names to avoid conflicts with
|
Some systems provide this library under various names to avoid conflicts with
|
||||||
previous versions. By default, HAProxy looks for "lua5.4", "lua54", "lua5.3",
|
previous versions. By default, HAProxy looks for "lua5.5", "lua55", "lua5.4",
|
||||||
"lua53", "lua". If your system uses a different naming, you may need to set the
|
"lua54", "lua5.3", "lua53", "lua". If your system uses a different naming, you
|
||||||
library name in the "LUA_LIB_NAME" variable.
|
may need to set the library name in the "LUA_LIB_NAME" variable.
|
||||||
|
|
||||||
If Lua is not provided on your system, it can be very simply built locally. It
|
If Lua is not provided on your system, it can be very simply built locally. It
|
||||||
can be downloaded from https://www.lua.org/, extracted and built, for example :
|
can be downloaded from https://www.lua.org/, extracted and built, for example :
|
||||||
|
|
|
||||||
6
Makefile
6
Makefile
|
|
@ -124,7 +124,7 @@
|
||||||
# LUA_LIB : force the lib path to lua
|
# LUA_LIB : force the lib path to lua
|
||||||
# LUA_INC : force the include path to lua
|
# LUA_INC : force the include path to lua
|
||||||
# LUA_LIB_NAME : force the lib name (or automatically evaluated, by order of
|
# LUA_LIB_NAME : force the lib name (or automatically evaluated, by order of
|
||||||
# priority : lua5.4, lua54, lua5.3, lua53, lua).
|
# priority: lua5.5, lua55, lua5.4, lua54, lua5.3, lua53, lua).
|
||||||
# OT_DEBUG : compile the OpenTracing filter in debug mode
|
# OT_DEBUG : compile the OpenTracing filter in debug mode
|
||||||
# OT_INC : force the include path to libopentracing-c-wrapper
|
# OT_INC : force the include path to libopentracing-c-wrapper
|
||||||
# OT_LIB : force the lib path to libopentracing-c-wrapper
|
# OT_LIB : force the lib path to libopentracing-c-wrapper
|
||||||
|
|
@ -685,14 +685,14 @@ endif
|
||||||
|
|
||||||
ifneq ($(USE_LUA:0=),)
|
ifneq ($(USE_LUA:0=),)
|
||||||
check_lua_inc = $(shell if [ -d $(2)$(1) ]; then echo $(2)$(1); fi;)
|
check_lua_inc = $(shell if [ -d $(2)$(1) ]; then echo $(2)$(1); fi;)
|
||||||
LUA_INC := $(firstword $(foreach lib,lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"/usr/include/")))
|
LUA_INC := $(firstword $(foreach lib,lua5.5 lua55 lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_inc,$(lib),"/usr/include/")))
|
||||||
|
|
||||||
check_lua_lib = $(shell echo "int main(){}" | $(CC) -o /dev/null -x c - $(2) -l$(1) 2>/dev/null && echo $(1))
|
check_lua_lib = $(shell echo "int main(){}" | $(CC) -o /dev/null -x c - $(2) -l$(1) 2>/dev/null && echo $(1))
|
||||||
LUA_LD_FLAGS := -Wl,$(if $(EXPORT_SYMBOL),$(EXPORT_SYMBOL),--export-dynamic) $(if $(LUA_LIB),-L$(LUA_LIB))
|
LUA_LD_FLAGS := -Wl,$(if $(EXPORT_SYMBOL),$(EXPORT_SYMBOL),--export-dynamic) $(if $(LUA_LIB),-L$(LUA_LIB))
|
||||||
|
|
||||||
# Try to automatically detect the Lua library if not set
|
# Try to automatically detect the Lua library if not set
|
||||||
ifeq ($(LUA_LIB_NAME),)
|
ifeq ($(LUA_LIB_NAME),)
|
||||||
LUA_LIB_NAME := $(firstword $(foreach lib,lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_lib,$(lib),$(LUA_LD_FLAGS))))
|
LUA_LIB_NAME := $(firstword $(foreach lib,lua5.5 lua55 lua5.4 lua54 lua5.3 lua53 lua,$(call check_lua_lib,$(lib),$(LUA_LD_FLAGS))))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Lua lib name must be set now (forced/detected above)
|
# Lua lib name must be set now (forced/detected above)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue