| [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 | 
|---|
| [4054] | 43 | AC_PROG_RANLIB | 
|---|
| [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 | #-----------------# | 
|---|
 | 67 | # DEBUG-statement # | 
|---|
 | 68 | #-----------------# | 
|---|
| [3173] | 69 | DEBUG=no | 
|---|
 | 70 | AC_MSG_CHECKING([if DEBUG-mode should be enabled]) | 
|---|
| [4555] | 71 | AC_ARG_ENABLE([debug], | 
|---|
 | 72 |         AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]), | 
|---|
 | 73 |          DEBUG=$enableval) | 
|---|
| [3205] | 74 |  | 
|---|
| [4555] | 75 | if test x$DEBUG = xno; then | 
|---|
 | 76 |         echo "no" | 
|---|
 | 77 |         echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." | 
|---|
 | 78 |         DEBUG=4 | 
|---|
| [3424] | 79 | elif test x$DEBUG = xyes; then | 
|---|
| [4555] | 80 |         echo "yes" | 
|---|
 | 81 |         echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." | 
|---|
 | 82 |         DEBUG=4 | 
|---|
 | 83 | else | 
|---|
 | 84 |         echo "yes: setting debuglevel to to $DEBUG" | 
|---|
| [3173] | 85 | fi | 
|---|
| [4555] | 86 |         AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are]) | 
|---|
| [3205] | 87 |  | 
|---|
| [3173] | 88 | AC_SUBST(DEBUG) | 
|---|
 | 89 |  | 
|---|
| [3592] | 90 | #---------------# | 
|---|
 | 91 | # Modular Debug # | 
|---|
 | 92 | #---------------# | 
|---|
 | 93 | MODULAR_DEBUG=yes | 
|---|
 | 94 | AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) | 
|---|
| [4555] | 95 | AC_ARG_ENABLE([modular-debug], | 
|---|
 | 96 |         AC_HELP_STRING( [--disable-modular-debug], [compiles in modular-debug mode, that logs differently on the many modules of orxonox.]), | 
|---|
 | 97 |          MODULAR_DEBUG=$enableval) | 
|---|
| [3592] | 98 |  | 
|---|
| [4555] | 99 | if test x$MODULAR_DEBUG = xno; then | 
|---|
 | 100 |         echo "no" | 
|---|
| [3592] | 101 | elif test x$MODULAR_DEBUG = xyes; then | 
|---|
| [4555] | 102 |         echo "yes" | 
|---|
 | 103 |         AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) | 
|---|
| [3592] | 104 | fi | 
|---|
 | 105 |  | 
|---|
| [3424] | 106 | #--------------# | 
|---|
 | 107 | # GTK-disabled # | 
|---|
 | 108 | #--------------# | 
