| [4555] | 1 | ########################################################################## | 
|---|
 | 2 | #   orxonox - the future of 3D-vertical-scrollers                        # | 
|---|
 | 3 | #                                                                        # | 
|---|
 | 4 | #   Copyright (C) 2004 orx                                               # | 
|---|
 | 5 | #                                                                        # | 
|---|
| [3424] | 6 | #   This program is free software; you can redistribute it and/or modify # | 
|---|
 | 7 | #   it under the terms of the GNU General Public License as published by # | 
|---|
 | 8 | #   the Free Software Foundation; either version 2, or (at your option)  # | 
|---|
| [4555] | 9 | #   any later version.                                                   # | 
|---|
 | 10 | #                                                                        # | 
|---|
 | 11 | #   ### File Specific:                                                   # | 
|---|
 | 12 | #   main-programmer: Benjamin Grauer                                     # | 
|---|
 | 13 | #   co-programmer: ...                                                   # | 
|---|
 | 14 | #                                                                        # | 
|---|
 | 15 | #   This is the main configuration File of autoconf.                     # | 
|---|
| [3424] | 16 | #   Please edit this file only, if you exactly know what you are doing.  # | 
|---|
 | 17 | #   It is quite fragile, and compiling orxonox on different Platforms    # | 
|---|
 | 18 | #   is only guarantied, if build with the right config.                  # | 
|---|
| [4944] | 19 | #                                                                        # | 
|---|
 | 20 | #   be sure to visit us at http://www.orxonox.net                        # | 
|---|
| [3424] | 21 | ########################################################################## | 
|---|
| [1945] | 22 |  | 
|---|
| [3424] | 23 | ######################### | 
|---|
 | 24 | ## AUTOCONF INIT PHASE ## | 
|---|
 | 25 | ######################### | 
|---|
| [3218] | 26 | AC_PREREQ(2.56) | 
|---|
| [5066] | 27 | AC_INIT(orxonox, 0.3.1_alpha, [orxonox-dev at mail.datacore.ch]) | 
|---|
| [2980] | 28 |  | 
|---|
| [3424] | 29 | ## Detect the canonical host and target build environment. | 
|---|
| [2980] | 30 | AC_CANONICAL_BUILD | 
|---|
 | 31 | AC_CANONICAL_HOST | 
|---|
 | 32 | AC_CANONICAL_TARGET | 
|---|
 | 33 |  | 
|---|
| [1959] | 34 | AM_INIT_AUTOMAKE | 
|---|
| [2618] | 35 |  | 
|---|
| [1951] | 36 | AC_CONFIG_SRCDIR([.]) | 
|---|
| [1945] | 37 | AC_CONFIG_HEADER([config.h]) | 
|---|
 | 38 |  | 
|---|
| [3424] | 39 | ######################### | 
|---|
 | 40 | ## Checks for programs ## | 
|---|
 | 41 | ######################### | 
|---|
| [1945] | 42 | AC_PROG_CXX | 
|---|
| [5450] | 43 | AC_PROG_LIBTOOL | 
|---|
| [2925] | 44 | AC_HEADER_STDC | 
|---|
| [2701] | 45 |  | 
|---|
| [4774] | 46 | ## THIS IS OUR DEFAULT-DATA-DIRECTORY | 
|---|
 | 47 |  | 
|---|
| [3424] | 48 | ################################## | 
|---|
 | 49 | ## CHECKING  OPTIONAL ARGUMENTS ## | 
|---|
 | 50 | ################################## | 
|---|
| [4774] | 51 | #----------------# | 
|---|
 | 52 | # Data-Directory # | 
|---|
 | 53 | #----------------# | 
|---|
 | 54 | DATA_DIR=$datadir | 
|---|
 | 55 | echo \$\{prefix\} | 
|---|
 | 56 | if test $DATA_DIR = \$\{prefix\}/share ; then | 
|---|
 | 57 |         echo "not given" | 
|---|
 | 58 |         DATA_DIR=/usr/share | 
|---|
 | 59 | else | 
|---|
 | 60 |         echo "given: $DATA_DIR" | 
|---|
 | 61 | fi | 
|---|
 | 62 | AC_DEFINE_UNQUOTED([DATADIR], ["$DATA_DIR"], | 
|---|
 | 63 |                    [Define to the read-only architecture-independent | 
|---|
 | 64 |                     data directory.]) | 
|---|
| [3424] | 65 |  | 
|---|
 | 66 | #-----------------# | 
|---|
| [5221] | 67 | # shared-lib-path # | 
|---|
 | 68 | #-----------------# | 
|---|
 | 69 | SHARED_LIB_PATH=no | 
|---|
 | 70 | AC_MSG_CHECKING([shared lib path]) | 
|---|
 | 71 | AC_ARG_WITH([shared-lib-path], | 
|---|
 | 72 |         AC_HELP_STRING( [--with-shared-lib-path], [Tells the executable, where to look for the shared libraries.]), | 
|---|
| [5223] | 73 |          SHARED_LIB_PATH=$withval) | 
|---|
| [5222] | 74 | if test x$SHARED_LIB_PATH != xno; then | 
|---|
| [5265] | 75 |         echo "set to $SHARED_LIB_PATH" | 
|---|
| [5222] | 76 | else | 
|---|
| [5221] | 77 |         echo "no" | 
|---|
 | 78 | fi | 
|---|
 | 79 |  | 
|---|
 | 80 |  | 
|---|
 | 81 | #-----------------# | 
|---|
| [3424] | 82 | # DEBUG-statement # | 
|---|
 | 83 | #-----------------# | 
|---|
| [3173] | 84 | DEBUG=no | 
|---|
 | 85 | AC_MSG_CHECKING([if DEBUG-mode should be enabled]) | 
