[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 | ######################### |
---|
[9391] | 30 | AC_PREREQ(2.56) |
---|
[9874] | 31 | AC_INIT([orxonox], [0.3.6_alpha], [orxonox at orxonox dot net]) |
---|
[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], |
---|
[9886] | 75 | AC_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], |
---|
[9886] | 90 | AC_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], |
---|
[9886] | 122 | AC_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], |
---|
[9886] | 138 | AC_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 | |
---|
[3424] | 147 | #-------------------# |
---|
| 148 | # SubProject-enable # |
---|
| 149 | #-------------------# |
---|
| 150 | def_sub_projects=no |
---|
[3377] | 151 | AC_MSG_CHECKING([if the SubProjects should be built]) |
---|
[4774] | 152 | AC_ARG_WITH([sub-projects], |
---|
[9886] | 153 | AC_HELP_STRING(--with-sub-projects,also builds the subProjects while make from srcdir), [def_sub_projects=yes]) |
---|
[3424] | 154 | if test x$def_sub_projects = xyes; then |
---|
[3377] | 155 | echo "yes" |
---|
[4555] | 156 | fi |
---|
[3424] | 157 | if test x$def_sub_projects = xno; then |
---|
[3377] | 158 | echo "no" |
---|
| 159 | fi |
---|
| 160 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) |
---|
| 161 | |
---|
[3788] | 162 | #-------------------# |
---|
| 163 | # Profiling Enabled # |
---|
| 164 | #-------------------# |
---|
| 165 | def_profiling=no |
---|
| 166 | AC_MSG_CHECKING([if Profiling should be enabled]) |
---|
[4555] | 167 | AC_ARG_ENABLE([profile], |
---|
[9886] | 168 | AC_HELP_STRING(--enable-profile,builds orxonox with profiling support), [def_profiling=yes]) |
---|
[3788] | 169 | if test x$def_profiling = xyes; then |
---|
| 170 | echo "yes" |
---|
| 171 | CXXFLAGS="$CXXFLAGS -pg" |
---|
[4555] | 172 | fi |
---|
[3788] | 173 | if test x$def_profiling = xno; then |
---|
| 174 | echo "no" |
---|
| 175 | fi |
---|
| 176 | |
---|
[3863] | 177 | #----------------# |
---|
| 178 | # efence Enabled # |
---|
| 179 | #----------------# |
---|
| 180 | def_efence=no |
---|
| 181 | AC_MSG_CHECKING([if efence should be enabled]) |
---|
[4555] | 182 | AC_ARG_ENABLE([efence], |
---|
[9886] | 183 | AC_HELP_STRING(--enable-efence,builds orxonox with efence support), [def_efence=yes]) |
---|
[3863] | 184 | if test x$def_efence = xyes; then |
---|
| 185 | echo "yes" |
---|
[4555] | 186 | fi |
---|
[3863] | 187 | if test x$def_efence = xno; then |
---|
| 188 | echo "no" |
---|
| 189 | fi |
---|
| 190 | |
---|
[3558] | 191 | #----------------------# |
---|
| 192 | # Documentation-enable # |
---|
| 193 | #----------------------# |
---|
| 194 | def_documentation=no |
---|
| 195 | AC_MSG_CHECKING([if the Documentation should be build by default]) |
---|
[4555] | 196 | AC_ARG_ENABLE([documentation], |
---|
[9886] | 197 | AC_HELP_STRING(--enable-documentation,also builds the sDocumentation while make from srcdir), [def_documentation=yes]) |
---|
[3558] | 198 | if test x$def_documentation = xyes; then |
---|
| 199 | echo "yes" |
---|
[4555] | 200 | fi |
---|
[3558] | 201 | if test x$def_documentation = xno; then |
---|
| 202 | echo "no" |
---|
| 203 | fi |
---|
| 204 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) |
---|
[4774] | 205 | |
---|
[5467] | 206 | #---------------------------# |
---|
| 207 | # WITH TARDIS (convenience) # |
---|
| 208 | #---------------------------# |
---|
| 209 | def_tardis=no |
---|
| 210 | AC_MSG_CHECKING([convenience flag for working at the taris in the ETH zurich]) |
---|
[5468] | 211 | AC_ARG_WITH([tardis], |
---|
[9886] | 212 | AC_HELP_STRING(--with-tardis,sets all the necesary environment flags for linux-TARDIS boxes at the ETH Zurich), [def_tardis=yes]) |
---|
[5467] | 213 | if test x$def_tardis = xyes; then |
---|
[5469] | 214 | ARCH=i686-debian-linux3.1 |
---|
[5470] | 215 | ## GAMELIBS |
---|
[5467] | 216 | PREFIX=/usr/pack/gamelibs-1.0-to |
---|
[5469] | 217 | CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include" |
---|
| 218 | LDFLAGS="${LDFLAGS} -L$PREFIX/${ARCH}/lib -Wl,-rpath -Wl,${PREFIX}/${ARCH}/lib" |
---|
[7661] | 219 | |
---|
[7753] | 220 | ## QT on Tardis |
---|
[7661] | 221 | QT_PREFIX=/usr/pack/qt-4.1.1-mo/${ARCH} |
---|
| 222 | # CPPFLAGS="${CPPFLAGS} -I${PREFIX_QT}/include" |
---|
| 223 | # LDFLAGS="${LDFLAGS} -L${QT_PREFIX}/lib -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib" |
---|
| 224 | |
---|
[5467] | 225 | fi |
---|
| 226 | if test x$def_tardis = xno; then |
---|
| 227 | echo "no" |
---|
| 228 | fi |
---|
| 229 | |
---|
[7661] | 230 | |
---|
| 231 | |
---|
[3424] | 232 | ####################### |
---|
| 233 | ## PROGRAMM CHECKING ## |
---|
| 234 | ## 3. party Programs ## |
---|
| 235 | ####################### |
---|
| 236 | |
---|
| 237 | #----------------------# |
---|
| 238 | # checking for Doxygen # |
---|
| 239 | #----------------------# |
---|
[3219] | 240 | AC_PATH_PROG(DOXYGEN, doxygen) |
---|
| 241 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) |
---|
| 242 | |
---|
[3789] | 243 | #--------------------# |
---|
| 244 | # checking for gprof # |
---|
| 245 | #--------------------# |
---|
| 246 | AC_PATH_PROG(GPROF, gprof) |
---|
| 247 | |
---|
[4130] | 248 | |
---|
[3424] | 249 | ######################### |
---|
| 250 | ## CHECKING FOR SYSTEM ## |
---|
| 251 | ######################### |
---|
| 252 | ## here the system is checked, and openGL is included |
---|
| 253 | ## also checking for SDL on differen Systems |
---|
[2701] | 254 | |
---|
| 255 | AC_MSG_CHECKING([for System]) |
---|
[2980] | 256 | ## checking for openGL-environment and other sys-specific parameters |
---|
| 257 | case "$target" in |
---|
[4825] | 258 | |
---|
[9875] | 259 | |
---|
| 260 | ######### |
---|
| 261 | #-------# |
---|
| 262 | # LINUX # |
---|
| 263 | #-------# |
---|
| 264 | ######### |
---|
| 265 | *-*-linux*) |
---|
| 266 | echo "Linux detected" |
---|
| 267 | |
---|
| 268 | Linux="yes" |
---|
| 269 | |
---|
| 270 | ##CPPFLAGS="-I/usr/include $CPPFLAGS" |
---|
| 271 | ##LDFLAGS="-L/usr/lib $LDFLAGS" |
---|
| 272 | if test x$SHARED_LIB_PATH != xno; then |
---|
| 273 | echo "setting new LDFLAGS with $SHARED_LIB_PATH" |
---|
| 274 | LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS" |
---|
| 275 | fi |
---|
| 276 | |
---|
| 277 | #--------# |
---|
| 278 | # openGL # |
---|
| 279 | #--------# |
---|
| 280 | AX_CHECK_REQUIRED_HEADER_LIB([GL/gl.h], [GL], [main],,, [http://www.opengl.org]) |
---|
| 281 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glu.h], [GLU], [main],,, [http://www.opengl.org]) |
---|
| 282 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glew.h], [GLEW], [main],,, [http://glew.sourceforge.net]) |
---|
| 283 | |
---|
| 284 | #--------# |
---|
| 285 | # openAL # |
---|
| 286 | #--------# |
---|
| 287 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [openal], [main],,, [http://www.openal.org]) |
---|
| 288 | |
---|
| 289 | #-----# |
---|
| 290 | # SDL # |
---|
| 291 | #-----# |
---|
| 292 | # checking for SDL |
---|
| 293 | AC_MSG_CHECKING([for SDL-version]) |
---|
| 294 | SDL_VERSION=`sdl-config --version` |
---|
| 295 | echo $SDL_VERSION |
---|
[10475] | 296 | |
---|
[9875] | 297 | |
---|
[10475] | 298 | AX_CHECK_REQUIRED_HEADER_LIB([SDL.h SDL/SDL.h], [SDL], [main],, [ |
---|
| 299 | CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`" |
---|
| 300 | LDFLAGS="${LDFLAGS} `sdl-config --libs`"], [http://www.libsdl.org]) |
---|
| 301 | |
---|
[9875] | 302 | |
---|
| 303 | ;; |
---|
| 304 | |
---|
[4825] | 305 | ########### |
---|
[3424] | 306 | #---------# |
---|
| 307 | # WINDOWS # |
---|
| 308 | #---------# |
---|
[4825] | 309 | ########### |
---|
[2980] | 310 | *-*-mingw32*) |
---|
[2701] | 311 | echo "mingw-WINDOWS detected" |
---|
| 312 | |
---|
[8147] | 313 | CPPFLAGS="-I/usr/include -I/mingw/include ${CPPFLAGS}" |
---|
[8523] | 314 | LDFLAGS="${LDFLAGS} -L/mingw/lib" |
---|
[2701] | 315 | mingw="yes" |
---|
| 316 | MSBITFIELDS="-mms-bitfields" |
---|
| 317 | MWINDOWS="-mwindows" |
---|
| 318 | |
---|
[5276] | 319 | #--------# |
---|
| 320 | # MIN-GW # |
---|
| 321 | #--------# |
---|
[4697] | 322 | # checking for mingw32 |
---|
| 323 | AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) |
---|
| 324 | if test x$FOUND_mingw32 = xyes; then |
---|
| 325 | LIBS="$LIBS -lmingw32" |
---|
| 326 | fi |
---|
| 327 | |
---|
[7919] | 328 | AC_CHECK_LIB([winmm], [main], [FOUND_winmm=yes]) |
---|
| 329 | if test x${FOUND_winmm} = xyes ; then |
---|
[8061] | 330 | LIBS="$LIBS -lwinmm" |
---|
[7919] | 331 | fi |
---|
| 332 | |
---|
[4697] | 333 | #---------------# |
---|
| 334 | # open-GL (win) # |
---|
| 335 | #---------------# |
---|
[2925] | 336 | # checking gl header |
---|
[2879] | 337 | AC_CHECK_HEADERS(GL/gl.h ,, |
---|
[5276] | 338 | [AC_MSG_ERROR([cannot find opengl headers])]) |
---|
[2701] | 339 | # checking for Windows openGl library |
---|
[5276] | 340 | AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"]) |
---|
| 341 | if test x$FOUND_GL != xyes ; then |
---|
[4555] | 342 | echo "------------------" |
---|
| 343 | echo "opengl not found." |
---|
| 344 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
| 345 | echo "------------------" |
---|
| 346 | exit -1 |
---|
[1959] | 347 | fi |
---|
| 348 | |
---|
[2701] | 349 | # cheking for GLU-header |
---|
[3424] | 350 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
[1971] | 351 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 352 | |
---|
[2701] | 353 | # checking for libGLU |
---|
[5276] | 354 | AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"]) |
---|
| 355 | if test x$FOUND_GLU != xyes ; then |
---|
[4555] | 356 | echo "------------------" |
---|
| 357 | echo "GLU library not found." |
---|
| 358 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
| 359 | echo "------------------" |
---|
| 360 | exit -1 |
---|
[1959] | 361 | fi |
---|
[1971] | 362 | |
---|
[5270] | 363 | # checking glew header |
---|
| 364 | AC_CHECK_HEADERS(GL/glew.h ,, |
---|
| 365 | [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ]) |
---|
| 366 | # checking for Windows glew library |
---|
[5276] | 367 | AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"]) |
---|
| 368 | if test x$FOUND_GLEW != xyes ; then |
---|
[5270] | 369 | echo "------------------" |
---|
| 370 | echo "opengl extension wrangler not found." |
---|
| 371 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
| 372 | echo "------------------" |
---|
| 373 | exit -1 |
---|
| 374 | fi |
---|
| 375 | |
---|
[4697] | 376 | #--------# |
---|
| 377 | # openAL # |
---|
| 378 | #--------# |
---|
[6838] | 379 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [OpenAL32], [main],,, [http://www.openal.org]) |
---|
[4825] | 380 | |
---|
[5276] | 381 | #-----------# |
---|
| 382 | # SDL(win) # |
---|
| 383 | #-----------# |
---|
| 384 | # checking for SDL-headers |
---|
| 385 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
| 386 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
| 387 | |
---|
| 388 | #checking for libSDL |
---|
| 389 | AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"]) |
---|
| 390 | if test x$FOUND_sdlmain != xyes ; then |
---|
| 391 | echo "------------------" |
---|
| 392 | echo "SDL library not found." |
---|
| 393 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 394 | echo "------------------" |
---|
| 395 | exit 1 |
---|
| 396 | fi |
---|
| 397 | AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"]) |
---|
| 398 | if test x$FOUND_SDL != xyes ; then |
---|
| 399 | echo "------------------" |
---|
| 400 | echo "SDL library not found." |
---|
| 401 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 402 | echo "------------------" |
---|
| 403 | exit -1 |
---|
| 404 | fi |
---|
| 405 | |
---|
| 406 | ;; |
---|
| 407 | |
---|
[4825] | 408 | ############# |
---|
[3424] | 409 | #-----------# |
---|
| 410 | # MAC -OS X # |
---|
| 411 | #-----------# |
---|
[4825] | 412 | ############# |
---|
[2995] | 413 | *darwin*) |
---|
[3424] | 414 | echo "OS X detected" |
---|
[2995] | 415 | osX="yes" |
---|
| 416 | |
---|
[8293] | 417 | QT_PREFIX="$prefix" |
---|
| 418 | CPPFLAGS="-I/$prefix/include $CPPFLAGS -F$prefix/lib -I/opt/local" |
---|
| 419 | LDFLAGS="$LDFLAGS -L$prefix/lib -F$prefix/lib -L/opt/local" |
---|
| 420 | PCK_CONFIG_PATH='/opt/local' |
---|
| 421 | |
---|
[2995] | 422 | # checking gl header |
---|
[3424] | 423 | AC_CHECK_HEADERS([OpenGL/gl.h] ,, |
---|
[2995] | 424 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
[8293] | 425 | # checking for GLU-header |
---|
[3424] | 426 | AC_CHECK_HEADERS([OpenGL/glu.h] ,, |
---|
[2995] | 427 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
[9406] | 428 | AC_CHECK_LIB( OpenGL, main, , ) |
---|
[2995] | 429 | LIBS="$LIBS -framework OpenGL" |
---|
| 430 | |
---|
[5279] | 431 | |
---|
| 432 | |
---|
| 433 | # checking for GLEW-headers |
---|
| 434 | AC_CHECK_HEADERS([GL/glew.h] ,, |
---|
| 435 | [AC_MSG_ERROR([cannot find glew headers]) ]) |
---|
| 436 | # checking for GLEW-lib |
---|
| 437 | AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"]) |
---|
| 438 | if test x$FOUND_GLEW != xyes ; then |
---|
| 439 | echo "------------------" |
---|
| 440 | echo "glew not found." |
---|
| 441 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
| 442 | echo "------------------" |
---|
| 443 | exit -1 |
---|
| 444 | fi |
---|
| 445 | |
---|
[8293] | 446 | LIBS="$LIBS" |
---|
[5278] | 447 | AC_CHECK_HEADERS([OpenAL/al.h] ,, |
---|
| 448 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 449 | HAVE_OPENAL=yes |
---|
| 450 | LIBS="$LIBS -framework OpenAL" |
---|
[4662] | 451 | |
---|
[5278] | 452 | |
---|
[4662] | 453 | ## SDL-check |
---|
[5295] | 454 | SDL_CFLAGS=`sdl-config --cflags` |
---|
| 455 | SDL_LIBS=`sdl-config --libs` |
---|
[8293] | 456 | CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" |
---|
[5295] | 457 | LIBS="$LIBS $SDL_LIBS" |
---|
[5278] | 458 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
| 459 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
| 460 | HAVE_SDL=yes |
---|
[5295] | 461 | # LIBS="$LIBS -framework SDL" |
---|
[3424] | 462 | |
---|
[2995] | 463 | # checking for SDL-headers |
---|
[3001] | 464 | # AC_CHECK_HEADERS(SDL/SDL.h ,, |
---|
| 465 | # [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
[2995] | 466 | |
---|
| 467 | ## checking for SDL |
---|
| 468 | # SDL_VERSION=1.2.7 |
---|
| 469 | # AM_PATH_SDL($SDL_VERSION, |
---|
| 470 | # :, |
---|
| 471 | # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
---|
| 472 | # ) |
---|
| 473 | |
---|
[3140] | 474 | |
---|
[2995] | 475 | ;; |
---|
| 476 | |
---|
[2701] | 477 | *) |
---|
| 478 | ;; |
---|
| 479 | esac |
---|
[2968] | 480 | |
---|
[2701] | 481 | AC_SUBST(MSBITFIELDS) |
---|
| 482 | |
---|
[3424] | 483 | ################################### |
---|
| 484 | ## CHECKING FOR HEADERS AND LIBS ## |
---|
| 485 | ################################### |
---|
| 486 | |
---|
[4665] | 487 | #---------# |
---|
| 488 | # SDL_ttf # |
---|
| 489 | #---------# |
---|
[6271] | 490 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_ttf.h SDL/SDL_ttf.h], [SDL_ttf], [TTF_OpenFont],,, [http://www.libsdl.org/projects/SDL_ttf]) |
---|
[4665] | 491 | #-----------# |
---|
| 492 | # SDL_Image # |
---|
| 493 | #-----------# |
---|
[6271] | 494 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_image.h SDL/SDL_image.h], [SDL_image], [main],,, [http://www.libsdl.org/projects/SDL_image]) |
---|
[5822] | 495 | #---------# |
---|
| 496 | # SDL_Net # |
---|
| 497 | #---------# |
---|
[6271] | 498 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_net.h SDL/SDL_net.h], [SDL_net], [main],,, [http://www.libsdl.org/projects/SDL_net]) |
---|
[5822] | 499 | |
---|
[4504] | 500 | #--------# |
---|
[6627] | 501 | # FFmpeg # |
---|
[6532] | 502 | #--------# |
---|
[9883] | 503 | |
---|
| 504 | ## THIS IS FOR SURE A BUG (-llualib) |
---|
[6532] | 505 | # checking for FFmpeg-headers |
---|
[8061] | 506 | AX_CHECK_REQUIRED_HEADER_LIB([avformat.h ffmpeg/avformat.h] ,[avformat], [main], |
---|
| 507 | [AX_CHECK_REQUIRED_HEADER_LIB([avcodec.h ffmpeg/avcodec.h], [avcodec], [main],,, [http://ffmpeg.sourceforge.net]) LIBS="${LIBS} -lavformat -lavcodec"], |
---|
[8145] | 508 | [AX_GET_INSTALL_NECESSARY_LIB([http://svn.orxonox.net/webdev/develop/ext_libs], [ffmpeg.tar.gz], [ffmpeg], [extern_libs/], [include/*.h lib/*.a]) |
---|
[8061] | 509 | LIBS="-llualib -llua" CPPFLAGS="${CPPFLAGS} -I$(top_build_dir)/extern_libs" ], |
---|
| 510 | [http://ffmpeg.sourceforge.net]) |
---|
| 511 | |
---|
| 512 | |
---|
[8145] | 513 | |
---|
| 514 | |
---|
[6532] | 515 | AC_CHECK_LIB([avutil], [main], [FOUND_avutil=yes; LIBS="$LIBS -lavutil"]) |
---|
[6877] | 516 | AC_CHECK_LIB([xvid], [main], [FOUND_xvid=yes; LIBS="$LIBS -lxvid"]) |
---|
[6609] | 517 | AC_CHECK_LIB([gcj], [main], [FOUND_gcj=yes; LIBS="$LIBS -lgcj"]) |
---|
[6532] | 518 | AC_CHECK_LIB([theora], [main], [FOUND_theora=yes; LIBS="$LIBS -ltheora"]) |
---|
| 519 | AC_CHECK_LIB([dts], [main], [FOUND_dts=yes; LIBS="$LIBS -ldts"]) |
---|
| 520 | AC_CHECK_LIB([gsm], [main], [FOUND_gsm=yes; LIBS="$LIBS -lgsm"]) |
---|
| 521 | AC_CHECK_LIB([dc1394_control], [main], [FOUND_dc1394_control=yes; LIBS="$LIBS -ldc1394_control"]) |
---|
| 522 | AC_CHECK_LIB([vorbisenc], [main], [FOUND_vorbisenc=yes; LIBS="$LIBS -lvorbisenc"]) |
---|
| 523 | |
---|
[6877] | 524 | |
---|
| 525 | #--------# |
---|
| 526 | # vorbis # |
---|
| 527 | #--------# |
---|
| 528 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/vorbisfile.h], [vorbisfile], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 529 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/codec.h], [vorbis], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 530 | |
---|
| 531 | #-----# |
---|
| 532 | # ogg # |
---|
| 533 | #-----# |
---|
| 534 | AX_CHECK_REQUIRED_HEADER_LIB([ogg/ogg.h], [ogg], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 535 | |
---|
| 536 | |
---|
[7661] | 537 | #----# |
---|
| 538 | # QT # |
---|
| 539 | #----# |
---|
[8293] | 540 | if test x$osX = xyes ; then |
---|
[9406] | 541 | # PKG_CONFIG_PATH="$prefix" |
---|
| 542 | # PKG_CHECK_MODULES( QT, QtOpenGL >= 4.01 QtCore >= 4.01 QtGui >= 4.0.1 ) |
---|
| 543 | # QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtOpenGL QtCore QtGui` |
---|
[8293] | 544 | #----------# |
---|
[9406] | 545 | AC_PATH_PROG([QT_MOC], [moc], [no], ["${QT_BIN_DIRECTORY}:${PATH}"]) |
---|
| 546 | if test x${QT_MOC} = xno ; then |
---|
| 547 | AC_MSG_ERROR([QT MOC not found]) |
---|
| 548 | fi |
---|
| 549 | AC_SUBST([QT_MOC]) |
---|
[8293] | 550 | |
---|
[9406] | 551 | AC_PATH_PROG([QT_UIC], [uic], [no], ["${QT_BIN_DIRECTORY}:${PATH}"]) |
---|
| 552 | AC_SUBST([QT_UIC]) |
---|
[8293] | 553 | |
---|
[9406] | 554 | AC_PATH_PROG([QT_RCC], [rcc], [no], ["${QT_BIN_DIRECTORY}:${PATH}"]) |
---|
[8293] | 555 | |
---|
[9406] | 556 | AC_SUBST([QT_RCC]) |
---|
| 557 | AC_SUBST( QT_INCLUDE_DIR ) |
---|
| 558 | AC_SUBST( QT_CFLAGS ) |
---|
| 559 | AC_SUBST( QT_LDFLAGS ) |
---|
| 560 | AC_SUBST( QT_LIBS ) |
---|
| 561 | echo "QT_LIBS = $QT_LIBS" |
---|
| 562 | echo "QT_CFLAGS = $QT_CFLAGS" |
---|
| 563 | echo "QT_INCLUDE_DIR = $QT_INCLUDE_DIR" |
---|
[8293] | 564 | else |
---|
[9406] | 565 | AX_CHECK_QT([${QT_PREFIX}], [QtCore QtCore4],, [http://www.trolltech.com]) |
---|
| 566 | if test x$have_qt = xno ; then |
---|
| 567 | WITH_QT=no |
---|
| 568 | fi |
---|
[7661] | 569 | fi |
---|
[3423] | 570 | |
---|
[7661] | 571 | #---------# |
---|
| 572 | # libcURL # |
---|
| 573 | #---------# |
---|
| 574 | AX_CHECK_HEADER_LIB([curl/curl.h], [curl], [main], [ |
---|
| 575 | have_curl=yes |
---|
| 576 | CURL_LIBS=`curl-config --libs` |
---|
| 577 | CURLCFLAGS=`curl-config --cflags` |
---|
| 578 | AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) ] |
---|
| 579 | ,, [http://curl.haxx.se/]) |
---|
| 580 | |
---|
| 581 | AC_SUBST(CURL_LIBS) |
---|
| 582 | AC_SUBST(CURL_CFLAGS) |
---|
| 583 | AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes") |
---|
| 584 | |
---|
[9391] | 585 | |
---|
| 586 | AX_CHECK_REQUIRED_HEADER_LIB([zlib.h], [z], [zlibVersion],,, [http://www.zlib.net]) |
---|
| 587 | AX_CHECK_REQUIRED_HEADER_LIB([math.h], [m], [sqrt]) |
---|
| 588 | |
---|
| 589 | |
---|
[8061] | 590 | #-----# |
---|
| 591 | # LUA # |
---|
| 592 | #-----# |
---|
| 593 | LUA_DIR="/usr/include/lua" |
---|
| 594 | AX_CHECK_LUA([${LUA_DIR}]) |
---|
| 595 | |
---|
[7661] | 596 | #--------# |
---|
| 597 | # efence # |
---|
| 598 | #--------# |
---|
| 599 | if test x$def_efence = xyes ; then |
---|
| 600 | AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"]) |
---|
| 601 | if test x$FOUND_efence != xyes ; then |
---|
| 602 | echo "efence was requested, but is not installed!! going on" |
---|
| 603 | fi |
---|
| 604 | fi |
---|
| 605 | |
---|
[1945] | 606 | # Checks for header files. |
---|
| 607 | AC_HEADER_STDC |
---|
| 608 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
| 609 | |
---|
| 610 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 611 | AC_HEADER_STDBOOL |
---|
| 612 | |
---|
| 613 | # Checks for library functions. |
---|
| 614 | AC_FUNC_MALLOC |
---|
| 615 | AC_CHECK_FUNCS([bzero sqrt]) |
---|
| 616 | |
---|
[3424] | 617 | ###################### |
---|
| 618 | ## OUTPUT CONFIGURE ## |
---|
| 619 | ###################### |
---|
[1946] | 620 | AC_CONFIG_FILES([Makefile |
---|
[3377] | 621 | src/Makefile |
---|
[4555] | 622 | src/lib/Makefile |
---|
[7033] | 623 | src/lib/math/Makefile |
---|
[9668] | 624 | src/lib/lang/Makefile |
---|
[8367] | 625 | src/lib/util/Makefile |
---|
[4555] | 626 | src/lib/graphics/Makefile |
---|
| 627 | src/lib/graphics/importer/Makefile |
---|
[4789] | 628 | src/lib/graphics/spatial_separation/Makefile |
---|
[4555] | 629 | src/lib/sound/Makefile |
---|
| 630 | src/lib/event/Makefile |
---|
| 631 | src/lib/physics/Makefile |
---|
| 632 | src/lib/collision_detection/Makefile |
---|
[7819] | 633 | src/lib/collision_reaction/Makefile |
---|
[7151] | 634 | src/lib/network/Makefile |
---|
[5160] | 635 | src/lib/shell/Makefile |
---|
[4555] | 636 | src/lib/gui/Makefile |
---|
[8145] | 637 | src/lib/gui/gl/Makefile |
---|
| 638 | src/lib/gui/qt/Makefile |
---|
[8061] | 639 | src/lib/script_engine/Makefile |
---|
[5944] | 640 | src/lib/parser/Makefile |
---|
| 641 | src/lib/parser/tinyxml/Makefile |
---|
| 642 | src/lib/parser/ini_parser/Makefile |
---|
[7256] | 643 | src/lib/parser/cmdline_parser/Makefile |
---|
[7661] | 644 | src/lib/parser/preferences/Makefile |
---|
[5350] | 645 | src/util/Makefile |
---|
[10376] | 646 | src/ai/Makefile |
---|
[7151] | 647 | src/world_entities/Makefile |
---|
[4662] | 648 | src/subprojects/Makefile |
---|
[4555] | 649 | src/subprojects/testmain/Makefile |
---|
| 650 | src/subprojects/importer/Makefile |
---|
| 651 | src/subprojects/particles/Makefile |
---|
| 652 | src/subprojects/collision_detection/Makefile |
---|
[5822] | 653 | src/subprojects/network/Makefile |
---|
[9406] | 654 | src/subprojects/recapture_mouse/Makefile |
---|
[4555] | 655 | ]) |
---|
[3377] | 656 | |
---|
[1945] | 657 | AC_OUTPUT |
---|