|---|
| [3100] | 109 | AC_MSG_CHECKING([if gtk should be enabled]) | 
|---|
| [4774] | 110 | AC_ARG_ENABLE([gtk], | 
|---|
 | 111 |         AC_HELP_STRING( [--disable-gtk], | 
|---|
| [4555] | 112 |         [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes]) | 
|---|
 | 113 | if test x$def_gtk = xyes; then | 
|---|
| [3100] | 114 |   echo "yes" | 
|---|
| [4555] | 115 | fi | 
|---|
 | 116 | if test x$def_gtk = xno; then | 
|---|
| [3100] | 117 |   echo "no" | 
|---|
 | 118 | fi | 
|---|
| [3423] | 119 |  | 
|---|
| [3424] | 120 | #------------------# | 
|---|
 | 121 | # libCurl-disabled # | 
|---|
 | 122 | #------------------# | 
|---|
| [3423] | 123 | AC_MSG_CHECKING([if libcURL should be enabled]) | 
|---|
| [4774] | 124 | AC_ARG_ENABLE([curl], | 
|---|
 | 125 |         AC_HELP_STRING( [--disable-curl], | 
|---|
| [4555] | 126 |         [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes]) | 
|---|
 | 127 | if test x$def_curl = xyes; then | 
|---|
| [3423] | 128 |   echo "yes" | 
|---|
| [4555] | 129 | fi | 
|---|
 | 130 | if test x$def_curl = xno; then | 
|---|
| [3423] | 131 |   echo "no" | 
|---|
 | 132 | fi | 
|---|
 | 133 |  | 
|---|
| [3424] | 134 | #-------------------# | 
|---|
 | 135 | # SubProject-enable # | 
|---|
 | 136 | #-------------------# | 
|---|
 | 137 | def_sub_projects=no | 
|---|
| [3377] | 138 | AC_MSG_CHECKING([if the SubProjects should be built]) | 
|---|
| [4774] | 139 | AC_ARG_WITH([sub-projects], | 
|---|
 | 140 |         AC_HELP_STRING( [--with-sub-projects], | 
|---|
| [4555] | 141 |         [also builds the subProjects while make from srcdir]), [def_sub_projects=yes]) | 
|---|
| [3424] | 142 | if test x$def_sub_projects = xyes; then | 
|---|
| [3377] | 143 |   echo "yes" | 
|---|
| [4555] | 144 | fi | 
|---|
| [3424] | 145 | if test x$def_sub_projects = xno; then | 
|---|
| [3377] | 146 |   echo "no" | 
|---|
 | 147 | fi | 
|---|
 | 148 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) | 
|---|
 | 149 |  | 
|---|
| [3788] | 150 | #-------------------# | 
|---|
 | 151 | # Profiling Enabled # | 
|---|
 | 152 | #-------------------# | 
|---|
 | 153 | def_profiling=no | 
|---|
 | 154 | AC_MSG_CHECKING([if Profiling should be enabled]) | 
|---|
| [4555] | 155 | AC_ARG_ENABLE([profile], | 
|---|
 | 156 |         AC_HELP_STRING( [--enable-profile], | 
|---|
 | 157 |         [builds orxonox with profiling support]), [def_profiling=yes]) | 
|---|
| [3788] | 158 | if test x$def_profiling = xyes; then | 
|---|
 | 159 |   echo "yes" | 
|---|
 | 160 |   CXXFLAGS="$CXXFLAGS -pg" | 
|---|
| [4555] | 161 | fi | 
|---|
| [3788] | 162 | if test x$def_profiling = xno; then | 
|---|
 | 163 |   echo "no" | 
|---|
 | 164 | fi | 
|---|
 | 165 |  | 
|---|
| [3863] | 166 | #----------------# | 
|---|
 | 167 | # efence Enabled # | 
|---|
 | 168 | #----------------# | 
|---|
 | 169 | def_efence=no | 
|---|
 | 170 | AC_MSG_CHECKING([if efence should be enabled]) | 
|---|
| [4555] | 171 | AC_ARG_ENABLE([efence], | 
|---|
 | 172 |         AC_HELP_STRING( [--enable-efence], | 
|---|
 | 173 |         [builds orxonox with efence support]), [def_efence=yes]) | 
|---|
| [3863] | 174 | if test x$def_efence = xyes; then | 
|---|
 | 175 |   echo "yes" | 
|---|
| [4555] | 176 | fi | 
|---|
| [3863] | 177 | if test x$def_efence = xno; then | 
|---|
 | 178 |   echo "no" | 
|---|
 | 179 | fi | 
|---|
 | 180 |  | 
|---|
| [3558] | 181 | #----------------------# | 
|---|
 | 182 | # Documentation-enable # | 
|---|
 | 183 | #----------------------# | 
|---|
 | 184 | def_documentation=no | 
|---|
 | 185 | AC_MSG_CHECKING([if the Documentation should be build by default]) | 
|---|
| [4555] | 186 | AC_ARG_ENABLE([documentation], | 
|---|
 | 187 |         AC_HELP_STRING( [--enable-documentation], | 
|---|
 | 188 |         [also builds the sDocumentation while make from srcdir]), [def_documentation=yes]) | 
|---|
| [3558] | 189 | if test x$def_documentation = xyes; then | 
|---|
 | 190 |   echo "yes" | 
|---|
| [4555] | 191 | fi | 
|---|
| [3558] | 192 | if test x$def_documentation = xno; then | 
|---|
 | 193 |   echo "no" | 
|---|
 | 194 | fi | 
|---|
 | 195 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) | 
|---|
| [4774] | 196 |  | 
|---|
| [3424] | 197 | ####################### | 
|---|
 | 198 | ## PROGRAMM CHECKING ## | 
|---|
 | 199 | ## 3. party Programs ## | 
|---|
 | 200 | ####################### | 
|---|
 | 201 |  | 
|---|
 | 202 | #----------------------# | 
|---|
 | 203 | # checking for Doxygen # | 
|---|
 | 204 | #----------------------# | 
|---|
| [3219] | 205 | AC_PATH_PROG(DOXYGEN, doxygen) | 
|---|
 | 206 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) | 
|---|
 | 207 |  | 
