- Timestamp:
- May 17, 2006, 2:02:57 PM (19 years ago)
- Location:
- branches/script_engine
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/acinclude.m4
r6274 r7648 19 19 20 20 21 dnl AX_CHECK_REQUIRED_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE] )21 dnl AX_CHECK_REQUIRED_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE], [CFLAGS], [OTHER_LIBS]) 22 22 AC_DEFUN([AX_CHECK_REQUIRED_HEADER_LIB], [ 23 23 _header_check="" 24 24 _lib_check="" 25 LAST_FOUND_LIB="" 26 27 _lib_USED="" 28 _header_USED="" 25 29 26 30 for _header in $1 27 31 do 28 AC_CHECK_HEADER([$ _header], [_header_check="yes"], [_header_check="no"])29 if test "x$ _header_check" = "xyes" ; then32 AC_CHECK_HEADER([${_header}], [_header_check="yes" ; _header_USED=${_header}], [_header_check="no"], $7) 33 if test "x${_header_check}" = "xyes" ; then 30 34 break 31 35 fi 32 36 done 33 AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"]) 34 if [test x$_header_check = "xyes" && test "x$_lib_check" = "xyes"] ; then 35 LIBS="$LIBS -l$2" 36 $4 37 for _check_library in $2 38 do 39 AC_CHECK_LIB([${_check_library}], [$3], [_lib_check="yes"; _lib_USED=${_check_library}], [_lib_check="no"], $8) 40 if test "x${_lib_check}" = "xyes" ; then 41 LAST_FOUND_LIB=${_lib_USED} 42 break 43 fi 44 done 45 if [test "x${_header_check}" = "xyes" && test "x${_lib_check}" = "xyes"] ; then 46 m4_ifval([$4], [$4], [ 47 LIBS="${LIBS} -l${_lib_USED}"]) 37 48 else 49 m4_ifval([$5], [$5], [ 38 50 echo "------------------" 39 51 echo "LIBRARY $2 not found." 40 52 echo "please install the $2-LIBRARY-package which can be found at $6" 41 53 echo "------------------" 42 $5 43 exit -1 54 exit -1]) 44 55 fi 45 56 ]) 57 58 59 60 61 dnl AX_CHECK_LUA([LUA_DIR]) 62 AC_DEFUN([AX_CHECK_LUA], [ 63 #dnl checking for LUA. 64 LUA_LIBS= 65 LUA_INCLUDES= 66 dnl Check for Lua. 67 68 LUA_INCLUDE_DIRECTORY="/usr/include" 69 LUA_COMMON_INCLUDE_DIRECTORIES=" 70 `ls -dr $1 2>/dev/null` 71 /usr/include 72 `ls -dr /usr/include/lua* 2>/dev/null` 73 `ls -dr /usr/lib/lua/include 2>/dev/null` 74 `ls -dr /usr/local/include/lua 2>/dev/null` 75 `ls -dr /opt/lua*/include 2>/dev/null` 76 `ls -dr /Developer/lua*/include 2>/dev/null` 77 " 78 79 for _lua_include_directory in ${LUA_COMMON_INCLUDE_DIRECTORIES} 80 do 81 if test -e ${_lua_include_directory}/lua.h ; then 82 LUA_INCLUDE_DIRECTORY=${_lua_include_directory} 83 CPPFLAGS="${CPPFLAGS} -I${LUA_INCLUDE_DIRECTORY}" 84 break 85 fi 86 done 87 if test -n ${LUA_INCLUDE_DIRECTORY} ; then 88 echo "Lua-Include Directory is: ${LUA_INCLUDE_DIRECTORY}" 89 else 90 AC_MSG_ERROR([Lua Headers not found]) 91 fi 92 93 94 AC_CHECK_LIB([dl], [dlopen]) 95 AX_CHECK_REQUIRED_HEADER_LIB([lua.h], [lua lua50], [lua_open], 96 dnl libLUA found 97 [LUA_LIBS="${LUA_LIBS} -l${LAST_FOUND_LIB}" AX_CHECK_REQUIRED_HEADER_LIB([lualib.h], [lualib lualib50], [luaopen_base], 98 dnl liblualib found 99 [LUA_LIBS="${LUA_LIBS} -l${LAST_FOUND_LIB}"],, 100 [http://www.lua.org],, [${LUA_LIBS} -ldl -lm])], 101 dnl liblua not found (download it) 102 [AX_GET_INSTALL_NECESSARY_LIB([http://www.lua.org/ftp], [lua-5.0.tar.gz], [lua-5.0], [extern_libs/], [include/*.h lib/*.a]) 103 LUA_LIBS="-llualib -llua" LUA_INCLUDES="-I$(top_build_dir)/extern_libs" ], [http://www.lua.org]) 104 105 AC_SUBST([LUA_LIBS]) 106 AC_SUBST([LUA_INCLUDES]) 107 ]) 108 109 110 111 112 113 dnl AX_GET_INSTALL_NECESSARY_LIB([FTP-DIR], [DIST-FILE], [DIST-DIR], [INSTALL-DIR], [INSTALL-FILES], [CONFIG-FLAGS], [MAKE-OPTS]) 114 AC_DEFUN([AX_GET_INSTALL_NECESSARY_LIB], [ 115 116 _get_install_FTP=$1 117 _get_install_DISTFILE=$2 118 _get_install_DISTDIR=$3 119 _get_install_INSTALLDIR=$4 120 dnl $5 is left out (inegrated bellow) 121 _get_install_CONFIGFLAGS=$6 122 _get_install_MAKEOPTS=$7 123 124 dnl DOWNLOADING THE FILE 125 if test -f "${_get_install_DISTFILE}" ; then 126 echo "${_get_install_DISTFILE} already downloaded" 127 else 128 echo "Getting ${_get_install_DISTFILE} from ${_get_install_FTP}/${_get_install_DISTFILE}" 129 echo `wget ${_get_install_FTP}/${_get_install_DISTFILE}` 130 fi 131 132 dnl UNCOMPRESS STAGE 133 echo "Uncompressing ${_get_install_DISTFILE}" 134 echo `tar xzvf ${_get_install_DISTFILE}` 135 136 dnl ENTER DIRECTORY AND EXECUTE CONFIGURE AND MAKE 137 _get_install_PWD=`pwd` 138 cd ${_get_install_DISTDIR} 139 dnl configure 140 if test -x "configure" ; then 141 ./configure ${_get_install_CONFIGFLAGS} 142 fi 143 make ${_get_install_MAKEOPTS} 144 cd ${_get_install_PWD} 145 146 dnl INSTALL STAGE 147 echo "Installing Libraries and Headers into ${_get_install_INSTALLDIR} local directory" 148 149 mkdir -p ${_get_install_INSTALLDIR} 150 for _get_install_installfile in $5 151 do 152 echo "copy ${_get_install_DISTDIR}/${_get_install_installfile} to ${_get_install_INSTALLDIR}/" 153 cp `ls -dr ${_get_install_DISTDIR}/${_get_install_installfile}` "${_get_install_INSTALLDIR}/" 154 done 155 156 #cleaning up 157 echo "rm -rf ${_get_install_DISTDIR}" 158 rm -rf ${_get_install_DISTDIR} 159 echo "rm ${_get_install_DISTFILE}" 160 rm ${_get_install_DISTFILE} 161 ]) -
branches/script_engine/config.h.in
r6838 r7648 39 39 /* Define to 1 if you have the <inttypes.h> header file. */ 40 40 #undef HAVE_INTTYPES_H 41 42 /* Define to 1 if you have the `dl' library (-ldl). */ 43 #undef HAVE_LIBDL 41 44 42 45 /* Define to 1 if you have the `m' library (-lm). */ -
branches/script_engine/configure.ac
r7256 r7648 38 38 AM_INIT_AUTOMAKE 39 39 40 AC_CONFIG_SRCDIR([./src ])40 AC_CONFIG_SRCDIR([./src/orxonox.cc]) 41 41 AC_CONFIG_HEADER([config.h]) 42 42 … … 571 571 AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes") 572 572 573 #-----# 574 # LUA # 575 #-----# 576 LUA_DIR="/usr/include/lua" 577 AX_CHECK_LUA([${LUA_DIR}]) 578 573 579 #--------# 574 580 # efence # … … 643 649 src/lib/gui/gtk_gui/Makefile 644 650 src/lib/gui/gl_gui/Makefile 651 src/lib/script_engine/Makefile 645 652 src/lib/parser/Makefile 646 653 src/lib/parser/tinyxml/Makefile 647 654 src/lib/parser/ini_parser/Makefile 648 655 src/lib/parser/cmdline_parser/Makefile 649 656 src/lib/parser/preferences/Makefile 650 657 src/util/Makefile 651 658 src/world_entities/Makefile -
branches/script_engine/src/lib/Makefile.am
r7422 r7648 71 71 parser \ 72 72 shell \ 73 script_engine \ 73 74 gui -
branches/script_engine/src/lib/script_engine/Makefile.am
r7645 r7648 1 2 INCLUDES= -I../../../extern_libs 3 4 noinst_LIBRARIES = libORXscript.a 5 6 libORXscript_a_SOURCES = \ 7 Script.cc \ 8 scriptable.cc\ 9 VirtualMachine.cc 10 11 AM_CPPFLAGS= @LUA_INCLUDES@ 1 12 2 13 bin_PROGRAMS = main 14 main_SOURCES = \ 15 main.cc 16 main_LDADD = libORXscript.a -L../../../extern_libs @LUA_LIBS@ 3 17 4 main_SOURCES = \ 5 Script.cc \ 6 scriptable.cc\ 7 VirtualMachine.cc \ 8 main.cc 18 main_LDFLAGS = 9 19 10 main_LDADD = @LUA_LIBS@11 20 12 21 noinst_HEADERS = \
Note: See TracChangeset
for help on using the changeset viewer.