From: Francesco M. <fr...@us...> - 2006-05-14 12:55:59
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28721/build/autoconf Modified Files: aclocal.m4 configure.ac wxpresets.m4 Log Message: added LUA checks to configure script Index: wxpresets.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/wxpresets.m4,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxpresets.m4 18 Mar 2006 19:18:16 -0000 1.16 --- wxpresets.m4 14 May 2006 12:55:56 -0000 1.17 *************** *** 95,98 **** --- 95,122 ---- ]) + # same as AM_BOOLOPT_SUMMARY but takes 2 bool options + AC_DEFUN([AM_2BOOLOPT_SUMMARY], + [ + if [[ "x$$1" = "x1" -a "x$$2" = "x1" ]]; then + echo $3 + elif [[ "x$$1" = "x0" -o "x$$2" = "x0" ]]; then + echo $4 + else + echo "$1 is $$1; $2 is $$2" + fi + ]) + + # same as AM_BOOLOPT_SUMMARY but takes 3 bool options + AC_DEFUN([AM_3BOOLOPT_SUMMARY], + [ + if [[ "x$$1" = "x1" -a "x$$2" = "x1" -a "x$$3" = "x1" ]]; then + echo $4 + elif [[ "x$$1" = "x0" -o "x$$2" = "x0" -o "x$$3" = "x0" ]]; then + echo $5 + else + echo "$1 is $$1; $2 is $$2; $3 is $$3" + fi + ]) + dnl --------------------------------------------------------------------------- Index: configure.ac =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** configure.ac 12 Apr 2006 18:04:05 -0000 1.26 --- configure.ac 14 May 2006 12:55:56 -0000 1.27 *************** *** 89,92 **** --- 89,121 ---- ##################################################################### + # Checks used to determine right LUA flags (see modules/lua/src/Makefile) + luadefs= + lualibs= + + # these do not require additional libs + AC_CHECK_FUNC([isatty], [luadefs="$luadefs -DLUA_USE_ISATTY"]) + AC_CHECK_FUNC([mkstemp], [luadefs="$luadefs -DLUA_USE_MKSTEMP"]) + AC_CHECK_FUNC([popen], [luadefs="$luadefs -DLUA_USE_POPEN"]) + AC_CHECK_FUNC([_longjmp], [luadefs="$luadefs -DLUA_USE_ULONGJMP"]) + + # these require addlibs + AC_CHECK_LIB([dl], [dlopen], [ + AC_CHECK_HEADER([dlfcn.h], [ + luadefs="$luadefs -DLUA_USE_DLOPEN" + lualibs="$lualibs -ldl" + ]) + ]) + AC_CHECK_LIB([readline], [readline], [ + luadefs="$luadefs -DLUA_USE_READLINE" + lualibs="$lualibs -lreadline" + ]) + + LUA_PLATFORM_SPECIFIC_CFLAGS=$luadefs + LUA_PLATFORM_SPECIFIC_LDFLAGS=$lualibs + AC_SUBST(LUA_PLATFORM_SPECIFIC_CFLAGS) + AC_SUBST(LUA_PLATFORM_SPECIFIC_LDFLAGS) + + + # check for wxWidgets WXLIBS_REQUIRED="xrc,html,adv,net,xml" *************** *** 95,98 **** --- 124,128 ---- + dnl --------------------------------------------------------------------------- dnl AM_WXSTC_CHECK( *************** *** 171,175 **** or report this problem to $PACKAGE_BUGREPORT. NOTE: build is proceeding without Scintilla wrappers, but you will miss ! the wxLuaApp and wxLuaEdit applications). ]) USE_WXBINDSTC=0 --- 201,205 ---- or report this problem to $PACKAGE_BUGREPORT. NOTE: build is proceeding without Scintilla wrappers, but you will miss ! the wxLuaApp and wxLuaEdit applications! ]) USE_WXBINDSTC=0 *************** *** 254,264 **** AC_OUTPUT AM_WXPRESETS_MSG_BEGIN # applications ! AM_BOOLOPT_SUMMARY([USE_WXLUAAPP], [" - wxLua application: yes"], [" - wxLua application: no"]) ! AM_BOOLOPT_SUMMARY([USE_WXLUACANAPP], [" - wxLuaCan application: yes"], [" - wxLuaCan application: no"]) --- 284,301 ---- AC_OUTPUT + + # output a nice summary of detected options + # NOTE: keep build conditions in synch with bakefiles; e.g. app_wxlua is + # declared as: + # <exe id="app_wxlua" template="wxluaapp" cond="USE_WXLUAAPP=='1' and USE_WXBINDSTC=='1' and USE_WXLUADEBUG=='1'"> + # and thus the AM_3BOOLOPT_SUMMARY([USE_WXLUAAPP], [USE_WXBINDSTC], [USE_WXLUADEBUG], ...) macro must be used ! + AM_WXPRESETS_MSG_BEGIN # applications ! AM_3BOOLOPT_SUMMARY([USE_WXLUAAPP], [USE_WXBINDSTC], [USE_WXLUADEBUG], [" - wxLua application: yes"], [" - wxLua application: no"]) ! AM_2BOOLOPT_SUMMARY([USE_WXLUACANAPP], [USE_WXBINDSTC], [" - wxLuaCan application: yes"], [" - wxLuaCan application: no"]) |