|---|
| [3789] | 208 | #--------------------# | 
|---|
 | 209 | # checking for gprof # | 
|---|
 | 210 | #--------------------# | 
|---|
 | 211 | AC_PATH_PROG(GPROF, gprof) | 
|---|
 | 212 |  | 
|---|
| [4130] | 213 | #-------------------------# | 
|---|
 | 214 | # checking for pkg-config # | 
|---|
 | 215 | #-------------------------# | 
|---|
 | 216 | if test x$def_gtk = xyes; then | 
|---|
 | 217 |  AC_PATH_PROG(PKG_CONFIG, pkg-config) | 
|---|
 | 218 | fi | 
|---|
 | 219 |  | 
|---|
 | 220 |  | 
|---|
| [3424] | 221 | ######################### | 
|---|
 | 222 | ## CHECKING FOR SYSTEM ## | 
|---|
 | 223 | ######################### | 
|---|
 | 224 | ## here the system is checked, and openGL is included | 
|---|
 | 225 | ## also checking for SDL on differen Systems | 
|---|
| [2701] | 226 |  | 
|---|
 | 227 | AC_MSG_CHECKING([for System]) | 
|---|
| [2980] | 228 | ## checking for openGL-environment and other sys-specific parameters | 
|---|
 | 229 | case "$target" in | 
|---|
| [4825] | 230 |  | 
|---|
 | 231 | ########### | 
|---|
| [3424] | 232 | #---------# | 
|---|
 | 233 | # WINDOWS # | 
|---|
 | 234 | #---------# | 
|---|
| [4825] | 235 | ########### | 
|---|
| [2980] | 236 |   *-*-mingw32*) | 
|---|
| [2701] | 237 | echo "mingw-WINDOWS detected" | 
|---|
 | 238 |  | 
|---|
| [4662] | 239 | CPPFLAGS="-I/usr/include -I/mingw/include" | 
|---|
| [3790] | 240 |  | 
|---|
| [2701] | 241 |     mingw="yes" | 
|---|
 | 242 |     MSBITFIELDS="-mms-bitfields" | 
|---|
 | 243 |     MWINDOWS="-mwindows" | 
|---|
 | 244 |  | 
|---|
 | 245 |  | 
|---|
| [4697] | 246 |  | 
|---|
 | 247 | # checking for mingw32 | 
|---|
 | 248 |     AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) | 
|---|
 | 249 |     if test x$FOUND_mingw32 = xyes; then | 
|---|
 | 250 |         LIBS="$LIBS -lmingw32" | 
|---|
 | 251 |     fi | 
|---|
 | 252 |  | 
|---|
 | 253 | #-----------# | 
|---|
 | 254 | # SDL (win) # | 
|---|
 | 255 | #-----------# | 
|---|
 | 256 | # checking for SDL-headers | 
|---|
 | 257 |     AC_CHECK_HEADERS([SDL/SDL.h] ,, | 
|---|
 | 258 |       [AC_MSG_ERROR([cannot find SDL headers]) ]) | 
|---|
 | 259 |  | 
|---|
 | 260 | #checking for libSDL | 
|---|
 | 261 |     AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes) | 
|---|
 | 262 |     if test x$FOUND_sdlmain = xyes ; then | 
|---|
 | 263 |        LIBS="$LIBS -lsdlmain" | 
|---|
 | 264 |     else | 
|---|
 | 265 |         echo "------------------" | 
|---|
 | 266 |         echo "SDL library not found." | 
|---|
 | 267 |         echo "please install the SDL library, which can be found at http://www.libsdl.org" | 
|---|
 | 268 |         echo "------------------" | 
|---|
 | 269 |         exit 1 | 
|---|
 | 270 |     fi | 
|---|
 | 271 |     AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes) | 
|---|
 | 272 |     if test x$FOUND_sdl = xyes ; then | 
|---|
 | 273 |        LIBS="$LIBS -lsdl" | 
|---|
 | 274 |     else | 
|---|
 | 275 |         echo "------------------" | 
|---|
 | 276 |         echo "SDL library not found." | 
|---|
 | 277 |         echo "please install the SDL library, which can be found at http://www.libsdl.org" | 
|---|
 | 278 |         echo "------------------" | 
|---|
 | 279 |         exit -1 | 
|---|
 | 280 |     fi | 
|---|
 | 281 |  | 
|---|
 | 282 | #---------------# | 
|---|
 | 283 | # open-GL (win) # | 
|---|
 | 284 | #---------------# | 
