[PATCH] cgit.mk: do not rely on pkg-config

Jason A. Donenfeld Jason at zx2c4.com
Sat Jan 18 00:51:19 CET 2014


If pkg-config is not installed, but Lua vanilla is forced, then we might
be able to get away with just padding "-llua". Unlike LuaJIT, headers
are normally installed to /usr/include, and the libs are usually
installed to /usr/lib and the headers to /usr/include, so we let the
compiler eventually have success or error out.

Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
---
What do you guys think of doing this? Some people don't have
pkg-config... or something? Not sure if this is the best approach but...

 cgit.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cgit.mk b/cgit.mk
index 056c3f9..78627aa 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -42,7 +42,8 @@ ifeq (JIT,$(LUA_IMPLEMENTATION))
 	CGIT_CFLAGS += $(LUAJIT_CFLAGS)
 else ifeq (VANILLA,$(LUA_IMPLEMENTATION))
 	ifeq ($(strip $(LUA_LIBS)),)
- 		$(error Lua specified via LUA_IMPLEMENTATION=VANILLA, but library could not be found.)
+ 		$(warning Lua specified via LUA_IMPLEMENTATION=VANILLA, but pkg-config failed to find it. Forcing -llua.)
+		LUA_LIBS := -llua
 	endif
 	LUA_MESSAGE := linking with selected Lua
 	CGIT_LIBS += $(LUA_LIBS)
-- 
1.8.5.2



More information about the CGit mailing list