Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5276 in orxonox.OLD for trunk/configure.ac


Ignore:
Timestamp:
Oct 4, 2005, 6:50:52 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: configure.ac now has a new way to check for stuff. this should proove more usefull when using osX too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r5272 r5276  
    257257    MWINDOWS="-mwindows"
    258258
    259 
    260 
     259#--------#
     260# MIN-GW #
     261#--------#
    261262# checking for mingw32
    262263    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
     
    264265        LIBS="$LIBS -lmingw32"
    265266    fi
     267
     268#---------------#
     269# open-GL (win) #
     270#---------------#
     271# checking gl header
     272   AC_CHECK_HEADERS(GL/gl.h ,,
     273      [AC_MSG_ERROR([cannot find opengl headers])])
     274#   checking for Windows openGl library
     275    AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"])
     276    if test x$FOUND_GL != xyes ; then
     277         echo "------------------"
     278         echo "opengl not found."
     279         echo "please install the opengl package which can be found at http://www.opengl.org"
     280         echo "------------------"
     281         exit -1
     282    fi
     283
     284# cheking for GLU-header
     285    AC_CHECK_HEADERS([GL/glu.h] ,,
     286      [AC_MSG_ERROR([cannot find opengl headers]) ])
     287
     288# checking for libGLU
     289    AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"])
     290    if test x$FOUND_GLU != xyes ; then
     291         echo "------------------"
     292         echo "GLU library not found."
     293         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
     294         echo "------------------"
     295         exit -1
     296    fi
     297
     298# checking glew header
     299   AC_CHECK_HEADERS(GL/glew.h ,,
     300      [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ])
     301#   checking for Windows glew library
     302    AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"])
     303    if test x$FOUND_GLEW != xyes ; then
     304         echo "------------------"
     305         echo "opengl extension wrangler not found."
     306         echo "please install the glew package which can be found at http://glew.sourceforge.net"
     307         echo "------------------"
     308         exit -1
     309    fi
     310
     311#--------#
     312# openAL #
     313#--------#
     314# checking for openAL-headers
     315  AC_CHECK_HEADERS([AL/al.h] ,,
     316      [AC_MSG_ERROR([cannot find openAL header.])])
     317# checking for openAL-lib
     318  AC_CHECK_LIB([OpenAL32], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lOpenAL32"])
     319  AC_CHECK_LIB([ALut], [main], [FOUND_ALUT=yes; LIBS="$LIBS -lALut"])
     320     if test x$FOUND_OPENAL != xyes ; then
     321        echo "------------------"
     322        echo "openal library not found."
     323        echo "please install the openal library, which can be found at http://www.openal.org"
     324        echo "------------------"
     325        exit -1
     326     fi
     327
    266328
    267329#-----------#
     
    273335
    274336#checking for libSDL
    275     AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    276     if test x$FOUND_sdlmain = xyes ; then
    277        LIBS="$LIBS -lsdlmain"
    278     else
     337    AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"])
     338    if test x$FOUND_sdlmain != xyes ; then
    279339        echo "------------------"
    280340        echo "SDL library not found."
     
    283343        exit 1
    284344    fi
    285     AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    286     if test x$FOUND_sdl = xyes ; then
    287        LIBS="$LIBS -lsdl"
    288     else
     345    AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"])
     346    if test x$FOUND_SDL != xyes ; then
    289347        echo "------------------"
    290348        echo "SDL library not found."
     
    294352    fi
    295353
    296 #---------------#
    297 # open-GL (win) #
    298 #---------------#
    299 # checking gl header
    300    AC_CHECK_HEADERS(GL/gl.h ,,
    301       [AC_MSG_ERROR([cannot find opengl headers]) ])
    302 #   checking for Windows openGl library
    303     AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
    304     if test x$FOUND_opengl32 = xyes ; then
    305         LIBS="$LIBS -lopengl32"
    306     else
    307          echo "------------------"
    308          echo "opengl not found."
    309          echo "please install the opengl package which can be found at http://www.opengl.org"
    310          echo "------------------"
    311          exit -1
    312     fi
    313 
    314 # cheking for GLU-header
    315     AC_CHECK_HEADERS([GL/glu.h] ,,
    316       [AC_MSG_ERROR([cannot find opengl headers]) ])
    317 
    318 # checking for libGLU
    319     AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
    320     if test x$FOUND_glu32 = xyes ; then
    321         LIBS="$LIBS -lGLU32"
    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
    329 
    330 # checking glew header
    331    AC_CHECK_HEADERS(GL/glew.h ,,
    332       [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ])
    333 #   checking for Windows glew library
    334     AC_CHECK_LIB([glew32], [main], [FOUND_glew32=yes])
    335     if test x$FOUND_glew32 = xyes ; then
    336         LIBS="$LIBS -lglew32"
    337     else
    338          echo "------------------"
    339          echo "opengl extension wrangler not found."
    340          echo "please install the glew package which can be found at http://glew.sourceforge.net"
    341          echo "------------------"
    342          exit -1
    343     fi
    344 
    345 #--------#
    346 # openAL #
    347 #--------#
    348 # checking for openAL-headers
    349   AC_CHECK_HEADERS([AL/al.h] ,,
    350       [AC_MSG_ERROR([cannot find openAL header.])])
    351 # checking for openAL-lib
    352   AC_CHECK_LIB([OpenAL32], [main], [FOUND_openal=yes])
    353   AC_CHECK_LIB([ALut], [main], [FOUND_ALut=yes])
    354      if test x$FOUND_openal = xyes ; then
    355       if test x$FOUND_ALut = xyes ; then
    356        LIBS="$LIBS -lALut -lOpenAL32"
    357      else
    358         echo "------------------"
    359         echo "openal library not found."
    360         echo "please install the openal library, which can be found at http://www.openal.org"
    361         echo "------------------"
    362         exit -1
    363       fi
    364      fi
    365     ;;
     354  ;;
    366355
    367356#########
     
    387376
    388377#  checking for Unix GL
    389    AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
    390    if test x$FOUND_GL = xyes ; then
    391      LIBS="$LIBS -lGL"
    392    else
     378   AC_CHECK_LIB([GL], [main], [FOUND_GL=yes; LIBS="$LIBS -lGL"])
     379   if test x$FOUND_GL != xyes ; then
    393380         echo "------------------"
    394381         echo "opengl not found."
     
    401388    AC_CHECK_HEADERS([GL/glu.h] ,,
    402389      [AC_MSG_ERROR([cannot find opengl headers]) ])
    403 
    404 #    AC_CHECK_LIB([GLU], [main], FOUND_GLU=yes)
    405 #    if test x$FOUND_GLU = xyes ; then
     390### FIXME ### THIS CHECK SHOULD WORK EVERYWHERE !!
     391#    AC_CHECK_LIB([GLU], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU"])
     392#    if test x$FOUND_GLU != xyes ; then
     393      FOUND_GLU=yes
    406394      LIBS="$LIBS -lGLU"
    407395#    else
     
    417405      [AC_MSG_ERROR([cannot find glew headers]) ])
    418406# checking for GLEW-lib
    419   AC_CHECK_LIB([GLEW], [main], FOUND_GLEW=yes)
    420    if test x$FOUND_GLEW = xyes ; then
    421      LIBS="$LIBS -lGLEW"
    422    else
     407  AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"])
     408   if test x$FOUND_GLEW != xyes ; then
    423409         echo "------------------"
    424410         echo "glew not found."
     
    435421      [AC_MSG_ERROR([cannot find openAL header.])])
    436422# checking for openAL-lib
    437   AC_CHECK_LIB([openal], [main], [FOUND_openal=yes])
    438      if test x$FOUND_openal = xyes ; then
    439        LIBS="$LIBS -lopenal"
    440      else
     423  AC_CHECK_LIB([openal], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lopenal"])
     424     if test x$FOUND_OPENAL != xyes ; then
    441425        echo "------------------"
    442426        echo "openal library not found."
     
    448432  AC_CHECK_HEADERS([AL/alut.h] ,,
    449433      [AC_MSG_ERROR([cannot find openAL Utility Toolkit (alut) header.])])
    450   AC_CHECK_LIB([alut], [main], [FOUND_alut=yes])
    451      if test x$FOUND_alut = xyes ; then
    452        LIBS="-lalut $LIBS"
    453      fi
    454 
     434  AC_CHECK_LIB([alut], [main], [FOUND_ALUT=yes; LIBS="-lalut $LIBS"])
     435
     436#-----#
     437# SDL #
     438#-----#
    455439# checking for SDL
    456440  AC_MSG_CHECKING([for SDL-version])
     
    463447   LIBS="`sdl-config --libs` $LIBS"
    464448   AC_CHECK_LIB([SDL], [main], [FOUND_SDL=yes])
    465     if test x$FOUND_SDL = xyes ; then
    466      echo `sdl-config --libs`
    467     else
     449    if test x$FOUND_SDL != xyes ; then
    468450        echo "------------------"
    469451        echo "SDL library not found."
     
    534516      [AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])]))
    535517# checking for SDL_ttf-lib
    536   AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes])
    537      if test x$FOUND_SDL_ttf = xyes ; then
    538        LIBS="$LIBS -lSDL_ttf"
    539      else
     518  AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes; LIBS="$LIBS -lSDL_ttf"])
     519     if test x$FOUND_SDL_ttf != xyes ; then
    540520        echo "------------------"
    541521        echo "SDL_ttf library not found."
     
    552532    [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([SDL_image header not found.]))])
    553533# checking for SDL_image-lib
    554 AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes])
    555    if test x$FOUND_SDL_image = xyes ; then
    556      LIBS="$LIBS -lSDL_image"
    557    else
     534AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes; LIBS="$LIBS -lSDL_image"])
     535   if test x$FOUND_SDL_image != xyes ; then
    558536      echo "------------------"
    559537      echo "SDL_image library not found."
     
    570548      [AC_MSG_ERROR([cannot find ogg header.])])
    571549# checking for ogg-lib
    572   AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes])
    573      if test x$FOUND_ogg = xyes ; then
    574        LIBS="$LIBS -logg"
    575      else
     550  AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes; LIBS="$LIBS -logg"])
     551     if test x$FOUND_ogg != xyes ; then
    576552        echo "------------------"
    577553        echo "ogg library not found."
     
    585561#--------#
    586562# checking for vorbis-lib
    587   AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes])
    588      if test x$FOUND_vorbis = xyes ; then
    589        LIBS="$LIBS -lvorbis"
    590      else
     563  AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes; LIBS="$LIBS -lvorbis"])
     564     if test x$FOUND_vorbis != xyes ; then
    591565        echo "------------------"
    592566        echo "vorbis library not found."
     
    603577      [AC_MSG_ERROR([cannot find vorbisfile header.])])
    604578# checking for vorbisfile-lib
    605   AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes])
    606      if test x$FOUND_vorbisfile = xyes ; then
    607        LIBS="$LIBS -lvorbisfile"
    608      else
     579  AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes; LIBS="$LIBS -lvorbisfile"])
     580     if test x$FOUND_vorbisfile != xyes ; then
    609581        echo "------------------"
    610582        echo "vorbisfile library not found."
     
    613585        exit -1
    614586     fi
     587
     588
     589#---------#
     590# libcURL #
     591#---------#
     592if test x$def_curl = xyes; then
     593 AC_CHECK_HEADERS([curl/curl.h], [curlHeader=yes], [curlHeader=no])
     594 AC_CHECK_LIB([curl], [main], [FOUND_curl=yes])
     595 if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
     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 else
     601  have_curl=no
     602 fi
     603
     604fi
     605AC_SUBST(CURL_LIBS)
     606AC_SUBST(CURL_CFLAGS)
     607AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes)
     608
     609#--------#
     610# efence #
     611#--------#
     612if test x$def_efence = xyes ; then
     613  AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"])
     614   if test x$FOUND_efence != xyes ; then
     615     echo "efence was requested, but is not installed!! going on"
     616   fi
     617
     618fi
    615619
    616620#-----#
     
    618622#-----#
    619623if test x$def_gtk = xyes; then
    620         #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     624#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
    621625        AC_MSG_CHECKING([for gtk2.0])
    622626        if `$PKG_CONFIG --exists gtk+-2.0`; then
     
    639643AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
    640644
    641 #---------#
    642 # libcURL #
    643 #---------#
    644 if test x$def_curl = xyes; then
    645 
    646  AC_CHECK_HEADERS([curl/curl.h], [curlHeader="yes"], [curlHeader="no"])
    647  AC_CHECK_LIB([curl], [main], [FOUND_curl=yes])
    648  if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
    649   have_curl=yes
    650   CURL_LIBS=`curl-config --libs`
    651   CURLCFLAGS=`curl-config --cflags`
    652   AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL])
    653  else
    654   have_curl=no
    655  fi
    656 
    657 fi
    658 AC_SUBST(CURL_LIBS)
    659 AC_SUBST(CURL_CFLAGS)
    660 AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes)
    661 
    662 #--------#
    663 # efence #
    664 #--------#
    665 if test x$def_efence = xyes ; then
    666   AC_CHECK_LIB([efence], [main], [FOUND_efence=yes])
    667    if test x$FOUND_efence = xyes ; then
    668       LIBS="$LIBS -lefence"
    669    fi
    670 
    671 fi
    672645
    673646# FIXME: Replace `main' with a function in `-lm':
Note: See TracChangeset for help on using the changeset viewer.