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