Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2983 in orxonox.OLD for orxonox/branches/osX/configure.ac


Ignore:
Timestamp:
Nov 25, 2004, 1:39:02 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/osX: merged back from trunk. command svn merge trunk/ branches/osX/ -r 2977:HEAD

File:
1 edited

Legend:

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

    r2978 r2983  
    22# Process this file with autoconf to produce a configure script.
    33
    4 AC_PREREQ(2.56)
     4#AC_PREREQ(2.56)
    55AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
     6
     7# Detect the canonical host and target build environment.
     8AC_CANONICAL_BUILD
     9AC_CANONICAL_HOST
     10AC_CANONICAL_TARGET
     11
     12
    613AM_INIT_AUTOMAKE
    714
     
    1219# Checks for programs.
    1320AC_PROG_CXX
    14 AC_PROG_CC
    15 
    16 
    17 
    1821AC_HEADER_STDC
    1922
     
    2124
    2225AC_MSG_CHECKING([for System])
    23 case `uname` in
     26## checking for openGL-environment and other sys-specific parameters
     27case "$target" in
    2428### WINDOWS ###
    25   *MINGW*)
     29  *-*-mingw32*)
    2630echo "mingw-WINDOWS detected"
    2731
     
    6468    fi
    6569
    66 
    6770# checking for mingw32
    6871    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
     
    7780    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    7881    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
     82       LIBS="$LIBS -lsdlmain"
     83    else
     84        echo "------------------"
     85        echo "SDL library not found."
     86        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     87        echo "------------------"
     88        exit 1
    8689    fi
    8790    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    8891    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
     92       LIBS="$LIBS -lsdl"
     93    else
     94        echo "------------------"
     95        echo "SDL library not found."
     96        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     97        echo "------------------"
     98        exit -1
     99    fi
     100
    97101
    98102    ;;
    99103
    100104### LINUX ###
    101  *Linux*)
     105 *-*-linux*)
    102106echo "Linux detected"
    103107
     
    135139    fi   
    136140
     141## checking for SDL
     142    SDL_VERSION=1.2.7
     143    AM_PATH_SDL($SDL_VERSION,
     144      :,
     145      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     146      )
     147    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     148    LIBS="$LIBS $SDL_LIBS"
     149    ;;
     150
     151### OS X ###
     152 *Darwin*)
     153echo "OS X detected"
     154
     155 osX="yes"
     156
     157# checking gl header
     158   AC_CHECK_HEADERS(OpenGL/gl.h ,,
     159      [AC_MSG_ERROR([cannot find opengl headers]) ])
     160# cheking for GLU-header
     161    AC_CHECK_HEADERS(OpenGL/glu.h ,,
     162      [AC_MSG_ERROR([cannot find opengl headers]) ])
     163
     164   LIBS="$LIBS -framework OpenGL"
     165
    137166# checking for SDL-headers
    138167    AC_CHECK_HEADERS(SDL/SDL.h ,,
    139168      [AC_MSG_ERROR([cannot find SDL headers]) ])
    140169
    141     AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    142      if test "$FOUND_SDL" = "yes" ; then
    143         LIBS="$LIBS -lSDL"
    144      else
    145          echo "------------------"
    146          echo "SDL library not found."
    147          echo "please install the SDL library, which can be found at http://www.libsdl.org"
    148          echo "------------------"
    149          exit -1
    150      fi   
    151        
    152      # FIXME: Replace `main' with a function in `-lOSMesa':
    153       AC_CHECK_LIB([OSMesa], [main])
    154      # FIXME: Replace `main' with a function in `-lX11':
    155       AC_CHECK_LIB([X11], [main])
    156      # FIXME: Replace `main' with a function in `-lXt':
    157       AC_CHECK_LIB([Xt], [main])
    158     ;;
    159 
    160 ### OS X ###
    161  *Darwin*)
    162 echo "OS X detected"
    163 
    164  osX="yes"
    165 
    166 # checking gl header
    167    AC_CHECK_HEADERS(OpenGL/gl.h ,,
    168       [AC_MSG_ERROR([cannot find opengl headers]) ])
    169 # cheking for GLU-header
    170     AC_CHECK_HEADERS(OpenGL/glu.h ,,
    171       [AC_MSG_ERROR([cannot find opengl headers]) ])
    172 
    173    LIBS="$LIBS -framework OpenGL"
    174 
    175 # checking for SDL-headers
    176     AC_CHECK_HEADERS(SDL/SDL.h ,,
    177       [AC_MSG_ERROR([cannot find SDL headers]) ])
    178 
    179  LIBS="$LIBS -L/sw/lib -lSDLmain -lSDL -framework Cocoa"
    180 
     170## checking for SDL
     171    SDL_VERSION=1.2.7
     172    AM_PATH_SDL($SDL_VERSION,
     173      :,
     174      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     175      )
     176    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     177    LIBS="$LIBS $SDL_LIBS"
    181178  ;;
    182179
     
    188185AC_SUBST(MSBITFIELDS)
    189186
     187
     188
     189
     190## checking for GTK
     191PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     192AC_SUBST(GTK2_LIBS)
     193AC_SUBST(GTK2_CFLAGS)
     194AM_CONDITIONAL(HAVE_GTK2, test "x$have_gtk2" = xyes)
    190195
    191196
     
    197202
    198203
    199 
    200 
    201204# FIXME: Replace `main' with a function in `-lm':
    202205 AC_CHECK_LIB([m], [main])
    203 
    204 LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
    205206
    206207
Note: See TracChangeset for help on using the changeset viewer.