[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 | |
---|
[5944] | 40 | AC_CONFIG_SRCDIR([./src]) |
---|
[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 | echo \$\{prefix\} |
---|
| 60 | if test $DATA_DIR = \$\{prefix\}/share ; then |
---|
| 61 | echo "not given" |
---|
| 62 | DATA_DIR=/usr/share |
---|
| 63 | else |
---|
| 64 | echo "given: $DATA_DIR" |
---|
| 65 | fi |
---|
| 66 | AC_DEFINE_UNQUOTED([DATADIR], ["$DATA_DIR"], |
---|
| 67 | [Define to the read-only architecture-independent |
---|
| 68 | data directory.]) |
---|
[3424] | 69 | |
---|
| 70 | #-----------------# |
---|
[5221] | 71 | # shared-lib-path # |
---|
| 72 | #-----------------# |
---|
| 73 | SHARED_LIB_PATH=no |
---|
| 74 | AC_MSG_CHECKING([shared lib path]) |
---|
| 75 | AC_ARG_WITH([shared-lib-path], |
---|
[5479] | 76 | AS_HELP_STRING(--with-shared-lib-path,Tells the executable, where to look for the shared libraries.), |
---|
[5223] | 77 | SHARED_LIB_PATH=$withval) |
---|
[5222] | 78 | if test x$SHARED_LIB_PATH != xno; then |
---|
[5265] | 79 | echo "set to $SHARED_LIB_PATH" |
---|
[5222] | 80 | else |
---|
[5221] | 81 | echo "no" |
---|
| 82 | fi |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | #-----------------# |
---|
[3424] | 86 | # DEBUG-statement # |
---|
| 87 | #-----------------# |
---|
[3173] | 88 | DEBUG=no |
---|
| 89 | AC_MSG_CHECKING([if DEBUG-mode should be enabled]) |
---|
[4555] | 90 | AC_ARG_ENABLE([debug], |
---|
[5479] | 91 | AS_HELP_STRING(--enable-debug,compiles in debug mode. Lots of debug info about the game.), |
---|
[4555] | 92 | DEBUG=$enableval) |
---|
[3205] | 93 | |
---|
[4555] | 94 | if test x$DEBUG = xno; then |
---|
| 95 | echo "no" |
---|
| 96 | echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." |
---|
| 97 | DEBUG=4 |
---|
[3424] | 98 | elif test x$DEBUG = xyes; then |
---|
[4555] | 99 | echo "yes" |
---|
| 100 | echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." |
---|
| 101 | DEBUG=4 |
---|
| 102 | else |
---|
[6838] | 103 | if test x$DEBUG = x0 || test x$DEBUG = x1 || test x$DEBUG = x2 || test x$DEBUG = x3 || test x$DEBUG = x4 || test x$DEBUG = x5 ; then |
---|
[4555] | 104 | echo "yes: setting debuglevel to to $DEBUG" |
---|
[6838] | 105 | else |
---|
| 106 | echo "yes: invalid Value for Debug ($DEBUG). setting to 4(DEBUG)" |
---|
| 107 | DEBUG=4 |
---|
| 108 | fi |
---|
[3173] | 109 | fi |
---|
[7442] | 110 | |
---|
| 111 | if test $DEBUD > 3 ; then |
---|
| 112 | CPPFLAGS="${CPPFLAGS} -g" |
---|
| 113 | fi |
---|
[5222] | 114 | AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are]) |
---|
[3173] | 115 | AC_SUBST(DEBUG) |
---|
| 116 | |
---|
[3592] | 117 | #---------------# |
---|
| 118 | # Modular Debug # |
---|
| 119 | #---------------# |
---|
| 120 | MODULAR_DEBUG=yes |
---|
| 121 | AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) |
---|
[4555] | 122 | AC_ARG_ENABLE([modular-debug], |
---|
[5479] | 123 | AS_HELP_STRING(--disable-modular-debug,compiles in modular-debug mode, that logs differently on the many modules of orxonox.), |
---|
[4555] | 124 | MODULAR_DEBUG=$enableval) |
---|
[3592] | 125 | |
---|
[4555] | 126 | if test x$MODULAR_DEBUG = xno; then |
---|
| 127 | echo "no" |
---|
[3592] | 128 | elif test x$MODULAR_DEBUG = xyes; then |
---|
[4555] | 129 | echo "yes" |
---|
| 130 | AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) |
---|
[3592] | 131 | fi |
---|
| 132 | |
---|
[3423] | 133 | |
---|
[3424] | 134 | #------------------# |
---|
| 135 | # libCurl-disabled # |
---|
| 136 | #------------------# |
---|
[3423] | 137 | AC_MSG_CHECKING([if libcURL should be enabled]) |
---|
[4774] | 138 | AC_ARG_ENABLE([curl], |
---|
[5479] | 139 | AS_HELP_STRING(--disable-curl,Prevents libcURL from being loaded), [def_curl=no], [def_curl=yes]) |
---|
[4555] | 140 | if test x$def_curl = xyes; then |
---|
[3423] | 141 | echo "yes" |
---|
[4555] | 142 | fi |
---|
| 143 | if test x$def_curl = xno; then |
---|
[3423] | 144 | echo "no" |
---|
| 145 | fi |
---|
| 146 | |
---|
[7442] | 147 | #--------------# |
---|
| 148 | # GTK-disabled # |
---|
| 149 | #--------------# |
---|
| 150 | |
---|
| 151 | AC_MSG_CHECKING([if gtk should be enabled]) |
---|
| 152 | AC_ARG_WITH([gtk], |
---|
| 153 | AS_HELP_STRING(--with-gtk, uses GTK for the GUI), [def_gtk=yes], [def_gtk=no]) |
---|
| 154 | if test x$def_gtk = xyes; then |
---|
[7501] | 155 | echo "yes - will be overwritten if Qt is enabled" |
---|
[7442] | 156 | fi |
---|
| 157 | if test x$def_gtk = xno; then |
---|
| 158 | echo "no" |
---|
| 159 | fi |
---|
| 160 | |
---|
| 161 | |
---|
| 162 | |
---|
[3424] | 163 | #-------------------# |
---|
| 164 | # SubProject-enable # |
---|
| 165 | #-------------------# |
---|
| 166 | def_sub_projects=no |
---|
[3377] | 167 | AC_MSG_CHECKING([if the SubProjects should be built]) |
---|
[4774] | 168 | AC_ARG_WITH([sub-projects], |
---|
[5479] | 169 | AS_HELP_STRING(--with-sub-projects,also builds the subProjects while make from srcdir), [def_sub_projects=yes]) |
---|
[3424] | 170 | if test x$def_sub_projects = xyes; then |
---|
[3377] | 171 | echo "yes" |
---|
[4555] | 172 | fi |
---|
[3424] | 173 | if test x$def_sub_projects = xno; then |
---|
[3377] | 174 | echo "no" |
---|
| 175 | fi |
---|
| 176 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) |
---|
| 177 | |
---|
[3788] | 178 | #-------------------# |
---|
| 179 | # Profiling Enabled # |
---|
| 180 | #-------------------# |
---|
| 181 | def_profiling=no |
---|
| 182 | AC_MSG_CHECKING([if Profiling should be enabled]) |
---|
[4555] | 183 | AC_ARG_ENABLE([profile], |
---|
[5479] | 184 | AS_HELP_STRING(--enable-profile,builds orxonox with profiling support), [def_profiling=yes]) |
---|
[3788] | 185 | if test x$def_profiling = xyes; then |
---|
| 186 | echo "yes" |
---|
| 187 | CXXFLAGS="$CXXFLAGS -pg" |
---|
[4555] | 188 | fi |
---|
[3788] | 189 | if test x$def_profiling = xno; then |
---|
| 190 | echo "no" |
---|
| 191 | fi |
---|
| 192 | |
---|
[3863] | 193 | #----------------# |
---|
| 194 | # efence Enabled # |
---|
| 195 | #----------------# |
---|
| 196 | def_efence=no |
---|
| 197 | AC_MSG_CHECKING([if efence should be enabled]) |
---|
[4555] | 198 | AC_ARG_ENABLE([efence], |
---|
[5479] | 199 | AS_HELP_STRING(--enable-efence,builds orxonox with efence support), [def_efence=yes]) |
---|
[3863] | 200 | if test x$def_efence = xyes; then |
---|
| 201 | echo "yes" |
---|
[4555] | 202 | fi |
---|
[3863] | 203 | if test x$def_efence = xno; then |
---|
| 204 | echo "no" |
---|
| 205 | fi |
---|
| 206 | |
---|
[3558] | 207 | #----------------------# |
---|
| 208 | # Documentation-enable # |
---|
| 209 | #----------------------# |
---|
| 210 | def_documentation=no |
---|
| 211 | AC_MSG_CHECKING([if the Documentation should be build by default]) |
---|
[4555] | 212 | AC_ARG_ENABLE([documentation], |
---|
[5479] | 213 | AS_HELP_STRING(--enable-documentation,also builds the sDocumentation while make from srcdir), [def_documentation=yes]) |
---|
[3558] | 214 | if test x$def_documentation = xyes; then |
---|
| 215 | echo "yes" |
---|
[4555] | 216 | fi |
---|
[3558] | 217 | if test x$def_documentation = xno; then |
---|
| 218 | echo "no" |
---|
| 219 | fi |
---|
| 220 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) |
---|
[4774] | 221 | |
---|
[5467] | 222 | #---------------------------# |
---|
| 223 | # WITH TARDIS (convenience) # |
---|
| 224 | #---------------------------# |
---|
| 225 | def_tardis=no |
---|
[5478] | 226 | GTKPATH="" |
---|
[5467] | 227 | AC_MSG_CHECKING([convenience flag for working at the taris in the ETH zurich]) |
---|
[5468] | 228 | AC_ARG_WITH([tardis], |
---|
[5479] | 229 | AS_HELP_STRING(--with-tardis,sets all the necesary environment flags for linux-TARDIS boxes at the ETH Zurich), [def_tardis=yes]) |
---|
[5467] | 230 | if test x$def_tardis = xyes; then |
---|
[5469] | 231 | ARCH=i686-debian-linux3.1 |
---|
[5470] | 232 | ## GAMELIBS |
---|
[5467] | 233 | PREFIX=/usr/pack/gamelibs-1.0-to |
---|
[5469] | 234 | CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include" |
---|
| 235 | LDFLAGS="${LDFLAGS} -L$PREFIX/${ARCH}/lib -Wl,-rpath -Wl,${PREFIX}/${ARCH}/lib" |
---|
[7501] | 236 | |
---|
| 237 | ## QT |
---|
[7502] | 238 | QT_PREFIX=/usr/pack/qt-4.0.1-mo |
---|
| 239 | CPPFLAGS="${CPPFLAGS} -I${PREFIX_QT}/${ARCH}/include" |
---|
| 240 | LDFLAGS="${LDFLAGS} -L${QT_PREFIX}/${ARCH}/lib -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib" |
---|
| 241 | QT_BIN_DIR="${PREFIX_QT}/${ARCH}/bin" |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | |
---|
[7501] | 245 | QT_PREFIX=/usr/pack/qt-4.1.1-mo |
---|
| 246 | QTDIR="${QT_PREFIX}/${ARCH}" |
---|
| 247 | LDFLAGS="${LDFLAGS} -Wl,-rpath -Wl,${QT_PREFIX}/${ARCH}/lib" |
---|
| 248 | |
---|
| 249 | |
---|
[5470] | 250 | ## GTK |
---|
| 251 | GTKPREFIX=/usr/pack/gtk-2.8.3-mo |
---|
[5478] | 252 | GTKPATH=${GTKPREFIX}/${ARCH}/bin |
---|
[5470] | 253 | CPPFLAGS="${CPPFLAGS} -I${GTKPREFIX}/include" |
---|
| 254 | LDFLAGS="${LDFLAGS} -L${GTKPREFIX}/${ARCH}/lib -Wl,-rpath -Wl,${GTKPREFIX}/${ARCH}/lib" |
---|
[5467] | 255 | echo "yes" |
---|
| 256 | fi |
---|
| 257 | if test x$def_tardis = xno; then |
---|
| 258 | echo "no" |
---|
| 259 | fi |
---|
| 260 | |
---|
[7501] | 261 | |
---|
| 262 | |
---|
[3424] | 263 | ####################### |
---|
| 264 | ## PROGRAMM CHECKING ## |
---|
| 265 | ## 3. party Programs ## |
---|
| 266 | ####################### |
---|
| 267 | |
---|
| 268 | #----------------------# |
---|
| 269 | # checking for Doxygen # |
---|
| 270 | #----------------------# |
---|
[3219] | 271 | AC_PATH_PROG(DOXYGEN, doxygen) |
---|
| 272 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) |
---|
| 273 | |
---|
[3789] | 274 | #--------------------# |
---|
| 275 | # checking for gprof # |
---|
| 276 | #--------------------# |
---|
| 277 | AC_PATH_PROG(GPROF, gprof) |
---|
| 278 | |
---|
[4130] | 279 | #-------------------------# |
---|
| 280 | # checking for pkg-config # |
---|
| 281 | #-------------------------# |
---|
| 282 | if test x$def_gtk = xyes; then |
---|
[5478] | 283 | if test x${GTKPATH} != x; then |
---|
| 284 | AC_PATH_PROG([PKG_CONFIG], [pkg-config],[], $GTKPATH ) |
---|
| 285 | else |
---|
| 286 | AC_PATH_PROG(PKG_CONFIG, pkg-config ) |
---|
| 287 | fi |
---|
[4130] | 288 | fi |
---|
| 289 | |
---|
| 290 | |
---|
[3424] | 291 | ######################### |
---|
| 292 | ## CHECKING FOR SYSTEM ## |
---|
| 293 | ######################### |
---|
| 294 | ## here the system is checked, and openGL is included |
---|
| 295 | ## also checking for SDL on differen Systems |
---|
[2701] | 296 | |
---|
| 297 | AC_MSG_CHECKING([for System]) |
---|
[2980] | 298 | ## checking for openGL-environment and other sys-specific parameters |
---|
| 299 | case "$target" in |
---|
[4825] | 300 | |
---|
| 301 | ########### |
---|
[3424] | 302 | #---------# |
---|
| 303 | # WINDOWS # |
---|
| 304 | #---------# |
---|
[4825] | 305 | ########### |
---|
[2980] | 306 | *-*-mingw32*) |
---|
[2701] | 307 | echo "mingw-WINDOWS detected" |
---|
| 308 | |
---|
[5222] | 309 | CPPFLAGS="-I/usr/include -I/mingw/include $CPPFLAGS" |
---|
[3790] | 310 | |
---|
[2701] | 311 | mingw="yes" |
---|
| 312 | MSBITFIELDS="-mms-bitfields" |
---|
| 313 | MWINDOWS="-mwindows" |
---|
| 314 | |
---|
[5276] | 315 | #--------# |
---|
| 316 | # MIN-GW # |
---|
| 317 | #--------# |
---|
[4697] | 318 | # checking for mingw32 |
---|
| 319 | AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) |
---|
| 320 | if test x$FOUND_mingw32 = xyes; then |
---|
| 321 | LIBS="$LIBS -lmingw32" |
---|
| 322 | fi |
---|
| 323 | |
---|
| 324 | #---------------# |
---|
| 325 | # open-GL (win) # |
---|
| 326 | #---------------# |
---|
[2925] | 327 | # checking gl header |
---|
[2879] | 328 | AC_CHECK_HEADERS(GL/gl.h ,, |
---|
[5276] | 329 | [AC_MSG_ERROR([cannot find opengl headers])]) |
---|
[2701] | 330 | # checking for Windows openGl library |
---|
[5276] | 331 | AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"]) |
---|
| 332 | if test x$FOUND_GL != xyes ; then |
---|
[4555] | 333 | echo "------------------" |
---|
| 334 | echo "opengl not found." |
---|
| 335 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
| 336 | echo "------------------" |
---|
| 337 | exit -1 |
---|
[1959] | 338 | fi |
---|
| 339 | |
---|
[2701] | 340 | # cheking for GLU-header |
---|
[3424] | 341 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
[1971] | 342 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 343 | |
---|
[2701] | 344 | # checking for libGLU |
---|
[5276] | 345 | AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"]) |
---|
| 346 | if test x$FOUND_GLU != xyes ; then |
---|
[4555] | 347 | echo "------------------" |
---|
| 348 | echo "GLU library not found." |
---|
| 349 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
| 350 | echo "------------------" |
---|
| 351 | exit -1 |
---|
[1959] | 352 | fi |
---|
[1971] | 353 | |
---|
[5270] | 354 | # checking glew header |
---|
| 355 | AC_CHECK_HEADERS(GL/glew.h ,, |
---|
| 356 | [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ]) |
---|
| 357 | # checking for Windows glew library |
---|
[5276] | 358 | AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"]) |
---|
| 359 | if test x$FOUND_GLEW != xyes ; then |
---|
[5270] | 360 | echo "------------------" |
---|
| 361 | echo "opengl extension wrangler not found." |
---|
| 362 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
| 363 | echo "------------------" |
---|
| 364 | exit -1 |
---|
| 365 | fi |
---|
| 366 | |
---|
[4697] | 367 | #--------# |
---|
| 368 | # openAL # |
---|
| 369 | #--------# |
---|
[6838] | 370 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [OpenAL32], [main],,, [http://www.openal.org]) |
---|
[4825] | 371 | |
---|
[5276] | 372 | #-----------# |
---|
| 373 | # SDL(win) # |
---|
| 374 | #-----------# |
---|
| 375 | # checking for SDL-headers |
---|
| 376 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
| 377 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
| 378 | |
---|
| 379 | #checking for libSDL |
---|
| 380 | AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"]) |
---|
| 381 | if test x$FOUND_sdlmain != xyes ; then |
---|
| 382 | echo "------------------" |
---|
| 383 | echo "SDL library not found." |
---|
| 384 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 385 | echo "------------------" |
---|
| 386 | exit 1 |
---|
| 387 | fi |
---|
| 388 | AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"]) |
---|
| 389 | if test x$FOUND_SDL != xyes ; then |
---|
| 390 | echo "------------------" |
---|
| 391 | echo "SDL library not found." |
---|
| 392 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 393 | echo "------------------" |
---|
| 394 | exit -1 |
---|
| 395 | fi |
---|
| 396 | |
---|
| 397 | ;; |
---|
| 398 | |
---|
[4825] | 399 | ######### |
---|
[3424] | 400 | #-------# |
---|
| 401 | # LINUX # |
---|
| 402 | #-------# |
---|
[4825] | 403 | ######### |
---|
[2980] | 404 | *-*-linux*) |
---|
[2701] | 405 | echo "Linux detected" |
---|
| 406 | |
---|
| 407 | Linux="yes" |
---|
| 408 | |
---|
[5265] | 409 | ##CPPFLAGS="-I/usr/include $CPPFLAGS" |
---|
[5224] | 410 | ##LDFLAGS="-L/usr/lib $LDFLAGS" |
---|
[5221] | 411 | if test x$SHARED_LIB_PATH != xno; then |
---|
[5265] | 412 | echo "setting new LDFLAGS with $SHARED_LIB_PATH" |
---|
| 413 | LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS" |
---|
[5221] | 414 | fi |
---|
| 415 | |
---|
[5277] | 416 | #--------# |
---|
| 417 | # openGL # |
---|
| 418 | #--------# |
---|
[6164] | 419 | AX_CHECK_REQUIRED_HEADER_LIB([GL/gl.h], [GL], [main],,, [http://www.opengl.org]) |
---|
| 420 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glu.h], [GLU], [main],,, [http://www.opengl.org]) |
---|
| 421 | AX_CHECK_REQUIRED_HEADER_LIB([GL/glew.h], [GLEW], [main],,, [http://glew.sourceforge.net]) |
---|
[2701] | 422 | |
---|
[4697] | 423 | #--------# |
---|
| 424 | # openAL # |
---|
| 425 | #--------# |
---|
[6271] | 426 | AX_CHECK_REQUIRED_HEADER_LIB([AL/al.h], [openal], [main],,, [http://www.openal.org]) |
---|
[6164] | 427 | |
---|
[5276] | 428 | #-----# |
---|
| 429 | # SDL # |
---|
| 430 | #-----# |
---|
[4664] | 431 | # checking for SDL |
---|
| 432 | AC_MSG_CHECKING([for SDL-version]) |
---|
| 433 | SDL_VERSION=`sdl-config --version` |
---|
| 434 | echo $SDL_VERSION |
---|
[5224] | 435 | CPPFLAGS="$CPPFLAGS `sdl-config --cflags`" |
---|
[2991] | 436 | |
---|
[6271] | 437 | AX_CHECK_REQUIRED_HEADER_LIB([SDL.h SDL/SDL.h], [SDL], [main],,, [http://www.libsdl.org]) |
---|
| 438 | |
---|
[4664] | 439 | ;; |
---|
[3140] | 440 | |
---|
[4825] | 441 | ############# |
---|
[3424] | 442 | #-----------# |
---|
| 443 | # MAC -OS X # |
---|
| 444 | #-----------# |
---|
[4825] | 445 | ############# |
---|
[2995] | 446 | *darwin*) |
---|
[3424] | 447 | echo "OS X detected" |
---|
[2995] | 448 | |
---|
| 449 | osX="yes" |
---|
| 450 | |
---|
[4662] | 451 | CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS" |
---|
[5278] | 452 | LDFLAGS="$LDFLAGS -L/sw/lib" |
---|
[2995] | 453 | # checking gl header |
---|
[3424] | 454 | AC_CHECK_HEADERS([OpenGL/gl.h] ,, |
---|
[2995] | 455 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 456 | # cheking for GLU-header |
---|
[3424] | 457 | AC_CHECK_HEADERS([OpenGL/glu.h] ,, |
---|
[2995] | 458 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 459 | |
---|
| 460 | LIBS="$LIBS -framework OpenGL" |
---|
| 461 | |
---|
[5279] | 462 | |
---|
| 463 | |
---|
| 464 | # checking for GLEW-headers |
---|
| 465 | AC_CHECK_HEADERS([GL/glew.h] ,, |
---|
| 466 | [AC_MSG_ERROR([cannot find glew headers]) ]) |
---|
| 467 | # checking for GLEW-lib |
---|
| 468 | AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"]) |
---|
| 469 | if test x$FOUND_GLEW != xyes ; then |
---|
| 470 | echo "------------------" |
---|
| 471 | echo "glew not found." |
---|
| 472 | echo "please install the glew package which can be found at http://glew.sourceforge.net" |
---|
| 473 | echo "------------------" |
---|
| 474 | exit -1 |
---|
| 475 | fi |
---|
| 476 | |
---|
| 477 | |
---|
[5278] | 478 | AC_CHECK_HEADERS([OpenAL/al.h] ,, |
---|
| 479 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 480 | HAVE_OPENAL=yes |
---|
| 481 | LIBS="$LIBS -framework OpenAL" |
---|
[4662] | 482 | |
---|
[5278] | 483 | |
---|
[4662] | 484 | ## SDL-check |
---|
[5295] | 485 | SDL_CFLAGS=`sdl-config --cflags` |
---|
| 486 | SDL_LIBS=`sdl-config --libs` |
---|
[6876] | 487 | CXXFL\AGS="$CXXFLAGS $SDL_CFLAGS" |
---|
[5295] | 488 | LIBS="$LIBS $SDL_LIBS" |
---|
[5278] | 489 | AC_CHECK_HEADERS([SDL/SDL.h] ,, |
---|
| 490 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
| 491 | HAVE_SDL=yes |
---|
[5295] | 492 | # LIBS="$LIBS -framework SDL" |
---|
[3424] | 493 | |
---|
[2995] | 494 | # checking for SDL-headers |
---|
[3001] | 495 | # AC_CHECK_HEADERS(SDL/SDL.h ,, |
---|
| 496 | # [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
[2995] | 497 | |
---|
| 498 | ## checking for SDL |
---|
| 499 | # SDL_VERSION=1.2.7 |
---|
| 500 | # AM_PATH_SDL($SDL_VERSION, |
---|
| 501 | # :, |
---|
| 502 | # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
---|
| 503 | # ) |
---|
| 504 | |
---|
[3140] | 505 | |
---|
[2995] | 506 | ;; |
---|
| 507 | |
---|
[2701] | 508 | *) |
---|
| 509 | ;; |
---|
| 510 | esac |
---|
[2968] | 511 | |
---|
[2701] | 512 | AC_SUBST(MSBITFIELDS) |
---|
| 513 | |
---|
[3424] | 514 | ################################### |
---|
| 515 | ## CHECKING FOR HEADERS AND LIBS ## |
---|
| 516 | ################################### |
---|
| 517 | |
---|
[4665] | 518 | #---------# |
---|
| 519 | # SDL_ttf # |
---|
| 520 | #---------# |
---|
[6271] | 521 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_ttf.h SDL/SDL_ttf.h], [SDL_ttf], [TTF_OpenFont],,, [http://www.libsdl.org/projects/SDL_ttf]) |
---|
[4665] | 522 | #-----------# |
---|
| 523 | # SDL_Image # |
---|
| 524 | #-----------# |
---|
[6271] | 525 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_image.h SDL/SDL_image.h], [SDL_image], [main],,, [http://www.libsdl.org/projects/SDL_image]) |
---|
[5822] | 526 | #---------# |
---|
| 527 | # SDL_Net # |
---|
| 528 | #---------# |
---|
[6271] | 529 | AX_CHECK_REQUIRED_HEADER_LIB([SDL_net.h SDL/SDL_net.h], [SDL_net], [main],,, [http://www.libsdl.org/projects/SDL_net]) |
---|
[5822] | 530 | |
---|
[4504] | 531 | #--------# |
---|
[6627] | 532 | # FFmpeg # |
---|
[6532] | 533 | #--------# |
---|
| 534 | # checking for FFmpeg-headers |
---|
| 535 | AC_CHECK_HEADERS([avformat.h] ,, |
---|
| 536 | [AC_CHECK_HEADERS([ffmpeg/avformat.h] ,,AC_MSG_ERROR([cannot find FFmpeg header.])])) |
---|
| 537 | # checking for ffmpeg-lib |
---|
| 538 | AC_CHECK_LIB([avformat], [main], [FOUND_avformat=yes; LIBS="$LIBS -lavformat"]) |
---|
| 539 | if test x$FOUND_avformat != xyes ; then |
---|
| 540 | echo "------------------" |
---|
| 541 | echo "avformat library not found." |
---|
| 542 | echo "please install the FFmpeg library, which can be found at http://ffmpeg.sourceforge.net" |
---|
| 543 | echo "------------------" |
---|
| 544 | exit -1 |
---|
| 545 | fi |
---|
| 546 | AC_CHECK_HEADERS([avcodec.h] ,, |
---|
| 547 | [AC_CHECK_HEADERS([ffmpeg/avcodec.h] ,,AC_MSG_ERROR([cannot find FFmpeg header.])])) |
---|
| 548 | AC_CHECK_LIB([avcodec], [main], [FOUND_avcodec=yes; LIBS="$LIBS -lavcodec"]) |
---|
| 549 | if test x$FOUND_avcodec != xyes ; then |
---|
| 550 | echo "------------------" |
---|
| 551 | echo "avcodec library not found." |
---|
| 552 | echo "please install the FFmpeg library, which can be found at http://ffmpeg.sourceforge.net" |
---|
| 553 | echo "------------------" |
---|
| 554 | exit -1 |
---|
| 555 | fi |
---|
| 556 | AC_CHECK_LIB([avutil], [main], [FOUND_avutil=yes; LIBS="$LIBS -lavutil"]) |
---|
[6877] | 557 | AC_CHECK_LIB([xvid], [main], [FOUND_xvid=yes; LIBS="$LIBS -lxvid"]) |
---|
[6609] | 558 | AC_CHECK_LIB([gcj], [main], [FOUND_gcj=yes; LIBS="$LIBS -lgcj"]) |
---|
[6532] | 559 | AC_CHECK_LIB([theora], [main], [FOUND_theora=yes; LIBS="$LIBS -ltheora"]) |
---|
| 560 | AC_CHECK_LIB([dts], [main], [FOUND_dts=yes; LIBS="$LIBS -ldts"]) |
---|
| 561 | AC_CHECK_LIB([gsm], [main], [FOUND_gsm=yes; LIBS="$LIBS -lgsm"]) |
---|
| 562 | AC_CHECK_LIB([dc1394_control], [main], [FOUND_dc1394_control=yes; LIBS="$LIBS -ldc1394_control"]) |
---|
| 563 | AC_CHECK_LIB([vorbisenc], [main], [FOUND_vorbisenc=yes; LIBS="$LIBS -lvorbisenc"]) |
---|
| 564 | |
---|
[6877] | 565 | |
---|
| 566 | #--------# |
---|
| 567 | # vorbis # |
---|
| 568 | #--------# |
---|
| 569 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/vorbisfile.h], [vorbisfile], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 570 | AX_CHECK_REQUIRED_HEADER_LIB([vorbis/codec.h], [vorbis], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 571 | |
---|
| 572 | #-----# |
---|
| 573 | # ogg # |
---|
| 574 | #-----# |
---|
| 575 | AX_CHECK_REQUIRED_HEADER_LIB([ogg/ogg.h], [ogg], [main],,, [http://www.xiph.org/ogg/vorbis/index.html]) |
---|
| 576 | |
---|
| 577 | |
---|
[7502] | 578 | #----# |
---|
| 579 | # QT # |
---|
| 580 | #----# |
---|
| 581 | AX_CHECK_QT([${QTDIR}], [QtCore QtCore4],, [http://www.trolltech.com]) |
---|
| 582 | if test x$have_qt = xno ; then |
---|
| 583 | WITH_QT=no |
---|
| 584 | else |
---|
| 585 | AX_CHECK_REQUIRED_LIB([QtCore QtCore4], [main],,,[http://www.trolltech.com] ) |
---|
| 586 | AX_CHECK_REQUIRED_LIB([QtGui QtGui4], [main],,,[http://www.trolltech.com] ) |
---|
| 587 | AX_CHECK_REQUIRED_LIB([QtOpenGL QtOpenGL4], [main],,,[http://www.trolltech.com] ) |
---|
| 588 | |
---|
| 589 | fi |
---|
| 590 | |
---|
| 591 | |
---|
[5276] | 592 | #-----# |
---|
| 593 | # GTK # |
---|
| 594 | #-----# |
---|
| 595 | if test x$def_gtk = xyes; then |
---|
| 596 | #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) |
---|
| 597 | AC_MSG_CHECKING([for gtk2.0]) |
---|
| 598 | if `$PKG_CONFIG --exists gtk+-2.0`; then |
---|
| 599 | echo "yes" |
---|
| 600 | have_gtk2=yes |
---|
| 601 | GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0` |
---|
| 602 | GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` |
---|
| 603 | AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2]) |
---|
| 604 | if test $DEBUG -ge 3; then |
---|
| 605 | echo "cflags: $GTK2_CFLAGS" |
---|
| 606 | echo "libs: $GTK2_LIBS" |
---|
| 607 | fi |
---|
| 608 | else |
---|
| 609 | echo "no" |
---|
| 610 | fi |
---|
| 611 | |
---|
| 612 | fi |
---|
| 613 | AC_SUBST(GTK2_LIBS) |
---|
| 614 | AC_SUBST(GTK2_CFLAGS) |
---|
| 615 | AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) |
---|
| 616 | |
---|
| 617 | |
---|
[7442] | 618 | #---------# |
---|
| 619 | # libcURL # |
---|
| 620 | #---------# |
---|
| 621 | AX_CHECK_HEADER_LIB([curl/curl.h], [curl], [main], [ |
---|
| 622 | have_curl=yes |
---|
| 623 | CURL_LIBS=`curl-config --libs` |
---|
| 624 | CURLCFLAGS=`curl-config --cflags` |
---|
| 625 | AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) ] |
---|
| 626 | ,, [http://curl.haxx.se/]) |
---|
| 627 | |
---|
| 628 | AC_SUBST(CURL_LIBS) |
---|
| 629 | AC_SUBST(CURL_CFLAGS) |
---|
| 630 | AM_CONDITIONAL(HAVE_CURL, test "x$have_curl" = "xyes") |
---|
| 631 | |
---|
| 632 | #--------# |
---|
| 633 | # efence # |
---|
| 634 | #--------# |
---|
| 635 | if test x$def_efence = xyes ; then |
---|
| 636 | AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"]) |
---|
| 637 | if test x$FOUND_efence != xyes ; then |
---|
| 638 | echo "efence was requested, but is not installed!! going on" |
---|
| 639 | fi |
---|
| 640 | |
---|
| 641 | fi |
---|
| 642 | |
---|
[1945] | 643 | # FIXME: Replace `main' with a function in `-lm': |
---|
[2968] | 644 | AC_CHECK_LIB([m], [main]) |
---|
[1945] | 645 | |
---|
[4555] | 646 | |
---|
[1945] | 647 | # Checks for header files. |
---|
| 648 | AC_HEADER_STDC |
---|
| 649 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
| 650 | |
---|
| 651 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 652 | AC_HEADER_STDBOOL |
---|
| 653 | |
---|
| 654 | # Checks for library functions. |
---|
| 655 | AC_FUNC_MALLOC |
---|
| 656 | AC_CHECK_FUNCS([bzero sqrt]) |
---|
| 657 | |
---|
[3424] | 658 | ###################### |
---|
| 659 | ## OUTPUT CONFIGURE ## |
---|
| 660 | ###################### |
---|
[1946] | 661 | AC_CONFIG_FILES([Makefile |
---|
[3377] | 662 | src/Makefile |
---|
[4555] | 663 | src/lib/Makefile |
---|
[7033] | 664 | src/lib/math/Makefile |
---|
[4555] | 665 | src/lib/graphics/Makefile |
---|
| 666 | src/lib/graphics/importer/Makefile |
---|
[4789] | 667 | src/lib/graphics/spatial_separation/Makefile |
---|
[4555] | 668 | src/lib/sound/Makefile |
---|
| 669 | src/lib/event/Makefile |
---|
| 670 | src/lib/physics/Makefile |
---|
| 671 | src/lib/particles/Makefile |
---|
| 672 | src/lib/collision_detection/Makefile |
---|
[7151] | 673 | src/lib/network/Makefile |
---|
[5160] | 674 | src/lib/shell/Makefile |
---|
[4555] | 675 | src/lib/gui/Makefile |
---|
[5467] | 676 | src/lib/gui/gtk_gui/Makefile |
---|
| 677 | src/lib/gui/gl_gui/Makefile |
---|
[7442] | 678 | src/lib/gui/qt_gui/Makefile |
---|
[5944] | 679 | src/lib/parser/Makefile |
---|
| 680 | src/lib/parser/tinyxml/Makefile |
---|
| 681 | src/lib/parser/ini_parser/Makefile |
---|
[7256] | 682 | src/lib/parser/cmdline_parser/Makefile |
---|
[7489] | 683 | src/lib/parser/preferences/Makefile |
---|
[5350] | 684 | src/util/Makefile |
---|
[7151] | 685 | src/world_entities/Makefile |
---|
[4662] | 686 | src/subprojects/Makefile |
---|
[4555] | 687 | src/subprojects/testmain/Makefile |
---|
| 688 | src/subprojects/importer/Makefile |
---|
| 689 | src/subprojects/particles/Makefile |
---|
| 690 | src/subprojects/collision_detection/Makefile |
---|
[5822] | 691 | src/subprojects/network/Makefile |
---|
[4555] | 692 | ]) |
---|
[3377] | 693 | |
---|
[1945] | 694 | AC_OUTPUT |
---|