Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5478 was 5478, checked in by bensch, 18 years ago

orxonox/trunk: find the GTK-path itself

File size: 22.0 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
217GTKPATH=""
218AC_MSG_CHECKING([convenience flag for working at the taris in the ETH zurich])
219AC_ARG_WITH([tardis],
220        AC_HELP_STRING( [--with-tardis],
221        [sets all the necesary environment flags for linux-TARDIS boxes at the ETH Zurich]), [def_tardis=yes])
222if test x$def_tardis = xyes; then
223  ARCH=i686-debian-linux3.1
224   ## GAMELIBS
225  PREFIX=/usr/pack/gamelibs-1.0-to
226  CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include"
227  LDFLAGS="${LDFLAGS} -L$PREFIX/${ARCH}/lib -Wl,-rpath -Wl,${PREFIX}/${ARCH}/lib"
228  ## GTK
229  GTKPREFIX=/usr/pack/gtk-2.8.3-mo
230  GTKPATH=${GTKPREFIX}/${ARCH}/bin
231  CPPFLAGS="${CPPFLAGS} -I${GTKPREFIX}/include"
232  LDFLAGS="${LDFLAGS} -L${GTKPREFIX}/${ARCH}/lib -Wl,-rpath -Wl,${GTKPREFIX}/${ARCH}/lib"
233  echo "yes"
234fi
235if test x$def_tardis = xno; then
236  echo "no"
237fi
238
239#######################
240## PROGRAMM CHECKING ##
241## 3. party Programs ##
242#######################
243
244#----------------------#
245# checking for Doxygen #
246#----------------------#
247AC_PATH_PROG(DOXYGEN, doxygen)
248AM_CONDITIONAL(DOXYGEN, test $DOXYGEN)
249
250#--------------------#
251# checking for gprof #
252#--------------------#
253AC_PATH_PROG(GPROF, gprof)
254
255#-------------------------#
256# checking for pkg-config #
257#-------------------------#
258if test x$def_gtk = xyes; then
259 if test x${GTKPATH} != x; then
260   AC_PATH_PROG([PKG_CONFIG], [pkg-config],[], $GTKPATH )
261 else
262   AC_PATH_PROG(PKG_CONFIG, pkg-config )
263 fi
264fi
265
266
267#########################
268## CHECKING FOR SYSTEM ##
269#########################
270## here the system is checked, and openGL is included
271## also checking for SDL on differen Systems
272
273AC_MSG_CHECKING([for System])
274## checking for openGL-environment and other sys-specific parameters
275case "$target" in
276
277###########
278#---------#
279# WINDOWS #
280#---------#
281###########
282  *-*-mingw32*)
283echo "mingw-WINDOWS detected"
284
285CPPFLAGS="-I/usr/include -I/mingw/include $CPPFLAGS"
286
287    mingw="yes"
288    MSBITFIELDS="-mms-bitfields"
289    MWINDOWS="-mwindows"
290
291#--------#
292# MIN-GW #
293#--------#
294# checking for mingw32
295    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
296    if test x$FOUND_mingw32 = xyes; then
297        LIBS="$LIBS -lmingw32"
298    fi
299
300#---------------#
301# open-GL (win) #
302#---------------#
303# checking gl header
304   AC_CHECK_HEADERS(GL/gl.h ,,
305      [AC_MSG_ERROR([cannot find opengl headers])])
306#   checking for Windows openGl library
307    AC_CHECK_LIB([opengl32], [main], [FOUND_GL=yes; LIBS="$LIBS -lopengl32"])
308    if test x$FOUND_GL != xyes ; then
309         echo "------------------"
310         echo "opengl not found."
311         echo "please install the opengl package which can be found at http://www.opengl.org"
312         echo "------------------"
313         exit -1
314    fi
315
316# cheking for GLU-header
317    AC_CHECK_HEADERS([GL/glu.h] ,,
318      [AC_MSG_ERROR([cannot find opengl headers]) ])
319
320# checking for libGLU
321    AC_CHECK_LIB([glu32], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU32"])
322    if test x$FOUND_GLU != xyes ; then
323         echo "------------------"
324         echo "GLU library not found."
325         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
326         echo "------------------"
327         exit -1
328    fi
329
330# checking glew header
331   AC_CHECK_HEADERS(GL/glew.h ,,
332      [AC_MSG_ERROR([cannot find opengl extension wrangler headers]) ])
333#   checking for Windows glew library
334    AC_CHECK_LIB([glew32], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lglew32"])
335    if test x$FOUND_GLEW != xyes ; then
336         echo "------------------"
337         echo "opengl extension wrangler not found."
338         echo "please install the glew package which can be found at http://glew.sourceforge.net"
339         echo "------------------"
340         exit -1
341    fi
342
343#--------#
344# openAL #
345#--------#
346# checking for openAL-headers
347  AC_CHECK_HEADERS([AL/al.h] ,,
348      [AC_MSG_ERROR([cannot find openAL header.])])
349# checking for openAL-lib
350  AC_CHECK_LIB([OpenAL32], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lOpenAL32"])
351  AC_CHECK_LIB([ALut], [main], [FOUND_ALUT=yes; LIBS="-lALut $LIBS"])
352     if test x$FOUND_OPENAL != xyes ; then
353        echo "------------------"
354        echo "openal library not found."
355        echo "please install the openal library, which can be found at http://www.openal.org"
356        echo "------------------"
357        exit -1
358     fi
359
360
361#-----------#
362# SDL(win) #
363#-----------#
364# checking for SDL-headers
365    AC_CHECK_HEADERS([SDL/SDL.h] ,,
366      [AC_MSG_ERROR([cannot find SDL headers]) ])
367
368#checking for libSDL
369    AC_CHECK_LIB([sdlmain], [main], [FOUND_sdlmain=yes; LIBS="$LIBS -lsdlmain"])
370    if test x$FOUND_sdlmain != xyes ; then
371        echo "------------------"
372        echo "SDL library not found."
373        echo "please install the SDL library, which can be found at http://www.libsdl.org"
374        echo "------------------"
375        exit 1
376    fi
377    AC_CHECK_LIB([sdl], [main], [FOUND_SDL=yes; LIBS="$LIBS -lsdl"])
378    if test x$FOUND_SDL != xyes ; then
379        echo "------------------"
380        echo "SDL library not found."
381        echo "please install the SDL library, which can be found at http://www.libsdl.org"
382        echo "------------------"
383        exit -1
384    fi
385
386  ;;
387
388#########
389#-------#
390# LINUX #
391#-------#
392#########
393 *-*-linux*)
394echo "Linux detected"
395
396 Linux="yes"
397
398##CPPFLAGS="-I/usr/include $CPPFLAGS"
399##LDFLAGS="-L/usr/lib $LDFLAGS"
400if test x$SHARED_LIB_PATH != xno; then
401        echo "setting new LDFLAGS with $SHARED_LIB_PATH"
402        LDFLAGS="-Wl,-rpath,$SHARED_LIB_PATH -L$SHARED_LIB_PATH $LDFLAGS"
403fi
404
405#--------#
406# openGL #
407#--------#
408# checking gl header
409   AC_CHECK_HEADERS([GL/gl.h] ,,
410      [AC_MSG_ERROR([cannot find opengl headers]) ])
411
412#  checking for Unix GL
413   AC_CHECK_LIB([GL], [main], [FOUND_GL=yes; LIBS="$LIBS -lGL"])
414   if test x$FOUND_GL != xyes ; then
415         echo "------------------"
416         echo "opengl not found."
417         echo "please install the opengl package which can be found at http://www.opengl.org"
418         echo "------------------"
419         exit -1
420   fi
421
422# cheking for GLU-header
423    AC_CHECK_HEADERS([GL/glu.h] ,,
424      [AC_MSG_ERROR([cannot find opengl headers]) ])
425    AC_CHECK_LIB([GLU], [main], [FOUND_GLU=yes; LIBS="$LIBS -lGLU"])
426    if test x$FOUND_GLU != xyes ; then
427         echo "------------------"
428         echo "GLU library not found."
429         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
430         echo "------------------"
431         exit -1
432    fi
433
434# checking for GLEW-headers
435   AC_CHECK_HEADERS([GL/glew.h] ,,
436      [AC_MSG_ERROR([cannot find glew headers]) ])
437# checking for GLEW-lib
438  AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"])
439   if test x$FOUND_GLEW != xyes ; then
440         echo "------------------"
441         echo "glew not found."
442         echo "please install the glew package which can be found at http://glew.sourceforge.net"
443         echo "------------------"
444         exit -1
445   fi
446
447#--------#
448# openAL #
449#--------#
450# checking for openAL-headers
451  AC_CHECK_HEADERS([AL/al.h] ,,
452      [AC_MSG_ERROR([cannot find openAL header.])])
453# checking for openAL-lib
454  AC_CHECK_LIB([openal], [main], [FOUND_OPENAL=yes; LIBS="$LIBS -lopenal"])
455     if test x$FOUND_OPENAL != xyes ; then
456        echo "------------------"
457        echo "openal library not found."
458        echo "please install the openal library, which can be found at http://www.openal.org"
459        echo "------------------"
460        exit -1
461     fi
462# checking for alut
463  AC_CHECK_HEADERS([AL/alut.h] ,,
464      [AC_MSG_ERROR([cannot find openAL Utility Toolkit (alut) header.])])
465  AC_CHECK_LIB([alut], [main], [FOUND_ALUT=yes; LIBS="-lalut $LIBS"])
466
467#-----#
468# SDL #
469#-----#
470# checking for SDL
471  AC_MSG_CHECKING([for SDL-version])
472  SDL_VERSION=`sdl-config --version`
473  echo $SDL_VERSION
474
475   CPPFLAGS="$CPPFLAGS `sdl-config --cflags`"
476   AC_CHECK_HEADERS([SDL.h] ,,
477      [AC_CHECK_HEADERS([SDL/SDL.h] ,,AC_MSG_ERROR([cannot find SDL header. please download from libsdl.org])]))
478   LIBS="`sdl-config --libs` $LIBS"
479   AC_CHECK_LIB([SDL], [main], [FOUND_SDL=yes])
480    if test x$FOUND_SDL != xyes ; then
481        echo "------------------"
482        echo "SDL library not found."
483        echo "please install the SDL library, which can be found at http://www.libsdl.org"
484        echo "------------------"
485        exit -1
486     fi
487
488    ;;
489
490#############
491#-----------#
492# MAC -OS X #
493#-----------#
494#############
495 *darwin*)
496 echo "OS X detected"
497
498 osX="yes"
499
500 CPPFLAGS="-I/sw/include -I/sw/include $CPPFLAGS"
501 LDFLAGS="$LDFLAGS -L/sw/lib"
502# checking gl header
503   AC_CHECK_HEADERS([OpenGL/gl.h] ,,
504      [AC_MSG_ERROR([cannot find opengl headers]) ])
505# cheking for GLU-header
506    AC_CHECK_HEADERS([OpenGL/glu.h] ,,
507      [AC_MSG_ERROR([cannot find opengl headers]) ])
508
509   LIBS="$LIBS -framework OpenGL"
510
511
512
513# checking for GLEW-headers
514   AC_CHECK_HEADERS([GL/glew.h] ,,
515      [AC_MSG_ERROR([cannot find glew headers]) ])
516# checking for GLEW-lib
517  AC_CHECK_LIB([GLEW], [main], [FOUND_GLEW=yes; LIBS="$LIBS -lGLEW"])
518   if test x$FOUND_GLEW != xyes ; then
519         echo "------------------"
520         echo "glew not found."
521         echo "please install the glew package which can be found at http://glew.sourceforge.net"
522         echo "------------------"
523         exit -1
524   fi
525
526
527   AC_CHECK_HEADERS([OpenAL/al.h] ,,
528      [AC_MSG_ERROR([cannot find opengl headers]) ])
529  HAVE_OPENAL=yes
530  LIBS="$LIBS -framework OpenAL"
531
532
533## SDL-check
534       SDL_CFLAGS=`sdl-config --cflags`
535       SDL_LIBS=`sdl-config --libs`
536       CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
537       LIBS="$LIBS $SDL_LIBS"
538   AC_CHECK_HEADERS([SDL/SDL.h] ,,
539      [AC_MSG_ERROR([cannot find SDL headers]) ])
540   HAVE_SDL=yes
541#   LIBS="$LIBS -framework SDL"
542
543# checking for SDL-headers
544#    AC_CHECK_HEADERS(SDL/SDL.h ,,
545#      [AC_MSG_ERROR([cannot find SDL headers]) ])
546
547## checking for SDL
548#    SDL_VERSION=1.2.7
549#    AM_PATH_SDL($SDL_VERSION,
550#      :,
551#      AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
552#      )
553
554
555    ;;
556
557  *)
558    ;;
559esac
560
561AC_SUBST(MSBITFIELDS)
562
563###################################
564## CHECKING FOR HEADERS AND LIBS ##
565###################################
566
567#---------#
568# SDL_ttf #
569#---------#
570# checking for SDL_ttf-headers
571  AC_CHECK_HEADERS([SDL_ttf.h] ,,
572      [AC_CHECK_HEADERS([SDL/SDL_ttf.h] ,,AC_MSG_ERROR([cannot find SDL_ttf header.])]))
573# checking for SDL_ttf-lib
574  AC_CHECK_LIB([SDL_ttf], [TTF_OpenFont], [FOUND_SDL_ttf=yes; LIBS="$LIBS -lSDL_ttf"])
575     if test x$FOUND_SDL_ttf != xyes ; then
576        echo "------------------"
577        echo "SDL_ttf library not found."
578        echo "please install the SDL_ttf library, which can be found at http://www.libsdl.org/projects/SDL_ttf/"
579        echo "------------------"
580        exit -1
581     fi
582
583#-----------#
584# SDL_Image #
585#-----------#
586# checking for SDL_image-headers
587AC_CHECK_HEADERS([SDL_image.h] ,,
588    [AC_CHECK_HEADERS([SDL/SDL_image.h],, AC_MSG_ERROR([SDL_image header not found.]))])
589# checking for SDL_image-lib
590AC_CHECK_LIB([SDL_image], [main], [FOUND_SDL_image=yes; LIBS="$LIBS -lSDL_image"])
591   if test x$FOUND_SDL_image != xyes ; then
592      echo "------------------"
593      echo "SDL_image library not found."
594      echo "please install the SDL_image library, which can be found at http://www.l ibsdl.org/projects/SDL_image/"
595      echo "------------------"
596      exit -1
597   fi
598
599#-----#
600# ogg #
601#-----#
602# checking for ogg-headers
603  AC_CHECK_HEADERS([ogg/ogg.h] ,,
604      [AC_MSG_ERROR([cannot find ogg header.])])
605# checking for ogg-lib
606  AC_CHECK_LIB([ogg], [main], [FOUND_ogg=yes; LIBS="$LIBS -logg"])
607     if test x$FOUND_ogg != xyes ; then
608        echo "------------------"
609        echo "ogg library not found."
610        echo "please install the ogg library, which can be found at http://www.xiph.org/ogg/vorbis/index.html"
611        echo "------------------"
612        exit -1
613     fi
614
615#--------#
616# vorbis #
617#--------#
618# checking for vorbis-lib
619  AC_CHECK_LIB([vorbis], [main], [FOUND_vorbis=yes; LIBS="$LIBS -lvorbis"])
620     if test x$FOUND_vorbis != xyes ; then
621        echo "------------------"
622        echo "vorbis library not found."
623        echo "please install the vorbis library, which can be found at http://www.xiph.org/ogg/vorbis/index.html"
624        echo "------------------"
625        exit -1
626     fi
627
628#------------#
629# vorbisfile #
630#------------#
631# checking for vorbis-headers
632  AC_CHECK_HEADERS([vorbis/vorbisfile.h] ,,
633      [AC_MSG_ERROR([cannot find vorbisfile header.])])
634# checking for vorbisfile-lib
635  AC_CHECK_LIB([vorbisfile], [main], [FOUND_vorbisfile=yes; LIBS="$LIBS -lvorbisfile"])
636     if test x$FOUND_vorbisfile != xyes ; then
637        echo "------------------"
638        echo "vorbisfile library not found."
639        echo "please install the vorbisfile library, which can be found at http://www.xiph.org/ogg/vorbis/index.html"
640        echo "------------------"
641        exit -1
642     fi
643
644
645#---------#
646# libcURL #
647#---------#
648if test x$def_curl = xyes; then
649 AC_CHECK_HEADERS([curl/curl.h], [curlHeader=yes], [curlHeader=no])
650 AC_CHECK_LIB([curl], [main], [FOUND_curl=yes])
651 if test x$curlHeader = xyes & test x$FOUND_curl = xyes ; then
652  have_curl=yes
653  CURL_LIBS=`curl-config --libs`
654  CURLCFLAGS=`curl-config --cflags`
655  AC_DEFINE_UNQUOTED(HAVE_CURL, 1, [if we have CURL])
656 else
657  have_curl=no
658 fi
659
660fi
661AC_SUBST(CURL_LIBS)
662AC_SUBST(CURL_CFLAGS)
663AM_CONDITIONAL(HAVE_CURL, test x$have_curl = xyes)
664
665#--------#
666# efence #
667#--------#
668if test x$def_efence = xyes ; then
669  AC_CHECK_LIB([efence], [main], [FOUND_efence=yes; LIBS="$LIBS -lefence"])
670   if test x$FOUND_efence != xyes ; then
671     echo "efence was requested, but is not installed!! going on"
672   fi
673
674fi
675
676#-----#
677# GTK #
678#-----#
679if test x$def_gtk = xyes; then
680#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
681        AC_MSG_CHECKING([for gtk2.0])
682        if `$PKG_CONFIG --exists gtk+-2.0`; then
683                echo "yes"
684                have_gtk2=yes
685                GTK2_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
686                GTK2_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
687                AC_DEFINE_UNQUOTED(HAVE_GTK2, 1, [if we have GTK2])
688                if test $DEBUG -ge 3; then
689                 echo "cflags: $GTK2_CFLAGS"
690                 echo "libs: $GTK2_LIBS"
691                fi
692        else
693                echo "no"
694        fi
695
696fi
697AC_SUBST(GTK2_LIBS)
698AC_SUBST(GTK2_CFLAGS)
699AM_CONDITIONAL(HAVE_GTK2, test x$have_gtk2 = xyes)
700
701
702# FIXME: Replace `main' with a function in `-lm':
703 AC_CHECK_LIB([m], [main])
704
705
706# Checks for header files.
707AC_HEADER_STDC
708AC_CHECK_HEADERS([stdlib.h string.h])
709
710# Checks for typedefs, structures, and compiler characteristics.
711AC_HEADER_STDBOOL
712
713# Checks for library functions.
714AC_FUNC_MALLOC
715AC_CHECK_FUNCS([bzero sqrt])
716
717######################
718## OUTPUT CONFIGURE ##
719######################
720AC_CONFIG_FILES([Makefile
721                 src/Makefile
722                 src/lib/Makefile
723                 src/lib/graphics/Makefile
724                 src/lib/graphics/importer/Makefile
725                 src/lib/graphics/spatial_separation/Makefile
726                 src/lib/sound/Makefile
727                 src/lib/event/Makefile
728                 src/lib/physics/Makefile
729                 src/lib/particles/Makefile
730                 src/lib/collision_detection/Makefile
731                 src/lib/shell/Makefile
732                 src/lib/gui/Makefile
733                 src/lib/gui/gtk_gui/Makefile
734                 src/lib/gui/gl_gui/Makefile
735                 src/lib/tinyxml/Makefile
736                 src/util/Makefile
737                 src/subprojects/Makefile
738                 src/subprojects/testmain/Makefile
739                 src/subprojects/importer/Makefile
740                 src/subprojects/particles/Makefile
741                 src/subprojects/collision_detection/Makefile
742                 ])
743
744AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.