From: Francesco M. <fr...@us...> - 2006-12-19 21:12:31
|
Update of /cvsroot/wxlua/wxLua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19847 Modified Files: configure Log Message: now BUILDDIR is set exactly like the wxWidgets builddir system LUA is now used if available on Unix or on Windows with USE_SYSTEM_LUA=1 changed the way the lua headers are included (removed the 'lua/include' prefix) to make it possible to use external lua Now when using built-in LUA the generated library is named lua5.1 and it overwrites any eventually preexisting lua library (when installed). Fixed the "samples" directory copy when srcdir==. Index: configure =================================================================== RCS file: /cvsroot/wxlua/wxLua/configure,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** configure 11 Dec 2006 00:08:17 -0000 1.42 --- configure 19 Dec 2006 21:11:57 -0000 1.43 *************** *** 682,685 **** --- 682,686 ---- WX_GTKPORT_VERSION WXLIBS_REQUIRED + LUA_DIR GREP EGREP *************** *** 754,757 **** --- 755,759 ---- COND_PLATFORM_WIN32_1 COND_SHARED_0 + COND_SHARED_0_USE_SYSTEM_LUA_0 COND_SHARED_0_USE_WXBINDSTC_1 COND_SHARED_0_USE_WXLUADEBUG_1 *************** *** 759,762 **** --- 761,765 ---- COND_SHARED_1 COND_SHARED_1_USE_LUAMODULE_1 + COND_SHARED_1_USE_SYSTEM_LUA_0 COND_SHARED_1_USE_WXBINDSTC_1 COND_SHARED_1_USE_WXLUADEBUG_1 *************** *** 1401,1404 **** --- 1404,1408 ---- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-lua-prefix Prefix where Lua is installed (optional) --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH --with-wx-config=CONFIG wx-config script to use (optional) *************** *** 2072,2075 **** --- 2076,2088 ---- + # 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 + + + { echo "$as_me:$LINENO: checking for --enable-wxlua-app option" >&5 *************** *** 2193,2196 **** --- 2206,2233 ---- + + { echo "$as_me:$LINENO: checking for --with-lua-prefix option" >&5 + echo $ECHO_N "checking for --with-lua-prefix option... $ECHO_C" >&6; } + if [ $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;; + *) + { { echo "$as_me:$LINENO: error: + You must provide an absolute path for the --with-lua-prefix option. + " >&5 + echo "$as_me: error: + You must provide an absolute path for the --with-lua-prefix option. + " >&2;} + { (exit 1); exit 1; }; } + esac + fi + { echo "$as_me:$LINENO: result: $lua_dir" >&5 + echo "${ECHO_T}$lua_dir" >&6; } + + + # Global wxLua options: # we could use these to define options like --enable-all-apps but these would *************** *** 2590,2594 **** ##################################################################### - # check for wxWidgets # --- 2627,2630 ---- *************** *** 5627,5638 **** ! # Checks used to determine right LUA flags (see modules/lua/src/Makefile) ! luadefs= ! lualibs= ! # these do not require additional libs ! { echo "$as_me:$LINENO: checking for isatty" >&5 echo $ECHO_N "checking for isatty... $ECHO_C" >&6; } if test "${ac_cv_func_isatty+set}" = set; then --- 5663,5768 ---- + # check for Lua + # + # NB: by default we try to use the system-wide lua 5.1; if it does not + # exist then we use our built-in lua ! if test "$lua_dir" = ""; then ! { 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; } ! LIBS="$LIBS -llua5.1" ! cat >conftest.$ac_ext <<_ACEOF ! ! /* confdefs.h. */ ! _ACEOF ! cat confdefs.h >>conftest.$ac_ext ! cat >>conftest.$ac_ext <<_ACEOF ! /* end confdefs.h. */ ! #include <lua.h> ! int ! main () ! { ! lua_newtable(NULL); ! ; ! return 0; ! } ! ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (ac_try="$ac_link" ! case "(($ac_try" in ! *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ! *) ac_try_echo=$ac_try;; ! esac ! eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ! (eval "$ac_link") 2>conftest.er1 ! ac_status=$? ! grep -v '^ *+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' ! { (case "(($ac_try" in ! *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ! *) ac_try_echo=$ac_try;; ! esac ! eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ! (eval "$ac_try") 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; } && ! { ac_try='test -s conftest$ac_exeext' ! { (case "(($ac_try" in ! *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ! *) ac_try_echo=$ac_try;; ! esac ! eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ! (eval "$ac_try") 2>&5 ! ac_status=$? ! echo "$as_me:$LINENO: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! LUA_PRESENCE=1 ! else ! echo "$as_me: failed program was:" >&5 ! sed 's/^/| /' conftest.$ac_ext >&5 ! ! LUA_PRESENCE=0 ! fi ! ! rm -f core conftest.err conftest.$ac_objext \ ! conftest$ac_exeext conftest.$ac_ext ! ! if test "$LUA_PRESENCE" = "1"; then ! { echo "$as_me:$LINENO: result: yes" >&5 ! echo "${ECHO_T}yes" >&6; } ! USE_SYSTEM_LUA=1 ! else ! { echo "$as_me:$LINENO: result: not found, falling back to the built-in lua" >&5 ! echo "${ECHO_T}not found, falling back to the built-in lua" >&6; } ! USE_SYSTEM_LUA=0 ! ! # LUA_DIR must always be an absolute path! ! LUA_DIR="`pwd`/$srcdir/modules/lua" ! ! fi ! ! else ! ! USE_SYSTEM_LUA=1 ! LUA_DIR="$lua_dir" ! fi ! ! ! if test "$USE_SYSTEM_LUA" = "0"; then ! ! # Checks used to determine right LUA flags (see modules/lua/src/Makefile) ! luadefs= ! lualibs= ! ! # these do not require additional libs ! { echo "$as_me:$LINENO: checking for isatty" >&5 echo $ECHO_N "checking for isatty... $ECHO_C" >&6; } if test "${ac_cv_func_isatty+set}" = set; then *************** *** 5735,5739 **** fi ! { echo "$as_me:$LINENO: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6; } if test "${ac_cv_func_mkstemp+set}" = set; then --- 5865,5869 ---- fi ! { echo "$as_me:$LINENO: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6; } if test "${ac_cv_func_mkstemp+set}" = set; then *************** *** 5836,5840 **** fi ! { echo "$as_me:$LINENO: checking for popen" >&5 echo $ECHO_N "checking for popen... $ECHO_C" >&6; } if test "${ac_cv_func_popen+set}" = set; then --- 5966,5970 ---- fi ! { echo "$as_me:$LINENO: checking for popen" >&5 echo $ECHO_N "checking for popen... $ECHO_C" >&6; } if test "${ac_cv_func_popen+set}" = set; then *************** *** 5937,5941 **** fi ! { echo "$as_me:$LINENO: checking for _longjmp" >&5 echo $ECHO_N "checking for _longjmp... $ECHO_C" >&6; } if test "${ac_cv_func__longjmp+set}" = set; then --- 6067,6071 ---- fi ! { echo "$as_me:$LINENO: checking for _longjmp" >&5 echo $ECHO_N "checking for _longjmp... $ECHO_C" >&6; } if test "${ac_cv_func__longjmp+set}" = set; then *************** *** 6039,6043 **** ! # these require addlibs { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 --- 6169,6173 ---- ! # these require addlibs { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 *************** *** 6559,6563 **** if test $ac_cv_lib_dl_dlopen = yes; then ! if test "${ac_cv_header_dlfcn_h+set}" = set; then { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } --- 6689,6693 ---- if test $ac_cv_lib_dl_dlopen = yes; then ! if test "${ac_cv_header_dlfcn_h+set}" = set; then { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } *************** *** 6715,6720 **** if test $ac_cv_header_dlfcn_h = yes; then ! luadefs="$luadefs -DLUA_USE_DLOPEN" ! lualibs="$lualibs -ldl" fi --- 6845,6850 ---- if test $ac_cv_header_dlfcn_h = yes; then ! luadefs="$luadefs -DLUA_USE_DLOPEN" ! lualibs="$lualibs -ldl" fi *************** *** 6724,6728 **** fi ! { echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_readline+set}" = set; then --- 6854,6858 ---- fi ! { echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } if test "${ac_cv_lib_readline_readline+set}" = set; then *************** *** 6803,6817 **** if test $ac_cv_lib_readline_readline = yes; then ! luadefs="$luadefs -DLUA_USE_READLINE" ! lualibs="$lualibs -lreadline" fi ! LUA_PLATFORM_SPECIFIC_CFLAGS=$luadefs ! LUA_PLATFORM_SPECIFIC_LDFLAGS=$lualibs --- 6933,6948 ---- if test $ac_cv_lib_readline_readline = yes; then ! luadefs="$luadefs -DLUA_USE_READLINE" ! lualibs="$lualibs -lreadline" fi ! LUA_PLATFORM_SPECIFIC_CFLAGS=$luadefs ! LUA_PLATFORM_SPECIFIC_LDFLAGS=$lualibs + fi *************** *** 9676,9679 **** --- 9807,9815 ---- fi + COND_SHARED_0_USE_SYSTEM_LUA_0="#" + if test "x$SHARED" = "x0" -a "x$USE_SYSTEM_LUA" = "x0" ; then + COND_SHARED_0_USE_SYSTEM_LUA_0="" + fi + COND_SHARED_0_USE_WXBINDSTC_1="#" if test "x$SHARED" = "x0" -a "x$USE_WXBINDSTC" = "x1" ; then *************** *** 9701,9704 **** --- 9837,9845 ---- fi + COND_SHARED_1_USE_SYSTEM_LUA_0="#" + if test "x$SHARED" = "x1" -a "x$USE_SYSTEM_LUA" = "x0" ; then + COND_SHARED_1_USE_SYSTEM_LUA_0="" + fi + COND_SHARED_1_USE_WXBINDSTC_1="#" if test "x$SHARED" = "x1" -a "x$USE_WXBINDSTC" = "x1" ; then *************** *** 9861,9865 **** # the wx.so library in ../lib; thus we need to copy the sample(s) to the # build directory to preserve the relative path correctness ! if [ "$top_srcdir" != "." ]; then { echo "$as_me:$LINENO: configure: copying $srcdir/samples to ./samples" >&5 --- 10002,10010 ---- # the wx.so library in ../lib; thus we need to copy the sample(s) to the # build directory to preserve the relative path correctness ! # ! # NOTE: we cannot check $top_srcdir here since it's not defined yet at this ! # point of the configure script ! # ! if [ ! -d "samples" ]; then { echo "$as_me:$LINENO: configure: copying $srcdir/samples to ./samples" >&5 *************** *** 10573,10576 **** --- 10718,10722 ---- WX_GTKPORT_VERSION!$WX_GTKPORT_VERSION$ac_delim WXLIBS_REQUIRED!$WXLIBS_REQUIRED$ac_delim + LUA_DIR!$LUA_DIR$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim *************** *** 10587,10591 **** NM!$NM$ac_delim INSTALL_DIR!$INSTALL_DIR$ac_delim - LDFLAGS_GUI!$LDFLAGS_GUI$ac_delim _ACEOF --- 10733,10736 ---- *************** *** 10629,10632 **** --- 10774,10778 ---- for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF + LDFLAGS_GUI!$LDFLAGS_GUI$ac_delim IF_GNU_MAKE!$IF_GNU_MAKE$ac_delim PLATFORM_UNIX!$PLATFORM_UNIX$ac_delim *************** *** 10686,10689 **** --- 10832,10836 ---- COND_PLATFORM_WIN32_1!$COND_PLATFORM_WIN32_1$ac_delim COND_SHARED_0!$COND_SHARED_0$ac_delim + COND_SHARED_0_USE_SYSTEM_LUA_0!$COND_SHARED_0_USE_SYSTEM_LUA_0$ac_delim COND_SHARED_0_USE_WXBINDSTC_1!$COND_SHARED_0_USE_WXBINDSTC_1$ac_delim COND_SHARED_0_USE_WXLUADEBUG_1!$COND_SHARED_0_USE_WXLUADEBUG_1$ac_delim *************** *** 10691,10694 **** --- 10838,10842 ---- COND_SHARED_1!$COND_SHARED_1$ac_delim COND_SHARED_1_USE_LUAMODULE_1!$COND_SHARED_1_USE_LUAMODULE_1$ac_delim + COND_SHARED_1_USE_SYSTEM_LUA_0!$COND_SHARED_1_USE_SYSTEM_LUA_0$ac_delim COND_SHARED_1_USE_WXBINDSTC_1!$COND_SHARED_1_USE_WXBINDSTC_1$ac_delim COND_SHARED_1_USE_WXLUADEBUG_1!$COND_SHARED_1_USE_WXLUADEBUG_1$ac_delim *************** *** 10723,10727 **** _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then break elif $ac_last_try; then --- 10871,10875 ---- _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then break elif $ac_last_try; then *************** *** 11141,11144 **** --- 11289,11300 ---- echo + if test "$USE_SYSTEM_LUA" = "1"; then + echo " - Using SYSTEM lua library (prefix is $lua_dir)" + else + echo " - Using BUILT-IN lua library" + fi + + + if [ "x$USE_WXBINDSTC" = "x1" ]; then echo " - wxBindSTC module: yes" |