Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Nov 2, 2004, 7:06:29 PM (21 years ago)
Author:
bensch
Message:

orxonox/trunk: configure.ac updated, that it only checks for linux, Windows, aso. (ando so on…). This should improve the simplicity of autoconf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/configure.ac

    r2627 r2701  
    99AC_CONFIG_HEADER([config.h])
    1010
    11 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])
    1226case `uname` in
     27### WINDOWS ###
    1328  *MINGW*)
     29echo "mingw-WINDOWS detected"
     30
    1431    mingw="yes"
    1532    MSBITFIELDS="-mms-bitfields"
    1633    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       
    17151    ;;
    18152  *)
     
    23157AC_SUBST(MSBITFIELDS)
    24158
    25 
    26 # Checks for programs.
    27 AC_PROG_CXX
    28 AC_PROG_CC
    29 
    30 # Checks for libraries.
    31 
    32 #  cheking for libGL
    33 AC_CHECK_HEADERS(GL/gl.h ,,
    34       [AC_MSG_ERROR([cannot find opengl headers]) ])
    35 
    36 #   checking for Unix GL
    37 AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
    38 if test "$FOUND_GL" = "yes" ; then
    39     LIBS="$LIBS -lGL"
    40     #   checking for Windows openGl library
    41 else
    42     echo "We did not find the Linux opengl Library. Checking for Windows Library"
    43     AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
    44     if test "$FOUND_opengl32" = "yes" ; then
    45         LIBS="$LIBS -lopengl32"
    46        
    47     else
    48          echo "------------------"
    49          echo "opengl not found."
    50          echo "please install the opengl package which can be found at http://www.opengl.org"
    51          echo "------------------"
    52          exit -1
    53     fi
    54 fi
    55 
    56 #  cheking for libGLU
    57 AC_CHECK_HEADERS(GL/glu.h ,,
    58       [AC_MSG_ERROR([cannot find opengl headers]) ])
    59 
    60 AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
    61 if test "$FOUND_GLU" = "yes" ; then
    62     LIBS="$LIBS -lGLU"
    63     #   checking for Windows GLU32 library
    64 else
    65     echo "We did not find the Linux GLU Library. Checking for Windows Library"
    66     AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
    67     if test "$FOUND_glu32" = "yes" ; then
    68         LIBS="$LIBS -lGLU32"
    69        
    70         else
    71          echo "------------------"
    72          echo "GLU library not found."
    73          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
    74          echo "------------------"
    75          exit -1
    76     fi
    77 fi
     159#### Checking for LIBraries.
    78160
    79161# FIXME: Replace `main' with a function in `-lOSMesa':
     
    84166AC_CHECK_LIB([Xt], [main])
    85167
    86 ## mingw CHECK
    87 if test $mingw = yes ; then
    88         AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
    89         if test $FOUND_mingw32 = "yes"; then
    90                 LIBS="$LIBS -lmingw32"
    91         fi
    92 fi
    93 
    94 ## SDL CHECK
    95 
    96 #checking for SDL libs
    97 AC_CHECK_HEADERS(SDL/SDL.h ,,
    98       [AC_MSG_ERROR([cannot find SDL headers]) ])
    99 if test $mingw = no ; then
    100         AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    101         if test "$FOUND_SDL" = "yes" ; then
    102                 LIBS="$LIBS -lSDL"
    103         fi
    104 #   checking for Windows sdl library
    105 else
    106     AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    107     if test "$FOUND_sdlmain" = "yes" ; then
    108         LIBS="$LIBS -lsdlmain"
    109     fi
    110         AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    111         if test "$FOUND_sdl" = "yes" ; then
    112                 LIBS="$LIBS -lsdl"
    113         fi
    114 fi
    115168
    116169#checking for pthread libs
Note: See TracChangeset for help on using the changeset viewer.