|---|
| [4555] | 86 | AC_ARG_ENABLE([debug], | 
|---|
 | 87 |         AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]), | 
|---|
 | 88 |          DEBUG=$enableval) | 
|---|
| [3205] | 89 |  | 
|---|
| [4555] | 90 | if test x$DEBUG = xno; then | 
|---|
 | 91 |         echo "no" | 
|---|
 | 92 |         echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." | 
|---|
 | 93 |         DEBUG=4 | 
|---|
| [3424] | 94 | elif test x$DEBUG = xyes; then | 
|---|
| [4555] | 95 |         echo "yes" | 
|---|
 | 96 |         echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." | 
|---|
 | 97 |         DEBUG=4 | 
|---|
 | 98 | else | 
|---|
 | 99 |         echo "yes: setting debuglevel to to $DEBUG" | 
|---|
| [3173] | 100 | fi | 
|---|
| [5222] | 101 | AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are]) | 
|---|
| [3173] | 102 | AC_SUBST(DEBUG) | 
|---|
 | 103 |  | 
|---|
| [3592] | 104 | #---------------# | 
|---|
 | 105 | # Modular Debug # | 
|---|
 | 106 | #---------------# | 
|---|
 | 107 | MODULAR_DEBUG=yes | 
|---|
 | 108 | AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) | 
|---|
| [4555] | 109 | AC_ARG_ENABLE([modular-debug], | 
|---|
 | 110 |         AC_HELP_STRING( [--disable-modular-debug], [compiles in modular-debug mode, that logs differently on the many modules of orxonox.]), | 
|---|
 | 111 |          MODULAR_DEBUG=$enableval) | 
|---|
| [3592] | 112 |  | 
|---|
| [4555] | 113 | if test x$MODULAR_DEBUG = xno; then | 
|---|
 | 114 |         echo "no" | 
|---|
| [3592] | 115 | elif test x$MODULAR_DEBUG = xyes; then | 
|---|
| [4555] | 116 |         echo "yes" | 
|---|
 | 117 |         AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) | 
|---|
| [3592] | 118 | fi | 
|---|
 | 119 |  | 
|---|
| [3424] | 120 | #--------------# | 
|---|
 | 121 | # GTK-disabled # | 
|---|
 | 122 | #--------------# | 
|---|
| [3100] | 123 | AC_MSG_CHECKING([if gtk should be enabled]) | 
|---|
| [4774] | 124 | AC_ARG_ENABLE([gtk], | 
|---|
 | 125 |         AC_HELP_STRING( [--disable-gtk], | 
|---|
| [4555] | 126 |         [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes]) | 
|---|
 | 127 | if test x$def_gtk = xyes; then | 
|---|
| [3100] | 128 |   echo "yes" | 
|---|
| [4555] | 129 | fi | 
|---|
 | 130 | if test x$def_gtk = xno; then | 
|---|
| [3100] | 131 |   echo "no" | 
|---|
 | 132 | fi | 
|---|
| [3423] | 133 |  | 
|---|
| [3424] | 134 | #------------------# | 
|---|
 | 135 | # libCurl-disabled # | 
|---|
 | 136 | #------------------# | 
|---|
| [3423] | 137 | AC_MSG_CHECKING([if libcURL should be enabled]) | 
|---|
| [4774] | 138 | AC_ARG_ENABLE([curl], | 
|---|
 | 139 |         AC_HELP_STRING( [--disable-curl], | 
|---|
| [4555] | 140 |         [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes]) | 
|---|
 | 141 | if test x$def_curl = xyes; then | 
|---|
| [3423] | 142 |   echo "yes" | 
|---|
| [4555] | 143 | fi | 
|---|
 | 144 | if test x$def_curl = xno; then | 
|---|
| [3423] | 145 |   echo "no" | 
|---|
 | 146 | fi | 
|---|
 | 147 |  | 
|---|
| [3424] | 148 | #-------------------# | 
|---|
 | 149 | # SubProject-enable # | 
|---|
 | 150 | #-------------------# | 
|---|
 | 151 | def_sub_projects=no | 
|---|
| [3377] | 152 | AC_MSG_CHECKING([if the SubProjects should be built]) | 
|---|
| [4774] | 153 | AC_ARG_WITH([sub-projects], | 
|---|
 | 154 |         AC_HELP_STRING( [--with-sub-projects], | 
|---|
| [4555] | 155 |         [also builds the subProjects while make from srcdir]), [def_sub_projects=yes]) | 
|---|
| [3424] | 156 | if test x$def_sub_projects = xyes; then | 
|---|
| [3377] | 157 |   echo "yes" | 
|---|
| [4555] | 158 | fi | 
|---|
| [3424] | 159 | if test x$def_sub_projects = xno; then | 
|---|
| [3377] | 160 |   echo "no" | 
|---|
 | 161 | fi | 
|---|
 | 162 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) | 
|---|
 | 163 |  | 
|---|
| [3788] | 164 | #-------------------# | 
|---|
 | 165 | # Profiling Enabled # | 
|---|
 | 166 | #-------------------# | 
|---|
 | 167 | def_profiling=no | 
|---|
 | 168 | AC_MSG_CHECKING([if Profiling should be enabled]) | 
|---|
| [4555] | 169 | AC_ARG_ENABLE([profile], | 
|---|
 | 170 |         AC_HELP_STRING( [--enable-profile], | 
|---|
 | 171 |         [builds orxonox with profiling support]), [def_profiling=yes]) | 
|---|
| [3788] | 172 | if test x$def_profiling = xyes; then | 
|---|
 | 173 |   echo "yes" | 
|---|
 | 174 |   CXXFLAGS="$CXXFLAGS -pg" | 
|---|
| [4555] | 175 | fi | 
|---|
| [3788] | 176 | if test x$def_profiling = xno; then | 
|---|
 | 177 |   echo "no" | 
|---|
 | 178 | fi | 
|---|
 | 179 |  | 
|---|
| [3863] | 180 | #----------------# | 
|---|
 | 181 | # efence Enabled # | 
|---|
 | 182 | #----------------# | 
|---|
 | 183 | def_efence=no | 
|---|
 | 184 | AC_MSG_CHECKING([if efence should be enabled]) | 
|---|
| [4555] | 185 | AC_ARG_ENABLE([efence], | 
|---|
 | 186 |         AC_HELP_STRING( [--enable-efence], | 
|---|
 | 187 |         [builds orxonox with efence support]), [def_efence=yes]) | 
|---|
| [3863] | 188 | if test x$def_efence = xyes; then | 
|---|
 | 189 |   echo "yes" | 
|---|
| [4555] | 190 | fi | 
|---|
| [3863] | 191 | if test x$def_efence = xno; then | 
|---|
 | 192 |   echo "no" | 
|---|
 | 193 | fi | 
|---|
 | 194 |  | 
|---|
| [3558] | 195 | #----------------------# | 
|---|
 | 196 | # Documentation-enable # | 
|---|
 | 197 | #----------------------# | 
|---|
 | 198 | def_documentation=no | 
|---|
 | 199 | AC_MSG_CHECKING([if the Documentation should be build by default]) | 
|---|
| [4555] | 200 | AC_ARG_ENABLE([documentation], | 
|---|
 | 201 |         AC_HELP_STRING( [--enable-documentation], | 
|---|
 | 202 |         [also builds the sDocumentation while make from srcdir]), [def_documentation=yes]) | 
|---|
| [3558] | 203 | if test x$def_documentation = xyes; then | 
|---|
 | 204 |   echo "yes" | 
|---|
| [4555] | 205 | fi | 
|---|
| [3558] | 206 | if test x$def_documentation = xno; then | 
|---|
 | 207 |   echo "no" | 
|---|
 | 208 | fi | 
|---|
 | 209 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) | 
