Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 5273 was 5272, checked in by bensch, 20 years ago

orxonox/trunk: check for glew should be ok now

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