Changeset 8061 in orxonox.OLD
- Timestamp:
- Jun 1, 2006, 1:59:42 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 29 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/acinclude.m4
r8042 r8061 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" ; 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], [ 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 ]) … … 155 166 done 156 167 if test -n ${QT_BIN_DIRECTORY} ; then 157 158 else 159 168 echo "Qt-Bin Directory is: ${QT_BIN_DIRECTORY}" 169 else 170 QT_BIN_DIRECTORY=${QT_PREFIX}/bin 160 171 fi 161 172 … … 230 241 LDFLAGS=${CACHED_LDFLAGS} 231 242 ]) 243 244 245 dnl AX_CHECK_LUA([LUA_DIR]) 246 AC_DEFUN([AX_CHECK_LUA], [ 247 #dnl checking for LUA. 248 LUA_LIBS= 249 LUA_INCLUDES= 250 dnl Check for Lua. 251 252 LUA_INCLUDE_DIRECTORY="/usr/include" 253 LUA_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 278 AC_CHECK_LIB([dl], [dlopen]) 279 AX_CHECK_REQUIRED_HEADER_LIB([lua.h], [lua lua50], [lua_open], 280 dnl libLUA found 281 [LUA_LIBS="${LUA_LIBS} -l${LAST_FOUND_LIB}" AX_CHECK_REQUIRED_HEADER_LIB([lualib.h], [lualib lualib50], [luaopen_base], 282 dnl liblualib found 283 [LUA_LIBS="${LUA_LIBS} -l${LAST_FOUND_LIB}"],, 284 [http://www.lua.org],, [${LUA_LIBS} -ldl -lm])], 285 dnl 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 289 AC_SUBST([LUA_LIBS]) 290 AC_SUBST([LUA_INCLUDES]) 291 ]) 292 293 294 295 296 297 dnl AX_GET_INSTALL_NECESSARY_LIB([FTP-DIR], [DIST-FILE], [DIST-DIR], [INSTALL-DIR], [INSTALL-FILES], [CONFIG-FLAGS], [MAKE-OPTS]) 298 AC_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 308 dnl 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 316 dnl UNCOMPRESS STAGE 317 echo "Uncompressing ${_get_install_DISTFILE}" 318 echo `tar xzvf ${_get_install_DISTFILE}` 319 320 dnl ENTER DIRECTORY AND EXECUTE CONFIGURE AND MAKE 321 _get_install_PWD=`pwd` 322 cd ${_get_install_DISTDIR} 323 dnl 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 330 dnl 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 3 3 /* in which debug mode we are */ 4 4 #undef DEBUG_LEVEL 5 6 /* Define to 1 if you have the <avcodec.h> header file. */7 #undef HAVE_AVCODEC_H8 9 /* Define to 1 if you have the <avformat.h> header file. */10 #undef HAVE_AVFORMAT_H11 5 12 6 /* Define to 1 if you have the `bzero' function. */ … … 15 9 /* if we have CURL */ 16 10 #undef HAVE_CURL 17 18 /* Define to 1 if you have the <ffmpeg/avcodec.h> header file. */19 #undef HAVE_FFMPEG_AVCODEC_H20 21 /* Define to 1 if you have the <ffmpeg/avformat.h> header file. */22 #undef HAVE_FFMPEG_AVFORMAT_H23 11 24 12 /* Define to 1 if you have the <GL/glew.h> header file. */ … … 33 21 /* Define to 1 if you have the <inttypes.h> header file. */ 34 22 #undef HAVE_INTTYPES_H 23 24 /* Define to 1 if you have the `dl' library (-ldl). */ 25 #undef HAVE_LIBDL 35 26 36 27 /* Define to 1 if you have the `m' library (-lm). */ -
trunk/configure.ac
r7954 r8061 310 310 AC_CHECK_LIB([winmm], [main], [FOUND_winmm=yes]) 311 311 if test x${FOUND_winmm} = xyes ; then 312 312 LIBS="$LIBS -lwinmm" 313 313 fi 314 314 … … 524 524 #--------# 525 525 # 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 547 533 AC_CHECK_LIB([avutil], [main], [FOUND_avutil=yes; LIBS="$LIBS -lavutil"]) 548 534 AC_CHECK_LIB([xvid], [main], [FOUND_xvid=yes; LIBS="$LIBS -lxvid"]) … … 588 574 AC_SUBST(CURL_CFLAGS) 589 575 AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes") 576 577 #-----# 578 # LUA # 579 #-----# 580 LUA_DIR="/usr/include/lua" 581 AX_CHECK_LUA([${LUA_DIR}]) 590 582 591 583 #--------# … … 636 628 src/lib/gui/gl_gui/Makefile 637 629 src/lib/gui/qt_gui/Makefile 630 src/lib/script_engine/Makefile 638 631 src/lib/parser/Makefile 639 632 src/lib/parser/tinyxml/Makefile -
trunk/src/lib/Makefile.am
r8048 r8061 79 79 parser \ 80 80 shell \ 81 script_engine \ 81 82 gui -
trunk/src/lib/event/event_handler.cc
r8035 r8061 337 337 else 338 338 { 339 //SDL_WM_GrabInput(SDL_GRAB_ON);339 SDL_WM_GrabInput(SDL_GRAB_ON); 340 340 SDL_ShowCursor(SDL_DISABLE); 341 341 }
Note: See TracChangeset
for help on using the changeset viewer.