|---|
| [4774] | 210 |  | 
|---|
| [3424] | 211 | ####################### | 
|---|
 | 212 | ## PROGRAMM CHECKING ## | 
|---|
 | 213 | ## 3. party Programs ## | 
|---|
 | 214 | ####################### | 
|---|
 | 215 |  | 
|---|
 | 216 | #----------------------# | 
|---|
 | 217 | # checking for Doxygen # | 
|---|
 | 218 | #----------------------# | 
|---|
| [3219] | 219 | AC_PATH_PROG(DOXYGEN, doxygen) | 
|---|
 | 220 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) | 
|---|
 | 221 |  | 
|---|
| [3789] | 222 | #--------------------# | 
|---|
 | 223 | # checking for gprof # | 
|---|
 | 224 | #--------------------# | 
|---|
 | 225 | AC_PATH_PROG(GPROF, gprof) | 
|---|
 | 226 |  | 
|---|
| [4130] | 227 | #-------------------------# | 
|---|
 | 228 | # checking for pkg-config # | 
|---|
 | 229 | #-------------------------# | 
|---|
 | 230 | if test x$def_gtk = xyes; then | 
|---|
 | 231 |  AC_PATH_PROG(PKG_CONFIG, pkg-config) | 
|---|
 | 232 | fi | 
|---|
 | 233 |  | 
|---|
 | 234 |  | 
|---|
| [3424] | 235 | ######################### | 
|---|
 | 236 | ## CHECKING FOR SYSTEM ## | 
|---|
 | 237 | ######################### | 
|---|
 | 238 | ## here the system is checked, and openGL is included | 
|---|
 | 239 | ## also checking for SDL on differen Systems | 
|---|
| [2701] | 240 |  | 
|---|
 | 241 | AC_MSG_CHECKING([for System]) | 
|---|
| [2980] | 242 | ## checking for openGL-environment and other sys-specific parameters | 
|---|
 | 243 | case "$target" in | 
|---|
| [4825] | 244 |  | 
|---|
 | 245 | ########### | 
|---|
| [3424] | 246 | #---------# | 
|---|
 | 247 | # WINDOWS # | 
|---|
 | 248 | #---------# | 
|---|
| [4825] | 249 | ########### | 
|---|
| [2980] | 250 |   *-*-mingw32*) | 
|---|
| [2701] | 251 | echo "mingw-WINDOWS detected" | 
|---|
 | 252 |  | 
|---|
| [5222] | 253 | CPPFLAGS="-I/usr/include -I/mingw/include $CPPFLAGS" | 
|---|
| [3790] | 254 |  | 
|---|
| [2701] | 255 |     mingw="yes" | 
|---|
 | 256 |     MSBITFIELDS="-mms-bitfields" | 
|---|
 | 257 |     MWINDOWS="-mwindows" | 
|---|
 | 258 |  | 
|---|
| [5276] | 259 | #--------# | 
|---|
 | 260 | # MIN-GW # | 
|---|
 | 261 | #--------# | 
|---|
| [4697] | 262 | # checking for mingw32 | 
|---|
 | 263 |     AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) | 
|---|
 | 264 |     if test x$FOUND_mingw32 = xyes; then | 
|---|
 | 265 |         LIBS="$LIBS -lmingw32" | 
|---|
 | 266 |     fi | 
|---|
 | 267 |  | 
|---|
 | 268 | #---------------# | 
|---|
 | 269 | # open-GL (win) # | 
|---|
 | 270 | #---------------# | 
