[3424] | 1 | ########################################################################## |
---|
| 2 | # orxonox - the future of 3D-vertical-scrollers # |
---|
| 3 | # # |
---|
| 4 | # Copyright (C) 2004 orx # |
---|
| 5 | # # |
---|
| 6 | # This program is free software; you can redistribute it and/or modify # |
---|
| 7 | # it under the terms of the GNU General Public License as published by # |
---|
| 8 | # the Free Software Foundation; either version 2, or (at your option) # |
---|
| 9 | # any later version. # |
---|
| 10 | # # |
---|
| 11 | # ### File Specific: # |
---|
| 12 | # main-programmer: Benjamin Grauer # |
---|
| 13 | # co-programmer: ... # |
---|
| 14 | # # |
---|
| 15 | # This is the main configuration File of autoconf. # |
---|
| 16 | # Please edit this file only, if you exactly know what you are doing. # |
---|
| 17 | # It is quite fragile, and compiling orxonox on different Platforms # |
---|
| 18 | # is only guarantied, if build with the right config. # |
---|
| 19 | ########################################################################## |
---|
[1945] | 20 | |
---|
[3424] | 21 | ######################### |
---|
| 22 | ## AUTOCONF INIT PHASE ## |
---|
| 23 | ######################### |
---|
[3218] | 24 | AC_PREREQ(2.56) |
---|
[4194] | 25 | AC_INIT(orxonox, 0.2.3-pre-alpha, [orxonox-dev at mail.datacore.ch]) |
---|
[2980] | 26 | |
---|
[3424] | 27 | ## Detect the canonical host and target build environment. |
---|
[2980] | 28 | AC_CANONICAL_BUILD |
---|
| 29 | AC_CANONICAL_HOST |
---|
| 30 | AC_CANONICAL_TARGET |
---|
| 31 | |
---|
[1959] | 32 | AM_INIT_AUTOMAKE |
---|
[2618] | 33 | |
---|
[1951] | 34 | AC_CONFIG_SRCDIR([.]) |
---|
[1945] | 35 | AC_CONFIG_HEADER([config.h]) |
---|
| 36 | |
---|
[3424] | 37 | ######################### |
---|
| 38 | ## Checks for programs ## |
---|
| 39 | ######################### |
---|
[1945] | 40 | AC_PROG_CXX |
---|
[4194] | 41 | AC_PROG_RANLIB |
---|
[2925] | 42 | AC_HEADER_STDC |
---|
[2701] | 43 | |
---|
[3424] | 44 | ################################## |
---|
| 45 | ## CHECKING OPTIONAL ARGUMENTS ## |
---|
| 46 | ################################## |
---|
| 47 | |
---|
| 48 | #-----------------# |
---|
| 49 | # DEBUG-statement # |
---|
| 50 | #-----------------# |
---|
[3173] | 51 | DEBUG=no |
---|
| 52 | AC_MSG_CHECKING([if DEBUG-mode should be enabled]) |
---|
[3181] | 53 | AC_ARG_ENABLE([debug], |
---|
[3205] | 54 | AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]), |
---|
| 55 | DEBUG=$enableval) |
---|
| 56 | |
---|
[3424] | 57 | if test x$DEBUG = xno; then |
---|
[3205] | 58 | echo "no" |
---|
[3592] | 59 | echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed." |
---|
| 60 | DEBUG=4 |
---|
[3424] | 61 | elif test x$DEBUG = xyes; then |
---|
[3205] | 62 | echo "yes" |
---|
[3424] | 63 | echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." |
---|
| 64 | DEBUG=4 |
---|
[3205] | 65 | else |
---|
[3424] | 66 | echo "yes: setting debuglevel to to $DEBUG" |
---|
[3173] | 67 | fi |
---|
[3205] | 68 | AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are]) |
---|
| 69 | |
---|
[3173] | 70 | AC_SUBST(DEBUG) |
---|
| 71 | |
---|
[3592] | 72 | #---------------# |
---|
| 73 | # Modular Debug # |
---|
| 74 | #---------------# |
---|
| 75 | MODULAR_DEBUG=yes |
---|
| 76 | AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled]) |
---|
| 77 | AC_ARG_ENABLE([modular-debug], |
---|
| 78 | AC_HELP_STRING( [--disable-modular-debug], [compiles in modular-debug mode, that logs differently on the many modules of orxonox.]), |
---|
| 79 | MODULAR_DEBUG=$enableval) |
---|
| 80 | |
---|
| 81 | if test x$MODULAR_DEBUG = xno; then |
---|
| 82 | echo "no" |
---|
| 83 | elif test x$MODULAR_DEBUG = xyes; then |
---|
| 84 | echo "yes" |
---|
| 85 | AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled]) |
---|
| 86 | fi |
---|
| 87 | |
---|
[3424] | 88 | #--------------# |
---|
| 89 | # GTK-disabled # |
---|
| 90 | #--------------# |
---|
[3100] | 91 | AC_MSG_CHECKING([if gtk should be enabled]) |
---|
[3181] | 92 | AC_ARG_WITH([gtk], |
---|
| 93 | AC_HELP_STRING( [--without-gtk], |
---|
[3205] | 94 | [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes]) |
---|
[3424] | 95 | if test x$def_gtk = xyes; then |
---|
[3100] | 96 | echo "yes" |
---|
| 97 | fi |
---|
[3424] | 98 | if test x$def_gtk = xno; then |
---|
[3100] | 99 | echo "no" |
---|
| 100 | fi |
---|
[3423] | 101 | |
---|
[3424] | 102 | #------------------# |
---|
| 103 | # libCurl-disabled # |
---|
| 104 | #------------------# |
---|
[3423] | 105 | AC_MSG_CHECKING([if libcURL should be enabled]) |
---|
| 106 | AC_ARG_WITH([curl], |
---|
| 107 | AC_HELP_STRING( [--without-curl], |
---|
| 108 | [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes]) |
---|
[3424] | 109 | if test x$def_curl = xyes; then |
---|
[3423] | 110 | echo "yes" |
---|
| 111 | fi |
---|
[3424] | 112 | if test x$def_curl = xno; then |
---|
[3423] | 113 | echo "no" |
---|
| 114 | fi |
---|
| 115 | |
---|
[3424] | 116 | #-------------------# |
---|
| 117 | # SubProject-enable # |
---|
| 118 | #-------------------# |
---|
| 119 | def_sub_projects=no |
---|
[3377] | 120 | AC_MSG_CHECKING([if the SubProjects should be built]) |
---|
| 121 | AC_ARG_ENABLE([sub-projects], |
---|
| 122 | AC_HELP_STRING( [--enable-sub-projects], |
---|
[3424] | 123 | [also builds the subProjects while make from srcdir]), [def_sub_projects=yes]) |
---|
| 124 | if test x$def_sub_projects = xyes; then |
---|
[3377] | 125 | echo "yes" |
---|
| 126 | fi |
---|
[3424] | 127 | if test x$def_sub_projects = xno; then |
---|
[3377] | 128 | echo "no" |
---|
| 129 | fi |
---|
| 130 | AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) |
---|
| 131 | |
---|
[3788] | 132 | #-------------------# |
---|
| 133 | # Profiling Enabled # |
---|
| 134 | #-------------------# |
---|
| 135 | def_profiling=no |
---|
| 136 | AC_MSG_CHECKING([if Profiling should be enabled]) |
---|
| 137 | AC_ARG_ENABLE([profile], |
---|
| 138 | AC_HELP_STRING( [--enable-profile], |
---|
| 139 | [builds orxonox with profiling support]), [def_profiling=yes]) |
---|
| 140 | if test x$def_profiling = xyes; then |
---|
| 141 | echo "yes" |
---|
| 142 | CXXFLAGS="$CXXFLAGS -pg" |
---|
| 143 | fi |
---|
| 144 | if test x$def_profiling = xno; then |
---|
| 145 | echo "no" |
---|
| 146 | fi |
---|
| 147 | |
---|
[3863] | 148 | #----------------# |
---|
| 149 | # efence Enabled # |
---|
| 150 | #----------------# |
---|
| 151 | def_efence=no |
---|
| 152 | AC_MSG_CHECKING([if efence should be enabled]) |
---|
| 153 | AC_ARG_ENABLE([efence], |
---|
| 154 | AC_HELP_STRING( [--enable-efence], |
---|
| 155 | [builds orxonox with efence support]), [def_efence=yes]) |
---|
| 156 | if test x$def_efence = xyes; then |
---|
| 157 | echo "yes" |
---|
| 158 | fi |
---|
| 159 | if test x$def_efence = xno; then |
---|
| 160 | echo "no" |
---|
| 161 | fi |
---|
| 162 | |
---|
[3558] | 163 | #----------------------# |
---|
| 164 | # Documentation-enable # |
---|
| 165 | #----------------------# |
---|
| 166 | def_documentation=no |
---|
| 167 | AC_MSG_CHECKING([if the Documentation should be build by default]) |
---|
| 168 | AC_ARG_ENABLE([documentation], |
---|
| 169 | AC_HELP_STRING( [--enable-documentation], |
---|
| 170 | [also builds the sDocumentation while make from srcdir]), [def_documentation=yes]) |
---|
| 171 | if test x$def_documentation = xyes; then |
---|
| 172 | echo "yes" |
---|
| 173 | fi |
---|
| 174 | if test x$def_documentation = xno; then |
---|
| 175 | echo "no" |
---|
| 176 | fi |
---|
| 177 | AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes) |
---|
[3424] | 178 | ####################### |
---|
| 179 | ## PROGRAMM CHECKING ## |
---|
| 180 | ## 3. party Programs ## |
---|
| 181 | ####################### |
---|
| 182 | |
---|
| 183 | #----------------------# |
---|
| 184 | # checking for Doxygen # |
---|
| 185 | #----------------------# |
---|
[3219] | 186 | AC_PATH_PROG(DOXYGEN, doxygen) |
---|
| 187 | AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) |
---|
| 188 | |
---|
[3789] | 189 | #--------------------# |
---|
| 190 | # checking for gprof # |
---|
| 191 | #--------------------# |
---|
| 192 | AC_PATH_PROG(GPROF, gprof) |
---|
| 193 | |
---|
[4194] | 194 | #-------------------------# |
---|
| 195 | # checking for pkg-config # |
---|
| 196 | #-------------------------# |
---|
| 197 | if test x$def_gtk = xyes; then |
---|
| 198 | AC_PATH_PROG(PKG_CONFIG, pkg-config) |
---|
| 199 | fi |
---|
| 200 | |
---|
| 201 | |
---|
[3424] | 202 | ######################### |
---|
| 203 | ## CHECKING FOR SYSTEM ## |
---|
| 204 | ######################### |
---|
| 205 | ## here the system is checked, and openGL is included |
---|
| 206 | ## also checking for SDL on differen Systems |
---|
[2701] | 207 | |
---|
| 208 | AC_MSG_CHECKING([for System]) |
---|
[2980] | 209 | ## checking for openGL-environment and other sys-specific parameters |
---|
| 210 | case "$target" in |
---|
[3424] | 211 | #---------# |
---|
| 212 | # WINDOWS # |
---|
| 213 | #---------# |
---|
[2980] | 214 | *-*-mingw32*) |
---|
[2701] | 215 | echo "mingw-WINDOWS detected" |
---|
| 216 | |
---|
[3790] | 217 | CPPFLAGS="-I/usr/include/SDL -I/mingw/include/SDL" |
---|
| 218 | |
---|
[2701] | 219 | mingw="yes" |
---|
| 220 | MSBITFIELDS="-mms-bitfields" |
---|
| 221 | MWINDOWS="-mwindows" |
---|
| 222 | |
---|
| 223 | # checking gl header |
---|
| 224 | #done before loop |
---|
| 225 | |
---|
[2925] | 226 | # checking gl header |
---|
[2879] | 227 | AC_CHECK_HEADERS(GL/gl.h ,, |
---|
| 228 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
[2701] | 229 | # checking for Windows openGl library |
---|
[1971] | 230 | AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h") |
---|
[3424] | 231 | if test x$FOUND_opengl32 = xyes ; then |
---|
[1959] | 232 | LIBS="$LIBS -lopengl32" |
---|
[1971] | 233 | else |
---|
[1959] | 234 | echo "------------------" |
---|
| 235 | echo "opengl not found." |
---|
| 236 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
| 237 | echo "------------------" |
---|
| 238 | exit -1 |
---|
| 239 | fi |
---|
| 240 | |
---|
[2701] | 241 | # cheking for GLU-header |
---|
[3424] | 242 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
[1971] | 243 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 244 | |
---|
[2701] | 245 | # checking for libGLU |
---|
[1971] | 246 | AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes) |
---|
[3424] | 247 | if test x$FOUND_glu32 = xyes ; then |
---|
[1959] | 248 | LIBS="$LIBS -lGLU32" |
---|
[2701] | 249 | else |
---|
[1959] | 250 | echo "------------------" |
---|
| 251 | echo "GLU library not found." |
---|
| 252 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
| 253 | echo "------------------" |
---|
| 254 | exit -1 |
---|
| 255 | fi |
---|
[1971] | 256 | |
---|
[2701] | 257 | # checking for mingw32 |
---|
| 258 | AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) |
---|
[3424] | 259 | if test x$FOUND_mingw32 = xyes; then |
---|
[2701] | 260 | LIBS="$LIBS -lmingw32" |
---|
| 261 | fi |
---|
[2982] | 262 | # checking for SDL-headers |
---|
[3790] | 263 | AC_CHECK_HEADERS([SDL.h] ,, |
---|
[2982] | 264 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
[2701] | 265 | |
---|
[2982] | 266 | #checking for libSDL |
---|
| 267 | AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes) |
---|
[3424] | 268 | if test x$FOUND_sdlmain = xyes ; then |
---|
[2982] | 269 | LIBS="$LIBS -lsdlmain" |
---|
| 270 | else |
---|
| 271 | echo "------------------" |
---|
| 272 | echo "SDL library not found." |
---|
| 273 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 274 | echo "------------------" |
---|
| 275 | exit 1 |
---|
| 276 | fi |
---|
| 277 | AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes) |
---|
[3424] | 278 | if test x$FOUND_sdl = xyes ; then |
---|
[2982] | 279 | LIBS="$LIBS -lsdl" |
---|
| 280 | else |
---|
| 281 | echo "------------------" |
---|
| 282 | echo "SDL library not found." |
---|
| 283 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 284 | echo "------------------" |
---|
| 285 | exit -1 |
---|
| 286 | fi |
---|
| 287 | |
---|
[2701] | 288 | ;; |
---|
[3424] | 289 | #-------# |
---|
| 290 | # LINUX # |
---|
| 291 | #-------# |
---|
[2980] | 292 | *-*-linux*) |
---|
[2701] | 293 | echo "Linux detected" |
---|
| 294 | |
---|
| 295 | Linux="yes" |
---|
| 296 | |
---|
[3790] | 297 | CPPFLAGS="-I/usr/X11R6/include -I/usr/include/SDL" |
---|
[3385] | 298 | LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS" |
---|
[2925] | 299 | # checking gl header |
---|
[3424] | 300 | AC_CHECK_HEADERS([GL/gl.h] ,, |
---|
[2879] | 301 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
[2701] | 302 | |
---|
| 303 | # checking for Unix GL |
---|
[3385] | 304 | AC_CHECK_LIB([GL], [glLoadIdentity], FOUND_GL=yes) |
---|
[3424] | 305 | if test x$FOUND_GL = xyes ; then |
---|
[2701] | 306 | LIBS="$LIBS -lGL" |
---|
| 307 | else |
---|
| 308 | echo "------------------" |
---|
| 309 | echo "opengl not found." |
---|
| 310 | echo "please install the opengl package which can be found at http://www.opengl.org" |
---|
| 311 | echo "------------------" |
---|
| 312 | exit -1 |
---|
| 313 | fi |
---|
| 314 | |
---|
| 315 | # cheking for GLU-header |
---|
[3424] | 316 | AC_CHECK_HEADERS([GL/glu.h] ,, |
---|
[2701] | 317 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 318 | |
---|
| 319 | AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes) |
---|
[3424] | 320 | if test x$FOUND_GLU = xyes ; then |
---|
[2701] | 321 | LIBS="$LIBS -lGLU" |
---|
| 322 | else |
---|
| 323 | echo "------------------" |
---|
| 324 | echo "GLU library not found." |
---|
| 325 | echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org" |
---|
| 326 | echo "------------------" |
---|
| 327 | exit -1 |
---|
| 328 | fi |
---|
[2995] | 329 | |
---|
[2991] | 330 | # checking for SDL-headers |
---|
[3790] | 331 | AC_CHECK_HEADERS([SDL.h] ,, |
---|
[2991] | 332 | [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
[2982] | 333 | |
---|
[3140] | 334 | # checking for SDL-lib |
---|
[2991] | 335 | AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes) |
---|
[3424] | 336 | if test x$FOUND_SDL = xyes ; then |
---|
[2991] | 337 | LIBS="$LIBS -lSDL" |
---|
| 338 | else |
---|
| 339 | echo "------------------" |
---|
| 340 | echo "SDL library not found." |
---|
| 341 | echo "please install the SDL library, which can be found at http://www.libsdl.org" |
---|
| 342 | echo "------------------" |
---|
| 343 | exit -1 |
---|
| 344 | fi |
---|
| 345 | |
---|
[3140] | 346 | |
---|
[2982] | 347 | ## checking for SDL |
---|
[2991] | 348 | # SDL_VERSION=1.2.7 |
---|
| 349 | # AM_PATH_SDL($SDL_VERSION, |
---|
| 350 | # :, |
---|
| 351 | # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
---|
| 352 | # ) |
---|
| 353 | # CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" |
---|
| 354 | # LIBS="$LIBS $SDL_LIBS" |
---|
[2701] | 355 | ;; |
---|
[3424] | 356 | #-----------# |
---|
| 357 | # MAC -OS X # |
---|
| 358 | #-----------# |
---|
[2995] | 359 | *darwin*) |
---|
[3424] | 360 | echo "OS X detected" |
---|
[2995] | 361 | |
---|
| 362 | osX="yes" |
---|
| 363 | |
---|
[3906] | 364 | CPPFLAGS="-I/sw/include -I/sw/include/SDL $CPPFLAGS" |
---|
[2995] | 365 | # checking gl header |
---|
[3424] | 366 | AC_CHECK_HEADERS([OpenGL/gl.h] ,, |
---|
[2995] | 367 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 368 | # cheking for GLU-header |
---|
[3424] | 369 | AC_CHECK_HEADERS([OpenGL/glu.h] ,, |
---|
[2995] | 370 | [AC_MSG_ERROR([cannot find opengl headers]) ]) |
---|
| 371 | |
---|
| 372 | LIBS="$LIBS -framework OpenGL" |
---|
| 373 | |
---|
[3424] | 374 | SDL_CFLAGS=`sdl-config --cflags` |
---|
| 375 | SDL_LIBS=`sdl-config --libs` |
---|
| 376 | CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" |
---|
| 377 | LIBS="$LIBS $SDL_LIBS" |
---|
| 378 | |
---|
| 379 | |
---|
[2995] | 380 | # checking for SDL-headers |
---|
[3001] | 381 | # AC_CHECK_HEADERS(SDL/SDL.h ,, |
---|
| 382 | # [AC_MSG_ERROR([cannot find SDL headers]) ]) |
---|
[2995] | 383 | |
---|
| 384 | ## checking for SDL |
---|
| 385 | # SDL_VERSION=1.2.7 |
---|
| 386 | # AM_PATH_SDL($SDL_VERSION, |
---|
| 387 | # :, |
---|
| 388 | # AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) |
---|
| 389 | # ) |
---|
| 390 | |
---|
[3140] | 391 | |
---|
[2995] | 392 | ;; |
---|
| 393 | |
---|
[2701] | 394 | *) |
---|
| 395 | ;; |
---|
| 396 | esac |
---|
[2968] | 397 | |
---|
[2701] | 398 | AC_SUBST(MSBITFIELDS) |
---|
| 399 | |
---|
[3424] | 400 | ################################### |
---|
| 401 | ## CHECKING FOR HEADERS AND LIBS ## |
---|
| 402 | ################################### |
---|
| 403 | |
---|
[3921] | 404 | #--------# |
---|
| 405 | # openAL # |
---|
| 406 | #--------# |
---|
| 407 | # checking for openAL-headers |
---|
| 408 | AC_CHECK_HEADERS([AL/al.h] ,, |
---|
| 409 | [AC_MSG_ERROR([cannot find openAL header.])]) |
---|
| 410 | # checking for openAL-lib |
---|
| 411 | AC_CHECK_LIB([openal], [main], [FOUND_openal=yes]) |
---|
| 412 | if test x$FOUND_openal = xyes ; then |
---|
| 413 | LIBS="$LIBS -lopenal" |
---|
| 414 | else |
---|
| 415 | echo "------------------" |
---|
| 416 | echo "openal library not found." |
---|
| 417 | echo "please install the openal library, which can be found at http://www.openal.org" |
---|
| 418 | echo "------------------" |
---|
| 419 | exit -1 |
---|
[4201] | 420 | fi |
---|
[3921] | 421 | |
---|
[4201] | 422 | #-----# |
---|
| 423 | # ogg # |
---|
| 424 | #-----# |
---|
| 425 | # checking for ogg-headers |
---|
| 426 | AC_CHECK_HEADERS([ogg/ogg.h] ,, |
---|
| 427 | [AC_MSG_ERROR([cannot find ogg header.])]) |
---|
| 428 | # checking for ogg-lib |
---|
| 429 | AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes]) |
---|
| 430 | if test x$FOUND_ogg = xyes ; then |
---|
| 431 | LIBS="$LIBS -logg" |
---|
| 432 | else |
---|
| 433 | echo "------------------" |
---|
| 434 | echo "ogg library not found." |
---|
| 435 | echo "please install the ogg library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" |
---|
| 436 | echo "------------------" |
---|
| 437 | exit -1 |
---|
| 438 | fi |
---|
| 439 | |
---|
| 440 | #--------# |
---|
| 441 | # vorbis # |
---|
| 442 | #--------# |
---|
| 443 | # checking for vorbis-lib |
---|
| 444 | AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes]) |
---|
| 445 | if test x$FOUND_vorbis = xyes ; then |
---|
| 446 | LIBS="$LIBS -lvorbis" |
---|
| 447 | else |
---|
| 448 | echo "------------------" |
---|
| 449 | echo "vorbis library not found." |
---|
| 450 | echo "please install the vorbis library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" |
---|
| 451 | echo "------------------" |
---|
| 452 | exit -1 |
---|
| 453 | fi |
---|
| 454 | |
---|
| 455 | #------------# |
---|
| 456 | # vorbisfile # |
---|
| 457 | #------------# |
---|
| 458 | # checking for vorbis-headers |
---|
| 459 | AC_CHECK_HEADERS([vorbis/vorbisfile.h] ,, |
---|
| 460 | [AC_MSG_ERROR([cannot find vorbisfile header.])]) |
---|
| 461 | # checking for vorbisfile-lib |
---|
| 462 | AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes]) |
---|
| 463 | if test x$FOUND_vorbisfile = xyes ; then |
---|
| 464 | LIBS="$LIBS -lvorbisfile" |
---|
| 465 | else |
---|
| 466 | echo "------------------" |
---|
| 467 | echo "vorbisfile library not found." |
---|
| 468 | echo "please install the vorbisfile library, which can be found at http://www.xiph.org/ogg/vorbis/index.html" |
---|
| 469 | echo "------------------" |
---|
| 470 | exit -1 |
---|
| 471 | fi |
---|
| 472 | |
---|
[3790] | 473 | #---------# |
---|
| 474 | # SDL_ttf # |
---|
| 475 | #---------# |
---|
| 476 | # checking for SDL_ttf-headers |
---|
| 477 | AC_CHECK_HEADERS([SDL_ttf.h] ,, |
---|
| 478 | [AC_MSG_ERROR([cannot find SDL_ttf header.])]) |
---|
| 479 | #fi |
---|
| 480 | # checking for SDL_ttf-lib |
---|
| 481 | AC_CHECK_LIB([SDL_ttf], [main], [FOUND_SDL_ttf=yes]) |
---|
| 482 | if test x$FOUND_SDL_ttf = xyes ; then |
---|
| 483 | LIBS="$LIBS -lSDL_ttf" |
---|
| 484 | else |
---|
| 485 | echo "------------------" |
---|
| 486 | echo "SDL_ttf library not found." |
---|
| 487 | echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/" |
---|
| 488 | echo "------------------" |
---|
| 489 | exit -1 |
---|
| 490 | fi |
---|
| 491 | |
---|
[3921] | 492 | |
---|
[3424] | 493 | #-----------# |
---|
| 494 | # SDL_Image # |
---|
| 495 | #-----------# |
---|
[3140] | 496 | # checking for SDL_image-headers |
---|
[3863] | 497 | AC_CHECK_HEADERS([SDL_image.h] ,, |
---|
| 498 | [echo "sdl_image header not found."; def_sdl_image=no; exit -1]) |
---|
[3140] | 499 | # checking for SDL_image-lib |
---|
[3863] | 500 | AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes]) |
---|
| 501 | if test x$FOUND_SDL_image = xyes ; then |
---|
| 502 | LIBS="$LIBS -lSDL_image" |
---|
| 503 | else |
---|
| 504 | echo "------------------" |
---|
| 505 | echo "SDL_image library not found." |
---|
| 506 | echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/" |
---|
| 507 | echo "------------------" |
---|
| 508 | exit -1 |
---|
| 509 | fi |
---|
[2701] | 510 | |
---|
[3424] | 511 | #-----# |
---|
| 512 | # GTK # |
---|
| 513 | #-----# |
---|
| 514 | if test x$def_gtk = xyes; then |
---|
[3100] | 515 | #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) |
---|
| 516 | AC_MSG_CHECKING([for gtk2.0]) |
---|
[4194] | 517 | if `$PKG_CONFIG --exists gtk+-2.0`; then |
---|
[3100] | 518 | echo "yes" |
---|
| 519 | have_gtk2=yes |
---|
[4194] | 520 | GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0` |
---|
| 521 | GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` |
---|
[3101] | 522 | AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2]) |
---|
[4194] | 523 | if test $DEBUG -ge 3; then |
---|
| 524 | echo "cflags: $GTK2_CFLAGS" |
---|
| 525 | echo "libs: $GTK2_LIBS" |
---|
| 526 | fi |
---|
[3100] | 527 | else |
---|
| 528 | echo "no" |
---|
| 529 | fi |
---|
[3101] | 530 | |
---|
[3099] | 531 | fi |
---|
[2980] | 532 | AC_SUBST(GTK2_LIBS) |
---|
| 533 | AC_SUBST(GTK2_CFLAGS) |
---|
[3100] | 534 | AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) |
---|
[2980] | 535 | |
---|
[3424] | 536 | #---------# |
---|
| 537 | # libcURL # |
---|
| 538 | #---------# |
---|
| 539 | if test x$def_curl = xyes; then |
---|
[2190] | 540 | |
---|
[3424] | 541 | AC_CHECK_HEADERS([curl/curl.h], [curlHeader="yes"], [curlHeader="no"]) |
---|
[3423] | 542 | AC_CHECK_LIB([curl], [main], [FOUND_curl=yes]) |
---|
| 543 | if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then |
---|
| 544 | have_curl=yes |
---|
| 545 | CURL_LIBS=`curl-config --libs` |
---|
| 546 | CURLCFLAGS=`curl-config --cflags` |
---|
| 547 | AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) |
---|
[3424] | 548 | else |
---|
[3423] | 549 | have_curl=no |
---|
| 550 | fi |
---|
| 551 | |
---|
| 552 | fi |
---|
| 553 | AC_SUBST(CURL_LIBS) |
---|
| 554 | AC_SUBST(CURL_CFLAGS) |
---|
| 555 | AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes) |
---|
| 556 | |
---|
[3863] | 557 | #--------# |
---|
| 558 | # efence # |
---|
| 559 | #--------# |
---|
| 560 | if test x$def_efence = xyes ; then |
---|
| 561 | AC_CHECK_LIB([efence], [main], [FOUND_efence=yes]) |
---|
| 562 | if test x$FOUND_efence = xyes ; then |
---|
| 563 | LIBS="$LIBS -lefence" |
---|
| 564 | fi |
---|
| 565 | |
---|
| 566 | fi |
---|
| 567 | |
---|
[1945] | 568 | # FIXME: Replace `main' with a function in `-lm': |
---|
[2968] | 569 | AC_CHECK_LIB([m], [main]) |
---|
[1945] | 570 | |
---|
[3099] | 571 | |
---|
[1945] | 572 | # Checks for header files. |
---|
| 573 | AC_HEADER_STDC |
---|
| 574 | AC_CHECK_HEADERS([stdlib.h string.h]) |
---|
| 575 | |
---|
| 576 | # Checks for typedefs, structures, and compiler characteristics. |
---|
| 577 | AC_HEADER_STDBOOL |
---|
| 578 | |
---|
| 579 | # Checks for library functions. |
---|
| 580 | AC_FUNC_MALLOC |
---|
| 581 | AC_CHECK_FUNCS([bzero sqrt]) |
---|
| 582 | |
---|
[3424] | 583 | ###################### |
---|
| 584 | ## OUTPUT CONFIGURE ## |
---|
| 585 | ###################### |
---|
[1946] | 586 | AC_CONFIG_FILES([Makefile |
---|
[3377] | 587 | src/Makefile |
---|
[3493] | 588 | src/lib/Makefile |
---|
| 589 | src/lib/graphics/Makefile |
---|
[3485] | 590 | src/lib/graphics/importer/Makefile |
---|
[3493] | 591 | src/lib/gui/Makefile |
---|
[3489] | 592 | src/lib/gui/console/Makefile |
---|
[3549] | 593 | src/lib/gui/gui/Makefile |
---|
| 594 | src/subprojects/Makefile |
---|
| 595 | src/subprojects/testmain/Makefile]) |
---|
[3377] | 596 | |
---|
[1945] | 597 | AC_OUTPUT |
---|