|---|
| [2925] | 285 | # checking gl header | 
|---|
| [2879] | 286 |    AC_CHECK_HEADERS(GL/gl.h ,, | 
|---|
 | 287 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
| [2701] | 288 | #   checking for Windows openGl library | 
|---|
| [1971] | 289 |     AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h") | 
|---|
| [3424] | 290 |     if test x$FOUND_opengl32 = xyes ; then | 
|---|
| [4555] | 291 |         LIBS="$LIBS -lopengl32" | 
|---|
| [1971] | 292 |     else | 
|---|
| [4555] | 293 |          echo "------------------" | 
|---|
 | 294 |          echo "opengl not found." | 
|---|
 | 295 |          echo "please install the opengl package which can be found at http://www.opengl.org" | 
|---|
 | 296 |          echo "------------------" | 
|---|
 | 297 |          exit -1 | 
|---|
| [1959] | 298 |     fi | 
|---|
 | 299 |  | 
|---|
| [2701] | 300 | # cheking for GLU-header | 
|---|
| [3424] | 301 |     AC_CHECK_HEADERS([GL/glu.h] ,, | 
|---|
| [1971] | 302 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 303 |  | 
|---|
| [2701] | 304 | # checking for libGLU | 
|---|
| [1971] | 305 |     AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes) | 
|---|
| [3424] | 306 |     if test x$FOUND_glu32 = xyes ; then | 
|---|
| [4555] | 307 |         LIBS="$LIBS -lGLU32" | 
|---|
| [2701] | 308 |     else | 
|---|
| [4555] | 309 |          echo "------------------" | 
|---|
 | 310 |          echo "GLU library not found." | 
|---|
 | 311 |          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" | 
|---|
 | 312 |          echo "------------------" | 
|---|
 | 313 |          exit -1 | 
|---|
| [1959] | 314 |     fi | 
|---|
| [1971] | 315 |  | 
|---|
| [4697] | 316 | #--------# | 
|---|
 | 317 | # openAL # | 
|---|
 | 318 | #--------# | 
|---|
 | 319 | # checking for openAL-headers | 
|---|
 | 320 |   AC_CHECK_HEADERS([AL/al.h] ,, | 
|---|
 | 321 |       [AC_MSG_ERROR([cannot find openAL header.])]) | 
|---|
 | 322 | # checking for openAL-lib | 
|---|
 | 323 |   AC_CHECK_LIB([OpenAL32], [main], [FOUND_openal=yes]) | 
|---|
 | 324 |   AC_CHECK_LIB([ALut], [main], [FOUND_ALut=yes]) | 
|---|
 | 325 |      if test x$FOUND_openal = xyes ; then | 
|---|
 | 326 |       if test x$FOUND_ALut = xyes ; then | 
|---|
 | 327 |        LIBS="$LIBS -lALut -lOpenAL32" | 
|---|
 | 328 |      else | 
|---|
| [2982] | 329 |         echo "------------------" | 
|---|
| [4697] | 330 |         echo "openal library not found." | 
|---|
 | 331 |         echo "please install the openal library, which can be found at http://www.openal.org" | 
|---|
| [2982] | 332 |         echo "------------------" | 
|---|
 | 333 |         exit -1 | 
|---|
| [4697] | 334 |       fi | 
|---|
 | 335 |      fi | 
|---|
| [2701] | 336 |     ;; | 
|---|
| [4825] | 337 |  | 
|---|
 | 338 | ######### | 
|---|
| [3424] | 339 | #-------# | 
|---|
 | 340 | # LINUX # | 
|---|
 | 341 | #-------# | 
|---|
| [4825] | 342 | ######### | 
|---|
| [2980] | 343 |  *-*-linux*) | 
|---|
| [2701] | 344 | echo "Linux detected" | 
|---|
 | 345 |  | 
|---|
 | 346 |  Linux="yes" | 
|---|
 | 347 |  | 
