Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2707 in orxonox.OLD for orxonox/branches/buerli/configure.ac


Ignore:
Timestamp:
Nov 3, 2004, 12:29:03 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/buerli: merged back from trunk, with new configure makefile and so forth.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/buerli/configure.ac

    r2617 r2707  
    55AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
    66AM_INIT_AUTOMAKE
     7
    78AC_CONFIG_SRCDIR([.])
    89AC_CONFIG_HEADER([config.h])
    910
    10 AC_MSG_CHECKING([for mingw])
     11
     12# Checks for programs.
     13AC_PROG_CXX
     14AC_PROG_CC
     15
     16
     17# checking gl header (has to be here because of a Linux error)
     18   AC_CHECK_HEADERS(GL/gl.h ,,
     19      [AC_MSG_ERROR([cannot find opengl headers]) ])
     20
     21
     22
     23### CHECKING FOR SYSTEM ###
     24
     25AC_MSG_CHECKING([for System])
    1126case `uname` in
     27### WINDOWS ###
    1228  *MINGW*)
     29echo "mingw-WINDOWS detected"
     30
    1331    mingw="yes"
    1432    MSBITFIELDS="-mms-bitfields"
    1533    MWINDOWS="-mwindows"
     34
     35# checking gl header
     36        #done before loop
     37
     38#   checking for Windows openGl library
     39    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
     40    if test "$FOUND_opengl32" = "yes" ; then
     41        LIBS="$LIBS -lopengl32"
     42    else
     43         echo "------------------"
     44         echo "opengl not found."
     45         echo "please install the opengl package which can be found at http://www.opengl.org"
     46         echo "------------------"
     47         exit -1
     48    fi
     49
     50# cheking for GLU-header
     51    AC_CHECK_HEADERS(GL/glu.h ,,
     52      [AC_MSG_ERROR([cannot find opengl headers]) ])
     53
     54# checking for libGLU
     55    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
     56    if test "$FOUND_glu32" = "yes" ; then
     57        LIBS="$LIBS -lGLU32"
     58    else
     59         echo "------------------"
     60         echo "GLU library not found."
     61         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
     62         echo "------------------"
     63         exit -1
     64    fi
     65
     66
     67# checking for mingw32
     68    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
     69    if test $FOUND_mingw32 = "yes"; then
     70        LIBS="$LIBS -lmingw32"
     71    fi
     72# checking for SDL-headers
     73    AC_CHECK_HEADERS(SDL/SDL.h ,,
     74      [AC_MSG_ERROR([cannot find SDL headers]) ])
     75
     76#checking for libSDL
     77    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
     78    if test "$FOUND_sdlmain" = "yes" ; then
     79        LIBS="$LIBS -lsdlmain"
     80    else
     81         echo "------------------"
     82         echo "SDL library not found."
     83         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     84         echo "------------------"
     85         exit 1
     86    fi
     87    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
     88    if test "$FOUND_sdl" = "yes" ; then
     89        LIBS="$LIBS -lsdl"
     90    else
     91         echo "------------------"
     92         echo "SDL library not found."
     93         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     94         echo "------------------"
     95         exit -1
     96    fi
     97
     98    ;;
     99
     100### LINUX ###
     101 *Linux*)
     102echo "Linux detected"
     103
     104 Linux="yes"
     105
     106# checking gl header
     107        #has been done befor linux-check
     108
     109#  checking for Unix GL
     110   AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
     111   if test "$FOUND_GL" = "yes" ; then
     112     LIBS="$LIBS -lGL"
     113   else
     114         echo "------------------"
     115         echo "opengl not found."
     116         echo "please install the opengl package which can be found at http://www.opengl.org"
     117         echo "------------------"
     118         exit -1
     119   fi
     120
     121# cheking for GLU-header
     122    AC_CHECK_HEADERS(GL/glu.h ,,
     123      [AC_MSG_ERROR([cannot find opengl headers]) ])
     124
     125    AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
     126    if test "$FOUND_GLU" = "yes" ; then
     127      LIBS="$LIBS -lGLU"
     128    else
     129         echo "------------------"
     130         echo "GLU library not found."
     131         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
     132         echo "------------------"
     133         exit -1
     134    fi   
     135
     136# checking for SDL-headers
     137    AC_CHECK_HEADERS(SDL/SDL.h ,,
     138      [AC_MSG_ERROR([cannot find SDL headers]) ])
     139
     140    AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
     141     if test "$FOUND_SDL" = "yes" ; then
     142        LIBS="$LIBS -lSDL"
     143     else
     144         echo "------------------"
     145         echo "SDL library not found."
     146         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     147         echo "------------------"
     148         exit -1
     149     fi   
     150       
    16151    ;;
    17152  *)
     
    22157AC_SUBST(MSBITFIELDS)
    23158
    24 
    25 # Checks for programs.
    26 AC_PROG_CXX
    27 AC_PROG_CC
    28 
    29 # Checks for libraries.
    30 
    31 #  cheking for libGL
    32 AC_CHECK_HEADERS(GL/gl.h ,,
    33       [AC_MSG_ERROR([cannot find opengl headers]) ])
    34 
    35 #   checking for Unix GL
    36 AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
    37 if test "$FOUND_GL" = "yes" ; then
    38     LIBS="$LIBS -lGL"
    39     #   checking for Windows openGl library
    40 else
    41     echo "We did not find the Linux opengl Library. Checking for Windows Library"
    42     AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
    43     if test "$FOUND_opengl32" = "yes" ; then
    44         LIBS="$LIBS -lopengl32"
    45        
    46     else
    47          echo "------------------"
    48          echo "opengl not found."
    49          echo "please install the opengl package which can be found at http://www.opengl.org"
    50          echo "------------------"
    51          exit -1
    52     fi
    53 fi
    54 
    55 #  cheking for libGLU
    56 AC_CHECK_HEADERS(GL/glu.h ,,
    57       [AC_MSG_ERROR([cannot find opengl headers]) ])
    58 
    59 AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
    60 if test "$FOUND_GLU" = "yes" ; then
    61     LIBS="$LIBS -lGLU"
    62     #   checking for Windows GLU32 library
    63 else
    64     echo "We did not find the Linux GLU Library. Checking for Windows Library"
    65     AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
    66     if test "$FOUND_glu32" = "yes" ; then
    67         LIBS="$LIBS -lGLU32"
    68        
    69         else
    70          echo "------------------"
    71          echo "GLU library not found."
    72          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
    73          echo "------------------"
    74          exit -1
    75     fi
    76 fi
     159#### Checking for LIBraries.
    77160
    78161# FIXME: Replace `main' with a function in `-lOSMesa':
     
    83166AC_CHECK_LIB([Xt], [main])
    84167
    85 #  cheking for libglut32
    86 AC_CHECK_HEADERS(GL/glut.h ,,
    87       [AC_MSG_ERROR([cannot find glut headers]) ])
    88 AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes)
    89 if test "$FOUND_glut" = "yes" ; then
    90     LIBS="$LIBS -lglut"
    91     #   checking for Windows glut32 library
    92 else
    93     echo "We did not find the Linux glut Library. Checking for Windows Library"
    94     AC_CHECK_LIB([glut32], [main], FOUND_glut32=yes)
    95     if test "$FOUND_glut32" = "yes" ; then
    96         LIBS="$LIBS -lglut32"
    97     else
    98          echo "------------------"
    99          echo "glut library not found."
    100          echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
    101          echo "------------------"
    102          exit -1
    103     fi
    104 fi
    105 
    106 ## mingw CHECK
    107 if test $mingw = yes ; then
    108         AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
    109         if test $FOUND_mingw32 = "yes"; then
    110                 LIBS="$LIBS -lmingw32"
    111         fi
    112 fi
    113 
    114 ## SDL CHECK
    115 
    116 #checking for SDL libs
    117 AC_CHECK_HEADERS(SDL/SDL.h ,,
    118       [AC_MSG_ERROR([cannot find SDL headers]) ])
    119 if test $mingw = no ; then
    120         AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    121         if test "$FOUND_SDL" = "yes" ; then
    122                 LIBS="$LIBS -lSDL"
    123         fi
    124 #   checking for Windows sdl library
    125 else
    126     AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    127     if test "$FOUND_sdlmain" = "yes" ; then
    128         LIBS="$LIBS -lsdlmain"
    129     fi
    130         AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    131         if test "$FOUND_sdl" = "yes" ; then
    132                 LIBS="$LIBS -lsdl"
    133         fi
    134 fi
    135168
    136169#checking for pthread libs
Note: See TracChangeset for help on using the changeset viewer.