[rrd-developers] Checking for lua in the configure script
Fidelis Assis
fidelis at pobox.com
Tue Sep 29 20:10:23 CEST 2009
Hi Sebastian,
Sebastian Harl escreveu:
> I'm pretty sure, we'll find a solution ;-) In the worst case, I'd have
> to build-conflict with any other lua version to make sure /usr/bin/lua
> points to lua5.1 - that's quite ugly though and I'd have to touch the
> package any time a new version of lua has been uploaded, so I'd like to
> avoid that.
Please, check if this will do. It'll force lua5.1, if available, even if
/usr/bin/lua points elsewhere.
--- program-rev1919/configure.ac 2009-09-29 14:01:36.000000000 -0300
+++ program-rev1919-new/configure.ac 2009-09-29 14:58:35.000000000 -0300
@@ -659,7 +659,7 @@
AC_SUBST(COMP_RUBY)
dnl Check for Lua.
-AC_PATH_PROG(LUA, lua, no)
+AC_PATH_PROGS(LUA, lua5.1 lua, no)
AC_ARG_ENABLE(lua,AS_HELP_STRING([--disable-lua],[do not build the lua
modules]),
[],[enable_lua=yes])
@@ -737,10 +737,11 @@
lua_pkg_prefix=lua
fi
# try with dot, without dot and finally without version
+ lua_dirname=`dirname $LUA`
for f in $lua_pkg_prefix$lua_vdot $lua_pkg_prefix$lua_vndot
$lua_pkg_prefix; do
- lua_exec_prefix=`$PKGCONFIG --variable=prefix $f 2>/dev/null`
+ lua_pkg_prefix=`$PKGCONFIG --variable=prefix $f 2>/dev/null`
# same binaries?
- if test "$lua_exec_prefix/bin/lua" = "$LUA"; then
+ if test "$lua_pkg_prefix/bin" = "$lua_dirname"; then
# OK, found CFLAGS. Get Lua LFLAGS and modules install dir
LUA_CFLAGS=`$PKGCONFIG --cflags $f 2>/dev/null`
LUA_LFLAGS=`$PKGCONFIG --libs $f 2>/dev/null`
--
Fidelis
More information about the rrd-developers
mailing list