|---|
| [4662] | 348 | CPPFLAGS="-I/usr/X11R6/include -I/usr/include" | 
|---|
| [5158] | 349 | ##LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS" | 
|---|
| [2925] | 350 | # checking gl header | 
|---|
| [3424] | 351 |    AC_CHECK_HEADERS([GL/gl.h] ,, | 
|---|
| [2879] | 352 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
| [2701] | 353 |  | 
|---|
 | 354 | #  checking for Unix GL | 
|---|
| [3385] | 355 |    AC_CHECK_LIB([GL], [glLoadIdentity], FOUND_GL=yes) | 
|---|
| [3424] | 356 |    if test x$FOUND_GL = xyes ; then | 
|---|
| [2701] | 357 |      LIBS="$LIBS -lGL" | 
|---|
 | 358 |    else | 
|---|
| [4555] | 359 |          echo "------------------" | 
|---|
 | 360 |          echo "opengl not found." | 
|---|
 | 361 |          echo "please install the opengl package which can be found at http://www.opengl.org" | 
|---|
 | 362 |          echo "------------------" | 
|---|
 | 363 |          exit -1 | 
|---|
| [2701] | 364 |    fi | 
|---|
 | 365 |  | 
|---|
 | 366 | # cheking for GLU-header | 
|---|
| [3424] | 367 |     AC_CHECK_HEADERS([GL/glu.h] ,, | 
|---|
| [2701] | 368 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 369 |  | 
|---|
 | 370 |     AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes) | 
|---|
| [3424] | 371 |     if test x$FOUND_GLU = xyes ; then | 
|---|
| [2701] | 372 |       LIBS="$LIBS -lGLU" | 
|---|
 | 373 |     else | 
|---|
| [4555] | 374 |          echo "------------------" | 
|---|
 | 375 |          echo "GLU library not found." | 
|---|
 | 376 |          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" | 
|---|
 | 377 |          echo "------------------" | 
|---|
 | 378 |          exit -1 | 
|---|
 | 379 |     fi | 
|---|
| [2995] | 380 |  | 
|---|
| [4697] | 381 | #--------# | 
|---|
 | 382 | # openAL # | 
|---|
 | 383 | #--------# | 
|---|
 | 384 | # checking for openAL-headers | 
|---|
 | 385 |   AC_CHECK_HEADERS([AL/al.h] ,, | 
|---|
 | 386 |       [AC_MSG_ERROR([cannot find openAL header.])]) | 
|---|
 | 387 | # checking for openAL-lib | 
|---|
 | 388 |   AC_CHECK_LIB([openal], [main], [FOUND_openal=yes]) | 
|---|
 | 389 |      if test x$FOUND_openal = xyes ; then | 
|---|
 | 390 |        LIBS="$LIBS -lopenal" | 
|---|
 | 391 |      else | 
|---|
 | 392 |         echo "------------------" | 
|---|
 | 393 |         echo "openal library not found." | 
|---|
 | 394 |         echo "please install the openal library, which can be found at http://www.openal.org" | 
|---|
 | 395 |         echo "------------------" | 
|---|
 | 396 |         exit -1 | 
|---|
 | 397 |      fi | 
|---|
 | 398 |  | 
|---|
| [4664] | 399 | # checking for SDL | 
|---|
 | 400 |   AC_MSG_CHECKING([for SDL-version]) | 
|---|
 | 401 |   SDL_VERSION=`sdl-config --version` | 
|---|
 | 402 |   echo $SDL_VERSION | 
|---|
| [2982] | 403 |  | 
|---|
| [4664] | 404 |    CPPFLAGS="`sdl-config --cflags` $CPPFLAGS" | 
|---|
| [4665] | 405 |    AC_CHECK_HEADERS([SDL.h] ,, | 
|---|
 | 406 |       [AC_CHECK_HEADERS([SDL/SDL.h] ,,AC_MSG_ERROR([cannot find SDL header. please download from libsdl.org])])) | 
|---|
| [2991] | 407 |  | 
|---|
| [4664] | 408 |    LIBS="`sdl-config --libs` $LIBS" | 
|---|
 | 409 |     ;; | 
|---|
| [3140] | 410 |  | 
|---|
| [4825] | 411 | ############# | 
|---|
| [3424] | 412 | #-----------# | 
|---|
 | 413 | # MAC -OS X # | 
|---|
 | 414 | #-----------# | 
|---|
| [4825] | 415 | ############# | 
|---|
| [2995] | 416 |  *darwin*) | 
|---|
| [3424] | 417 |  echo "OS X detected" | 
|---|
| [2995] | 418 |  | 
|---|
 | 419 |  osX="yes" | 
|---|
 | 420 |  | 
