From: Francesco M. <fr...@us...> - 2008-01-15 19:45:31
|
Update of /cvsroot/wxlua/wxLua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21790 Modified Files: configure 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 =================================================================== RCS file: /cvsroot/wxlua/wxLua/configure,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** configure 15 Jan 2008 18:37:26 -0000 1.75 --- configure 15 Jan 2008 19:45:27 -0000 1.76 *************** *** 2452,2458 **** # Check whether --with-lua-prefix was given. if test "${with_lua_prefix+set}" = set; then ! withval=$with_lua_prefix; lua_dir="$withval" else ! lua_dir="" fi --- 2452,2458 ---- # Check whether --with-lua-prefix was given. if test "${with_lua_prefix+set}" = set; then ! withval=$with_lua_prefix; lua_prefix="$withval" else ! lua_prefix="" fi *************** *** 2794,2802 **** { echo "$as_me:$LINENO: checking for the --with-lua-prefix option" >&5 echo $ECHO_N "checking for the --with-lua-prefix option... $ECHO_C" >&6; } ! 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;; *) --- 2794,2802 ---- { echo "$as_me:$LINENO: checking for the --with-lua-prefix option" >&5 echo $ECHO_N "checking for the --with-lua-prefix option... $ECHO_C" >&6; } ! 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;; *) *************** *** 2810,2815 **** esac fi ! { echo "$as_me:$LINENO: result: $lua_dir" >&5 ! echo "${ECHO_T}$lua_dir" >&6; } { echo "$as_me:$LINENO: checking for the --with-wxstedit-prefix option" >&5 --- 2810,2815 ---- esac fi ! { echo "$as_me:$LINENO: result: $lua_prefix" >&5 ! echo "${ECHO_T}$lua_prefix" >&6; } { echo "$as_me:$LINENO: checking for the --with-wxstedit-prefix option" >&5 *************** *** 4809,4818 **** # exist then we use our built-in lua - { echo "$as_me:$LINENO: checking if Lua 5.1 is installed" >&5 - echo $ECHO_N "checking if Lua 5.1 is installed... $ECHO_C" >&6; } USE_SYSTEM_LUA=0 if test ! "$enable_systemlua" = "no"; then SAVED_CPPFLAGS="$CPPFLAGS" --- 4809,4828 ---- # 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" + SAVED_CPPFLAGS="$CPPFLAGS" *************** *** 4825,4833 **** 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" cat >conftest.$ac_ext <<_ACEOF --- 4835,4843 ---- 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" ! cat >conftest.$ac_ext <<_ACEOF *************** *** 4881,4895 **** # from other macros called by AC_LINK_IFELSE may interfere # in the final output if test "$LUA_PRESENCE" = "1"; then { echo "$as_me:$LINENO: result: yes, using system Lua" >&5 echo "${ECHO_T}yes, using system Lua" >&6; } 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 { echo "$as_me:$LINENO: result: not found, falling back to the built-in lua" >&5 --- 4891,4901 ---- # from other macros called by AC_LINK_IFELSE may interfere # in the final output + { echo "$as_me:$LINENO: checking if Lua 5.1 is installed" >&5 + echo $ECHO_N "checking if Lua 5.1 is installed... $ECHO_C" >&6; } + if test "$LUA_PRESENCE" = "1"; then { echo "$as_me:$LINENO: result: yes, using system Lua" >&5 echo "${ECHO_T}yes, using system Lua" >&6; } USE_SYSTEM_LUA=1 else { echo "$as_me:$LINENO: result: not found, falling back to the built-in lua" >&5 *************** *** 4904,4908 **** " >&2;} { (exit 1); exit 1; }; } - fi fi --- 4910,4913 ---- *************** *** 4914,4918 **** LIBS="$SAVED_LIBS" # restore $CPPFLAGS and $LIBS - else { echo "$as_me:$LINENO: result: using built-in Lua --enable-systemlua=no" >&5 --- 4919,4922 ---- *************** *** 14810,14814 **** if test "$USE_SYSTEM_LUA" = "1"; then ! echo " - Using SYSTEM lua library (prefix is '$lua_dir')" else echo " - Using BUILT-IN lua library" --- 14814,14818 ---- if test "$USE_SYSTEM_LUA" = "1"; then ! echo " - Using SYSTEM lua library (prefix is '$lua_prefix')" else echo " - Using BUILT-IN lua library" |