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