From 07050a35f3cc4401e19761b2b5e84ad56a5067c8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 23 Dec 2010 23:53:28 -0500 Subject: [PATCH] Portability - Added preliminary enhancement to configure.ac (thanks to Sander Marechal), but this still needs work. --- AUTHORS | 2 +- configure.ac | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 399c59e04..65698326b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -35,6 +35,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Andraž 'ruskie' Levstik Irfan Siddiqui Itay Perl + Sander Marechal Thanks to the following, who submitted detailed bug reports and excellent suggestions: @@ -67,6 +68,5 @@ suggestions: Elizabeth Maxson Peter De Poorter Max Muller - Sander Marechal Thomas Sattler diff --git a/configure.ac b/configure.ac index 6ed9502e6..703ce996f 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,7 @@ AC_ARG_WITH([lua-lib], if test "x$with_lua" = "xyes" ; then AC_DEFINE([HAVE_LIBLUA], [1], [Defined if you have liblua]) + if test -n "$lua_inc"; then CFLAGS="$CFLAGS -I$lua_inc" CXXFLAGS="$CXXFLAGS -I$lua_inc" @@ -122,7 +123,27 @@ if test "x$with_lua" = "xyes" ; then LDFLAGS="$LDFLAGS -L$lua_lib" fi - AC_CHECK_LIB([lua],[main]) +# AC_CHECK_LIB([lua],[main]) + +# The following code should replace the one line above, but is not working. +# Anyone know why? + +# # check for lua. this is separate from the above libraries because it's +# # liblua50 on debian and liblua everywhere else. +# AC_CHECK_LIB(lua, lua_open, LIB_LUA="-llua") +# AC_CHECK_LIB(lualib, luaopen_base, LIB_LUA_LIB=-llualib, , [$LIB_LUA -ldl -lm]) +# +# if test "x${LIB_LUA}" = "x"; then +# echo "Could not find liblua. Please install liblua 5.1+" +# exit 1 +# fi +# +# if test "x${LIB_LUA_LIB}" = "x"; then +# echo "Could not find liblualib. Please install liblualib 5.1+" +# exit 1 +# fi +# +# LDFLAGS="$LDFLAGS $LIB_LUA $LIB_LUA_LIB" fi