|---|
| [2925] | 271 | # checking gl header | 
|---|
| [2879] | 272 |    AC_CHECK_HEADERS(GL/gl.h ,, | 
|---|
| [5276] | 273 |       [AC_MSG_ERROR([cannot find opengl headers])]) | 
|---|
| [2701] | 274 | #   checking for Windows openGl library | 
|---|
| [5276] | 275 |     AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"]) | 
|---|
 | 276 |     if test x$FOUND_GL != xyes ; then | 
|---|
| [4555] | 277 |          echo "------------------" | 
|---|
 | 278 |          echo "opengl not found." | 
|---|
 | 279 |          echo "please install the opengl package which can be found at http://www.opengl.org" | 
|---|
 | 280 |          echo "------------------" | 
|---|
 | 281 |          exit -1 | 
|---|
| [1959] | 282 |     fi | 
|---|
 | 283 |  | 
|---|
| [2701] | 284 | # cheking for GLU-header | 
|---|
| [3424] | 285 |     AC_CHECK_HEADERS([GL/glu.h] ,, | 
|---|
| [1971] | 286 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 287 |  | 
|---|
| [2701] | 288 | # checking for libGLU | 
|---|
| [5276] | 289 |     AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"]) | 
|---|
 | 290 |     if test x$FOUND_GLU != xyes ; then | 
|---|
| [4555] | 291 |          echo "------------------" | 
|---|
 | 292 |          echo "GLU library not found." | 
|---|
 | 293 |          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" | 
|---|
 | 294 |          echo "------------------" | 
|---|
 | 295 |          exit -1 | 
|---|
| [1959] | 296 |     fi | 
|---|
| [1971] | 297 |  | 
|---|
| [5270] | 298 | # checking glew header | 
|---|
 | 299 |    AC_CHECK_HEADERS(GL/glew.h ,, | 
|---|
 | 300 |       [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ]) | 
|---|
 | 301 | #   checking for Windows glew library | 
|---|
| [5276] | 302 |     AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"]) | 
|---|
 | 303 |     if test x$FOUND_GLEW != xyes ; then | 
|---|
| [5270] | 304 |          echo "------------------" | 
|---|
 | 305 |          echo "opengl extension wrangler not found." | 
|---|
 | 306 |          echo "please install the glew package which can be found at http://glew.sourceforge.net" | 
|---|
 | 307 |          echo "------------------" | 
|---|
 | 308 |          exit -1 | 
|---|
 | 309 |     fi | 
|---|
 | 310 |  | 
|---|
| [4697] | 311 | #--------# | 
|---|
 | 312 | # openAL # | 
|---|
 | 313 | #--------# | 
|---|
 | 314 | # checking for openAL-headers | 
|---|
 | 315 |   AC_CHECK_HEADERS([AL/al.h] ,, | 
|---|
 | 316 |       [AC_MSG_ERROR([cannot find openAL header.])]) | 
|---|
 | 317 | # checking for openAL-lib | 
|---|
| [5276] | 318 |   AC_CHECK_LIB([OpenAL32], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lOpenAL32"]) | 
|---|
| [5436] | 319 |   AC_CHECK_LIB([ALut], [main], [FOUND_ALUT=yes; LIBS="-lALut $LIBS"]) | 
|---|
| [5276] | 320 |      if test x$FOUND_OPENAL != xyes ; then | 
|---|
| [2982] | 321 |         echo "------------------" | 
|---|
| [4697] | 322 |         echo "openal library not found." | 
|---|
 | 323 |         echo "please install the openal library, which can be found at http://www.openal.org" | 
|---|
| [2982] | 324 |         echo "------------------" | 
|---|
 | 325 |         exit -1 | 
|---|
| [4697] | 326 |      fi | 
|---|
| [4825] | 327 |  | 
|---|
| [5276] | 328 |  | 
|---|
 | 329 | #-----------# | 
|---|
 | 330 | # SDL(win) # | 
|---|
 | 331 | #-----------# | 
|---|
 | 332 | # checking for SDL-headers | 
|---|
 | 333 |     AC_CHECK_HEADERS([SDL/SDL.h] ,, | 
|---|
 | 334 |       [AC_MSG_ERROR([cannot find SDL headers]) ]) | 
|---|
 | 335 |  | 
|---|
 | 336 | #checking for libSDL | 
|---|
 | 337 |     AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"]) | 
|---|
 | 338 |     if test x$FOUND_sdlmain != xyes ; then | 
|---|
 | 339 |         echo "------------------" | 
|---|
 | 340 |         echo "SDL library not found." | 
|---|
 | 341 |         echo "please install the SDL library, which can be found at http://www.libsdl.org" | 
|---|
 | 342 |         echo "------------------" | 
|---|
 | 343 |         exit 1 | 
|---|
 | 344 |     fi | 
|---|
 | 345 |     AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"]) | 
|---|
 | 346 |     if test x$FOUND_SDL != xyes ; then | 
|---|
 | 347 |         echo "------------------" | 
|---|
 | 348 |         echo "SDL library not found." | 
|---|
 | 349 |         echo "please install the SDL library, which can be found at http://www.libsdl.org" | 
|---|
 | 350 |         echo "------------------" | 
|---|
 | 351 |         exit -1 | 
|---|
 | 352 |     fi | 
|---|
 | 353 |  | 
|---|
 | 354 |   ;; | 
|---|
 | 355 |  | 
|---|
| [4825] | 356 | ######### | 
|---|
| [3424] | 357 | #-------# | 
|---|
 | 358 | # LINUX # | 
|---|
 | 359 | #-------# | 
|---|
| [4825] | 360 | ######### | 
|---|
| [2980] | 361 |  *-*-linux*) | 
|---|
| [2701] | 362 | echo "Linux detected" | 
|---|
 | 363 |  | 
|---|
 | 364 |  Linux="yes" | 
|---|
 | 365 |  | 
|---|
| [5265] | 366 | ##CPPFLAGS="-I/usr/include $CPPFLAGS" | 
|---|
| [5224] | 367 | ##LDFLAGS="-L/usr/lib $LDFLAGS" | 
|---|
| [5221] | 368 | if test x$SHARED_LIB_PATH != xno; then | 
|---|
| [5265] | 369 |         echo "setting new LDFLAGS with $SHARED_LIB_PATH" | 
|---|
 | 370 |         LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS" | 
|---|
| [5221] | 371 | fi | 
|---|
 | 372 |  | 
|---|
| [5277] | 373 | #--------# | 
|---|
 | 374 | # openGL # | 
|---|
 | 375 | #--------# | 
|---|
| [2925] | 376 | # checking gl header | 
|---|
| [3424] | 377 |    AC_CHECK_HEADERS([GL/gl.h] ,, | 
|---|
| [2879] | 378 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
| [2701] | 379 |  | 
|---|
 | 380 | #  checking for Unix GL | 
|---|
| [5279] | 381 |    AC_CHECK_LIB([GL], [main], [FOUND_GL=yes; LIBS="$LIBS -lGL"]) | 
|---|
| [5276] | 382 |    if test x$FOUND_GL != xyes ; then | 
|---|
| [4555] | 383 |          echo "------------------" | 
|---|
 | 384 |          echo "opengl not found." | 
|---|
 | 385 |          echo "please install the opengl package which can be found at http://www.opengl.org" | 
|---|
 | 386 |          echo "------------------" | 
|---|
 | 387 |          exit -1 | 
|---|
| [2701] | 388 |    fi | 
|---|
 | 389 |  | 
|---|
 | 390 | # cheking for GLU-header | 
|---|
| [3424] | 391 |     AC_CHECK_HEADERS([GL/glu.h] ,, | 
|---|
| [2701] | 392 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
| [5277] | 393 |     AC_CHECK_LIB([GLU], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU"]) | 
|---|
 | 394 |     if test x$FOUND_GLU != xyes ; then | 
|---|
 | 395 |          echo "------------------" | 
|---|
 | 396 |          echo "GLU library not found." | 
|---|
 | 397 |          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" | 
|---|
 | 398 |          echo "------------------" | 
|---|
 | 399 |          exit -1 | 
|---|
 | 400 |     fi | 
|---|
| [2995] | 401 |  | 
|---|
| [5265] | 402 | # checking for GLEW-headers | 
|---|
 | 403 |    AC_CHECK_HEADERS([GL/glew.h] ,, | 
|---|
 | 404 |       [AC_MSG_ERROR([cannot find glew headers]) ]) | 
|---|
 | 405 | # checking for GLEW-lib | 
|---|
| [5276] | 406 |   AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"]) | 
|---|
 | 407 |    if test x$FOUND_GLEW != xyes ; then | 
|---|
| [5265] | 408 |          echo "------------------" | 
|---|
 | 409 |          echo "glew not found." | 
|---|
 | 410 |          echo "please install the glew package which can be found at http://glew.sourceforge.net" | 
|---|
 | 411 |          echo "------------------" | 
|---|
 | 412 |          exit -1 | 
|---|
 | 413 |    fi | 
|---|
 | 414 |  | 
|---|
| [4697] | 415 | #--------# | 
|---|
 | 416 | # openAL # | 
|---|
 | 417 | #--------# | 
|---|
 | 418 | # checking for openAL-headers | 
|---|
 | 419 |   AC_CHECK_HEADERS([AL/al.h] ,, | 
|---|
 | 420 |       [AC_MSG_ERROR([cannot find openAL header.])]) | 
|---|
 | 421 | # checking for openAL-lib | 
|---|
| [5276] | 422 |   AC_CHECK_LIB([openal], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lopenal"]) | 
|---|
 | 423 |      if test x$FOUND_OPENAL != xyes ; then | 
|---|
| [4697] | 424 |         echo "------------------" | 
|---|
 | 425 |         echo "openal library not found." | 
|---|
 | 426 |         echo "please install the openal library, which can be found at http://www.openal.org" | 
|---|
 | 427 |         echo "------------------" | 
|---|
 | 428 |         exit -1 | 
|---|
 | 429 |      fi | 
|---|
| [5220] | 430 | # checking for alut | 
|---|
| [5223] | 431 |   AC_CHECK_HEADERS([AL/alut.h] ,, | 
|---|
 | 432 |       [AC_MSG_ERROR([cannot find openAL Utility Toolkit (alut) header.])]) | 
|---|
| [5276] | 433 |   AC_CHECK_LIB([alut], [main], [FOUND_ALUT=yes; LIBS="-lalut $LIBS"]) | 
|---|
| [4697] | 434 |  | 
|---|
| [5276] | 435 | #-----# | 
|---|
 | 436 | # SDL # | 
|---|
 | 437 | #-----# | 
|---|
| [4664] | 438 | # checking for SDL | 
|---|
 | 439 |   AC_MSG_CHECKING([for SDL-version]) | 
|---|
 | 440 |   SDL_VERSION=`sdl-config --version` | 
|---|
 | 441 |   echo $SDL_VERSION | 
|---|
| [2982] | 442 |  | 
|---|
| [5224] | 443 |    CPPFLAGS="$CPPFLAGS `sdl-config --cflags`" | 
|---|
| [4665] | 444 |    AC_CHECK_HEADERS([SDL.h] ,, | 
|---|
 | 445 |       [AC_CHECK_HEADERS([SDL/SDL.h] ,,AC_MSG_ERROR([cannot find SDL header. please download from libsdl.org])])) | 
|---|
| [5223] | 446 |    LIBS="`sdl-config --libs` $LIBS" | 
|---|
| [5221] | 447 |    AC_CHECK_LIB([SDL], [main], [FOUND_SDL=yes]) | 
|---|
| [5276] | 448 |     if test x$FOUND_SDL != xyes ; then | 
|---|
| [5221] | 449 |         echo "------------------" | 
|---|
 | 450 |         echo "SDL library not found." | 
|---|
 | 451 |         echo "please install the SDL library, which can be found at http://www.libsdl.org" | 
|---|
 | 452 |         echo "------------------" | 
|---|
 | 453 |         exit -1 | 
|---|
 | 454 |      fi | 
|---|
| [2991] | 455 |  | 
|---|
| [4664] | 456 |     ;; | 
|---|
| [3140] | 457 |  | 
|---|
| [4825] | 458 | ############# | 
|---|
| [3424] | 459 | #-----------# | 
|---|
 | 460 | # MAC -OS X # | 
|---|
 | 461 | #-----------# | 
|---|
| [4825] | 462 | ############# | 
|---|
| [2995] | 463 |  *darwin*) | 
|---|
| [3424] | 464 |  echo "OS X detected" | 
|---|
| [2995] | 465 |  | 
|---|
 | 466 |  osX="yes" | 
|---|
 | 467 |  | 
|---|
| [4662] | 468 |  CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS" | 
|---|
| [5278] | 469 |  LDFLAGS="$LDFLAGS -L/sw/lib" | 
|---|
| [2995] | 470 | # checking gl header | 
|---|
| [3424] | 471 |    AC_CHECK_HEADERS([OpenGL/gl.h] ,, | 
|---|
| [2995] | 472 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 473 | # cheking for GLU-header | 
|---|
| [3424] | 474 |     AC_CHECK_HEADERS([OpenGL/glu.h] ,, | 
|---|
| [2995] | 475 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 476 |  | 
|---|
 | 477 |    LIBS="$LIBS -framework OpenGL" | 
|---|
 | 478 |  | 
|---|
| [5279] | 479 |  | 
|---|
 | 480 |  | 
|---|
 | 481 | # checking for GLEW-headers | 
|---|
 | 482 |    AC_CHECK_HEADERS([GL/glew.h] ,, | 
|---|
 | 483 |       [AC_MSG_ERROR([cannot find glew headers]) ]) | 
|---|
 | 484 | # checking for GLEW-lib | 
|---|
 | 485 |   AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"]) | 
|---|
 | 486 |    if test x$FOUND_GLEW != xyes ; then | 
|---|
 | 487 |          echo "------------------" | 
|---|
 | 488 |          echo "glew not found." | 
|---|
 | 489 |          echo "please install the glew package which can be found at http://glew.sourceforge.net" | 
|---|
 | 490 |          echo "------------------" | 
|---|
 | 491 |          exit -1 | 
|---|
 | 492 |    fi | 
|---|
 | 493 |  | 
|---|
 | 494 |  | 
|---|
| [5278] | 495 |    AC_CHECK_HEADERS([OpenAL/al.h] ,, | 
|---|
 | 496 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 497 |   HAVE_OPENAL=yes | 
|---|
 | 498 |   LIBS="$LIBS -framework OpenAL" | 
|---|
| [4662] | 499 |  | 
|---|
| [5278] | 500 |  | 
|---|
| [4662] | 501 | ## SDL-check | 
|---|
| [5295] | 502 |        SDL_CFLAGS=`sdl-config --cflags` | 
|---|
 | 503 |        SDL_LIBS=`sdl-config --libs` | 
|---|
 | 504 |        CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" | 
|---|
 | 505 |        LIBS="$LIBS $SDL_LIBS" | 
|---|
| [5278] | 506 |    AC_CHECK_HEADERS([SDL/SDL.h] ,, | 
|---|
 | 507 |       [AC_MSG_ERROR([cannot find SDL headers]) ]) | 
|---|
 | 508 |    HAVE_SDL=yes | 
|---|
| [5295] | 509 | #   LIBS="$LIBS -framework SDL" | 
|---|
| [3424] | 510 |  | 
|---|
| [2995] | 511 | # checking for SDL-headers | 
|---|
| [3001] | 512 | #    AC_CHECK_HEADERS(SDL/SDL.h ,, | 
|---|
 | 513 | #      [AC_MSG_ERROR([cannot find SDL headers]) ]) | 
|---|
| [2995] | 514 |  | 
|---|
 | 515 | ## checking for SDL | 
|---|
 | 516 | #    SDL_VERSION=1.2.7 | 
|---|
 | 517 | #    AM_PATH_SDL($SDL_VERSION, | 
|---|
 | 518 | #      :, | 
|---|
 | 519 | #      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) | 
|---|
 | 520 | #      ) | 
|---|
 | 521 |  | 
|---|
| [3140] | 522 |  | 
|---|
| [2995] | 523 |     ;; | 
|---|
 | 524 |  | 
|---|
| [2701] | 525 |   *) | 
|---|
 | 526 |     ;; | 
|---|
 | 527 | esac | 
|---|
| [2968] | 528 |  | 
|---|
| [2701] | 529 | AC_SUBST(MSBITFIELDS) | 
|---|
 | 530 |  | 
|---|
| [3424] | 531 | ################################### | 
|---|
 | 532 | ## CHECKING FOR HEADERS AND LIBS ## | 
|---|
 | 533 | ################################### | 
|---|
 | 534 |  | 
|---|
| [4665] | 535 | #---------# | 
|---|
 | 536 | # SDL_ttf # | 
|---|
 | 537 | #---------# | 
|---|
 | 538 | # checking for SDL_ttf-headers | 
|---|
| [4672] | 539 |   AC_CHECK_HEADERS([SDL_ttf.h] ,, | 
|---|
 | 540 |       [AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])])) | 
|---|
| [4665] | 541 | # checking for SDL_ttf-lib | 
|---|
| [5276] | 542 |   AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes; LIBS="$LIBS -lSDL_ttf"]) | 
|---|
 | 543 |      if test x$FOUND_SDL_ttf != xyes ; then | 
|---|
| [4665] | 544 |         echo "------------------" | 
|---|
 | 545 |         echo "SDL_ttf library not found." | 
|---|
 | 546 |         echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/" | 
|---|
 | 547 |         echo "------------------" | 
|---|
 | 548 |         exit -1 | 
|---|
 | 549 |      fi | 
|---|
 | 550 |  | 
|---|
 | 551 | #-----------# | 
|---|
 | 552 | # SDL_Image # | 
|---|
 | 553 | #-----------# | 
|---|
 | 554 | # checking for SDL_image-headers | 
|---|
 | 555 | AC_CHECK_HEADERS([SDL_image.h] ,, | 
|---|
| [4672] | 556 |     [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([SDL_image header not found.]))]) | 
|---|
| [4665] | 557 | # checking for SDL_image-lib | 
|---|
| [5276] | 558 | AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes; LIBS="$LIBS -lSDL_image"]) | 
|---|
 | 559 |    if test x$FOUND_SDL_image != xyes ; then | 