|---|
| [4662] | 421 |  CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS" | 
|---|
| [2995] | 422 | # checking gl header | 
|---|
| [3424] | 423 |    AC_CHECK_HEADERS([OpenGL/gl.h] ,, | 
|---|
| [2995] | 424 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 425 | # cheking for GLU-header | 
|---|
| [3424] | 426 |     AC_CHECK_HEADERS([OpenGL/glu.h] ,, | 
|---|
| [2995] | 427 |       [AC_MSG_ERROR([cannot find opengl headers]) ]) | 
|---|
 | 428 |  | 
|---|
 | 429 |    LIBS="$LIBS -framework OpenGL" | 
|---|
 | 430 |  | 
|---|
| [4662] | 431 |  | 
|---|
 | 432 | ## SDL-check | 
|---|
| [3424] | 433 |        SDL_CFLAGS=`sdl-config --cflags` | 
|---|
 | 434 |        SDL_LIBS=`sdl-config --libs` | 
|---|
 | 435 |        CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" | 
|---|
 | 436 |        LIBS="$LIBS $SDL_LIBS" | 
|---|
 | 437 |  | 
|---|
 | 438 |  | 
|---|
| [2995] | 439 | # checking for SDL-headers | 
|---|
| [3001] | 440 | #    AC_CHECK_HEADERS(SDL/SDL.h ,, | 
|---|
 | 441 | #      [AC_MSG_ERROR([cannot find SDL headers]) ]) | 
|---|
| [2995] | 442 |  | 
|---|
 | 443 | ## checking for SDL | 
|---|
 | 444 | #    SDL_VERSION=1.2.7 | 
|---|
 | 445 | #    AM_PATH_SDL($SDL_VERSION, | 
|---|
 | 446 | #      :, | 
|---|
 | 447 | #      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) | 
|---|
 | 448 | #      ) | 
|---|
 | 449 |  | 
|---|
| [3140] | 450 |  | 
|---|
| [2995] | 451 |     ;; | 
|---|
 | 452 |  | 
|---|
| [2701] | 453 |   *) | 
|---|
 | 454 |     ;; | 
|---|
 | 455 | esac | 
|---|
| [2968] | 456 |  | 
|---|
| [2701] | 457 | AC_SUBST(MSBITFIELDS) | 
|---|
 | 458 |  | 
|---|
| [3424] | 459 | ################################### | 
|---|
 | 460 | ## CHECKING FOR HEADERS AND LIBS ## | 
|---|
 | 461 | ################################### | 
|---|
 | 462 |  | 
|---|
| [4665] | 463 | #---------# | 
|---|
 | 464 | # SDL_ttf # | 
|---|
 | 465 | #---------# | 
|---|
 | 466 | # checking for SDL_ttf-headers | 
|---|
| [4672] | 467 |   AC_CHECK_HEADERS([SDL_ttf.h] ,, | 
|---|
 | 468 |       [AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])])) | 
|---|
| [4665] | 469 | # checking for SDL_ttf-lib | 
|---|
| [4697] | 470 |   AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes]) | 
|---|
| [4665] | 471 |      if test x$FOUND_SDL_ttf = xyes ; then | 
|---|
 | 472 |        LIBS="$LIBS -lSDL_ttf" | 
|---|
 | 473 |      else | 
|---|
 | 474 |         echo "------------------" | 
|---|
 | 475 |         echo "SDL_ttf library not found." | 
|---|
 | 476 |         echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/" | 
|---|
 | 477 |         echo "------------------" | 
|---|
 | 478 |         exit -1 | 
|---|
 | 479 |      fi | 
|---|
 | 480 |  | 
|---|
 | 481 |  | 
|---|
 | 482 | #-----------# | 
|---|
 | 483 | # SDL_Image # | 
|---|
 | 484 | #-----------# | 
|---|
 | 485 | # checking for SDL_image-headers | 
|---|
 | 486 | AC_CHECK_HEADERS([SDL_image.h] ,, | 
|---|
| [4672] | 487 |     [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([SDL_image header not found.]))]) | 
|---|
| [4665] | 488 | # checking for SDL_image-lib | 
|---|
 | 489 | AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes]) | 
|---|
 | 490 |    if test x$FOUND_SDL_image = xyes ; then | 
|---|
 | 491 |      LIBS="$LIBS -lSDL_image" | 
|---|
 | 492 |    else | 
|---|
 | 493 |       echo "------------------" | 
|---|
 | 494 |       echo "SDL_image library not found." | 
|---|
 | 495 |       echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" | 
|---|
 | 496 |       echo "------------------" | 
|---|
 | 497 |       exit -1 | 
|---|
 | 498 |    fi | 
|---|
 | 499 |  | 
|---|
| [4504] | 500 | #-----# | 
|---|
 | 501 | # ogg # | 
|---|
 | 502 | #-----# | 
