[6532] | 1 | |
---|
[4555] | 2 | ########################################################################## |
---|
| 3 | # orxonox - the future of 3D-vertical-scrollers # |
---|
| 4 | # # |
---|
| 5 | # Copyright (C) 2004 orx # |
---|
| 6 | # # |
---|
[3424] | 7 | # This program is free software; you can redistribute it and/or modify # |
---|
| 8 | # it under the terms of the GNU General Public License as published by # |
---|
| 9 | # the Free Software Foundation; either version 2, or (at your option) # |
---|
[4555] | 10 | # any later version. # |
---|
| 11 | # # |
---|
| 12 | # ### File Specific: # |
---|
| 13 | # main-programmer: Benjamin Grauer # |
---|
| 14 | # co-programmer: ... # |
---|
| 15 | # # |
---|
| 16 | # This is the main configuration File of autoconf. # |
---|
[3424] | 17 | # Please edit this file only, if you exactly know what you are doing. # |
---|
| 18 | # It is quite fragile, and compiling orxonox on different Platforms # |
---|
| 19 | # is only guarantied, if build with the right config. # |
---|
[4944] | 20 | # # |
---|
[7194] | 21 | # You might also have a look at the acinclude.m4, where many macros # |
---|
| 22 | # for this configuration files are stored # |
---|
| 23 | # # |
---|
[4944] | 24 | # be sure to visit us at http://www.orxonox.net # |
---|
[3424] | 25 | ########################################################################## |
---|
[1945] | 26 | |
---|
[3424] | 27 | ######################### |
---|
| 28 | ## AUTOCONF INIT PHASE ## |
---|
| 29 | ######################### |
---|
[5479] | 30 | AC_PREREQ(2.59) |
---|
[7223] | 31 | AC_INIT([orxonox], [0.3.4_alpha], [orxonox-dev at mail.datacore.ch]) |
---|
[2980] | 32 | |
---|
[3424] | 33 | ## Detect the canonical host and target build environment. |
---|
[2980] | 34 | AC_CANONICAL_BUILD |
---|
| 35 | AC_CANONICAL_HOST |
---|
| 36 | AC_CANONICAL_TARGET |
---|
| 37 | |
---|
[1959] | 38 | AM_INIT_AUTOMAKE |
---|
[2618] | 39 | |
---|
[7661] | 40 | AC_CONFIG_SRCDIR([src/orxonox.cc]) |
---|
[1945] | 41 | AC_CONFIG_HEADER([config.h]) |
---|
| 42 | |
---|
[3424] | 43 | ######################### |
---|
| 44 | ## Checks for programs ## |
---|
| 45 | ######################### |
---|
[1945] | 46 | AC_PROG_CXX |
---|
[5463] | 47 | AC_PROG_RANLIB |
---|
[2925] | 48 | AC_HEADER_STDC |
---|
[2701] | 49 | |
---|
[4774] | 50 | ## THIS IS OUR DEFAULT-DATA-DIRECTORY |
---|
| 51 | |
---|
[3424] | 52 | ################################## |
---|
| 53 | ## CHECKING OPTIONAL ARGUMENTS ## |
---|
| 54 | ################################## |
---|
[4774] | 55 | #----------------# |
---|
| 56 | # Data-Directory # |
---|
| 57 | #----------------# |
---|
| 58 | DATA_DIR=$datadir |
---|
| 59 | if test $DATA_DIR = \$\{prefix\}/share ; then |
---|
| 60 | echo "not given" |
---|
| 61 | DATA_DIR=/usr/share |
---|
| 62 | else |
---|
| 63 | echo "given: $DATA_DIR" |
---|
| 64 | fi |
---|
[7661] | 65 | AC_DEFINE_UNQUOTED([ORX_DATADIR], ["$DATA_DIR"], |
---|
[4774] | 66 | [Define to the read-only architecture-independent |
---|
[7661] | 67 | data directory of ORXONOX.]) |
---|
[3424] | 68 | |
---|
| 69 | #-----------------# |
---|
[5221] | 70 | # shared-lib-path # |
---|
| 71 | #-----------------# |
---|
| 72 | SHARED_LIB_PATH=no |
---|
| 73 | AC_MSG_CHECKING([shared lib path]) |
---|
| 74 | AC_ARG_WITH([shared-lib-path], |
---|
[5479] | 75 | AS_HELP_STRING(--with-shared-lib-path,Tells the executable, where to look for the shared libraries.), |
---|
[5223] | 76 | SHARED_LIB_PATH=$withval) |
---|
[5222] | 77 | if test x$SHARED_LIB_PATH != xno; then |
---|
[5265] | 78 | echo "set to $SHARED_LIB_PATH" |
---|
[5222] | 79 | else |
---|
[5221] | 80 | echo "no" |
---|
| 81 | fi |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | #-----------------# |
---|
[3424] | 85 | # DEBUG-statement # |
---|
| 86 | #-----------------# |
---|
[7729] | 87 | DEBUG_LEVEL=no |
---|
[3173] | 88 | AC_MSG_CHECKING([if DEBUG-mode should be enabled]) |
---|
[4555] | 89 | AC_ARG_ENABLE([debug], |
---|
[5479] | 90 | AS_HELP_STRING(--enable-debug,compiles in debug mode. Lots of debug info about the game.), |
---|
[7729] | 91 | DEBUG_LEVEL=$enableval) |
---|
[3205] | 92 | |
---|
[7729] | 93 | if test x$DEBUG_LEVEL = xno; then |
---|
[4555] | 94 | echo "no" |
---|
| 95 | echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." |
---|
[7729] | 96 | DEBUG_LEVEL=4 |
---|
| 97 | elif test x$DEBUG_LEVEL = xyes; then |
---|
[4555] | 98 | echo "yes" |
---|
| 99 | echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." |
---|
[7729] | 100 | DEBUG_LEVEL=4 |
---|
[4555] | 101 | else |
---|
[7729] | 102 | if test x$DEBUG_LEVEL = x0 || test x$DEBUG_LEVEL = x1 || test x$DEBUG_LEVEL = x2 || test x$DEBUG_LEVEL = x3 || test x$DEBUG_LEVEL = x4 || test x$DEBUG_LEVEL = x5 ; then |
---|
| 103 | echo "yes: setting debuglevel to to $DEBUG_LEVEL" |
---|
[6838] | 104 | else |
---|
[7729] | 105 | echo "yes: invalid Value for Debug ($DEBUG_LEVEL). setting to 4(DEBUG)" |
---|
| 106 | DEBUG_LEVEL=4 |
---|
[6838] | 107 | fi |
---|
[3173] | 108 | fi |
---|
[7661] | 109 | |
---|
[8147] | 110 | if test ${DEBUG_LEVEL} -gt 3 ; then |
---|
| 111 | CPPFLAGS="${CPPFLAGS} -g -Wall" |
---|
[7661] | 112 | fi |
---|
[7729] | 113 | AC_DEFINE_UNQUOTED(DEBUG_LEVEL, ${DEBUG_LEVEL}, [in which debug mode we are]) |
---|
| 114 | AC_SUBST(DEBUG_LEVEL) |
---|
[3173] | 115 | |
---|
[3592] | 116 | #---------------# |
---|
| 117 | # Modular Debug # |
---|
| 118 | #---------------# |
---|
| 119 | MODULAR_DEBUG=yes |
---|
| 120 | AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) |
---|
[4555] | 121 | AC_ARG_ENABLE([modular-debug], |
---|
[5479] | 122 | AS_HELP_STRING(--disable-modular-debug,compiles in modular-debug mode, that logs differently on the many modules of orxonox.), |
---|
[4555] | 123 | MODULAR_DEBUG=$enableval) |
---|
[3592] | 124 | |
---|
[4555] | 125 | if test x$MODULAR_DEBUG = xno; then |
---|
| 126 | echo "no" |
---|
[3592] | 127 | elif test x$MODULAR_DEBUG = xyes; then |
---|
[4555] | 128 | echo "yes" |
---|
| 129 | AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) |
---|
[3592] | 130 | fi |
---|
| 131 | |
---|
[3423] | 132 | |
---|
[3424] | 133 | #------------------# |
---|
| 134 | # libCurl-disabled # |
---|
| 135 | #------------------# |
---|
[3423] | 136 | AC_MSG_CHECKING([if libcURL should be enabled]) |
---|
[4774] | 137 | AC_ARG_ENABLE([curl], |
---|
[5479] | 138 | AS_HELP_STRING(--disable-curl,Prevents libcURL from being loaded), [def_curl=no], [def_curl=yes]) |
---|
[4555] | 139 | if test x$def_curl = xyes; then |
---|
[3423] | 140 | echo "yes" |
---|
[4555] | 141 | fi |
---|
| 142 | if test x$def_curl = xno; then |
---|
[3423] | 143 | echo "no" |
---|
| 144 | fi |
---|
| 145 | |
---|
[7661] | 146 | #--------------# |
---|
| 147 | # GTK-disabled # |
---|
| 148 | #--------------# |
---|
| 149 | |
---|
| 150 | AC_MSG_CHECKING([if gtk should be enabled]) |
---|
| 151 | AC_ARG_WITH([gtk], |
---|
| 152 | AS_HELP_STRING(--with-gtk, uses GTK for the GUI), [def_gtk=yes], [def_gtk=no]) |
---|
| 153 | if test x$def_gtk = xyes; then |
---|
| 154 | echo "yes - will be overwritten if Qt is enabled" |
---|
| 155 | fi |
---|
| 156 | if test x$def_gtk = xno; then |
---|
| 157 | echo "no" |
---|
| 158 | fi |
---|
| 159 | |
---|
| 160 | |
---|
| 161 | |
---|
[3424] | 162 | #-------------------# |
---|
| 163 | # SubProject-enable # |
---|
| 164 | #-------------------# |
---|
| 165 | def_sub_projects=no |
---|
[3377] | 166 | AC_MSG_CHECKING([if the SubProjects should be built]) |
---|
[4774] | 167 | AC_ARG_WITH([sub-projects], |
---|
[5479] | 168 | AS_HELP_STRING(--with-sub-projects,also builds the subProjects while make from srcdir), [def_sub_projects=yes]) |
---|
[3424] | 169 | if test x$def_sub_projects = xyes; then |
---|
[3377] | 170 | echo "yes" |
---|
[4555] | 171 | fi |
---|
[3424] | 172 | if test x$def_sub_projects = xno; then |
---|
[3377] | 173 | echo "no" |
---|
| 174 | fi |
---|
| 175 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) |
---|
| 176 | |
---|
[3788] | 177 | #-------------------# |
---|
| 178 | # Profiling Enabled # |
---|
| 179 | #-------------------# |
---|
| 180 | def_profiling=no |
---|
| 181 | AC_MSG_CHECKING([if Profiling should be enabled]) |
---|
[4555] | 182 | AC_ARG_ENABLE([profile], |
---|
[5479] | 183 | AS_HELP_STRING(--enable-profile,builds orxonox with profiling support), [def_profiling=yes]) |
---|
[3788] | 184 | if test x$def_profiling = xyes; then |
---|
| 185 | echo "yes" |
---|
| 186 | CXXFLAGS="$CXXFLAGS -pg" |
---|
[4555] | 187 | fi |
---|
[3788] | 188 | if test x$def_profiling = xno; then |
---|
| 189 | echo "no" |
---|
| 190 | fi |
---|
| 191 | |
---|
[3863] | 192 | #----------------# |
---|
| 193 | # efence Enabled # |
---|
| 194 | #----------------# |
---|
| 195 | def_efence=no |
---|
| 196 | AC_MSG_CHECKING([if efence should be enabled]) |
---|
[4555] | 197 | AC_ARG_ENABLE([efence], |
---|
[5479] | 198 | AS_HELP_STRING(--enable-efence,builds orxonox with efence support), [def_efence=yes]) |
---|
[3863] | 199 | if test x$def_efence = xyes; then |
---|
| 200 | echo "yes" |
---|
[4555] | 201 | fi |
---|
[3863] | 202 | if test x$def_efence = xno; then |
---|
| 203 | echo "no" |
---|
| 204 | fi |
---|
| 205 | |
---|
[3558] | 206 | #----------------------# |
---|
| 207 | # Documentation-enable # |
---|
| 208 | #----------------------# |
---|
| 209 | def_documentation=no |
---|
| 210 | AC_MSG_CHECKING([if the Documentation should be build by default]) |
---|
[4555] | 211 | AC_ARG_ENABLE([documentation], |
---|
[5479] | 212 | AS_HELP_STRING(--enable-documentation,also builds the sDocumentation while make from srcdir), [def_documentation=yes]) |
---|
[3558] | 213 | if test x$def_documentation = xyes; then |
---|
| 214 | echo "yes" |
---|
[4555] | 215 | fi |
---|
[3558] | 216 | if test x$def_documentation = xno; then |
---|
| 217 | echo "no" |
---|
| 218 | fi |
---|
| 219 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) |
---|
[4774] | 220 | |
---|
[5467] | 221 | #---------------------------# |
---|
| 222 | # WITH TARDIS (convenience) # |
---|
| 223 | #---------------------------# |
---|
| 224 | def_tardis=no |
---|
[5478] | 225 | GTKPATH="" |
---|
[5467] | 226 | AC_MSG_CHECKING([convenience flag for working at the taris in the ETH zurich]) |
---|
[5468] | 227 | AC_ARG_WITH([tardis], |
---|
[5479] | 228 | AS_HELP_STRING(--with-tardis,sets all the necesary environment flags for linux-TARDIS boxes at the ETH Zurich), [def_tardis=yes]) |
---|
[5467] | 229 | if test x$def_tardis = xyes; then |
---|
[5469] | 230 | ARCH=i686-debian-linux3.1 |
---|
[5470] | 231 | ## GAMELIBS |
---|
[5467] | 232 | PREFIX=/usr/pack/gamelibs-1.0-to |
---|
[5469] | 233 | CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include" |
---|
| 234 | LDFLAGS="${LDFLAGS} -L$PREFIX/${ARCH}/lib -Wl,-rpath -Wl,${PREFIX}/${ARCH}/lib" |
---|
[7661] | 235 | |
---|
[7753] | 236 | ## QT on Tardis |
---|
[7661] | 237 | QT_PREFIX=/usr/pack/qt-4.1.1-mo/${ARCH} |
---|
| 238 | # CPPFLAGS="${CPPFLAGS} -I${PREFIX_QT}/include" |
---|
| 239 | # LDFLAGS="${LDFLAGS} -L${QT_PREFIX}/lib -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib" |
---|
| 240 | |
---|
[5467] | 241 | fi |
---|
| 242 | if test x$def_tardis = xno; then |
---|
| 243 | echo "no" |
---|
| 244 | fi |
---|
| 245 | |
---|
[7661] | 246 | |
---|
| 247 | |
---|
[3424] | 248 | ####################### |
---|
| 249 | ## PROGRAMM CHECKING ## |
---|
| 250 | ## 3. party Programs ## |
---|
| 251 | ####################### |
---|
| 252 | |
---|
| 253 | #----------------------# |
---|
| 254 | # checking for Doxygen # |
---|
| 255 | #----------------------# |
---|
[3219] | 256 | AC_PATH_PROG(DOXYGEN, doxygen) |
---|
| 257 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) |
---|
| 258 | |
---|
[3789] | 259 | #--------------------# |
---|
| 260 | # checking for gprof # |
---|
| 261 | #--------------------# |
---|
| 262 | AC_PATH_PROG(GPROF, gprof) |
---|
| 263 | |
---|
[4130] | 264 | #-------------------------# |
---|
| 265 | # checking for pkg-config # |
---|
| 266 | #-------------------------# |
---|
| 267 | if test x$def_gtk = xyes; then |
---|
[5478] | 268 | if test x${GTKPATH} != x; then |
---|
| 269 | AC_PATH_PROG([PKG_CONFIG], [pkg-config],[], $GTKPATH ) |
---|
| 270 | else |
---|
| 271 | AC_PATH_PROG(PKG_CONFIG, pkg-config ) |
---|
| 272 | fi |
---|
[4130] | 273 | fi |
---|
| 274 | |
---|
| 275 | |
---|
[3424] | 276 | ######################### |
---|
| 277 | ## CHECKING FOR SYSTEM ## |
---|
| 278 | ######################### |
---|
| 279 | ## here the system is checked, and openGL is included |
---|
| 280 | ## also checking for SDL on differen Systems |
---|
[2701] | 281 | |
---|
| 282 | AC_MSG_CHECKING([for System]) |
---|
[2980] | 283 | ## checking for openGL-environment and other sys-specific parameters |
---|
| 284 | case "$target" in |
---|
[4825] | 285 | |
---|
| 286 | ########### |
---|
[3424] | 287 | #---------# |
---|
| 288 | # WINDOWS # |
---|
| 289 | #---------# |
---|
[4825] | 290 | ########### |
---|
[2980] | 291 | *-*-mingw32*) |
---|
[2701] | 292 | echo "mingw-WINDOWS detected" |
---|
| 293 | |
---|
[8147] | 294 | CPPFLAGS="-I/usr/include -I/mingw/include ${CPPFLAGS}" |
---|
[3790] | 295 | |
---|
[2701] | 296 | mingw="yes" |
---|
| 297 | MSBITFIELDS="-mms-bitfields" |
---|
| 298 | MWINDOWS="-mwindows" |
---|
| 299 | |
---|
[5276] | 300 | #--------# |
---|
| 301 | # MIN-GW # |
---|
| 302 | #--------# |
---|
[4697] | 303 | # checking for mingw32 |
---|
| 304 | AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) |
---|
| 305 | if test x$FOUND_mingw32 = xyes; then |
---|
| 306 | LIBS="$LIBS -lmingw32" |
---|
| 307 | fi |
---|
| 308 | |
---|
[7919] | 309 | AC_CHECK_LIB([winmm], [main], [FOUND_winmm=yes]) |
---|
| 310 | if test x${FOUND_winmm} = xyes ; then |
---|
[8061] | 311 | LIBS="$LIBS -lwinmm" |
---|
[7919] | 312 | fi |
---|
| 313 | |
---|
[4697] | 314 | #---------------# |
---|
| 315 | # open-GL (win) # |
---|
| 316 | #---------------# |
---|
[2925] | 317 | # checking gl header |
---|
[2879] | 318 | AC_CHECK_HEADERS(GL/gl.h ,, |
---|
[5276] | 319 | [AC_MSG_ERROR([cannot find opengl headers])]) |
---|
[2701] | 320 | # checking for Windows openGl library |
---|
[5276] | 321 | AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"]) |
---|
| 322 | if test x$FOUND_GL != xyes ; then |
---|
[4555] | 323 | echo "------------------" |
---|
| 324 | echo "opengl not found." |
---|
| 325 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
| 326 | echo "------------------" |
---|
| 327 | exit -1 |
---|
[1959] | 328 | fi |
---|
| 329 | |
---|
[2701] | 330 | # cheking for GLU-header |
---|
[3424] | 331 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
[1971] | 332 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 333 | |
---|
[2701] | 334 | # checking for libGLU |
---|
[5276] | 335 | AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"]) |
---|
| 336 | if test x$FOUND_GLU != xyes ; then |
---|
[4555] | 337 | echo "------------------" |
---|
| 338 | echo "GLU library not found." |
---|
| 339 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
| 340 | echo "------------------" |
---|
| 341 | exit -1 |
---|
[1959] | 342 | fi |
---|
[1971] | 343 | |
---|
[5270] | 344 | # checking glew header |
---|
| 345 | AC_CHECK_HEADERS(GL/glew.h ,, |
---|
| 346 | [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ]) |
---|
| 347 | # checking for Windows glew library |
---|
[5276] | 348 | AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"]) |
---|
| 349 | if test x$FOUND_GLEW != xyes ; then |
---|
[5270] | 350 | echo "------------------" |
---|
| 351 | echo "opengl extension wrangler not found." |
---|
| 352 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
| 353 | echo "------------------" |
---|
| 354 | exit -1 |
---|
| 355 | fi |
---|
| 356 | |
---|
[4697] | 357 | #--------# |
---|
| 358 | # openAL # |
---|
| 359 | #--------# |
---|
[6838] | 360 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [OpenAL32], [main],,, [http://www.openal.org]) |
---|
[4825] | 361 | |
---|
[5276] | 362 | #-----------# |
---|
| 363 | # SDL(win) # |
---|
| 364 | #-----------# |
---|
| 365 | # checking for SDL-headers |
---|
| 366 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
| 367 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
| 368 | |
---|
| 369 | #checking for libSDL |
---|
| 370 | AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"]) |
---|
| 371 | if test x$FOUND_sdlmain != xyes ; then |
---|
| 372 | echo "------------------" |
---|
| 373 | echo "SDL library not found." |
---|
| 374 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 375 | echo "------------------" |
---|
| 376 | exit 1 |
---|
| 377 | fi |
---|
| 378 | AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"]) |
---|
| 379 | if test x$FOUND_SDL != xyes ; then |
---|
| 380 | echo "------------------" |
---|
| 381 | echo "SDL library not found." |
---|
| 382 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 383 | echo "------------------" |
---|
| 384 | exit -1 |
---|
| 385 | fi |
---|
| 386 | |
---|
| 387 | ;; |
---|
| 388 | |
---|
[4825] | 389 | ######### |
---|
[3424] | 390 | #-------# |
---|
| 391 | # LINUX # |
---|
| 392 | #-------# |
---|
[4825] | 393 | ######### |
---|
[2980] | 394 | *-*-linux*) |
---|
[2701] | 395 | echo "Linux detected" |
---|
| 396 | |
---|
| 397 | Linux="yes" |
---|
| 398 | |
---|
[5265] | 399 | ##CPPFLAGS="-I/usr/include $CPPFLAGS" |
---|
[5224] | 400 | ##LDFLAGS="-L/usr/lib $LDFLAGS" |
---|
[5221] | 401 | if test x$SHARED_LIB_PATH != xno; then |
---|
[5265] | 402 | echo "setting new LDFLAGS with $SHARED_LIB_PATH" |
---|
| 403 | LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS" |
---|
[5221] | 404 | fi |
---|
| 405 | |
---|
[5277] | 406 | #--------# |
---|
| 407 | # openGL # |
---|
| 408 | #--------# |
---|
[6164] | 409 | AX_CHECK_REQUIRED_HEADER_LIB([GL/gl.h], [GL], [main],,, [http://www.opengl.org]) |
---|
| 410 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glu.h], [GLU], [main],,, [http://www.opengl.org]) |
---|
| 411 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glew.h], [GLEW], [main],,, [http://glew.sourceforge.net]) |
---|
[2701] | 412 | |
---|
[4697] | 413 | #--------# |
---|
| 414 | # openAL # |
---|
| 415 | #--------# |
---|
[6271] | 416 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [openal], [main],,, [http://www.openal.org]) |
---|
[6164] | 417 | |
---|
[5276] | 418 | #-----# |
---|
| 419 | # SDL # |
---|
| 420 | #-----# |
---|
[4664] | 421 | # checking for SDL |
---|
| 422 | AC_MSG_CHECKING([for SDL-version]) |
---|
| 423 | SDL_VERSION=`sdl-config --version` |
---|
| 424 | echo $SDL_VERSION |
---|
[8147] | 425 | CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`" |
---|
[2991] | 426 | |
---|
[6271] | 427 | AX_CHECK_REQUIRED_HEADER_LIB([SDL.h SDL/SDL.h], [SDL], [main],,, [http://www.libsdl.org]) |
---|
| 428 | |
---|
[4664] | 429 | ;; |
---|
[3140] | 430 | |
---|
[4825] | 431 | ############# |
---|
[3424] | 432 | #-----------# |
---|
| 433 | # MAC -OS X # |
---|
| 434 | #-----------# |
---|
[4825] | 435 | ############# |
---|
[2995] | 436 | *darwin*) |
---|
[3424] | 437 | echo "OS X detected" |
---|
[2995] | 438 | |
---|
| 439 | osX="yes" |
---|
| 440 | |
---|
[8147] | 441 | CPPFLAGS="-I/sw/include -I/sw/include ${CPPFLAGS}" |
---|
[5278] | 442 | LDFLAGS="$LDFLAGS -L/sw/lib" |
---|
[2995] | 443 | # checking gl header |
---|
[3424] | 444 | AC_CHECK_HEADERS([OpenGL/gl.h] ,, |
---|
[2995] | 445 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 446 | # cheking for GLU-header |
---|
[3424] | 447 | AC_CHECK_HEADERS([OpenGL/glu.h] ,, |
---|
[2995] | 448 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 449 | |
---|
| 450 | LIBS="$LIBS -framework OpenGL" |
---|
| 451 | |
---|
[5279] | 452 | |
---|
| 453 | |
---|
| 454 | # checking for GLEW-headers |
---|
| 455 | AC_CHECK_HEADERS([GL/glew.h] ,, |
---|
| 456 | [AC_MSG_ERROR([cannot find glew headers]) ]) |
---|
| 457 | # checking for GLEW-lib |
---|
| 458 | AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"]) |
---|
| 459 | if test x$FOUND_GLEW != xyes ; then |
---|
| 460 | echo "------------------" |
---|
| 461 | echo "glew not found." |
---|
| 462 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
| 463 | echo "------------------" |
---|
| 464 | exit -1 |
---|
| 465 | fi |
---|
| 466 | |
---|
| 467 | |
---|
[5278] | 468 | AC_CHECK_HEADERS([OpenAL/al.h] ,, |
---|
| 469 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 470 | HAVE_OPENAL=yes |
---|
| 471 | LIBS="$LIBS -framework OpenAL" |
---|
[4662] | 472 | |
---|
[5278] | 473 | |
---|
[4662] | 474 | ## SDL-check |
---|
[5295] | 475 | SDL_CFLAGS=`sdl-config --cflags` |
---|
| 476 | SDL_LIBS=`sdl-config --libs` |
---|
[6876] | 477 | CXXFL\AGS="$CXXFLAGS $SDL_CFLAGS" |
---|
[5295] | 478 | LIBS="$LIBS $SDL_LIBS" |
---|
[5278] | 479 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
| 480 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
| 481 | HAVE_SDL=yes |
---|
[5295] | 482 | # LIBS="$LIBS -framework SDL" |
---|
[3424] | 483 | |
---|
[2995] | 484 | # checking for SDL-headers |
---|
[3001] | 485 | # AC_CHECK_HEADERS(SDL/SDL.h ,, |
---|
| 486 | # [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
[2995] | 487 | |
---|
| 488 | ## checking for SDL |
---|
| 489 | # SDL_VERSION=1.2.7 |
---|
| 490 | # AM_PATH_SDL($SDL_VERSION, |
---|
| 491 | # :, |
---|
| 492 | # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
---|
| 493 | # ) |
---|
| 494 | |
---|
[3140] | 495 | |
---|
[2995] | 496 | ;; |
---|
| 497 | |
---|
[2701] | 498 | *) |
---|
| 499 | ;; |
---|
| 500 | esac |
---|
[2968] | 501 | |
---|
[2701] | 502 | AC_SUBST(MSBITFIELDS) |
---|
| 503 | |
---|
[3424] | 504 | ################################### |
---|
| 505 | ## CHECKING FOR HEADERS AND LIBS ## |
---|
| 506 | ################################### |
---|
| 507 | |
---|
[4665] | 508 | #---------# |
---|
| 509 | # SDL_ttf # |
---|
| 510 | #---------# |
---|
[6271] | 511 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_ttf.h SDL/SDL_ttf.h], [SDL_ttf], [TTF_OpenFont],,, [http://www.libsdl.org/projects/SDL_ttf]) |
---|
[4665] | 512 | #-----------# |
---|
| 513 | # SDL_Image # |
---|
| 514 | #-----------# |
---|
[6271] | 515 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_image.h SDL/SDL_image.h], [SDL_image], [main],,, [http://www.libsdl.org/projects/SDL_image]) |
---|
[5822] | 516 | #---------# |
---|
| 517 | # SDL_Net # |
---|
| 518 | #---------# |
---|
[6271] | 519 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_net.h SDL/SDL_net.h], [SDL_net], [main],,, [http://www.libsdl.org/projects/SDL_net]) |
---|
[5822] | 520 | |
---|
[4504] | 521 | #--------# |
---|
[6627] | 522 | # FFmpeg # |
---|
[6532] | 523 | #--------# |
---|
| 524 | # checking for FFmpeg-headers |
---|
[8061] | 525 | AX_CHECK_REQUIRED_HEADER_LIB([avformat.h ffmpeg/avformat.h] ,[avformat], [main], |
---|
| 526 | [AX_CHECK_REQUIRED_HEADER_LIB([avcodec.h ffmpeg/avcodec.h], [avcodec], [main],,, [http://ffmpeg.sourceforge.net]) LIBS="${LIBS} -lavformat -lavcodec"], |
---|
[8145] | 527 | [AX_GET_INSTALL_NECESSARY_LIB([http://svn.orxonox.net/webdev/develop/ext_libs], [ffmpeg.tar.gz], [ffmpeg], [extern_libs/], [include/*.h lib/*.a]) |
---|
[8061] | 528 | LIBS="-llualib -llua" CPPFLAGS="${CPPFLAGS} -I$(top_build_dir)/extern_libs" ], |
---|
| 529 | [http://ffmpeg.sourceforge.net]) |
---|
| 530 | |
---|
| 531 | |
---|
[8145] | 532 | |
---|
| 533 | |
---|
[6532] | 534 | AC_CHECK_LIB([avutil], [main], [FOUND_avutil=yes; LIBS="$LIBS -lavutil"]) |
---|
[6877] | 535 | AC_CHECK_LIB([xvid], [main], [FOUND_xvid=yes; LIBS="$LIBS -lxvid"]) |
---|
[6609] | 536 | AC_CHECK_LIB([gcj], [main], [FOUND_gcj=yes; LIBS="$LIBS -lgcj"]) |
---|
[6532] | 537 | AC_CHECK_LIB([theora], [main], [FOUND_theora=yes; LIBS="$LIBS -ltheora"]) |
---|
| 538 | AC_CHECK_LIB([dts], [main], [FOUND_dts=yes; LIBS="$LIBS -ldts"]) |
---|
| 539 | AC_CHECK_LIB([gsm], [main], [FOUND_gsm=yes; LIBS="$LIBS -lgsm"]) |
---|
| 540 | AC_CHECK_LIB([dc1394_control], [main], [FOUND_dc1394_control=yes; LIBS="$LIBS -ldc1394_control"]) |
---|
| 541 | AC_CHECK_LIB([vorbisenc], [main], [FOUND_vorbisenc=yes; LIBS="$LIBS -lvorbisenc"]) |
---|
| 542 | |
---|
[6877] | 543 | |
---|
| 544 | #--------# |
---|
| 545 | # vorbis # |
---|
| 546 | #--------# |
---|
| 547 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/vorbisfile.h], [vorbisfile], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 548 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/codec.h], [vorbis], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 549 | |
---|
| 550 | #-----# |
---|
| 551 | # ogg # |
---|
| 552 | #-----# |
---|
| 553 | AX_CHECK_REQUIRED_HEADER_LIB([ogg/ogg.h], [ogg], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 554 | |
---|
| 555 | |
---|
[7661] | 556 | #----# |
---|
| 557 | # QT # |
---|
| 558 | #----# |
---|
[7669] | 559 | AX_CHECK_QT([${QT_PREFIX}], [QtCore QtCore4],, [http://www.trolltech.com]) |
---|
[7661] | 560 | if test x$have_qt = xno ; then |
---|
| 561 | WITH_QT=no |
---|
| 562 | fi |
---|
[3423] | 563 | |
---|
[7661] | 564 | #---------# |
---|
| 565 | # libcURL # |
---|
| 566 | #---------# |
---|
| 567 | AX_CHECK_HEADER_LIB([curl/curl.h], [curl], [main], [ |
---|
| 568 | have_curl=yes |
---|
| 569 | CURL_LIBS=`curl-config --libs` |
---|
| 570 | CURLCFLAGS=`curl-config --cflags` |
---|
| 571 | AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) ] |
---|
| 572 | ,, [http://curl.haxx.se/]) |
---|
| 573 | |
---|
| 574 | AC_SUBST(CURL_LIBS) |
---|
| 575 | AC_SUBST(CURL_CFLAGS) |
---|
| 576 | AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes") |
---|
| 577 | |
---|
[8061] | 578 | #-----# |
---|
| 579 | # LUA # |
---|
| 580 | #-----# |
---|
| 581 | LUA_DIR="/usr/include/lua" |
---|
| 582 | AX_CHECK_LUA([${LUA_DIR}]) |
---|
| 583 | |
---|
[7661] | 584 | #--------# |
---|
| 585 | # efence # |
---|
| 586 | #--------# |
---|
| 587 | if test x$def_efence = xyes ; then |
---|
| 588 | AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"]) |
---|
| 589 | if test x$FOUND_efence != xyes ; then |
---|
| 590 | echo "efence was requested, but is not installed!! going on" |
---|
| 591 | fi |
---|
| 592 | fi |
---|
| 593 | |
---|
[1945] | 594 | # FIXME: Replace `main' with a function in `-lm': |
---|
[2968] | 595 | AC_CHECK_LIB([m], [main]) |
---|
[7954] | 596 | AX_CHECK_REQUIRED_HEADER_LIB([zlib.h], [z], [zlibVersion],,, [http://www.zlib.net]) |
---|
[1945] | 597 | |
---|
| 598 | # Checks for header files. |
---|
| 599 | AC_HEADER_STDC |
---|
| 600 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
| 601 | |
---|
| 602 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 603 | AC_HEADER_STDBOOL |
---|
| 604 | |
---|
| 605 | # Checks for library functions. |
---|
| 606 | AC_FUNC_MALLOC |
---|
| 607 | AC_CHECK_FUNCS([bzero sqrt]) |
---|
| 608 | |
---|
[3424] | 609 | ###################### |
---|
| 610 | ## OUTPUT CONFIGURE ## |
---|
| 611 | ###################### |
---|
[1946] | 612 | AC_CONFIG_FILES([Makefile |
---|
[3377] | 613 | src/Makefile |
---|
[4555] | 614 | src/lib/Makefile |
---|
[7033] | 615 | src/lib/math/Makefile |
---|
[4555] | 616 | src/lib/graphics/Makefile |
---|
| 617 | src/lib/graphics/importer/Makefile |
---|
[4789] | 618 | src/lib/graphics/spatial_separation/Makefile |
---|
[4555] | 619 | src/lib/sound/Makefile |
---|
| 620 | src/lib/event/Makefile |
---|
| 621 | src/lib/physics/Makefile |
---|
| 622 | src/lib/particles/Makefile |
---|
| 623 | src/lib/collision_detection/Makefile |
---|
[7819] | 624 | src/lib/collision_reaction/Makefile |
---|
[7151] | 625 | src/lib/network/Makefile |
---|
[5160] | 626 | src/lib/shell/Makefile |
---|
[4555] | 627 | src/lib/gui/Makefile |
---|
[8145] | 628 | src/lib/gui/gtk/Makefile |
---|
| 629 | src/lib/gui/gl/Makefile |
---|
| 630 | src/lib/gui/qt/Makefile |
---|
[8061] | 631 | src/lib/script_engine/Makefile |
---|
[5944] | 632 | src/lib/parser/Makefile |
---|
| 633 | src/lib/parser/tinyxml/Makefile |
---|
| 634 | src/lib/parser/ini_parser/Makefile |
---|
[7256] | 635 | src/lib/parser/cmdline_parser/Makefile |
---|
[7661] | 636 | src/lib/parser/preferences/Makefile |
---|
[5350] | 637 | src/util/Makefile |
---|
[7151] | 638 | src/world_entities/Makefile |
---|
[4662] | 639 | src/subprojects/Makefile |
---|
[4555] | 640 | src/subprojects/testmain/Makefile |
---|
| 641 | src/subprojects/importer/Makefile |
---|
| 642 | src/subprojects/particles/Makefile |
---|
| 643 | src/subprojects/collision_detection/Makefile |
---|
[5822] | 644 | src/subprojects/network/Makefile |
---|
[4555] | 645 | ]) |
---|
[3377] | 646 | |
---|
[1945] | 647 | AC_OUTPUT |
---|