Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: compiles on tardis with flag —with-tardis

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