Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Nov 25, 2004, 11:28:18 AM (21 years ago)
Author:
bensch
Message:

orxonox/truk: configure.ac/makefile.am's better now. more dynamic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/configure.ac

    r2968 r2980  
    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
     
    7074        LIBS="$LIBS -lmingw32"
    7175    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
    9776
    9877    ;;
    9978
    10079### LINUX ###
    101  *Linux*)
     80 *-*-linux*)
    10281echo "Linux detected"
    10382
     
    134113         exit -1
    135114    fi   
    136 
    137 # checking for SDL-headers
    138     AC_CHECK_HEADERS(SDL/SDL.h ,,
    139       [AC_MSG_ERROR([cannot find SDL headers]) ])
    140 
    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])
    158115    ;;
    159116  *)
     
    165122
    166123
     124## checking for SDL
     125SDL_VERSION=1.2.7
     126AM_PATH_SDL($SDL_VERSION,
     127   :,
     128   AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     129   )
     130CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     131LIBS="$LIBS $SDL_LIBS"
     132
     133
     134## checking for GTK
     135PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     136AC_SUBST(GTK2_LIBS)
     137AC_SUBST(GTK2_CFLAGS)
     138AM_CONDITIONAL(HAVE_GTK2, test "x$have_gtk2" = xyes)
     139
    167140
    168141#checking for pthread libs
     
    173146
    174147
    175 
    176 
    177148# FIXME: Replace `main' with a function in `-lm':
    178149 AC_CHECK_LIB([m], [main])
    179 
    180 LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
    181150
    182151
Note: See TracChangeset for help on using the changeset viewer.