|---|
| [4825] | 503 | # checking for ogg-headers | 
|---|
 | 504 |   AC_CHECK_HEADERS([ogg/ogg.h] ,, | 
|---|
 | 505 |       [AC_MSG_ERROR([cannot find ogg header.])]) | 
|---|
 | 506 | # checking for ogg-lib | 
|---|
 | 507 |   AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes]) | 
|---|
 | 508 |      if test x$FOUND_ogg = xyes ; then | 
|---|
 | 509 |        LIBS="$LIBS -logg" | 
|---|
 | 510 |      else | 
|---|
 | 511 |         echo "------------------" | 
|---|
 | 512 |         echo "ogg library not found." | 
|---|
 | 513 |         echo "please install the ogg library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" | 
|---|
 | 514 |         echo "------------------" | 
|---|
 | 515 |         exit -1 | 
|---|
 | 516 |      fi | 
|---|
| [4504] | 517 |  | 
|---|
 | 518 | #--------# | 
|---|
 | 519 | # vorbis # | 
|---|
 | 520 | #--------# | 
|---|
| [4825] | 521 | # checking for vorbis-lib | 
|---|
 | 522 |   AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes]) | 
|---|
 | 523 |      if test x$FOUND_vorbis = xyes ; then | 
|---|
 | 524 |        LIBS="$LIBS -lvorbis" | 
|---|
 | 525 |      else | 
|---|
 | 526 |         echo "------------------" | 
|---|
 | 527 |         echo "vorbis library not found." | 
|---|
 | 528 |         echo "please install the vorbis library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" | 
|---|
 | 529 |         echo "------------------" | 
|---|
 | 530 |         exit -1 | 
|---|
 | 531 |      fi | 
|---|
| [4504] | 532 |  | 
|---|
 | 533 | #------------# | 
|---|
 | 534 | # vorbisfile # | 
|---|
 | 535 | #------------# | 
|---|
| [4825] | 536 | # checking for vorbis-headers | 
|---|
 | 537 |   AC_CHECK_HEADERS([vorbis/vorbisfile.h] ,, | 
|---|
 | 538 |       [AC_MSG_ERROR([cannot find vorbisfile header.])]) | 
|---|
 | 539 | # checking for vorbisfile-lib | 
|---|
 | 540 |   AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes]) | 
|---|
 | 541 |      if test x$FOUND_vorbisfile = xyes ; then | 
|---|
 | 542 |        LIBS="$LIBS -lvorbisfile" | 
|---|
 | 543 |      else | 
|---|
 | 544 |         echo "------------------" | 
|---|
 | 545 |         echo "vorbisfile library not found." | 
|---|
 | 546 |         echo "please install the vorbisfile library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" | 
|---|
 | 547 |         echo "------------------" | 
|---|
 | 548 |         exit -1 | 
|---|
 | 549 |      fi | 
|---|
| [4504] | 550 |  | 
|---|
| [3424] | 551 | #-----# | 
|---|
 | 552 | # GTK # | 
|---|
 | 553 | #-----# | 
|---|
| [4555] | 554 | if test x$def_gtk = xyes; then | 
|---|
 | 555 |         #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) | 
|---|
 | 556 |         AC_MSG_CHECKING([for gtk2.0]) | 
|---|
 | 557 |         if `$PKG_CONFIG --exists gtk+-2.0`; then | 
|---|
 | 558 |                 echo "yes" | 
|---|
 | 559 |                 have_gtk2=yes | 
|---|
 | 560 |                 GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0` | 
|---|
 | 561 |                 GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` | 
|---|
 | 562 |                 AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2]) | 
|---|
 | 563 |                 if test $DEBUG -ge 3; then | 
|---|
 | 564 |                  echo "cflags: $GTK2_CFLAGS" | 
|---|
 | 565 |                  echo "libs: $GTK2_LIBS" | 
|---|
 | 566 |                 fi | 
|---|
 | 567 |         else | 
|---|
 | 568 |                 echo "no" | 
|---|
 | 569 |         fi | 
|---|
| [3101] | 570 |  | 
|---|
| [3099] | 571 | fi | 
|---|
| [2980] | 572 | AC_SUBST(GTK2_LIBS) | 
|---|
 | 573 | AC_SUBST(GTK2_CFLAGS) | 
|---|
| [3100] | 574 | AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) | 
|---|
| [2980] | 575 |  | 
|---|
| [3424] | 576 | #---------# | 
|---|
 | 577 | # libcURL # | 
|---|
 | 578 | #---------# | 
