lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

my first and the only, for now, project using Lua is Lua plugin for
Claws Mail. I did develop it on FreeBSD with some hardwired paths for
Lua library location and similar, using Lua 5.2. I'd like to ask how to
make it portable for other platform, using other version of Lua if
desired, and avoid hardwired paths.

Currently, I have Makefile.am containing two targets with hardwired
items, namely

lua_la_LIBADD = $(cygwin_export_lib) \
	$(GTK_LIBS) \
	-L/usr/local/lib -llua-5.2

lua_la_CPPFLAGS = \
	-I$(top_srcdir)/src \
	-I$(top_builddir)/src/common \
	-I$(top_srcdir)/src/common \
	-I$(top_srcdir)/src/gtk \
	$(GLIB_CFLAGS) \
	$(GTK_CFLAGS) \
	$(ENCHANT_CFLAGS) \
	-I/usr/local/include/lua52

In global configure, I added --disable-lua-plugin and
--enable-lua-plugin options, but they are doing just this, allowing my
plugin to build, but I'd like to add there some logic (I am tempted to
write magic) to define $(LUA_LIBS) and $(LUA_CFLAGS) so I can use them
in Makefile.am instead of hardwired values.

I know it is not directly related to Lua itself, please accept my
apology, but I think here should be many doing some projects with
similar requirements.

Regards,
Milan