|---|
| [4665] | 560 |       echo "------------------" | 
|---|
 | 561 |       echo "SDL_image library not found." | 
|---|
| [5278] | 562 |       echo "please install the SDL_image library, which can be found at http://www.l ibsdl.org/projects/SDL_image/" | 
|---|
| [4665] | 563 |       echo "------------------" | 
|---|
 | 564 |       exit -1 | 
|---|
 | 565 |    fi | 
|---|
 | 566 |  | 
|---|
| [4504] | 567 | #-----# | 
|---|
 | 568 | # ogg # | 
|---|
 | 569 | #-----# | 
|---|
| [4825] | 570 | # checking for ogg-headers | 
|---|
 | 571 |   AC_CHECK_HEADERS([ogg/ogg.h] ,, | 
|---|
 | 572 |       [AC_MSG_ERROR([cannot find ogg header.])]) | 
|---|
 | 573 | # checking for ogg-lib | 
|---|
| [5276] | 574 |   AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes; LIBS="$LIBS -logg"]) | 
|---|
 | 575 |      if test x$FOUND_ogg != xyes ; then | 
|---|
| [4825] | 576 |         echo "------------------" | 
|---|
 | 577 |         echo "ogg library not found." | 
|---|
 | 578 |         echo "please install the ogg library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" | 
