Changeset 3430 in orxonox.OLD for orxonox/branches/trackManager/configure.ac
- Timestamp:
- Mar 1, 2005, 9:50:30 AM (20 years ago)
- Location:
- orxonox/branches/trackManager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/trackManager
- Property svn:externals set to
-
orxonox/branches/trackManager/configure.ac
r3240 r3430 1 # -*- Autoconf -*- 2 # Process this file with autoconf to produce a configure script. 3 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 ########################################################################## 20 21 ######################### 22 ## AUTOCONF INIT PHASE ## 23 ######################### 4 24 AC_PREREQ(2.56) 5 25 AC_INIT(orxonox, 0.2.1-pre-alpha, [orxonox-dev at mail.datacore.ch]) 6 26 7 # Detect the canonical host and target build environment.27 ## Detect the canonical host and target build environment. 8 28 AC_CANONICAL_BUILD 9 29 AC_CANONICAL_HOST 10 30 AC_CANONICAL_TARGET 11 31 12 13 32 AM_INIT_AUTOMAKE 14 33 … … 16 35 AC_CONFIG_HEADER([config.h]) 17 36 18 19 # Checks for programs. 37 ######################### 38 ## Checks for programs ## 39 ######################### 20 40 AC_PROG_CXX 21 41 AC_HEADER_STDC 22 42 23 ### CHECKING OPTIONAT ARGUMENTS 24 ## DEBUG-statement 43 ################################## 44 ## CHECKING OPTIONAL ARGUMENTS ## 45 ################################## 46 47 #-----------------# 48 # DEBUG-statement # 49 #-----------------# 25 50 DEBUG=no 26 51 AC_MSG_CHECKING([if DEBUG-mode should be enabled]) … … 29 54 DEBUG=$enableval) 30 55 31 if test "$DEBUG" = "no"; then56 if test x$DEBUG = xno; then 32 57 echo "no" 33 echo " -> Setting debuglevel to 1. Like this you can still see errors."34 DEBUG= 135 elif test "$DEBUG" =yes; then58 echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed." 59 DEBUG=3 60 elif test x$DEBUG = xyes; then 36 61 echo "yes" 37 echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."38 DEBUG= 362 echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!." 63 DEBUG=4 39 64 else 40 echo "yes setto $DEBUG"65 echo "yes: setting debuglevel to to $DEBUG" 41 66 fi 42 67 AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are]) … … 44 69 AC_SUBST(DEBUG) 45 70 46 ## GTK-disabled 71 #--------------# 72 # GTK-disabled # 73 #--------------# 47 74 AC_MSG_CHECKING([if gtk should be enabled]) 48 75 AC_ARG_WITH([gtk], 49 76 AC_HELP_STRING( [--without-gtk], 50 77 [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes]) 51 if test "$def_gtk" =yes; then78 if test x$def_gtk = xyes; then 52 79 echo "yes" 53 80 fi 54 if test "$def_gtk" =no; then81 if test x$def_gtk = xno; then 55 82 echo "no" 56 83 fi 57 ### SDL_image-disable 84 85 #------------------# 86 # gThread-disabled # 87 #------------------# 88 AC_MSG_CHECKING([if gThread should be enabled]) 89 AC_ARG_WITH([gthread], 90 AC_HELP_STRING( [--without-gthread], 91 [Prevents gThread from being loaded]), [def_gthread=no], [def_gthread=yes]) 92 if test x$def_gthread = xyes; then 93 echo "yes" 94 fi 95 if test x$def_gthread = xno; then 96 echo "no" 97 fi 98 99 #------------------# 100 # pthread-disabled # 101 #------------------# 102 AC_MSG_CHECKING([if pthread should be enabled]) 103 AC_ARG_WITH([pthread], 104 AC_HELP_STRING( [--without-pthread], 105 [Prevents pthread from being loaded]), [def_pthread=no], [def_pthread=yes]) 106 if test x$def_pthread = xyes; then 107 echo "yes" 108 fi 109 if test x$def_pthread = xno; then 110 echo "no" 111 fi 112 113 #------------------# 114 # libCurl-disabled # 115 #------------------# 116 AC_MSG_CHECKING([if libcURL should be enabled]) 117 AC_ARG_WITH([curl], 118 AC_HELP_STRING( [--without-curl], 119 [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes]) 120 if test x$def_curl = xyes; then 121 echo "yes" 122 fi 123 if test x$def_curl = xno; then 124 echo "no" 125 fi 126 127 #-------------------# 128 # SDL_image-disable # 129 #-------------------# 58 130 def_sdl_image=yes 59 131 AC_MSG_CHECKING([if SDL_image should be enabled]) … … 61 133 AC_HELP_STRING( [--without-sdl-image], 62 134 [Prevents SDL_image from being loaded]), [def_sdl_image=no]) 63 if test "$def_sdl_image" =yes; then135 if test x$def_sdl_image = xyes; then 64 136 echo "yes" 65 137 fi 66 if test "$def_sdl_image" =no; then138 if test x$def_sdl_image = xno; then 67 139 echo "no" 68 140 fi 69 70 71 ## PROGRAMM CHECKING 72 # checking for Doxygen 141 #-------------------# 142 # SubProject-enable # 143 #-------------------# 144 def_sub_projects=no 145 AC_MSG_CHECKING([if the SubProjects should be built]) 146 AC_ARG_ENABLE([sub-projects], 147 AC_HELP_STRING( [--enable-sub-projects], 148 [also builds the subProjects while make from srcdir]), [def_sub_projects=yes]) 149 if test x$def_sub_projects = xyes; then 150 echo "yes" 151 fi 152 if test x$def_sub_projects = xno; then 153 echo "no" 154 fi 155 AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes) 156 157 ####################### 158 ## PROGRAMM CHECKING ## 159 ## 3. party Programs ## 160 ####################### 161 162 #----------------------# 163 # checking for Doxygen # 164 #----------------------# 73 165 AC_PATH_PROG(DOXYGEN, doxygen) 74 166 AM_CONDITIONAL(DOXYGEN, test $DOXYGEN) 75 167 76 ### CHECKING FOR SYSTEM ### 168 ######################### 169 ## CHECKING FOR SYSTEM ## 170 ######################### 171 ## here the system is checked, and openGL is included 172 ## also checking for SDL on differen Systems 77 173 78 174 AC_MSG_CHECKING([for System]) 79 175 ## checking for openGL-environment and other sys-specific parameters 80 176 case "$target" in 81 ### WINDOWS ### 177 #---------# 178 # WINDOWS # 179 #---------# 82 180 *-*-mingw32*) 83 181 echo "mingw-WINDOWS detected" … … 95 193 # checking for Windows openGl library 96 194 AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h") 97 if test "$FOUND_opengl32" = "yes"; then195 if test x$FOUND_opengl32 = xyes ; then 98 196 LIBS="$LIBS -lopengl32" 99 197 else … … 106 204 107 205 # cheking for GLU-header 108 AC_CHECK_HEADERS( GL/glu.h,,206 AC_CHECK_HEADERS([GL/glu.h] ,, 109 207 [AC_MSG_ERROR([cannot find opengl headers]) ]) 110 208 111 209 # checking for libGLU 112 210 AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes) 113 if test "$FOUND_glu32" = "yes"; then211 if test x$FOUND_glu32 = xyes ; then 114 212 LIBS="$LIBS -lGLU32" 115 213 else … … 123 221 # checking for mingw32 124 222 AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes) 125 if test $FOUND_mingw32 = "yes"; then223 if test x$FOUND_mingw32 = xyes; then 126 224 LIBS="$LIBS -lmingw32" 127 225 fi 128 226 # checking for SDL-headers 129 AC_CHECK_HEADERS( SDL/SDL.h,,227 AC_CHECK_HEADERS([SDL/SDL.h] ,, 130 228 [AC_MSG_ERROR([cannot find SDL headers]) ]) 131 229 132 230 #checking for libSDL 133 231 AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes) 134 if test "$FOUND_sdlmain" = "yes"; then232 if test x$FOUND_sdlmain = xyes ; then 135 233 LIBS="$LIBS -lsdlmain" 136 234 else … … 142 240 fi 143 241 AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes) 144 if test "$FOUND_sdl" = "yes"; then242 if test x$FOUND_sdl = xyes ; then 145 243 LIBS="$LIBS -lsdl" 146 244 else … … 153 251 154 252 ;; 155 156 ### LINUX ### 253 #-------# 254 # LINUX # 255 #-------# 157 256 *-*-linux*) 158 257 echo "Linux detected" … … 161 260 162 261 CPPFLAGS="-I/usr/X11R6/include" 163 LDFLAGS="-L/usr/ Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"262 LDFLAGS="-L/usr/lib/opengl/xorg-x11/lib -L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS" 164 263 # checking gl header 165 AC_CHECK_HEADERS( GL/gl.h,,264 AC_CHECK_HEADERS([GL/gl.h] ,, 166 265 [AC_MSG_ERROR([cannot find opengl headers]) ]) 167 266 168 267 # checking for Unix GL 169 AC_CHECK_LIB([GL], [ main], FOUND_GL=yes)170 if test "$FOUND_GL" = "yes"; then268 AC_CHECK_LIB([GL], [glLoadIdentity], FOUND_GL=yes) 269 if test x$FOUND_GL = xyes ; then 171 270 LIBS="$LIBS -lGL" 172 271 else … … 179 278 180 279 # cheking for GLU-header 181 AC_CHECK_HEADERS( GL/glu.h,,280 AC_CHECK_HEADERS([GL/glu.h] ,, 182 281 [AC_MSG_ERROR([cannot find opengl headers]) ]) 183 282 184 283 AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes) 185 if test "$FOUND_GLU" = "yes"; then284 if test x$FOUND_GLU = xyes ; then 186 285 LIBS="$LIBS -lGLU" 187 286 else … … 194 293 195 294 # checking for SDL-headers 196 AC_CHECK_HEADERS( SDL/SDL.h,,295 AC_CHECK_HEADERS([SDL/SDL.h] ,, 197 296 [AC_MSG_ERROR([cannot find SDL headers]) ]) 198 297 199 298 # checking for SDL-lib 200 299 AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes) 201 if test "$FOUND_SDL" = "yes"; then300 if test x$FOUND_SDL = xyes ; then 202 301 LIBS="$LIBS -lSDL" 203 302 else … … 219 318 # LIBS="$LIBS $SDL_LIBS" 220 319 ;; 221 222 ### OS X ### 320 #-----------# 321 # MAC -OS X # 322 #-----------# 223 323 *darwin*) 224 echo "OS X detected"324 echo "OS X detected" 225 325 226 326 osX="yes" … … 228 328 CPPFLAGS="-I/sw/include $CPPFLAGS" 229 329 # checking gl header 230 AC_CHECK_HEADERS( OpenGL/gl.h,,330 AC_CHECK_HEADERS([OpenGL/gl.h] ,, 231 331 [AC_MSG_ERROR([cannot find opengl headers]) ]) 232 332 # cheking for GLU-header 233 AC_CHECK_HEADERS( OpenGL/glu.h,,333 AC_CHECK_HEADERS([OpenGL/glu.h] ,, 234 334 [AC_MSG_ERROR([cannot find opengl headers]) ]) 235 335 236 336 LIBS="$LIBS -framework OpenGL" 337 338 SDL_CFLAGS=`sdl-config --cflags` 339 SDL_LIBS=`sdl-config --libs` 340 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" 341 LIBS="$LIBS $SDL_LIBS" 342 237 343 238 344 # checking for SDL-headers … … 247 353 # ) 248 354 249 SDL_CFLAGS=`sdl-config --cflags`250 SDL_LIBS=`sdl-config --libs`251 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"252 LIBS="$LIBS $SDL_LIBS"253 355 254 356 ;; … … 260 362 AC_SUBST(MSBITFIELDS) 261 363 262 ## check for SDL_Image 263 if test "$def_sdl_image" = "yes"; then 364 ################################### 365 ## CHECKING FOR HEADERS AND LIBS ## 366 ################################### 367 368 #-----------# 369 # SDL_Image # 370 #-----------# 371 if test x$def_sdl_image = xyes; then 264 372 # checking for SDL_image-headers 265 AC_CHECK_HEADERS( SDL/SDL_image.h,,373 AC_CHECK_HEADERS([SDL/SDL_image.h] ,, 266 374 [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ]) 267 375 fi 268 if test "$def_sdl_image" = "yes"; then376 if test x$def_sdl_image = xyes; then 269 377 # checking for SDL_image-lib 270 AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes)271 if test "$FOUND_SDL_image" = "yes"; then378 AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes]) 379 if test x$FOUND_SDL_image = xyes ; then 272 380 LIBS="$LIBS -lSDL_image" 273 381 else … … 280 388 fi 281 389 282 283 if test "$def_sdl_image" = "no"; then 284 ## checking for libjpeg 285 AC_CHECK_HEADERS(jpeglib.h ,jpegHeader="yes", 286 jpegHeader="no") 287 if test $jpegHeader = "no"; then 390 ## case no SDL-image: 391 if test x$def_sdl_image = xno; then 392 #---------# 393 # libjpeg # 394 #---------# 395 AC_CHECK_HEADERS([jpeglib.h], [jpegHeader="yes"], 396 [jpegHeader="no"]) 397 if test x$jpegHeader = xno; then 288 398 echo " not including jpeg." 289 399 else 290 AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes)291 if test "$FOUND_jpeg" = "yes"; then400 AC_CHECK_LIB([jpeg], [main], [FOUND_jpeg=yes]) 401 if test x$FOUND_jpeg = xyes ; then 292 402 LIBS="$LIBS -ljpeg" 293 403 else … … 300 410 fi 301 411 302 ## checking for libpng 303 AC_CHECK_HEADERS(png.h ,pngHeader="yes", 304 pngHeader="no") 305 if test $pngHeader = "no"; then 412 #--------# 413 # libpng # 414 #--------# 415 AC_CHECK_HEADERS([png.h], [pngHeader="yes"], 416 [pngHeader="no"]) 417 if test x$pngHeader = xno; then 306 418 echo " not including png." 307 419 else 308 420 AC_CHECK_LIB([png], [main], FOUND_png=yes) 309 if test "$FOUND_png" = "yes"; then421 if test x$FOUND_png = xyes ; then 310 422 LIBS="$LIBS -lpng" 311 423 else … … 319 431 fi 320 432 321 ## checking for GTK 322 if test "$def_gtk" = yes; then 433 #-----# 434 # GTK # 435 #-----# 436 if test x$def_gtk = xyes; then 323 437 324 438 #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no) … … 339 453 AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes) 340 454 341 342 343 #checking for pthread libs 344 # AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes) 345 # if test "$FOUND_pthread" = "yes" ; then 346 # LIBS="$LIBS -lpthread" 347 # fi 455 #---------# 456 # gThread # 457 #---------# 458 if test x$def_gthread = xyes; then 459 460 AC_MSG_CHECKING([for gthread]) 461 if `pkg-config --exists gthread-2.0`; then 462 echo "yes" 463 have_gthread=yes 464 GTHREAD_LIBS=`pkg-config --libs gthread-2.0` 465 GTHREAD_CFLAGS=`pkg-config --cflags gthread-2.0` 466 AC_DEFINE_UNQUOTED(HAVE_GTHREAD, 1, [if we have gThread]) 467 else 468 echo "no" 469 fi 470 471 fi 472 AC_SUBST(GTHREAD_LIBS) 473 AC_SUBST(GTHREAD_CFLAGS) 474 AM_CONDITIONAL(HAVE_GTHREAD, test x$have_gthread = xyes) 475 476 #---------# 477 # libcURL # 478 #---------# 479 if test x$def_curl = xyes; then 480 481 AC_CHECK_HEADERS([curl/curl.h], [curlHeader="yes"], [curlHeader="no"]) 482 AC_CHECK_LIB([curl], [main], [FOUND_curl=yes]) 483 if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then 484 have_curl=yes 485 CURL_LIBS=`curl-config --libs` 486 CURLCFLAGS=`curl-config --cflags` 487 AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL]) 488 else 489 have_curl=no 490 fi 491 492 fi 493 AC_SUBST(CURL_LIBS) 494 AC_SUBST(CURL_CFLAGS) 495 AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes) 496 497 #---------# 498 # pthread # 499 #---------# 500 if test x$def_pthread = xyes ; then 501 if test x$have_gthread = xyes ; then 502 AC_CHECK_HEADERS([pthread.h], [pthreadHeader="yes"], [pthreadHeader="no"]) 503 AC_CHECK_LIB([pthread], [main], [FOUND_pthread=yes]) 504 if test x$FOUND_pthread = xyes ; then 505 LIBS="$LIBS -lpthread" 506 fi 507 fi 508 fi 348 509 349 510 … … 363 524 AC_CHECK_FUNCS([bzero sqrt]) 364 525 526 ###################### 527 ## OUTPUT CONFIGURE ## 528 ###################### 365 529 AC_CONFIG_FILES([Makefile 530 src/Makefile 531 src/importer/Makefile 366 532 src/console/Makefile 367 src/gui/Makefile 368 src/Makefile 369 src/importer/Makefile]) 533 src/gui/Makefile]) 534 370 535 AC_OUTPUT
Note: See TracChangeset
for help on using the changeset viewer.