Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3238 in orxonox.OLD for orxonox/branches/sound/configure.ac


Ignore:
Timestamp:
Dec 20, 2004, 2:42:54 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches: updated branches: buerli, nico, sound. And moved bezierTrack to old.bezierTrack. Conflicts resolved in a usefull order.
Conflics mostly resolved in favor of trunk
merge.

File:
1 edited

Legend:

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

    r2964 r3238  
    33
    44AC_PREREQ(2.56)
    5 AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
     5AC_INIT(orxonox, 0.2.0_alpha-r1, 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
     23### CHECKING  OPTIONAT ARGUMENTS
     24## DEBUG-statement
     25DEBUG=no
     26AC_MSG_CHECKING([if DEBUG-mode should be enabled])
     27AC_ARG_ENABLE([debug],
     28        AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]),
     29         DEBUG=$enableval)
     30
     31if test "$DEBUG" = "no"; then
     32        echo "no"
     33        echo " -> Setting debuglevel to 1. Like this you can still see errors."
     34        DEBUG=1
     35elif test "$DEBUG" = yes; then
     36        echo "yes"
     37        echo " -> Setting debuglevel to 3. HARD DEBUG MODE!!."
     38        DEBUG=3
     39else       
     40        echo "yes set to $DEBUG"
     41fi
     42        AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are])
     43
     44AC_SUBST(DEBUG)
     45
     46## GTK-disabled
     47AC_MSG_CHECKING([if gtk should be enabled])
     48AC_ARG_WITH([gtk],
     49        AC_HELP_STRING( [--without-gtk],
     50        [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes])
     51if test "$def_gtk" = yes; then
     52  echo "yes"
     53fi
     54if test "$def_gtk" = no; then
     55  echo "no"
     56fi
     57### SDL_image-disable
     58def_sdl_image=yes
     59AC_MSG_CHECKING([if SDL_image should be enabled])
     60AC_ARG_WITH([sdl_image],
     61        AC_HELP_STRING( [--without-sdl-image],
     62        [Prevents SDL_image from being loaded]), [def_sdl_image=no])
     63if test "$def_sdl_image" = yes; then
     64  echo "yes"
     65fi
     66if test "$def_sdl_image" = no; then
     67  echo "no"
     68fi
     69
     70
     71## PROGRAMM CHECKING
     72# checking for Doxygen
     73AC_PATH_PROG(DOXYGEN, doxygen)
     74AM_CONDITIONAL(DOXYGEN, test $DOXYGEN)
     75
    2076### CHECKING FOR SYSTEM ###
    2177
    2278AC_MSG_CHECKING([for System])
    23 case `uname` in
     79## checking for openGL-environment and other sys-specific parameters
     80case "$target" in
    2481### WINDOWS ###
    25   *MINGW*)
     82  *-*-mingw32*)
    2683echo "mingw-WINDOWS detected"
    2784
     
    64121    fi
    65122
    66 
    67123# checking for mingw32
    68124    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
     
    77133    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    78134    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
     135       LIBS="$LIBS -lsdlmain"
     136    else
     137        echo "------------------"
     138        echo "SDL library not found."
     139        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     140        echo "------------------"
     141        exit 1
    86142    fi
    87143    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    88144    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 # checking for SDL-Mixer-headers
    99     AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
    100       [AC_MSG_ERROR([cannot find SDL headers]) ])
    101 
    102 #checking for libSDL_mixer
    103     AC_CHECK_LIB([SDL_mixer], [main], FOUND_SDL_mixer=yes)
    104     if test "$FOUND_SDL_mixer" = "yes" ; then
    105         LIBS="$LIBS -lSDL_mixer"
    106     else
    107          echo "------------------"
    108          echo "SDL Mixer library not found."
    109          echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
    110          echo "------------------"
    111          exit 1
    112     fi
    113 
     145       LIBS="$LIBS -lsdl"
     146    else
     147        echo "------------------"
     148        echo "SDL library not found."
     149        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     150        echo "------------------"
     151        exit -1
     152    fi
    114153
    115154    ;;
    116155
    117156### LINUX ###
    118  *Linux*)
     157 *-*-linux*)
    119158echo "Linux detected"
    120159
    121160 Linux="yes"
    122161
     162CPPFLAGS="-I/usr/X11R6/include"
     163LDFLAGS="-L/usr/Mesa-6.0.1/lib -L/usr/X11R6/lib $LDFLAGS"
    123164# checking gl header
    124165   AC_CHECK_HEADERS(GL/gl.h ,,
     
    156197      [AC_MSG_ERROR([cannot find SDL headers]) ])
    157198
     199# checking for SDL-lib
    158200    AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    159201     if test "$FOUND_SDL" = "yes" ; then
    160         LIBS="$LIBS -lSDL"
     202       LIBS="$LIBS -lSDL"
    161203     else
    162         echo "------------------"
    163         echo "SDL library not found."
    164          echo "please install the SDL library, which can be found at http://www.libsdl.org"
    165         echo "------------------"
    166         exit -1
     204        echo "------------------"
     205        echo "SDL library not found."
     206        echo "please install the SDL library, which can be found at http://www.libsdl.org"
     207        echo "------------------"
     208        exit -1
    167209     fi   
    168        
     210
     211
     212## checking for SDL
     213#    SDL_VERSION=1.2.7
     214#    AM_PATH_SDL($SDL_VERSION,
     215#      :,
     216#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     217#      )
     218#    CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     219#    LIBS="$LIBS $SDL_LIBS"
     220    ;;
     221
     222### OS X ###
     223 *darwin*)
     224echo "OS X detected"
     225
     226 osX="yes"
     227
     228 CPPFLAGS="-I/sw/include $CPPFLAGS"
     229# checking gl header
     230   AC_CHECK_HEADERS(OpenGL/gl.h ,,
     231      [AC_MSG_ERROR([cannot find opengl headers]) ])
     232# cheking for GLU-header
     233    AC_CHECK_HEADERS(OpenGL/glu.h ,,
     234      [AC_MSG_ERROR([cannot find opengl headers]) ])
     235
     236   LIBS="$LIBS -framework OpenGL"
     237
     238# checking for SDL-headers
     239#    AC_CHECK_HEADERS(SDL/SDL.h ,,
     240#      [AC_MSG_ERROR([cannot find SDL headers]) ])
     241
     242## checking for SDL
     243#    SDL_VERSION=1.2.7
     244#    AM_PATH_SDL($SDL_VERSION,
     245#      :,
     246#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
     247#      )
     248
     249       SDL_CFLAGS=`sdl-config --cflags`
     250       SDL_LIBS=`sdl-config --libs`
     251       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
     252       LIBS="$LIBS $SDL_LIBS"
     253
     254    ;;
     255
     256  *)
     257    ;;
     258esac
     259
     260AC_SUBST(MSBITFIELDS)
     261
     262
     263## check for SDL_mixer
    169264# checking for SDL-Mixer-headers
    170265    AC_CHECK_HEADERS(SDL/SDL_mixer.h ,,
    171266      [AC_MSG_ERROR([cannot find SDL headers]) ])
    172 
    173 
     267 
     268 
    174269#checking for libSDL_mixer
    175270    AC_CHECK_LIB([SDL_mixer], [main], FOUND_SDL_mixer=yes)
    176271    if test "$FOUND_SDL_mixer" = "yes" ; then
    177         LIBS="$LIBS -lSDL_mixer"
    178     else
    179          echo "------------------"
    180          echo "SDL Mixer library not found."
    181          echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
    182          echo "------------------"
    183          exit 1
    184     fi
    185 
    186     ;;
    187   *)
    188     mingw="no"
    189     ;;
    190 esac
    191 AC_MSG_RESULT([$mingw])
    192 AC_SUBST(MSBITFIELDS)
    193 
    194 #### Checking for LIBraries.
    195 
    196 # FIXME: Replace `main' with a function in `-lOSMesa':
    197 AC_CHECK_LIB([OSMesa], [main])
    198 # FIXME: Replace `main' with a function in `-lX11':
    199 AC_CHECK_LIB([X11], [main])
    200 # FIXME: Replace `main' with a function in `-lXt':
    201 AC_CHECK_LIB([Xt], [main])
     272       LIBS="$LIBS -lSDL_mixer"
     273    else
     274        echo "------------------"
     275        echo "SDL Mixer library not found."
     276        echo "please install the SDL Mixer library, which can be found at http://www.libsdl.org"
     277        echo "------------------"
     278        exit 1
     279    fi
     280
     281
     282## check for SDL_Image
     283if test "$def_sdl_image" = "yes"; then
     284# checking for SDL_image-headers
     285  AC_CHECK_HEADERS(SDL/SDL_image.h ,,
     286      [echo "sdl_image not found. falling back to other options"; def_sdl_image=no ])
     287fi
     288if test "$def_sdl_image" = "yes"; then
     289# checking for SDL_image-lib
     290  AC_CHECK_LIB([SDL_image], [main], FOUND_SDL_image=yes)
     291     if test "$FOUND_SDL_image" = "yes" ; then
     292       LIBS="$LIBS -lSDL_image"
     293     else
     294        echo "------------------"
     295        echo "SDL_image library not found."
     296        echo "please install the SDL_image library, which can be found at http://www.libsdl.org/projects/SDL_image/"
     297        echo "------------------"
     298        exit -1
     299     fi   
     300fi
     301
     302
     303if test "$def_sdl_image" = "no"; then
     304 ## checking for libjpeg
     305 AC_CHECK_HEADERS(jpeglib.h ,jpegHeader="yes",
     306        jpegHeader="no")
     307 if test $jpegHeader = "no"; then
     308        echo " not including jpeg."
     309 else
     310  AC_CHECK_LIB([jpeg], [main], FOUND_jpeg=yes)
     311    if test "$FOUND_jpeg" = "yes" ; then
     312      LIBS="$LIBS -ljpeg"
     313    else
     314         echo "------------------"
     315         echo "jpeg library not found."
     316         echo "please install the jpeg library from the Independent JPEG Group, which can be found at http://www.ijg.org"
     317         echo "------------------"
     318         exit -1
     319    fi   
     320 fi
     321
     322 ## checking for libpng
     323 AC_CHECK_HEADERS(png.h ,pngHeader="yes",
     324        pngHeader="no")
     325 if test $pngHeader = "no"; then
     326        echo " not including png."
     327 else
     328  AC_CHECK_LIB([png], [main], FOUND_png=yes)
     329    if test "$FOUND_png" = "yes" ; then
     330      LIBS="$LIBS -lpng"
     331    else
     332         echo "------------------"
     333         echo "png library not found."
     334         echo "please install the png library, which can be found at http://libpng.org/pub/png/libpng.html"
     335         echo "------------------"
     336         exit -1
     337    fi
     338 fi   
     339fi
     340
     341## checking for GTK
     342if test "$def_gtk" = yes; then
     343
     344        #PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     345        AC_MSG_CHECKING([for gtk2.0])
     346        if `pkg-config --exists gtk+-2.0`; then
     347                echo "yes"
     348                have_gtk2=yes
     349                GTK2_LIBS=`pkg-config --libs gtk+-2.0`
     350                GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
     351                AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2])
     352        else
     353                echo "no"
     354        fi
     355
     356fi
     357AC_SUBST(GTK2_LIBS)
     358AC_SUBST(GTK2_CFLAGS)
     359AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
     360
    202361
    203362
    204363#checking for pthread libs
    205 AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
    206 if test "$FOUND_pthread" = "yes" ; then
    207     LIBS="$LIBS -lpthread"
    208 fi
    209 
    210 
     364# AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
     365# if test "$FOUND_pthread" = "yes" ; then
     366#    LIBS="$LIBS -lpthread"
     367# fi
    211368
    212369
    213370# FIXME: Replace `main' with a function in `-lm':
    214 AC_CHECK_LIB([m], [main])
    215 
    216 LIBS="$LIBS `pkg-config --libs  gtk+-2.0`"
    217 
    218 
     371 AC_CHECK_LIB([m], [main])
     372
     373 
    219374# Checks for header files.
    220375AC_HEADER_STDC
     
    229384
    230385AC_CONFIG_FILES([Makefile
    231                  console/Makefile
    232                  gui/Makefile
     386                 src/console/Makefile
     387                 src/gui/Makefile
    233388                 src/Makefile
    234                  importer/Makefile])
     389                 src/importer/Makefile])
    235390AC_OUTPUT
Note: See TracChangeset for help on using the changeset viewer.