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