|---|
 | 579 |         echo "------------------" | 
|---|
 | 580 |         exit -1 | 
|---|
 | 581 |      fi | 
|---|
| [4504] | 582 |  | 
|---|
 | 583 | #--------# | 
|---|
 | 584 | # vorbis # | 
|---|
 | 585 | #--------# | 
|---|
| [4825] | 586 | # checking for vorbis-lib | 
|---|
| [5276] | 587 |   AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes; LIBS="$LIBS -lvorbis"]) | 
|---|
 | 588 |      if test x$FOUND_vorbis != xyes ; then | 
|---|
| [4825] | 589 |         echo "------------------" | 
|---|
 | 590 |         echo "vorbis library not found." | 
|---|
 | 591 |         echo "please install the vorbis library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" | 
|---|
 | 592 |         echo "------------------" | 
|---|
 | 593 |         exit -1 | 
|---|
 | 594 |      fi | 
|---|
| [4504] | 595 |  | 
|---|
 | 596 | #------------# | 
|---|
 | 597 | # vorbisfile # | 
|---|
 | 598 | #------------# | 
|---|
| [4825] | 599 | # checking for vorbis-headers | 
|---|
 | 600 |   AC_CHECK_HEADERS([vorbis/vorbisfile.h] ,, | 
|---|
 | 601 |       [AC_MSG_ERROR([cannot find vorbisfile header.])]) | 
