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