Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8061 in orxonox.OLD


Ignore:
Timestamp:
Jun 1, 2006, 1:59:42 PM (18 years ago)
Author:
bensch
Message:

merged the scriptengine back to the trunk

Location:
trunk
Files:
5 edited
29 copied

Legend:

Unmodified
Added
Removed
  • trunk/acinclude.m4

    r8042 r8061  
    1919
    2020
    21 dnl AX_CHECK_REQUIRED_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE])
     21dnl 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])
    2222AC_DEFUN([AX_CHECK_REQUIRED_HEADER_LIB], [
    2323    _header_check=""
    2424    _lib_check=""
     25    LAST_FOUND_LIB=""
     26
     27    _lib_USED=""
     28    _header_USED=""
    2529
    2630    for _header in $1
    2731    do
    28       AC_CHECK_HEADER([$_header], [_header_check="yes"], [_header_check="no"])
    29       if  test "x$_header_check" = "xyes" ; then
    30         break
    31       fi
    32     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     else
     32      AC_CHECK_HEADER([${_header}], [_header_check="yes" ; _header_USED=${_header}], [_header_check="no"], $7)
     33      if  test "x${_header_check}" = "xyes" ; then
     34        break
     35      fi
     36    done
     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}"])
     48    else
     49        m4_ifval([$5], [$5], [
    3850         echo "------------------"
    3951         echo "LIBRARY $2 not found."
    4052         echo "please install the $2-LIBRARY-package which can be found at $6"
    4153         echo "------------------"
    42          $5
    43          exit -1
     54         exit -1])
    4455    fi
    4556])
     
    155166    done
    156167    if test -n ${QT_BIN_DIRECTORY} ; then
    157         echo "Qt-Bin Directory is: ${QT_BIN_DIRECTORY}"
    158     else
    159         QT_BIN_DIRECTORY=${QT_PREFIX}/bin
     168        echo "Qt-Bin Directory is: ${QT_BIN_DIRECTORY}"
     169    else
     170        QT_BIN_DIRECTORY=${QT_PREFIX}/bin
    160171    fi
    161172
     
    230241    LDFLAGS=${CACHED_LDFLAGS}
    231242])
     243
     244
     245dnl AX_CHECK_LUA([LUA_DIR])
     246AC_DEFUN([AX_CHECK_LUA], [
     247#dnl checking for LUA.
     248LUA_LIBS=
     249LUA_INCLUDES=
     250dnl Check for Lua.
     251
     252LUA_INCLUDE_DIRECTORY="/usr/include"
     253LUA_COMMON_INCLUDE_DIRECTORIES="
     254      `ls -dr $1                       2>/dev/null`
     255      /usr/include
     256      `ls -dr /usr/include/lua*        2>/dev/null`
     257      `ls -dr /usr/lib/lua/include     2>/dev/null`
     258      `ls -dr /usr/local/include/lua   2>/dev/null`
     259      `ls -dr /opt/lua*/include        2>/dev/null`
     260      `ls -dr /Developer/lua*/include  2>/dev/null`
     261    "
     262
     263  for _lua_include_directory in ${LUA_COMMON_INCLUDE_DIRECTORIES}
     264    do
     265      if test -e ${_lua_include_directory}/lua.h ; then
     266        LUA_INCLUDE_DIRECTORY=${_lua_include_directory}
     267        CPPFLAGS="${CPPFLAGS} -I${LUA_INCLUDE_DIRECTORY}"
     268        break
     269      fi
     270  done
     271    if test -n ${LUA_INCLUDE_DIRECTORY} ; then
     272      echo "Lua-Include Directory is: ${LUA_INCLUDE_DIRECTORY}"
     273    else
     274      AC_MSG_ERROR([Lua Headers not found])
     275    fi
     276
     277
     278AC_CHECK_LIB([dl], [dlopen])
     279AX_CHECK_REQUIRED_HEADER_LIB([lua.h], [lua lua50], [lua_open],
     280dnl libLUA found
     281     [LUA_LIBS="${LUA_LIBS} -l${LAST_FOUND_LIB}"  AX_CHECK_REQUIRED_HEADER_LIB([lualib.h], [lualib lualib50], [luaopen_base],
     282dnl liblualib found
     283      [LUA_LIBS="${LUA_LIBS} -l${LAST_FOUND_LIB}"],,
     284      [http://www.lua.org],, [${LUA_LIBS} -ldl -lm])],
     285dnl liblua not found (download it)
     286       [AX_GET_INSTALL_NECESSARY_LIB([http://www.lua.org/ftp], [lua-5.0.tar.gz], [lua-5.0], [extern_libs/], [include/*.h lib/*.a])
     287       LUA_LIBS="-llualib -llua"  LUA_INCLUDES="-I$(top_build_dir)/extern_libs" ], [http://www.lua.org])
     288
     289AC_SUBST([LUA_LIBS])
     290AC_SUBST([LUA_INCLUDES])
     291])
     292
     293
     294
     295
     296
     297dnl AX_GET_INSTALL_NECESSARY_LIB([FTP-DIR], [DIST-FILE], [DIST-DIR], [INSTALL-DIR], [INSTALL-FILES], [CONFIG-FLAGS], [MAKE-OPTS])
     298AC_DEFUN([AX_GET_INSTALL_NECESSARY_LIB], [
     299
     300   _get_install_FTP=$1
     301   _get_install_DISTFILE=$2
     302   _get_install_DISTDIR=$3
     303   _get_install_INSTALLDIR=$4
     304   dnl $5 is left out (inegrated bellow)
     305   _get_install_CONFIGFLAGS=$6
     306   _get_install_MAKEOPTS=$7
     307
     308dnl DOWNLOADING THE FILE
     309   if test -f "${_get_install_DISTFILE}" ; then
     310     echo "${_get_install_DISTFILE} already downloaded"
     311   else
     312     echo "Getting ${_get_install_DISTFILE} from ${_get_install_FTP}/${_get_install_DISTFILE}"
     313     echo `wget ${_get_install_FTP}/${_get_install_DISTFILE}`
     314   fi
     315
     316dnl UNCOMPRESS STAGE
     317   echo "Uncompressing ${_get_install_DISTFILE}"
     318   echo `tar xzvf ${_get_install_DISTFILE}`
     319
     320dnl ENTER DIRECTORY AND EXECUTE CONFIGURE AND MAKE
     321   _get_install_PWD=`pwd`
     322   cd ${_get_install_DISTDIR}
     323dnl configure
     324   if test -x "configure" ; then
     325    ./configure ${_get_install_CONFIGFLAGS}
     326   fi
     327   make ${_get_install_MAKEOPTS}
     328   cd ${_get_install_PWD}
     329
     330dnl INSTALL STAGE
     331   echo "Installing Libraries and Headers into ${_get_install_INSTALLDIR} local directory"
     332
     333   mkdir -p ${_get_install_INSTALLDIR}
     334   for _get_install_installfile in $5
     335    do
     336     echo "copy  ${_get_install_DISTDIR}/${_get_install_installfile} to ${_get_install_INSTALLDIR}/"
     337     cp `ls -dr ${_get_install_DISTDIR}/${_get_install_installfile}` "${_get_install_INSTALLDIR}/"
     338    done
     339
     340#cleaning up
     341  echo "rm -rf ${_get_install_DISTDIR}"
     342  rm -rf ${_get_install_DISTDIR}
     343  echo "rm ${_get_install_DISTFILE}"
     344  rm ${_get_install_DISTFILE}
     345])
  • trunk/config.h.in

    r7753 r8061  
    33/* in which debug mode we are */
    44#undef DEBUG_LEVEL
    5 
    6 /* Define to 1 if you have the <avcodec.h> header file. */
    7 #undef HAVE_AVCODEC_H
    8 
    9 /* Define to 1 if you have the <avformat.h> header file. */
    10 #undef HAVE_AVFORMAT_H
    115
    126/* Define to 1 if you have the `bzero' function. */
     
    159/* if we have CURL */
    1610#undef HAVE_CURL
    17 
    18 /* Define to 1 if you have the <ffmpeg/avcodec.h> header file. */
    19 #undef HAVE_FFMPEG_AVCODEC_H
    20 
    21 /* Define to 1 if you have the <ffmpeg/avformat.h> header file. */
    22 #undef HAVE_FFMPEG_AVFORMAT_H
    2311
    2412/* Define to 1 if you have the <GL/glew.h> header file. */
     
    3321/* Define to 1 if you have the <inttypes.h> header file. */
    3422#undef HAVE_INTTYPES_H
     23
     24/* Define to 1 if you have the `dl' library (-ldl). */
     25#undef HAVE_LIBDL
    3526
    3627/* Define to 1 if you have the `m' library (-lm). */
  • trunk/configure.ac

    r7954 r8061  
    310310    AC_CHECK_LIB([winmm], [main], [FOUND_winmm=yes])
    311311    if test x${FOUND_winmm} = xyes ; then
    312         LIBS="$LIBS -lwinmm"
     312        LIBS="$LIBS -lwinmm"
    313313    fi
    314314
     
    524524#--------#
    525525# checking for FFmpeg-headers
    526   AC_CHECK_HEADERS([avformat.h] ,,
    527       [AC_CHECK_HEADERS([ffmpeg/avformat.h] ,,AC_MSG_ERROR([cannot find FFmpeg header.])]))
    528 # checking for ffmpeg-lib
    529   AC_CHECK_LIB([avformat], [main], [FOUND_avformat=yes; LIBS="$LIBS -lavformat"])
    530      if test x$FOUND_avformat != xyes ; then
    531         echo "------------------"
    532         echo "avformat library not found."
    533         echo "please install the FFmpeg library, which can be found at http://ffmpeg.sourceforge.net"
    534         echo "------------------"
    535         exit -1
    536      fi
    537   AC_CHECK_HEADERS([avcodec.h] ,,
    538       [AC_CHECK_HEADERS([ffmpeg/avcodec.h] ,,AC_MSG_ERROR([cannot find FFmpeg header.])]))
    539   AC_CHECK_LIB([avcodec], [main], [FOUND_avcodec=yes; LIBS="$LIBS -lavcodec"])
    540      if test x$FOUND_avcodec != xyes ; then
    541         echo "------------------"
    542         echo "avcodec library not found."
    543         echo "please install the FFmpeg library, which can be found at http://ffmpeg.sourceforge.net"
    544         echo "------------------"
    545         exit -1
    546      fi
     526  AX_CHECK_REQUIRED_HEADER_LIB([avformat.h ffmpeg/avformat.h] ,[avformat], [main],
     527   [AX_CHECK_REQUIRED_HEADER_LIB([avcodec.h ffmpeg/avcodec.h], [avcodec], [main],,, [http://ffmpeg.sourceforge.net]) LIBS="${LIBS} -lavformat -lavcodec"],
     528   [AX_GET_INSTALL_NECESSARY_LIB([http://svn.orxonox.net/webdev/develop/ext_libs], [ffmpeg.tar.gz], [ffmpeg], [extern_libs/], [include/*.h lib/*.a])
     529       LIBS="-llualib -llua"  CPPFLAGS="${CPPFLAGS} -I$(top_build_dir)/extern_libs" ],
     530  [http://ffmpeg.sourceforge.net])
     531
     532
    547533  AC_CHECK_LIB([avutil], [main], [FOUND_avutil=yes; LIBS="$LIBS -lavutil"])
    548534  AC_CHECK_LIB([xvid], [main], [FOUND_xvid=yes; LIBS="$LIBS -lxvid"])
     
    588574AC_SUBST(CURL_CFLAGS)
    589575AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes")
     576
     577#-----#
     578# LUA #
     579#-----#
     580LUA_DIR="/usr/include/lua"
     581AX_CHECK_LUA([${LUA_DIR}])
    590582
    591583#--------#
     
    636628                 src/lib/gui/gl_gui/Makefile
    637629                 src/lib/gui/qt_gui/Makefile
     630                 src/lib/script_engine/Makefile
    638631                 src/lib/parser/Makefile
    639632                 src/lib/parser/tinyxml/Makefile
  • trunk/src/lib/Makefile.am

    r8048 r8061  
    7979        parser \
    8080        shell \
     81        script_engine \
    8182        gui
  • trunk/src/lib/event/event_handler.cc

    r8035 r8061  
    337337  else
    338338  {
    339     //SDL_WM_GrabInput(SDL_GRAB_ON);
     339    SDL_WM_GrabInput(SDL_GRAB_ON);
    340340    SDL_ShowCursor(SDL_DISABLE);
    341341  }
Note: See TracChangeset for help on using the changeset viewer.