|---|
 | 602 | # checking for vorbisfile-lib | 
|---|
| [5276] | 603 |   AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes; LIBS="$LIBS -lvorbisfile"]) | 
|---|
 | 604 |      if test x$FOUND_vorbisfile != xyes ; then | 
|---|
| [4825] | 605 |         echo "------------------" | 
|---|
 | 606 |         echo "vorbisfile library not found." | 
|---|
 | 607 |         echo "please install the vorbisfile library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" | 
|---|
 | 608 |         echo "------------------" | 
|---|
 | 609 |         exit -1 | 
|---|
 | 610 |      fi | 
|---|
| [4504] | 611 |  | 
|---|
| [3101] | 612 |  | 
|---|
| [3424] | 613 | #---------# | 
|---|
 | 614 | # libcURL # | 
|---|
 | 615 | #---------# | 
|---|
| [4555] | 616 | if test x$def_curl = xyes; then | 
|---|
| [5276] | 617 |  AC_CHECK_HEADERS([curl/curl.h], [curlHeader=yes], [curlHeader=no]) | 
|---|
| [3423] | 618 |  AC_CHECK_LIB([curl], [main], [FOUND_curl=yes]) | 
|---|
 | 619 |  if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then | 
|---|
 | 620 |   have_curl=yes | 
|---|
 | 621 |   CURL_LIBS=`curl-config --libs` | 
