Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/shared_lib/configure.ac @ 7186

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

added libtool

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