|---|
| [4555] | 579 | if test x$def_curl = xyes; then | 
|---|
| [2190] | 580 |  | 
|---|
| [3424] | 581 |  AC_CHECK_HEADERS([curl/curl.h], [curlHeader="yes"], [curlHeader="no"]) | 
|---|
| [3423] | 582 |  AC_CHECK_LIB([curl], [main], [FOUND_curl=yes]) | 
|---|
 | 583 |  if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then | 
|---|
 | 584 |   have_curl=yes | 
|---|
 | 585 |   CURL_LIBS=`curl-config --libs` | 
|---|
 | 586 |   CURLCFLAGS=`curl-config --cflags` | 
|---|
 | 587 |   AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) | 
|---|
| [3424] | 588 |  else | 
|---|
| [3423] | 589 |   have_curl=no | 
|---|
 | 590 |  fi | 
|---|
 | 591 |  | 
|---|
 | 592 | fi | 
|---|
 | 593 | AC_SUBST(CURL_LIBS) | 
|---|
 | 594 | AC_SUBST(CURL_CFLAGS) | 
|---|
 | 595 | AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes) | 
|---|
 | 596 |  | 
|---|
| [3863] | 597 | #--------# | 
|---|
 | 598 | # efence # | 
|---|
 | 599 | #--------# | 
|---|
 | 600 | if test x$def_efence = xyes ; then | 
|---|
 | 601 |   AC_CHECK_LIB([efence], [main], [FOUND_efence=yes]) | 
|---|
 | 602 |    if test x$FOUND_efence = xyes ; then | 
|---|
 | 603 |       LIBS="$LIBS -lefence" | 
|---|
 | 604 |    fi | 
|---|
| [4555] | 605 |  | 
|---|
| [3863] | 606 | fi | 
|---|
 | 607 |  | 
|---|
| [1945] | 608 | # FIXME: Replace `main' with a function in `-lm': | 
|---|
| [2968] | 609 |  AC_CHECK_LIB([m], [main]) | 
|---|
| [1945] | 610 |  | 
|---|
| [4555] | 611 |  | 
|---|
| [1945] | 612 | # Checks for header files. | 
|---|
 | 613 | AC_HEADER_STDC | 
|---|
 | 614 | AC_CHECK_HEADERS([stdlib.h string.h]) | 
|---|
 | 615 |  | 
|---|
 | 616 | # Checks for typedefs, structures, and compiler characteristics. | 
|---|
 | 617 | AC_HEADER_STDBOOL | 
|---|
 | 618 |  | 
|---|
 | 619 | # Checks for library functions. | 
|---|
 | 620 | AC_FUNC_MALLOC | 
|---|
 | 621 | AC_CHECK_FUNCS([bzero sqrt]) | 
|---|
 | 622 |  | 
|---|
| [3424] | 623 | ###################### | 
|---|
 | 624 | ## OUTPUT CONFIGURE ## | 
|---|
 | 625 | ###################### | 
|---|
| [1946] | 626 | AC_CONFIG_FILES([Makefile | 
|---|
| [3377] | 627 |                  src/Makefile | 
|---|
| [4555] | 628 |                  src/lib/Makefile | 
|---|
 | 629 |                  src/lib/graphics/Makefile | 
|---|
 | 630 |                  src/lib/graphics/importer/Makefile | 
|---|
| [4789] | 631 |                  src/lib/graphics/spatial_separation/Makefile | 
|---|
| [4555] | 632 |                  src/lib/sound/Makefile | 
|---|
 | 633 |                  src/lib/event/Makefile | 
|---|
 | 634 |                  src/lib/physics/Makefile | 
|---|
 | 635 |                  src/lib/particles/Makefile | 
|---|
 | 636 |                  src/lib/collision_detection/Makefile | 
|---|
| [5160] | 637 |                  src/lib/shell/Makefile | 
|---|
| [4555] | 638 |                  src/lib/gui/Makefile | 
|---|
| [4265] | 639 |                  src/lib/tinyxml/Makefile | 
|---|
| [4662] | 640 |                  src/subprojects/Makefile | 
|---|
| [4555] | 641 |                  src/subprojects/testmain/Makefile | 
|---|
 | 642 |                  src/subprojects/importer/Makefile | 
|---|
 | 643 |                  src/subprojects/particles/Makefile | 
|---|
 | 644 |                  src/subprojects/collision_detection/Makefile | 
|---|
 | 645 |                  ]) | 
|---|
| [3377] | 646 |  | 
|---|
| [1945] | 647 | AC_OUTPUT | 
|---|