|---|
 | 622 |   CURLCFLAGS=`curl-config --cflags` | 
|---|
 | 623 |   AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) | 
|---|
| [3424] | 624 |  else | 
|---|
| [3423] | 625 |   have_curl=no | 
|---|
 | 626 |  fi | 
|---|
 | 627 |  | 
|---|
 | 628 | fi | 
|---|
 | 629 | AC_SUBST(CURL_LIBS) | 
|---|
 | 630 | AC_SUBST(CURL_CFLAGS) | 
|---|
 | 631 | AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes) | 
|---|
 | 632 |  | 
|---|
| [3863] | 633 | #--------# | 
|---|
 | 634 | # efence # | 
|---|
 | 635 | #--------# | 
|---|
 | 636 | if test x$def_efence = xyes ; then | 
|---|
| [5276] | 637 |   AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"]) | 
|---|
 | 638 |    if test x$FOUND_efence != xyes ; then | 
|---|
 | 639 |      echo "efence was requested, but is not installed!! going on" | 
|---|
| [3863] | 640 |    fi | 
|---|
| [4555] | 641 |  | 
|---|
| [3863] | 642 | fi | 
|---|
 | 643 |  | 
|---|
| [5276] | 644 | #-----# | 
|---|
 | 645 | # GTK # | 
|---|
 | 646 | #-----# | 
|---|
 | 647 | if test x$def_gtk = xyes; then | 
|---|
 | 648 | #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) | 
|---|
 | 649 |         AC_MSG_CHECKING([for gtk2.0]) | 
|---|
 | 650 |         if `$PKG_CONFIG --exists gtk+-2.0`; then | 
|---|
 | 651 |                 echo "yes" | 
|---|
 | 652 |                 have_gtk2=yes | 
|---|
 | 653 |                 GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0` | 
|---|
 | 654 |                 GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` | 
|---|
 | 655 |                 AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2]) | 
|---|
 | 656 |                 if test $DEBUG -ge 3; then | 
|---|
 | 657 |                  echo "cflags: $GTK2_CFLAGS" | 
|---|
 | 658 |                  echo "libs: $GTK2_LIBS" | 
|---|
 | 659 |                 fi | 
|---|
 | 660 |         else | 
|---|
 | 661 |                 echo "no" | 
|---|
 | 662 |         fi | 
|---|
 | 663 |  | 
|---|
 | 664 | fi | 
|---|
 | 665 | AC_SUBST(GTK2_LIBS) | 
|---|
 | 666 | AC_SUBST(GTK2_CFLAGS) | 
|---|
 | 667 | AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) | 
|---|
 | 668 |  | 
|---|
 | 669 |  | 
|---|
| [1945] | 670 | # FIXME: Replace `main' with a function in `-lm': | 
|---|
| [2968] | 671 |  AC_CHECK_LIB([m], [main]) | 
|---|
| [1945] | 672 |  | 
|---|
| [4555] | 673 |  | 
|---|
| [1945] | 674 | # Checks for header files. | 
|---|
 | 675 | AC_HEADER_STDC | 
|---|
 | 676 | AC_CHECK_HEADERS([stdlib.h string.h]) | 
|---|
 | 677 |  | 
|---|
 | 678 | # Checks for typedefs, structures, and compiler characteristics. | 
|---|
 | 679 | AC_HEADER_STDBOOL | 
|---|
 | 680 |  | 
|---|
 | 681 | # Checks for library functions. | 
|---|
 | 682 | AC_FUNC_MALLOC | 
|---|
 | 683 | AC_CHECK_FUNCS([bzero sqrt]) | 
|---|
 | 684 |  | 
|---|
| [3424] | 685 | ###################### | 
|---|
 | 686 | ## OUTPUT CONFIGURE ## | 
|---|
 | 687 | ###################### | 
|---|
| [1946] | 688 | AC_CONFIG_FILES([Makefile | 
|---|
| [3377] | 689 |                  src/Makefile | 
|---|
| [4555] | 690 |                  src/lib/Makefile | 
|---|
 | 691 |                  src/lib/graphics/Makefile | 
|---|
 | 692 |                  src/lib/graphics/importer/Makefile | 
|---|
| [4789] | 693 |                  src/lib/graphics/spatial_separation/Makefile | 
|---|
| [4555] | 694 |                  src/lib/sound/Makefile | 
|---|
 | 695 |                  src/lib/event/Makefile | 
|---|
 | 696 |                  src/lib/physics/Makefile | 
|---|
 | 697 |                  src/lib/particles/Makefile | 
|---|
 | 698 |                  src/lib/collision_detection/Makefile | 
|---|
| [5160] | 699 |                  src/lib/shell/Makefile | 
|---|
| [4555] | 700 |                  src/lib/gui/Makefile | 
|---|
| [5450] | 701 |                  src/lib/gui/gtk_gui/Makefile | 
|---|
 | 702 |                  src/lib/gui/gl_gui/Makefile | 
|---|
| [4265] | 703 |                  src/lib/tinyxml/Makefile | 
|---|
| [5350] | 704 |                  src/util/Makefile | 
|---|
| [5450] | 705 |                  src/world_entities/Makefile | 
|---|
| [4662] | 706 |                  src/subprojects/Makefile | 
|---|
| [4555] | 707 |                  src/subprojects/testmain/Makefile | 
|---|
 | 708 |                  src/subprojects/importer/Makefile | 
|---|
 | 709 |                  src/subprojects/particles/Makefile | 
|---|
 | 710 |                  src/subprojects/collision_detection/Makefile | 
|---|
 | 711 |                  ]) | 
|---|
| [3377] | 712 |  | 
|---|
| [1945] | 713 | AC_OUTPUT | 
|---|