Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/configure.ac @ 5468

Last change on this file since 5468 was 5468, checked in by bensch, 19 years ago

orxonox/trunk: typo

File size: 21.6 KB
RevLine 
[4555]1##########################################################################
2#   orxonox - the future of 3D-vertical-scrollers                        #
3#                                                                        #
4#   Copyright (C) 2004 orx                                               #
5#                                                                        #
[3424]6#   This program is free software; you can redistribute it and/or modify #
7#   it under the terms of the GNU General Public License as published by #
8#   the Free Software Foundation; either version 2, or (at your option)  #
[4555]9#   any later version.                                                   #
10#                                                                        #
11#   ### File Specific:                                                   #
12#   main-programmer: Benjamin Grauer                                     #
13#   co-programmer: ...                                                   #
14#                                                                        #
15#   This is the main configuration File of autoconf.                     #
[3424]16#   Please edit this file only, if you exactly know what you are doing.  #
17#   It is quite fragile, and compiling orxonox on different Platforms    #
18#   is only guarantied, if build with the right config.                  #
[4944]19#                                                                        #
20#   be sure to visit us at http://www.orxonox.net                        #
[3424]21##########################################################################
[1945]22
[3424]23#########################
24## AUTOCONF INIT PHASE ##
25#########################
[3218]26AC_PREREQ(2.56)
[5066]27AC_INIT(orxonox, 0.3.1_alpha, [orxonox-dev at mail.datacore.ch])
[2980]28
[3424]29## Detect the canonical host and target build environment.
[2980]30AC_CANONICAL_BUILD
31AC_CANONICAL_HOST
32AC_CANONICAL_TARGET
33
[1959]34AM_INIT_AUTOMAKE
[2618]35
[1951]36AC_CONFIG_SRCDIR([.])
[1945]37AC_CONFIG_HEADER([config.h])
38
[3424]39#########################
40## Checks for programs ##
41#########################
[1945]42AC_PROG_CXX
[5463]43AC_PROG_RANLIB
[2925]44AC_HEADER_STDC
[2701]45
[4774]46## THIS IS OUR DEFAULT-DATA-DIRECTORY
47
[3424]48##################################
49## CHECKING  OPTIONAL ARGUMENTS ##
50##################################
[4774]51#----------------#
52# Data-Directory #
53#----------------#
54DATA_DIR=$datadir
55echo \$\{prefix\}
56if test $DATA_DIR = \$\{prefix\}/share ; then
57        echo "not given"
58        DATA_DIR=/usr/share
59else
60        echo "given: $DATA_DIR"
61fi
62AC_DEFINE_UNQUOTED([DATADIR], ["$DATA_DIR"],
63                   [Define to the read-only architecture-independent
64                    data directory.])
[3424]65
66#-----------------#
[5221]67# shared-lib-path #
68#-----------------#
69SHARED_LIB_PATH=no
70AC_MSG_CHECKING([shared lib path])
71AC_ARG_WITH([shared-lib-path],
72        AC_HELP_STRING( [--with-shared-lib-path], [Tells the executable, where to look for the shared libraries.]),
[5223]73         SHARED_LIB_PATH=$withval)
[5222]74if test x$SHARED_LIB_PATH != xno; then
[5265]75        echo "set to $SHARED_LIB_PATH"
[5222]76else
[5221]77        echo "no"
78fi
79
80
81#-----------------#
[3424]82# DEBUG-statement #
83#-----------------#
[3173]84DEBUG=no
85AC_MSG_CHECKING([if DEBUG-mode should be enabled])
[4555]86AC_ARG_ENABLE([debug],
87        AC_HELP_STRING( [--enable-debug], [compiles in debug mode. Lots of debug info about the game.]),
88         DEBUG=$enableval)
[3205]89
[4555]90if test x$DEBUG = xno; then
91        echo "no"
92        echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed."
93        DEBUG=4
[3424]94elif test x$DEBUG = xyes; then
[4555]95        echo "yes"
96        echo " -> Setting debuglevel to 4. HARD DEBUG MODE!!."
97        DEBUG=4
98else
99        echo "yes: setting debuglevel to to $DEBUG"
[3173]100fi
[5222]101AC_DEFINE_UNQUOTED(DEBUG, $DEBUG, [in which debug mode we are])
[3173]102AC_SUBST(DEBUG)
103
[3592]104#---------------#
105# Modular Debug #
106#---------------#
107MODULAR_DEBUG=yes
108AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled])
[4555]109AC_ARG_ENABLE([modular-debug],
110        AC_HELP_STRING( [--disable-modular-debug], [compiles in modular-debug mode, that logs differently on the many modules of orxonox.]),
111         MODULAR_DEBUG=$enableval)
[3592]112
[4555]113if test x$MODULAR_DEBUG = xno; then
114        echo "no"
[3592]115elif test x$MODULAR_DEBUG = xyes; then
[4555]116        echo "yes"
117        AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled])
[3592]118fi
119
[3424]120#--------------#
121# GTK-disabled #
122#--------------#
[3100]123AC_MSG_CHECKING([if gtk should be enabled])
[4774]124AC_ARG_ENABLE([gtk],
125        AC_HELP_STRING( [--disable-gtk],
[4555]126        [Prevents GTK from being loaded]), [def_gtk=no], [def_gtk=yes])
127if test x$def_gtk = xyes; then
[3100]128  echo "yes"
[4555]129fi
130if test x$def_gtk = xno; then
[3100]131  echo "no"
132fi
[3423]133
[3424]134#------------------#
135# libCurl-disabled #
136#------------------#
[3423]137AC_MSG_CHECKING([if libcURL should be enabled])
[4774]138AC_ARG_ENABLE([curl],
139        AC_HELP_STRING( [--disable-curl],
[4555]140        [Prevents libcURL from being loaded]), [def_curl=no], [def_curl=yes])
141if test x$def_curl = xyes; then
[3423]142  echo "yes"
[4555]143fi
144if test x$def_curl = xno; then
[3423]145  echo "no"
146fi
147
[3424]148#-------------------#
149# SubProject-enable #
150#-------------------#
151def_sub_projects=no
[3377]152AC_MSG_CHECKING([if the SubProjects should be built])
[4774]153AC_ARG_WITH([sub-projects],
154        AC_HELP_STRING( [--with-sub-projects],
[4555]155        [also builds the subProjects while make from srcdir]), [def_sub_projects=yes])
[3424]156if test x$def_sub_projects = xyes; then
[3377]157  echo "yes"
[4555]158fi
[3424]159if test x$def_sub_projects = xno; then
[3377]160  echo "no"
161fi
162AM_CONDITIONAL(SUB_PROJECTS, test x$def_sub_projects = xyes)
163
[3788]164#-------------------#
165# Profiling Enabled #
166#-------------------#
167def_profiling=no
168AC_MSG_CHECKING([if Profiling should be enabled])
[4555]169AC_ARG_ENABLE([profile],
170        AC_HELP_STRING( [--enable-profile],
171        [builds orxonox with profiling support]), [def_profiling=yes])
[3788]172if test x$def_profiling = xyes; then
173  echo "yes"
174  CXXFLAGS="$CXXFLAGS -pg"
[4555]175fi
[3788]176if test x$def_profiling = xno; then
177  echo "no"
178fi
179
[3863]180#----------------#
181# efence Enabled #
182#----------------#
183def_efence=no
184AC_MSG_CHECKING([if efence should be enabled])
[4555]185AC_ARG_ENABLE([efence],
186        AC_HELP_STRING( [--enable-efence],
187        [builds orxonox with efence support]), [def_efence=yes])
[3863]188if test x$def_efence = xyes; then
189  echo "yes"
[4555]190fi
[3863]191if test x$def_efence = xno; then
192  echo "no"
193fi
194
[3558]195#----------------------#
196# Documentation-enable #
197#----------------------#
198def_documentation=no
199AC_MSG_CHECKING([if the Documentation should be build by default])
[4555]200AC_ARG_ENABLE([documentation],
201        AC_HELP_STRING( [--enable-documentation],
202        [also builds the sDocumentation while make from srcdir]), [def_documentation=yes])
[3558]203if test x$def_documentation = xyes; then
204  echo "yes"
[4555]205fi
[3558]206if test x$def_documentation = xno; then
207  echo "no"
208fi
209AM_CONDITIONAL(DOCUMENTATION, test x$def_documentation = xyes)
[4774]210
[5467]211
212
213#---------------------------#
214# WITH TARDIS (convenience) #
215#---------------------------#
216def_tardis=no
217AC_MSG_CHECKING([convenience flag for working at the taris in the ETH zurich])
[5468]218AC_ARG_WITH([tardis],
[5467]219        AC_HELP_STRING( [--with-tardis],
220        [sets all the necesary environment flags for linux-TARDIS boxes at the ETH Zurich]), [def_tardis=yes])
221if test x$def_tardis = xyes; then
222  PREFIX=/usr/pack/gamelibs-1.0-to
223  CPPFLAGS="$CPPFLAGS -I$PREFIX/include"
224  LDFLAGS="$LDFLAGS -L$PREFIX/$ARCH/lib -Wl,-rpath -Wl,$PREFIX/$ARCH/lib"
225  echo "yes"
226fi
227if test x$def_tardis = xno; then
228  echo "no"
229fi
230
[3424]231#######################
232## PROGRAMM CHECKING ##
233## 3. party Programs ##
234#######################
235
236#----------------------#
237# checking for Doxygen #
238#----------------------#
[3219]239AC_PATH_PROG(DOXYGEN, doxygen)
240AM_CONDITIONAL(DOXYGEN, test $DOXYGEN)
241
[3789]242#--------------------#
243# checking for gprof #
244#--------------------#
245AC_PATH_PROG(GPROF, gprof)
246
[4130]247#-------------------------#
248# checking for pkg-config #
249#-------------------------#
250if test x$def_gtk = xyes; then
251 AC_PATH_PROG(PKG_CONFIG, pkg-config)
252fi
253
254
[3424]255#########################
256## CHECKING FOR SYSTEM ##
257#########################
258## here the system is checked, and openGL is included
259## also checking for SDL on differen Systems
[2701]260
261AC_MSG_CHECKING([for System])
[2980]262## checking for openGL-environment and other sys-specific parameters
263case "$target" in
[4825]264
265###########
[3424]266#---------#
267# WINDOWS #
268#---------#
[4825]269###########
[2980]270  *-*-mingw32*)
[2701]271echo "mingw-WINDOWS detected"
272
[5222]273CPPFLAGS="-I/usr/include -I/mingw/include $CPPFLAGS"
[3790]274
[2701]275    mingw="yes"
276    MSBITFIELDS="-mms-bitfields"
277    MWINDOWS="-mwindows"
278
[5276]279#--------#
280# MIN-GW #
281#--------#
[4697]282# checking for mingw32
283    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
284    if test x$FOUND_mingw32 = xyes; then
285        LIBS="$LIBS -lmingw32"
286    fi
287
288#---------------#
289# open-GL (win) #
290#---------------#
[2925]291# checking gl header
[2879]292   AC_CHECK_HEADERS(GL/gl.h ,,
[5276]293      [AC_MSG_ERROR([cannot find opengl headers])])
[2701]294#   checking for Windows openGl library
[5276]295    AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"])
296    if test x$FOUND_GL != xyes ; then
[4555]297         echo "------------------"
298         echo "opengl not found."
299         echo "please install the opengl package which can be found at http://www.opengl.org"
300         echo "------------------"
301         exit -1
[1959]302    fi
303
[2701]304# cheking for GLU-header
[3424]305    AC_CHECK_HEADERS([GL/glu.h] ,,
[1971]306      [AC_MSG_ERROR([cannot find opengl headers]) ])
307
[2701]308# checking for libGLU
[5276]309    AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"])
310    if test x$FOUND_GLU != xyes ; then
[4555]311         echo "------------------"
312         echo "GLU library not found."
313         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
314         echo "------------------"
315         exit -1
[1959]316    fi
[1971]317
[5270]318# checking glew header
319   AC_CHECK_HEADERS(GL/glew.h ,,
320      [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ])
321#   checking for Windows glew library
[5276]322    AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"])
323    if test x$FOUND_GLEW != xyes ; then
[5270]324         echo "------------------"
325         echo "opengl extension wrangler not found."
326         echo "please install the glew package which can be found at http://glew.sourceforge.net"
327         echo "------------------"
328         exit -1
329    fi
330
[4697]331#--------#
332# openAL #
333#--------#
334# checking for openAL-headers
335  AC_CHECK_HEADERS([AL/al.h] ,,
336      [AC_MSG_ERROR([cannot find openAL header.])])
337# checking for openAL-lib
[5276]338  AC_CHECK_LIB([OpenAL32], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lOpenAL32"])
[5436]339  AC_CHECK_LIB([ALut], [main], [FOUND_ALUT=yes; LIBS="-lALut $LIBS"])
[5276]340     if test x$FOUND_OPENAL != xyes ; then
[2982]341        echo "------------------"
[4697]342        echo "openal library not found."
343        echo "please install the openal library, which can be found at http://www.openal.org"
[2982]344        echo "------------------"
345        exit -1
[4697]346     fi
[4825]347
[5276]348
349#-----------#
350# SDL(win) #
351#-----------#
352# checking for SDL-headers
353    AC_CHECK_HEADERS([SDL/SDL.h] ,,
354      [AC_MSG_ERROR([cannot find SDL headers]) ])
355
356#checking for libSDL
357    AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"])
358    if test x$FOUND_sdlmain != xyes ; then
359        echo "------------------"
360        echo "SDL library not found."
361        echo "please install the SDL library, which can be found at http://www.libsdl.org"
362        echo "------------------"
363        exit 1
364    fi
365    AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"])
366    if test x$FOUND_SDL != xyes ; then
367        echo "------------------"
368        echo "SDL library not found."
369        echo "please install the SDL library, which can be found at http://www.libsdl.org"
370        echo "------------------"
371        exit -1
372    fi
373
374  ;;
375
[4825]376#########
[3424]377#-------#
378# LINUX #
379#-------#
[4825]380#########
[2980]381 *-*-linux*)
[2701]382echo "Linux detected"
383
384 Linux="yes"
385
[5265]386##CPPFLAGS="-I/usr/include $CPPFLAGS"
[5224]387##LDFLAGS="-L/usr/lib $LDFLAGS"
[5221]388if test x$SHARED_LIB_PATH != xno; then
[5265]389        echo "setting new LDFLAGS with $SHARED_LIB_PATH"
390        LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS"
[5221]391fi
392
[5277]393#--------#
394# openGL #
395#--------#
[2925]396# checking gl header
[3424]397   AC_CHECK_HEADERS([GL/gl.h] ,,
[2879]398      [AC_MSG_ERROR([cannot find opengl headers]) ])
[2701]399
400#  checking for Unix GL
[5279]401   AC_CHECK_LIB([GL], [main], [FOUND_GL=yes; LIBS="$LIBS -lGL"])
[5276]402   if test x$FOUND_GL != xyes ; then
[4555]403         echo "------------------"
404         echo "opengl not found."
405         echo "please install the opengl package which can be found at http://www.opengl.org"
406         echo "------------------"
407         exit -1
[2701]408   fi
409
410# cheking for GLU-header
[3424]411    AC_CHECK_HEADERS([GL/glu.h] ,,
[2701]412      [AC_MSG_ERROR([cannot find opengl headers]) ])
[5277]413    AC_CHECK_LIB([GLU], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU"])
414    if test x$FOUND_GLU != xyes ; then
415         echo "------------------"
416         echo "GLU library not found."
417         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
418         echo "------------------"
419         exit -1
420    fi
[2995]421
[5265]422# checking for GLEW-headers
423   AC_CHECK_HEADERS([GL/glew.h] ,,
424      [AC_MSG_ERROR([cannot find glew headers]) ])
425# checking for GLEW-lib
[5276]426  AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"])
427   if test x$FOUND_GLEW != xyes ; then
[5265]428         echo "------------------"
429         echo "glew not found."
430         echo "please install the glew package which can be found at http://glew.sourceforge.net"
431         echo "------------------"
432         exit -1
433   fi
434
[4697]435#--------#
436# openAL #
437#--------#
438# checking for openAL-headers
439  AC_CHECK_HEADERS([AL/al.h] ,,
440      [AC_MSG_ERROR([cannot find openAL header.])])
441# checking for openAL-lib
[5276]442  AC_CHECK_LIB([openal], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lopenal"])
443     if test x$FOUND_OPENAL != xyes ; then
[4697]444        echo "------------------"
445        echo "openal library not found."
446        echo "please install the openal library, which can be found at http://www.openal.org"
447        echo "------------------"
448        exit -1
449     fi
[5220]450# checking for alut
[5223]451  AC_CHECK_HEADERS([AL/alut.h] ,,
452      [AC_MSG_ERROR([cannot find openAL Utility Toolkit (alut) header.])])
[5276]453  AC_CHECK_LIB([alut], [main], [FOUND_ALUT=yes; LIBS="-lalut $LIBS"])
[4697]454
[5276]455#-----#
456# SDL #
457#-----#
[4664]458# checking for SDL
459  AC_MSG_CHECKING([for SDL-version])
460  SDL_VERSION=`sdl-config --version`
461  echo $SDL_VERSION
[2982]462
[5224]463   CPPFLAGS="$CPPFLAGS `sdl-config --cflags`"
[4665]464   AC_CHECK_HEADERS([SDL.h] ,,
465      [AC_CHECK_HEADERS([SDL/SDL.h] ,,AC_MSG_ERROR([cannot find SDL header. please download from libsdl.org])]))
[5223]466   LIBS="`sdl-config --libs` $LIBS"
[5221]467   AC_CHECK_LIB([SDL], [main], [FOUND_SDL=yes])
[5276]468    if test x$FOUND_SDL != xyes ; then
[5221]469        echo "------------------"
470        echo "SDL library not found."
471        echo "please install the SDL library, which can be found at http://www.libsdl.org"
472        echo "------------------"
473        exit -1
474     fi
[2991]475
[4664]476    ;;
[3140]477
[4825]478#############
[3424]479#-----------#
480# MAC -OS X #
481#-----------#
[4825]482#############
[2995]483 *darwin*)
[3424]484 echo "OS X detected"
[2995]485
486 osX="yes"
487
[4662]488 CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS"
[5278]489 LDFLAGS="$LDFLAGS -L/sw/lib"
[2995]490# checking gl header
[3424]491   AC_CHECK_HEADERS([OpenGL/gl.h] ,,
[2995]492      [AC_MSG_ERROR([cannot find opengl headers]) ])
493# cheking for GLU-header
[3424]494    AC_CHECK_HEADERS([OpenGL/glu.h] ,,
[2995]495      [AC_MSG_ERROR([cannot find opengl headers]) ])
496
497   LIBS="$LIBS -framework OpenGL"
498
[5279]499
500
501# checking for GLEW-headers
502   AC_CHECK_HEADERS([GL/glew.h] ,,
503      [AC_MSG_ERROR([cannot find glew headers]) ])
504# checking for GLEW-lib
505  AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"])
506   if test x$FOUND_GLEW != xyes ; then
507         echo "------------------"
508         echo "glew not found."
509         echo "please install the glew package which can be found at http://glew.sourceforge.net"
510         echo "------------------"
511         exit -1
512   fi
513
514
[5278]515   AC_CHECK_HEADERS([OpenAL/al.h] ,,
516      [AC_MSG_ERROR([cannot find opengl headers]) ])
517  HAVE_OPENAL=yes
518  LIBS="$LIBS -framework OpenAL"
[4662]519
[5278]520
[4662]521## SDL-check
[5295]522       SDL_CFLAGS=`sdl-config --cflags`
523       SDL_LIBS=`sdl-config --libs`
524       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
525       LIBS="$LIBS $SDL_LIBS"
[5278]526   AC_CHECK_HEADERS([SDL/SDL.h] ,,
527      [AC_MSG_ERROR([cannot find SDL headers]) ])
528   HAVE_SDL=yes
[5295]529#   LIBS="$LIBS -framework SDL"
[3424]530
[2995]531# checking for SDL-headers
[3001]532#    AC_CHECK_HEADERS(SDL/SDL.h ,,
533#      [AC_MSG_ERROR([cannot find SDL headers]) ])
[2995]534
535## checking for SDL
536#    SDL_VERSION=1.2.7
537#    AM_PATH_SDL($SDL_VERSION,
538#      :,
539#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
540#      )
541
[3140]542
[2995]543    ;;
544
[2701]545  *)
546    ;;
547esac
[2968]548
[2701]549AC_SUBST(MSBITFIELDS)
550
[3424]551###################################
552## CHECKING FOR HEADERS AND LIBS ##
553###################################
554
[4665]555#---------#
556# SDL_ttf #
557#---------#
558# checking for SDL_ttf-headers
[4672]559  AC_CHECK_HEADERS([SDL_ttf.h] ,,
560      [AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])]))
[4665]561# checking for SDL_ttf-lib
[5276]562  AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes; LIBS="$LIBS -lSDL_ttf"])
563     if test x$FOUND_SDL_ttf != xyes ; then
[4665]564        echo "------------------"
565        echo "SDL_ttf library not found."
566        echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/"
567        echo "------------------"
568        exit -1
569     fi
570
571#-----------#
572# SDL_Image #
573#-----------#
574# checking for SDL_image-headers
575AC_CHECK_HEADERS([SDL_image.h] ,,
[4672]576    [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([SDL_image header not found.]))])
[4665]577# checking for SDL_image-lib
[5276]578AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes; LIBS="$LIBS -lSDL_image"])
579   if test x$FOUND_SDL_image != xyes ; then
[4665]580      echo "------------------"
581      echo "SDL_image library not found."
[5278]582      echo "please install the SDL_image library, which can be found at http://www.l ibsdl.org/projects/SDL_image/"
[4665]583      echo "------------------"
584      exit -1
585   fi
586
[4504]587#-----#
588# ogg #
589#-----#
[4825]590# checking for ogg-headers
591  AC_CHECK_HEADERS([ogg/ogg.h] ,,
592      [AC_MSG_ERROR([cannot find ogg header.])])
593# checking for ogg-lib
[5276]594  AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes; LIBS="$LIBS -logg"])
595     if test x$FOUND_ogg != xyes ; then
[4825]596        echo "------------------"
597        echo "ogg library not found."
598        echo "please install the ogg library, which can be found at http://www.xiph.org/ogg/vorbis/index.html"
599        echo "------------------"
600        exit -1
601     fi
[4504]602
603#--------#
604# vorbis #
605#--------#
[4825]606# checking for vorbis-lib
[5276]607  AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes; LIBS="$LIBS -lvorbis"])
608     if test x$FOUND_vorbis != xyes ; then
[4825]609        echo "------------------"
610        echo "vorbis library not found."
611        echo "please install the vorbis library, which can be found at http://www.xiph.org/ogg/vorbis/index.html"
612        echo "------------------"
613        exit -1
614     fi
[4504]615
616#------------#
617# vorbisfile #
618#------------#
[4825]619# checking for vorbis-headers
620  AC_CHECK_HEADERS([vorbis/vorbisfile.h] ,,
621      [AC_MSG_ERROR([cannot find vorbisfile header.])])
622# checking for vorbisfile-lib
[5276]623  AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes; LIBS="$LIBS -lvorbisfile"])
624     if test x$FOUND_vorbisfile != xyes ; then
[4825]625        echo "------------------"
626        echo "vorbisfile library not found."
627        echo "please install the vorbisfile library, which can be found at http://www.xiph.org/ogg/vorbis/index.html"
628        echo "------------------"
629        exit -1
630     fi
[4504]631
[3101]632
[3424]633#---------#
634# libcURL #
635#---------#
[4555]636if test x$def_curl = xyes; then
[5276]637 AC_CHECK_HEADERS([curl/curl.h], [curlHeader=yes], [curlHeader=no])
[3423]638 AC_CHECK_LIB([curl], [main], [FOUND_curl=yes])
639 if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
640  have_curl=yes
641  CURL_LIBS=`curl-config --libs`
642  CURLCFLAGS=`curl-config --cflags`
643  AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL])
[3424]644 else
[3423]645  have_curl=no
646 fi
647
648fi
649AC_SUBST(CURL_LIBS)
650AC_SUBST(CURL_CFLAGS)
651AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes)
652
[3863]653#--------#
654# efence #
655#--------#
656if test x$def_efence = xyes ; then
[5276]657  AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"])
658   if test x$FOUND_efence != xyes ; then
659     echo "efence was requested, but is not installed!! going on"
[3863]660   fi
[4555]661
[3863]662fi
663
[5276]664#-----#
665# GTK #
666#-----#
667if test x$def_gtk = xyes; then
668#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
669        AC_MSG_CHECKING([for gtk2.0])
670        if `$PKG_CONFIG --exists gtk+-2.0`; then
671                echo "yes"
672                have_gtk2=yes
673                GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
674                GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
675                AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2])
676                if test $DEBUG -ge 3; then
677                 echo "cflags: $GTK2_CFLAGS"
678                 echo "libs: $GTK2_LIBS"
679                fi
680        else
681                echo "no"
682        fi
683
684fi
685AC_SUBST(GTK2_LIBS)
686AC_SUBST(GTK2_CFLAGS)
687AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
688
689
[1945]690# FIXME: Replace `main' with a function in `-lm':
[2968]691 AC_CHECK_LIB([m], [main])
[1945]692
[4555]693
[1945]694# Checks for header files.
695AC_HEADER_STDC
696AC_CHECK_HEADERS([stdlib.h string.h])
697
698# Checks for typedefs, structures, and compiler characteristics.
699AC_HEADER_STDBOOL
700
701# Checks for library functions.
702AC_FUNC_MALLOC
703AC_CHECK_FUNCS([bzero sqrt])
704
[3424]705######################
706## OUTPUT CONFIGURE ##
707######################
[1946]708AC_CONFIG_FILES([Makefile
[3377]709                 src/Makefile
[4555]710                 src/lib/Makefile
711                 src/lib/graphics/Makefile
712                 src/lib/graphics/importer/Makefile
[4789]713                 src/lib/graphics/spatial_separation/Makefile
[4555]714                 src/lib/sound/Makefile
715                 src/lib/event/Makefile
716                 src/lib/physics/Makefile
717                 src/lib/particles/Makefile
718                 src/lib/collision_detection/Makefile
[5160]719                 src/lib/shell/Makefile
[4555]720                 src/lib/gui/Makefile
[5467]721                 src/lib/gui/gtk_gui/Makefile
722                 src/lib/gui/gl_gui/Makefile
[4265]723                 src/lib/tinyxml/Makefile
[5350]724                 src/util/Makefile
[4662]725                 src/subprojects/Makefile
[4555]726                 src/subprojects/testmain/Makefile
727                 src/subprojects/importer/Makefile
728                 src/subprojects/particles/Makefile
729                 src/subprojects/collision_detection/Makefile
730                 ])
[3377]731
[1945]732AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.