From: Francesco M. <fr...@us...> - 2008-01-15 19:45:31
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21790/build/autoconf Modified Files: configure.ac Log Message: rename lua_dir to lua_prefix to avoid conflicts with LUA_DIR; remove brackets in AC_SUBST as we don't use them anywhere in AC_SUBST; always set the LUA_*_DIR variables as leaving them empty gives problems; set them to reasonable values at least for Ubuntu systems Index: configure.ac =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** configure.ac 15 Jan 2008 18:37:27 -0000 1.64 --- configure.ac 15 Jan 2008 19:45:27 -0000 1.65 *************** *** 94,98 **** AC_ARG_WITH([lua-prefix], [AC_HELP_STRING([--with-lua-prefix], [Prefix where Lua is installed (optional)])], ! [lua_dir="$withval"], [lua_dir=""]) AC_ARG_WITH([wxstedit-prefix], --- 94,98 ---- AC_ARG_WITH([lua-prefix], [AC_HELP_STRING([--with-lua-prefix], [Prefix where Lua is installed (optional)])], ! [lua_prefix="$withval"], [lua_prefix=""]) AC_ARG_WITH([wxstedit-prefix], *************** *** 126,134 **** AC_MSG_CHECKING([for the --with-lua-prefix option]) ! if test ! $lua_dir = ""; then # user explicitely provided a path to its own lua, check that it's an absolute path # (or it won't work for out-of-tree builds) ! case $lua_dir in /*) continue;; *) --- 126,134 ---- AC_MSG_CHECKING([for the --with-lua-prefix option]) ! if test ! $lua_prefix = ""; then # user explicitely provided a path to its own lua, check that it's an absolute path # (or it won't work for out-of-tree builds) ! case $lua_prefix in /*) continue;; *) *************** *** 138,142 **** esac fi ! AC_MSG_RESULT([$lua_dir]) AC_MSG_CHECKING([for the --with-wxstedit-prefix option]) --- 138,142 ---- esac fi ! AC_MSG_RESULT([$lua_prefix]) AC_MSG_CHECKING([for the --with-wxstedit-prefix option]) *************** *** 207,215 **** # exist then we use our built-in lua - AC_MSG_CHECKING([if Lua 5.1 is installed]) USE_SYSTEM_LUA=0 if test ! "$enable_systemlua" = "no"; then UTILS_SAVE_COREVAR() --- 207,226 ---- # exist then we use our built-in lua USE_SYSTEM_LUA=0 + LUA_INCLUDE_DIR="." # leaving these vars empty would give problems + LUA_LIB_DIR="." + if test ! "$enable_systemlua" = "no"; then + # the default prefix is /usr + if test "$lua_prefix" = ""; then + lua_prefix="/usr" + fi + + # default include folder for lua 5.1 seems to be $lua_prefix/include/lua5.1 + LUA_INCLUDE_DIR="$lua_prefix/include/lua5.1" + LUA_LIB_DIR="$lua_prefix/lib" + UTILS_SAVE_COREVAR() *************** *** 217,225 **** CPPFLAGS="-x c $CPPFLAGS" ! # use their Lua path --with-lua-prefix=$lua_dir ! if test ! "$lua_dir" = ""; then ! CPPFLAGS="-I$lua_dir $CPPFLAGS" ! fi ! LIBS="$LIBS -llua5.1" AC_LINK_IFELSE([ AC_LANG_PROGRAM([#include <lua.h>], --- 228,236 ---- CPPFLAGS="-x c $CPPFLAGS" ! # use the Lua path given by the user through --with-lua-prefix option ! CPPFLAGS="-I$LUA_INCLUDE_DIR $CPPFLAGS" ! LDFLAGS="-L$LUA_LIB_DIR $LDFLAGS" ! LIBS="-llua5.1 $LIBS" ! AC_LINK_IFELSE([ AC_LANG_PROGRAM([#include <lua.h>], *************** *** 232,245 **** # from other macros called by AC_LINK_IFELSE may interfere # in the final output if test "$LUA_PRESENCE" = "1"; then AC_MSG_RESULT([yes, using system Lua]) USE_SYSTEM_LUA=1 - if test ! $lua_dir = ""; then - LUA_INCLUDE_DIR=$lua_dir - # We don't know where the system LUA_LIB_DIR is, just duplicate our lib path - LUA_LIB_DIR="`pwd`/lib" - echo " Lua include path: '$LUA_INCLUDE_DIR'" - fi - else AC_MSG_RESULT([not found, falling back to the built-in lua]) --- 243,251 ---- # from other macros called by AC_LINK_IFELSE may interfere # in the final output + AC_MSG_CHECKING([if Lua 5.1 is installed]) + if test "$LUA_PRESENCE" = "1"; then AC_MSG_RESULT([yes, using system Lua]) USE_SYSTEM_LUA=1 else AC_MSG_RESULT([not found, falling back to the built-in lua]) *************** *** 249,264 **** You specified --enable-systemlua=yes, but it is not useable. See config.log. ]) - fi fi UTILS_RESTORE_COREVAR() # restore $CPPFLAGS and $LIBS - else AC_MSG_RESULT([using built-in Lua --enable-systemlua=no]) fi ! AC_SUBST([LUA_INCLUDE_DIR]) ! AC_SUBST([LUA_LIB_DIR]) if test "$USE_SYSTEM_LUA" = "0"; then --- 255,268 ---- You specified --enable-systemlua=yes, but it is not useable. See config.log. ]) fi fi UTILS_RESTORE_COREVAR() # restore $CPPFLAGS and $LIBS else AC_MSG_RESULT([using built-in Lua --enable-systemlua=no]) fi ! AC_SUBST(LUA_INCLUDE_DIR) ! AC_SUBST(LUA_LIB_DIR) if test "$USE_SYSTEM_LUA" = "0"; then *************** *** 756,760 **** if test "$USE_SYSTEM_LUA" = "1"; then ! echo " - Using SYSTEM lua library (prefix is '$lua_dir')" else echo " - Using BUILT-IN lua library" --- 760,764 ---- if test "$USE_SYSTEM_LUA" = "1"; then ! echo " - Using SYSTEM lua library (prefix is '$lua_prefix')" else echo " - Using BUILT-IN lua library" |