Jeff King <peff@xxxxxxxx> writes: > On Tue, Sep 25, 2012 at 03:21:10AM +0000, Robin H. Johnson wrote: > >> On Mon, Sep 24, 2012 at 08:25:12PM -0400, Jeff King wrote: >> > +ifdef USE_LUA >> > + BASIC_CFLAGS += -DUSE_LUA `pkg-config --cflags lua5.2` >> > + EXTLIBS += `pkg-config --libs lua5.2` >> > +endif >> Can you please hoist the packagename out to a variable? It's just plain >> "lua" on Gentoo. > > Yeah. I mentioned these patches were very rough, but I didn't go into > detail on all the bad points. That is definitely one of them. I have no > idea what the "normal" name is; my debian system sticks the version > number in to allow multiple concurrent versions. Yeah, there is no point nitpicking yet. Even the choice of lua is not all that interesting; embedding _any_ reasonable interpreter, and figuring out which operations and codepaths in us benefit most from such embedding, are of bigger interest at this early stage. How about doing this on top at the minimum? You can let pkg-config to tell you where -I<directory> and what -l<lib> is, or you can set it yourself. $ make USE_LUA=YesPlease \ LUA_INCLUDE_ARG=-I/usr/include/lua5.2 \ LUA_LINK_ARG=-llua5.2 or $ make USE_LUA=lua5.2 Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git i/Makefile w/Makefile index 620df89..90335ba 100644 --- i/Makefile +++ w/Makefile @@ -1898,8 +1898,14 @@ ifdef USE_NED_ALLOCATOR endif ifdef USE_LUA - BASIC_CFLAGS += -DUSE_LUA `pkg-config --cflags lua5.2` - EXTLIBS += `pkg-config --libs lua5.2` + # You can say + # $ make USE_LUA=YesPlease LUA_INCLUDE_ARG=-I/usr/include + # or + # $ make USE_LUA=lua5.2 + LUA_INCLUDE_ARG ?= $(shell pkg-config --cflags $(USE_LUA)) + LUA_LINK_ARG ?= $(shell pkg-config --libs $(USE_LUA)) + BASIC_CFLAGS += -DUSE_LUA $(LUA_INCLUDE_ARG) + EXTLIBS += $(LUA_LINK_ARG) endif ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html